From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id SLc/OTzR+V9cFAAA0tVLHw (envelope-from ) for ; Sat, 09 Jan 2021 15:52:28 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id em8NNTzR+V90UwAAB5/wlQ (envelope-from ) for ; Sat, 09 Jan 2021 15:52:28 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 71F169403A9 for ; Sat, 9 Jan 2021 15:52:28 +0000 (UTC) Received: from localhost ([::1]:55632 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kyGXT-0004SA-CC for larch@yhetil.org; Sat, 09 Jan 2021 10:52:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54932) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kyGX4-0004QE-ER for guix-patches@gnu.org; Sat, 09 Jan 2021 10:52:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:40925) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kyGX4-0000W5-6t for guix-patches@gnu.org; Sat, 09 Jan 2021 10:52:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kyGX4-0000go-6I for guix-patches@gnu.org; Sat, 09 Jan 2021 10:52:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#45742] [PATCH] gnu: Add x86emu. Resent-From: Tobias Geerinckx-Rice Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 09 Jan 2021 15:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45742 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Vincent Legoll X-Debbugs-Original-Cc: 45742@debbugs.gnu.org, guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16102074832602 (code B ref -1); Sat, 09 Jan 2021 15:52:02 +0000 Received: (at submit) by debbugs.gnu.org; 9 Jan 2021 15:51:23 +0000 Received: from localhost ([127.0.0.1]:52471 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kyGWR-0000ft-3Q for submit@debbugs.gnu.org; Sat, 09 Jan 2021 10:51:23 -0500 Received: from lists.gnu.org ([209.51.188.17]:48070) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kyGWP-0000fm-OJ for submit@debbugs.gnu.org; Sat, 09 Jan 2021 10:51:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54830) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kyGWP-0003ik-GF for guix-patches@gnu.org; Sat, 09 Jan 2021 10:51:21 -0500 Received: from tobias.gr ([2a02:c205:2020:6054::1]:60752) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kyGWN-0000Bg-Bn for guix-patches@gnu.org; Sat, 09 Jan 2021 10:51:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tobias.gr; s=2018; bh=7KzMxwOHNnrD1LFu810QZJNwYxPkcR53iIi/W/eovLY=; h=date:in-reply-to: references:subject:cc:to:from; b=XW6N3C3RVhe3YZrvkYannRfxRxvBjOzLumtwQ kUKXaoA3sRcoIrQFSbmwQB1sSg6emaJVO0+KSgU+KziVE1sCLjsA+oIOFyw+3xFBrZRoOz KkJkpG2k1imHAppgdSS+b3udoMEJZ7girWGF0TNb1Zca6GGCKwSqLGHlYD18OOqqPlZx1w EcKb/Ntl1Kybh/QAP/7j2/Qrhu+z/ZBTFWAE4wHBoa5QEjsV+ZGxMpJ1IClJ0qrnzovz/3 tpUtoTa4wZedLxZ3d3IYXYTmPSiBXMSeUfv8XMw4AzusDLvhypJRJCv3p3aqqU35GkLC2j 6JP1Fk5svN8zS49aM1UHsXuZA== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 7dcc8a3f (TLSv1.2:ECDHE-ECDSA-AES256-GCM-SHA384:256:NO); Sat, 9 Jan 2021 15:51:48 +0000 (UTC) BIMI-Selector: v=BIMI1; s=default; References: <20210109143038.1918-1-vincent.legoll@gmail.com> <874kjq6rgb.fsf@nckx> In-reply-to: <874kjq6rgb.fsf@nckx> Date: Sat, 09 Jan 2021 16:51:21 +0100 Message-ID: <871reu6rd2.fsf@nckx> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=2a02:c205:2020:6054::1; envelope-from=me@tobias.gr; helo=tobias.gr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 45742@debbugs.gnu.org Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Tobias Geerinckx-Rice , Tobias Geerinckx-Rice via Guix-patches From: Tobias Geerinckx-Rice via Guix-patches via X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -4.35 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=tobias.gr header.s=2018 header.b=XW6N3C3R; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 71F169403A9 X-Spam-Score: -4.35 X-Migadu-Scanner: scn0.migadu.com X-TUID: 6sQzUfwSl3Q0 --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: base64 VG9iaWFzIEdlZXJpbmNreC1SaWNlIOWGmemBk++8mg0KPiB0aGUgYXR0YWNoZWQgcGF0Y2gNCg0K --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-Add-x86emu.patch Content-Transfer-Encoding: quoted-printable From=206a74a2447e0e1f624903d468376542d785558986 Mon Sep 17 00:00:00 2001 From: Vincent Legoll Date: Sat, 9 Jan 2021 15:30:38 +0100 Subject: [PATCH] gnu: Add x86emu. * gnu/packages/emulators.scm (x86emu): New variable. Signed-off-by: Tobias Geerinckx-Rice =2D-- gnu/packages/emulators.scm | 62 ++++++++++++++++++++++++++++++++++++++ gnu/packages/linux.scm | 2 ++ 2 files changed, 64 insertions(+) diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm index 1d94090f48..785d464273 100644 =2D-- a/gnu/packages/emulators.scm +++ b/gnu/packages/emulators.scm @@ -13,6 +13,7 @@ ;;; Copyright =C2=A9 2019 David Wilson ;;; Copyright =C2=A9 2020 Jakub K=C4=85dzio=C5=82ka ;;; Copyright =C2=A9 2020 Christopher Howard +;;; Copyright =C2=A9 2021 Vincent Legoll ;;; ;;; This file is part of GNU Guix. ;;; @@ -2236,3 +2237,64 @@ framework based on QEMU.") "PPSSPP is a ``high-level'' emulator simulating the PSP operating system.") (license license:gpl2+))) + +(define-public x86emu + (let ((revision "0") + (commit "cbc65a99d0f7d291b7c72444b8afa71649d214c4")) + (package + (name "x86emu") + (version (git-version "0.0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/shift-crops/x86emu") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "16q69m5zb71pgwsw5w0ilkd0vqh0hrmgq10fqba3x604chb90a87"))= )) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; no tests + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'set-image-file-names + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (os (string-append out "/share/x86emu"))) + (substitute* "main.cpp" + (("sample/kernel\\.img|bios/(bios|crt0)\\.bin" file) + (string-append os "/" file))) + #t))) + (delete 'configure) ; no configure script + (replace 'build + ;; Also build the =E2=80=98os=E2=80=99 target with kernel & BIO= S images. + (lambda* (#:key inputs outputs #:allow-other-keys) + (invoke "make" "all"))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (os (string-append out "/share/x86emu"))) + (invoke "find") + (install-file "x86emu" bin) + (copy-recursively "include" (string-append out "/include")) + (for-each (lambda (file) + (install-file file (string-append os "/bios"))) + (find-files "bios" "\\.bin$")) + (for-each (lambda (file) + (install-file file (string-append os "/sample")= )) + (find-files "sample" "\\.img$")) + #t)))))) + (native-inputs + `(("nasm" ,nasm))) + (inputs + `(("glfw" ,glfw))) + (home-page "https://github.com/shift-crops/x86emu") + (synopsis "Simple x86 emulator") + (description + "x86emu is an emulator of the x86 architecture. It supports multiple= CPU +modes (16- and 32-bit, real/protected) and some devices. You can boot fro= m a +simulated floppy disk drive without DMA support and operate it with the mo= use +and keyboard. The package includes a light-weight BIOS and kernel image.") + (license license:expat)))) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 6c2556e91a..449258ad50 100644 =2D-- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -74,6 +74,7 @@ #:use-module (gnu packages acl) #:use-module (gnu packages admin) #:use-module (gnu packages algebra) + #:use-module (gnu packages assembly) #:use-module (gnu packages audio) #:use-module (gnu packages autotools) #:use-module (gnu packages backup) @@ -98,6 +99,7 @@ #:use-module (gnu packages gawk) #:use-module (gnu packages gcc) #:use-module (gnu packages gettext) + #:use-module (gnu packages gl) #:use-module (gnu packages glib) #:use-module (gnu packages golang) #:use-module (gnu packages gperf) =2D-=20 2.30.0 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCX/nQ+Q0cbWVAdG9iaWFz LmdyAAoJEA2w/4hPVW15YGABANvFCvALbxXSEvi6PmX+0q7EerENnXqXC7Gc2ghj XEGxAP9jrgV7NMVYfQRP2F82PDXs6e7eo5wGrQqt8puD0gJsDQ== =9xh/ -----END PGP SIGNATURE----- --==-=-=--