Package: guix-patches;
Reported by: Efraim Flashner <efraim <at> flashner.co.il>
Date: Mon, 13 May 2024 08:21:01 UTC
Severity: normal
Tags: patch
Done: Efraim Flashner <efraim <at> flashner.co.il>
To reply to this bug, email your comments to 70913 AT debbugs.gnu.org.
There is no need to reopen the bug first.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
guix-patches <at> gnu.org
:bug#70913
; Package guix-patches
.
(Mon, 13 May 2024 08:21:02 GMT) Full text and rfc822 format available.Efraim Flashner <efraim <at> flashner.co.il>
:guix-patches <at> gnu.org
.
(Mon, 13 May 2024 08:21:02 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Efraim Flashner <efraim <at> flashner.co.il> To: guix-patches <at> gnu.org Cc: Efraim Flashner <efraim <at> flashner.co.il> Subject: [PATCH 00/11] Combine edk2-tools and ovmf firmware Date: Mon, 13 May 2024 11:19:31 +0300
This patch set aims to combine the edk2-tools and the ovmf firmware sources, so that they're built out of the same sources and share the same version. I was able to test some of the system tests requiring the UEFI firmware for x86_64 after also applying the patch in bug#70912. I did some work to try to get the %test-gui-uefi-installed-os system test to pass on aarch64, but it's not quite there yet. In theory edk2-tools (and make-ovmf-firmware) should be more limited in the supported-systems, but I haven't made any changes there yet. Also, the ovmf-x86-64 and ovmf-i686 packages add CFLAGS that only allow it to be built on x86_64 or i686 systems, but I haven't investigated if it would be ok to remove those flags or if we should limit the supported-systems to those two. Efraim Flashner (11): gnu: edk2-tools: Update to 202402. gnu: edk2-tools: Enable submodules. gnu: Add ovmf-x86-64. gnu: Add ovmf-i686. gnu: ovmf-aarch64: Update to 202402. gnu: ovmf-arm: Update to 202402. gnu: ovmf-riscv64: Update to 202402. gnu: Use new ovmf firmware packages. tests: install: Add support for aarch64 UEFI tests. gnu: ovmf: Deprecate in favor of ovmf-x86-64. tests: install: Use a default qemu machine for arm architectures. doc/guix.texi | 2 +- gnu/packages/firmware.scm | 307 ++++++++++++++++---------------- gnu/packages/virtualization.scm | 2 +- gnu/tests/install.scm | 18 +- 4 files changed, 168 insertions(+), 161 deletions(-) base-commit: 109679cdfaab645d2f35afec9bf1cb1b0d24f767 -- Efraim Flashner <efraim <at> flashner.co.il> רנשלפ םירפא GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted
efraim <at> flashner.co.il, vagrant <at> debian.org, guix-patches <at> gnu.org
:bug#70913
; Package guix-patches
.
(Mon, 13 May 2024 08:24:02 GMT) Full text and rfc822 format available.Message #8 received at 70913 <at> debbugs.gnu.org (full text, mbox):
From: Efraim Flashner <efraim <at> flashner.co.il> To: 70913 <at> debbugs.gnu.org Cc: Efraim Flashner <efraim <at> flashner.co.il> Subject: [PATCH 01/11] gnu: edk2-tools: Update to 202402. Date: Mon, 13 May 2024 11:21:50 +0300
* gnu/packages/firmware.scm (edk2-tools): Update to 202402. Change-Id: I3ab7d75a8193faea2b3b3649f9b14bba48611187 --- gnu/packages/firmware.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index 6f0c2da806..62753e3769 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo <at> gnu.org> ;;; Copyright © 2016 Eric Bavier <bavier <at> member.fsf.org> ;;; Copyright © 2017 David Craven <david <at> craven.ch> -;;; Copyright © 2017, 2018, 2022, 2023 Efraim Flashner <efraim <at> flashner.co.il> +;;; Copyright © 2017, 2018, 2022-2024 Efraim Flashner <efraim <at> flashner.co.il> ;;; Copyright © 2018, 2020 Tobias Geerinckx-Rice <me <at> tobias.gr> ;;; Copyright © 2018 Vagrant Cascadian <vagrant <at> debian.org> ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe <at> gmail.com> @@ -814,7 +814,7 @@ (define-public sgabios (define-public edk2-tools (package (name "edk2-tools") - (version "202308") + (version "202402") (source (origin (method git-fetch) (uri (git-reference @@ -823,7 +823,7 @@ (define-public edk2-tools (file-name (git-file-name name version)) (sha256 (base32 - "19g3g94hayvcwmn6sjs6mghq0qf5nsd785k5j8szcrj2p0vjh54f")))) + "1x0h89cz3ihihcp4n93bw708q9r3icprb8cjsrrfcgq10clavdzx")))) (build-system gnu-build-system) (arguments (list #:make-flags -- Efraim Flashner <efraim <at> flashner.co.il> רנשלפ םירפא GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted
efraim <at> flashner.co.il, vagrant <at> debian.org, guix-patches <at> gnu.org
:bug#70913
; Package guix-patches
.
(Mon, 13 May 2024 08:24:02 GMT) Full text and rfc822 format available.Message #11 received at 70913 <at> debbugs.gnu.org (full text, mbox):
From: Efraim Flashner <efraim <at> flashner.co.il> To: 70913 <at> debbugs.gnu.org Cc: Efraim Flashner <efraim <at> flashner.co.il> Subject: [PATCH 02/11] gnu: edk2-tools: Enable submodules. Date: Mon, 13 May 2024 11:21:51 +0300
* gnu/packages/firmware.scm (edk2-tools)[source]: Checkout submodules. [arguments]: Don't disable building brotli or xz compression. Change-Id: I8b318373e38767e1a309e9e385f1626429bfbb20 --- gnu/packages/firmware.scm | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index 62753e3769..f3bb51bcb1 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -819,11 +819,13 @@ (define-public edk2-tools (method git-fetch) (uri (git-reference (url "https://github.com/tianocore/edk2") - (commit (string-append "edk2-stable" version)))) + (commit (string-append "edk2-stable" version)) + ;; EDK2 makes extensive use of submodules. + (recursive? #t))) (file-name (git-file-name name version)) (sha256 (base32 - "1x0h89cz3ihihcp4n93bw708q9r3icprb8cjsrrfcgq10clavdzx")))) + "0y7jfpijgi099znhzjklnsczn0k0vm1d1qznq9x2a2sa0glydsin")))) (build-system gnu-build-system) (arguments (list #:make-flags @@ -835,15 +837,6 @@ (define-public edk2-tools (add-after 'unpack 'change-directory (lambda _ (chdir "BaseTools"))) - (add-after 'change-directory 'disable-some-tools - (lambda _ - ;; Disable building brotli and xz, since we package them - ;; separately, and it would require fetching submodules. - (substitute* "Source/C/GNUmakefile" - (("^[[:blank:]]+BrotliCompress[[:blank:]]+\\\\") - "\\") - (("^[[:blank:]]+LzmaCompress[[:blank:]]+\\\\") - "\\")))) (replace 'build (lambda* (#:key (make-flags #~'()) #:allow-other-keys) ;; The default build target also runs tests. -- Efraim Flashner <efraim <at> flashner.co.il> רנשלפ םירפא GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted
efraim <at> flashner.co.il, vagrant <at> debian.org, guix-patches <at> gnu.org
:bug#70913
; Package guix-patches
.
(Mon, 13 May 2024 08:25:01 GMT) Full text and rfc822 format available.Message #14 received at 70913 <at> debbugs.gnu.org (full text, mbox):
From: Efraim Flashner <efraim <at> flashner.co.il> To: 70913 <at> debbugs.gnu.org Cc: Efraim Flashner <efraim <at> flashner.co.il> Subject: [PATCH 04/11] gnu: Add ovmf-i686. Date: Mon, 13 May 2024 11:21:53 +0300
* gnu/packages/firmware.scm (ovmf-i686): New variable. Change-Id: Ie5702435695e24ed1d2731152a89b0aeb9a050dd --- gnu/packages/firmware.scm | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index 40ca541437..ab39f8d0d2 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -1002,6 +1002,28 @@ (define-public ovmf-x86-64 "OVMF_CODE" "OVMF_VARS")))))))))))) +(define-public ovmf-i686 + (let ((base (make-ovmf-firmware "i686"))) + (package + (inherit base) + (arguments + (substitute-keyword-arguments (package-arguments base) + ((#:phases phases) + #~(modify-phases #$phases + (replace 'install + (lambda _ + (let ((fmw (string-append #$output "/share/firmware"))) + (mkdir-p fmw) + (for-each + (lambda (file) + (copy-file + (string-append "Build/OvmfIa32/RELEASE_GCC" + "/FV/" file ".fd") + (string-append fmw "/" (string-downcase file) "_ia32.bin"))) + (list "OVMF" + "OVMF_CODE" + "OVMF_VARS")))))))))))) + (define-public ovmf (let ((toolchain-ver "GCC5")) (package -- Efraim Flashner <efraim <at> flashner.co.il> רנשלפ םירפא GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted
efraim <at> flashner.co.il, vagrant <at> debian.org, guix-patches <at> gnu.org
:bug#70913
; Package guix-patches
.
(Mon, 13 May 2024 08:25:02 GMT) Full text and rfc822 format available.Message #17 received at 70913 <at> debbugs.gnu.org (full text, mbox):
From: Efraim Flashner <efraim <at> flashner.co.il> To: 70913 <at> debbugs.gnu.org Cc: Efraim Flashner <efraim <at> flashner.co.il> Subject: [PATCH 05/11] gnu: ovmf-aarch64: Update to 202402. Date: Mon, 13 May 2024 11:21:54 +0300
* gnu/packages/firmware.scm (ovmf-aarch64): Update to 202402. Build using make-ovmf-firmware. Change-Id: I270bd8fa79f2df3d73bdf8d5685d27a3cc0cef6a --- gnu/packages/firmware.scm | 51 ++++++++++++--------------------------- 1 file changed, 16 insertions(+), 35 deletions(-) diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index ab39f8d0d2..ae11c82d1a 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -1024,6 +1024,22 @@ (define-public ovmf-i686 "OVMF_CODE" "OVMF_VARS")))))))))))) +(define-public ovmf-aarch64 + (let ((base (make-ovmf-firmware "aarch64"))) + (package + (inherit base) + (arguments + (substitute-keyword-arguments (package-arguments base) + ((#:phases phases) + #~(modify-phases #$phases + (replace 'install + (lambda _ + (let ((fmw (string-append #$output "/share/firmware"))) + (mkdir-p fmw) + (copy-file (string-append "Build/ArmVirtQemu-AARCH64/" + "RELEASE_GCC/FV/QEMU_EFI.fd") + (string-append fmw "/ovmf_aarch64.bin")))))))))))) + (define-public ovmf (let ((toolchain-ver "GCC5")) (package @@ -1124,41 +1140,6 @@ (define-public ovmf (license (list license:expat license:bsd-2 license:bsd-3 license:bsd-4))))) -(define-public ovmf-aarch64 - (let ((toolchain-ver "GCC5")) - (package - (inherit ovmf) - (name "ovmf-aarch64") - (native-inputs - (append (package-native-inputs ovmf) - (if (not (string-prefix? "aarch64" (%current-system))) - `(("cross-gcc" ,(cross-gcc "aarch64-linux-gnu")) - ("cross-binutils" ,(cross-binutils "aarch64-linux-gnu"))) - '()))) - (arguments - (substitute-keyword-arguments (package-arguments ovmf) - ((#:phases phases) - #~(modify-phases #$phases - #$@(if (string-prefix? "aarch64" (%current-system)) - '() - #~((add-before 'configure 'set-env - (lambda _ - (setenv (string-append #$toolchain-ver "_AARCH64_PREFIX") - "aarch64-linux-gnu-"))))) - (replace 'build - (lambda _ - (invoke "build" "-a" "AARCH64" "-t" #$toolchain-ver - "-p" "ArmVirtPkg/ArmVirtQemu.dsc"))) - (delete 'build-x64) - (replace 'install - (lambda _ - (let ((fmw (string-append #$output "/share/firmware"))) - (mkdir-p fmw) - (copy-file (string-append "Build/ArmVirtQemu-AARCH64/RELEASE_" - #$toolchain-ver "/FV/QEMU_EFI.fd") - (string-append fmw "/ovmf_aarch64.bin"))))))))) - (supported-systems %supported-systems)))) - (define-public ovmf-arm (let ((toolchain-ver "GCC5")) (package -- Efraim Flashner <efraim <at> flashner.co.il> רנשלפ םירפא GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted
efraim <at> flashner.co.il, vagrant <at> debian.org, guix-patches <at> gnu.org
:bug#70913
; Package guix-patches
.
(Mon, 13 May 2024 08:25:02 GMT) Full text and rfc822 format available.Message #20 received at 70913 <at> debbugs.gnu.org (full text, mbox):
From: Efraim Flashner <efraim <at> flashner.co.il> To: 70913 <at> debbugs.gnu.org Cc: Efraim Flashner <efraim <at> flashner.co.il> Subject: [PATCH 06/11] gnu: ovmf-arm: Update to 202402. Date: Mon, 13 May 2024 11:21:55 +0300
* gnu/packages/firmware.scm (ovmf-arm): Update to 202402. Build using make-ovmf-firmware. Change-Id: I1adf1afc9ceb29db373c2e0d05d42a3c68232cb5 --- gnu/packages/firmware.scm | 52 +++++++++++++-------------------------- 1 file changed, 17 insertions(+), 35 deletions(-) diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index ae11c82d1a..f660c21712 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -1040,6 +1040,23 @@ (define-public ovmf-aarch64 "RELEASE_GCC/FV/QEMU_EFI.fd") (string-append fmw "/ovmf_aarch64.bin")))))))))))) +(define-public ovmf-arm + (let ((base (make-ovmf-firmware "armhf"))) + (package + (inherit base) + (name "ovmf-arm") + (arguments + (substitute-keyword-arguments (package-arguments base) + ((#:phases phases) + #~(modify-phases #$phases + (replace 'install + (lambda _ + (let ((fmw (string-append #$output "/share/firmware"))) + (mkdir-p fmw) + (copy-file (string-append "Build/ArmVirtQemu-ARM/" + "RELEASE_GCC/FV/QEMU_EFI.fd") + (string-append fmw "/ovmf_arm.bin")))))))))))) + (define-public ovmf (let ((toolchain-ver "GCC5")) (package @@ -1140,41 +1157,6 @@ (define-public ovmf (license (list license:expat license:bsd-2 license:bsd-3 license:bsd-4))))) -(define-public ovmf-arm - (let ((toolchain-ver "GCC5")) - (package - (inherit ovmf) - (name "ovmf-arm") - (native-inputs - (append (package-native-inputs ovmf) - (if (not (string-prefix? "armhf" (%current-system))) - `(("cross-gcc" ,(cross-gcc "arm-linux-gnueabihf")) - ("cross-binutils" ,(cross-binutils "arm-linux-gnueabihf"))) - '()))) - (arguments - (substitute-keyword-arguments (package-arguments ovmf) - ((#:phases phases) - #~(modify-phases #$phases - #$@(if (string-prefix? "armhf" (%current-system)) - '() - #~((add-before 'configure 'set-env - (lambda _ - (setenv (string-append #$toolchain-ver "_ARM_PREFIX") - "arm-linux-gnueabihf-"))))) - (replace 'build - (lambda _ - (invoke "build" "-a" "ARM" "-t" #$toolchain-ver - "-p" "ArmVirtPkg/ArmVirtQemu.dsc"))) - (delete 'build-x64) - (replace 'install - (lambda _ - (let ((fmw (string-append #$output "/share/firmware"))) - (mkdir-p fmw) - (copy-file (string-append "Build/ArmVirtQemu-ARM/RELEASE_" - #$toolchain-ver "/FV/QEMU_EFI.fd") - (string-append fmw "/ovmf_arm.bin"))))))))) - (supported-systems %supported-systems)))) - (define-public ovmf-riscv64 (let ((toolchain-ver "GCC5")) (package -- Efraim Flashner <efraim <at> flashner.co.il> רנשלפ םירפא GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted
efraim <at> flashner.co.il, vagrant <at> debian.org, guix-patches <at> gnu.org
:bug#70913
; Package guix-patches
.
(Mon, 13 May 2024 08:25:03 GMT) Full text and rfc822 format available.Message #23 received at 70913 <at> debbugs.gnu.org (full text, mbox):
From: Efraim Flashner <efraim <at> flashner.co.il> To: 70913 <at> debbugs.gnu.org Cc: Efraim Flashner <efraim <at> flashner.co.il> Subject: [PATCH 07/11] gnu: ovmf-riscv64: Update to 202402. Date: Mon, 13 May 2024 11:21:56 +0300
* gnu/packages/firmware.scm (ovmf-riscv64): Update to 202402. Build using make-ovmf-firmware. Change-Id: I1a7dcaac3975669a61723b929162ad33affa1619 --- gnu/packages/firmware.scm | 54 ++++++++++++--------------------------- 1 file changed, 16 insertions(+), 38 deletions(-) diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index f660c21712..b0638382cb 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -1057,6 +1057,22 @@ (define-public ovmf-arm "RELEASE_GCC/FV/QEMU_EFI.fd") (string-append fmw "/ovmf_arm.bin")))))))))))) +(define-public ovmf-riscv64 + (let ((base (make-ovmf-firmware "riscv64"))) + (package + (inherit base) + (arguments + (substitute-keyword-arguments (package-arguments base) + ((#:phases phases) + #~(modify-phases #$phases + (replace 'install + (lambda _ + (let ((fmw (string-append #$output "/share/firmware"))) + (mkdir-p fmw) + (with-directory-excursion "Build/RiscVVirtQemu/RELEASE_GCC/FV" + (install-file "RISCV_VIRT_CODE.fd" fmw) + (install-file "RISCV_VIRT_VARS.fd" fmw)))))))))))) + (define-public ovmf (let ((toolchain-ver "GCC5")) (package @@ -1157,44 +1173,6 @@ (define-public ovmf (license (list license:expat license:bsd-2 license:bsd-3 license:bsd-4))))) -(define-public ovmf-riscv64 - (let ((toolchain-ver "GCC5")) - (package - (inherit ovmf) - (name "ovmf-riscv64") - (native-inputs - (append (package-native-inputs ovmf) - (if (not (string-prefix? "riscv64" (%current-system))) - `(("cross-gcc" ,(cross-gcc "riscv64-linux-gnu")) - ("cross-binutils" ,(cross-binutils "riscv64-linux-gnu"))) - '()))) - (arguments - (substitute-keyword-arguments (package-arguments ovmf) - ((#:phases phases) - #~(modify-phases #$phases - #$@(if (string-prefix? "riscv64" (%current-system)) - '() - #~((add-before 'configure 'set-env - (lambda _ - (setenv (string-append #$toolchain-ver "_RISCV64_PREFIX") - "riscv64-linux-gnu-"))))) - (replace 'build - (lambda _ - (invoke "build" "-a" "RISCV64" "-t" #$toolchain-ver - "-p" "OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc"))) - (delete 'build-x64) - (replace 'install - (lambda _ - (let ((fmw (string-append #$output "/share/firmware"))) - (mkdir-p fmw) - (copy-file (string-append "Build/RiscVVirtQemu/RELEASE_" - #$toolchain-ver "/FV/RISCV_VIRT_CODE.fd") - (string-append fmw "/RISCV_VIRT_CODE.fd")) - (copy-file (string-append "Build/RiscVVirtQemu/RELEASE_" - #$toolchain-ver "/FV/RISCV_VIRT_VARS.fd") - (string-append fmw "/RISCV_VIRT_VARS.fd"))))))))) - (supported-systems %supported-systems)))) - (define* (make-arm-trusted-firmware platform #:key (triplet "aarch64-linux-gnu")) (let ((native-build? (lambda () -- Efraim Flashner <efraim <at> flashner.co.il> רנשלפ םירפא GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted
pelzflorian <at> pelzflorian.de, ludo <at> gnu.org, matt <at> excalamus.com, guix-patches <at> gnu.org
:bug#70913
; Package guix-patches
.
(Mon, 13 May 2024 08:25:03 GMT) Full text and rfc822 format available.Message #26 received at 70913 <at> debbugs.gnu.org (full text, mbox):
From: Efraim Flashner <efraim <at> flashner.co.il> To: 70913 <at> debbugs.gnu.org Cc: Efraim Flashner <efraim <at> flashner.co.il> Subject: [PATCH 08/11] gnu: Use new ovmf firmware packages. Date: Mon, 13 May 2024 11:21:57 +0300
* doc/guix.texi (Invoking guix system): Update qemu command to use ovmf-x86-64. * gnu/packages/virtualization.scm (xen)[inputs]: Replace ovmf with ovmf-i686. * gnu/tests/install.scm (uefi-firmware): Use system appropriate ovmf firmware. Change-Id: Ia2ff76eaf766c8d4fb0be4a7cc7b8941574433d0 --- doc/guix.texi | 2 +- gnu/packages/virtualization.scm | 2 +- gnu/tests/install.scm | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index ce1a06747c..6058658996 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -42250,7 +42250,7 @@ Invoking guix system cp $image /tmp/my-image.qcow2 chmod +w /tmp/my-image.qcow2 qemu-system-x86_64 -enable-kvm -hda /tmp/my-image.qcow2 -m 1000 \ - -bios $(guix build ovmf)/share/firmware/ovmf_x64.bin + -bios $(guix build ovmf-x86-64)/share/firmware/ovmf_x64.bin @end example When using the @code{mbr-hybrid-raw} image type, a raw disk image is diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 34cccd6550..c701ae2d45 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -2670,7 +2670,7 @@ (define-public xen yajl ncurses openssl - ovmf + ovmf-i686 pixman qemu-minimal seabios diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm index 16da320000..6248faed9b 100644 --- a/gnu/tests/install.scm +++ b/gnu/tests/install.scm @@ -210,9 +210,9 @@ (define (uefi-firmware system) "Return the appropriate QEMU OVMF UEFI firmware for the given SYSTEM." (cond ((string-prefix? "x86_64" system) - (file-append ovmf "/share/firmware/ovmf_x64.bin")) + (file-append ovmf-x86-64 "/share/firmware/ovmf_x64.bin")) ((string-prefix? "i686" system) - (file-append ovmf "/share/firmware/ovmf_ia32.bin")) + (file-append ovmf-i686 "/share/firmware/ovmf_ia32.bin")) (else #f))) (define* (run-install target-os target-os-source -- Efraim Flashner <efraim <at> flashner.co.il> רנשלפ םירפא GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted
guix-patches <at> gnu.org
:bug#70913
; Package guix-patches
.
(Mon, 13 May 2024 08:25:04 GMT) Full text and rfc822 format available.Message #29 received at 70913 <at> debbugs.gnu.org (full text, mbox):
From: Efraim Flashner <efraim <at> flashner.co.il> To: 70913 <at> debbugs.gnu.org Cc: Efraim Flashner <efraim <at> flashner.co.il> Subject: [PATCH 09/11] tests: install: Add support for aarch64 UEFI tests. Date: Mon, 13 May 2024 11:21:58 +0300
* gnu/tests/install.scm (uefi-firmware): Add case for aarch64. Change-Id: I77a506f792790954a289eda5a7a395a2b37c19c7 --- gnu/tests/install.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm index 6248faed9b..90e1ca6e75 100644 --- a/gnu/tests/install.scm +++ b/gnu/tests/install.scm @@ -213,6 +213,8 @@ (define (uefi-firmware system) (file-append ovmf-x86-64 "/share/firmware/ovmf_x64.bin")) ((string-prefix? "i686" system) (file-append ovmf-i686 "/share/firmware/ovmf_ia32.bin")) + ((string-prefix? "aarch64" system) + (file-append ovmf-aarch64 "/share/firmware/ovmf_aarch64.bin")) (else #f))) (define* (run-install target-os target-os-source -- Efraim Flashner <efraim <at> flashner.co.il> רנשלפ םירפא GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted
efraim <at> flashner.co.il, vagrant <at> debian.org, guix-patches <at> gnu.org
:bug#70913
; Package guix-patches
.
(Mon, 13 May 2024 08:25:04 GMT) Full text and rfc822 format available.Message #32 received at 70913 <at> debbugs.gnu.org (full text, mbox):
From: Efraim Flashner <efraim <at> flashner.co.il> To: 70913 <at> debbugs.gnu.org Cc: Efraim Flashner <efraim <at> flashner.co.il> Subject: [PATCH 03/11] gnu: Add ovmf-x86-64. Date: Mon, 13 May 2024 11:21:52 +0300
* gnu/packages/firmware.scm (make-ovmf-firmware): New procedure. (ovmf-x86-64): New variable. Change-Id: I283065577b5507f3b7d695eaa67a6d248174bcf5 --- gnu/packages/firmware.scm | 133 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index f3bb51bcb1..40ca541437 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -869,6 +869,139 @@ (define-public edk2-tools @end itemize") (license license:bsd-2))) +(define* (make-ovmf-firmware arch) + (let ((toolchain "GCC") + (arch-string (match arch + ("x86_64" "X64") + ("i686" "IA32") + ("aarch64" "AARCH64") + ("armhf" "ARM") + ("riscv64" "RISCV64") + ("loongarch64" "LOONGARCH64") + (_ "NONE")))) + (package + (inherit edk2-tools) + (name (string-append "ovmf-" arch)) + (arguments + (list + #:tests? #f ; No check target. + #:target #f ; Package produces firmware. + #:modules '((guix build gnu-build-system) + (guix build utils) + (ice-9 match)) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-source + (lambda _ + (substitute* "edksetup.sh" + (("^return \\$\\?") + "exit $?")))) + (add-before 'configure 'set-env + (lambda _ + (unless (string-prefix? #$arch #$(%current-system)) + (setenv (string-append #$toolchain "_X64_PREFIX") + "x86_64-linux-gnu-") + (setenv (string-append #$toolchain "_IA32_PREFIX") + "i686-linux-gnu-") + (setenv (string-append #$toolchain "_AARCH64_PREFIX") + "aarch64-linux-gnu-") + (setenv (string-append #$toolchain "_ARM_PREFIX") + "arm-linux-gnueabihf-") + (setenv (string-append #$toolchain "_RISCV64_PREFIX") + "riscv64-linux-gnu-") + (setenv (string-append #$toolchain "_LOONGARCH64_PREFIX") + "loongarch64-linux-gnu-")))) + (replace 'configure + (lambda _ + (let* ((cwd (getcwd)) + (tools (string-append cwd "/BaseTools")) + (bin (string-append tools "/BinWrappers/PosixLike"))) + (setenv "WORKSPACE" cwd) + (setenv "EDK_TOOLS_PATH" tools) + (setenv "PYTHON3_ENABLE" "TRUE") + (setenv "PYTHON_COMMAND" "python3") + (setenv "PATH" (string-append (getenv "PATH") ":" bin)) + (invoke "bash" "edksetup.sh") + (substitute* "Conf/target.txt" + (("^TARGET[ ]*=.*$") "TARGET = RELEASE\n") + (("^TOOL_CHAIN_TAG[ ]*=.*$") + (string-append "TOOL_CHAIN_TAG = " #$toolchain "\n")) + (("^TARGET_ARCH[ ]*=.*$") + (string-append "TARGET_ARCH = " #$arch-string + "\n")) + (("^MAX_CONCURRENT_THREAD_NUMBER[ ]*=.*$") + (format #f "MAX_CONCURRENT_THREAD_NUMBER = ~a~%" + (number->string (parallel-job-count))))) + ;; Build build support. + (setenv "CC" "gcc") + (invoke "make" "-C" tools)))) + (replace 'build + (lambda _ + (invoke "build" "-a" #$arch-string "-t" #$toolchain "-p" + (match #$arch + ("x86_64" + "OvmfPkg/OvmfPkgX64.dsc") + ("i686" + "OvmfPkg/OvmfPkgIa32.dsc") + ((or "aarch64" "armhf") + "ArmVirtPkg/ArmVirtQemu.dsc") + ("riscv64" + "OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc") + (_ #t))))) + (add-before 'install 'install-efi-shell + (lambda _ + (let ((fmw (string-append #$output "/share/firmware"))) + (mkdir-p fmw) + (for-each + (lambda (file) + (copy-file file + (string-append fmw "/Shell_" + (string-downcase #$arch-string) + ".efi"))) + (find-files "Build" "Shell\\.efi")))))))) + (native-inputs + (append + (list acpica + nasm + perl + python-3 + (list util-linux "lib")) + (if (not (string-prefix? arch (%current-system))) + (if (string=? arch "armhf") + (list (cross-gcc "arm-linux-gnueabihf") + (cross-binutils "arm-linux-gnueabihf")) + (list (cross-gcc (string-append arch "-linux-gnu")) + (cross-binutils (string-append arch "-linux-gnu")))) + '()))) + (synopsis "UEFI firmware for QEMU") + (description "OVMF is an EDK II based project to enable UEFI support for +Virtual Machines. OVMF contains a sample UEFI firmware for QEMU and KVM.") + (license (list license:expat + license:bsd-2 license:bsd-3 license:bsd-4))))) + +(define-public ovmf-x86-64 + (let ((base (make-ovmf-firmware "x86_64"))) + (package + (inherit base) + (name "ovmf-x86-64") + (arguments + (substitute-keyword-arguments (package-arguments base) + ((#:phases phases) + #~(modify-phases #$phases + (replace 'install + (lambda _ + (let ((fmw (string-append #$output "/share/firmware"))) + (mkdir-p fmw) + (for-each + (lambda (file) + (copy-file + (string-append "Build/OvmfX64/RELEASE_GCC" + "/FV/" file ".fd") + (string-append fmw "/" (string-downcase file) "_x64.bin"))) + (list "OVMF" + "OVMF_CODE" + "OVMF_VARS")))))))))))) + (define-public ovmf (let ((toolchain-ver "GCC5")) (package -- Efraim Flashner <efraim <at> flashner.co.il> רנשלפ םירפא GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted
efraim <at> flashner.co.il, vagrant <at> debian.org, guix-patches <at> gnu.org
:bug#70913
; Package guix-patches
.
(Mon, 13 May 2024 08:25:04 GMT) Full text and rfc822 format available.Message #35 received at 70913 <at> debbugs.gnu.org (full text, mbox):
From: Efraim Flashner <efraim <at> flashner.co.il> To: 70913 <at> debbugs.gnu.org Cc: Efraim Flashner <efraim <at> flashner.co.il> Subject: [PATCH 10/11] gnu: ovmf: Deprecate in favor of ovmf-x86-64. Date: Mon, 13 May 2024 11:21:59 +0300
* gnu/packages/firmware.scm (ovmf): Deprecate package in favor of ovmf-x86-64. Change-Id: I912c2b122f80a7f3fd473b8d91ae6e714b27808f --- gnu/packages/firmware.scm | 100 +------------------------------------- 1 file changed, 2 insertions(+), 98 deletions(-) diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index b0638382cb..55f78c3da6 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -30,6 +30,7 @@ (define-module (gnu packages firmware) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix memoization) + #:use-module (guix deprecation) #:use-module (guix packages) #:use-module (guix platform) #:use-module (guix download) @@ -1074,104 +1075,7 @@ (define-public ovmf-riscv64 (install-file "RISCV_VIRT_VARS.fd" fmw)))))))))))) (define-public ovmf - (let ((toolchain-ver "GCC5")) - (package - (name "ovmf") - (version "202311") - (source (origin - (method git-fetch) - (uri (git-reference - ;; OVMF is part of the edk2 source tree. - (url "https://github.com/tianocore/edk2") - (recursive? #t) ;edk2 now uses a lot of submodules - (commit (string-append "edk2-stable" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "136dl5cxpjpg37whzlqq7jrrjsgybmwrgkbbmks8xaixqmzwhbw0")))) - (build-system gnu-build-system) - (arguments - (list - #:tests? #f ; No check target. - #:target #f ; Package produces firmware. - #:phases - #~(modify-phases %standard-phases - (add-after 'unpack 'patch-source - (lambda _ - (substitute* "edksetup.sh" - (("^return \\$\\?") - "exit $?")))) - (replace 'configure - (lambda _ - (let* ((cwd (getcwd)) - (tools (string-append cwd "/BaseTools")) - (bin (string-append tools "/BinWrappers/PosixLike"))) - (setenv "WORKSPACE" cwd) - (setenv "EDK_TOOLS_PATH" tools) - (setenv "PYTHON3_ENABLE" "TRUE") - (setenv "PYTHON_COMMAND" "python3") - (setenv "PATH" (string-append (getenv "PATH") ":" bin)) - (invoke "bash" "edksetup.sh") - (substitute* "Conf/tools_def.txt" - ;; Guix gcc is compiled without pie - ;; The -no-pie flag causes the Ia32 build to fail - (("-no-pie") "")) - (substitute* "Conf/target.txt" - (("^TARGET[ ]*=.*$") "TARGET = RELEASE\n") - (("^TOOL_CHAIN_TAG[ ]*=.*$") - (string-append "TOOL_CHAIN_TAG = " #$toolchain-ver "\n")) - (("^TARGET_ARCH[ ]*=.*$") - (string-append "TARGET_ARCH = IA32" - #$@(if (string=? "x86_64-linux" (%current-system)) - '(", X64") - '()) - "\n")) - (("^MAX_CONCURRENT_THREAD_NUMBER[ ]*=.*$") - (format #f "MAX_CONCURRENT_THREAD_NUMBER = ~a~%" - (number->string (parallel-job-count))))) - ;; Build build support. - (setenv "CC" "gcc") - (invoke "make" "-C" tools)))) - (replace 'build - (lambda _ - (invoke "build" "-a" "IA32" "-t" #$toolchain-ver - "-p" "OvmfPkg/OvmfPkgIa32.dsc"))) - #$@(if (string=? "x86_64-linux" (%current-system)) - #~((add-after 'build 'build-x64 - (lambda _ - (invoke "build" "-a" "X64" "-t" #$toolchain-ver - "-p" "OvmfPkg/OvmfPkgX64.dsc")))) - #~()) - (replace 'install - (lambda _ - (let ((fmw (string-append #$output "/share/firmware"))) - (mkdir-p fmw) - (for-each - (lambda (file) - (copy-file (string-append "Build/OvmfIa32/RELEASE_" - #$toolchain-ver "/FV/" file ".fd") - (string-append fmw "/" (string-downcase file) "_ia32.bin")) - #$@(if (string=? "x86_64-linux" (%current-system)) - #~((copy-file (string-append "Build/OvmfX64/RELEASE_" - #$toolchain-ver "/FV/" file ".fd") - (string-append fmw "/" (string-downcase file) "_x64.bin"))) - #~())) - (list "OVMF" - "OVMF_CODE" - "OVMF_VARS")))))))) - (native-inputs - `(("acpica" ,acpica) - ("nasm" ,nasm) - ("perl" ,perl) - ("python-3" ,python-3) - ("util-linux" ,util-linux "lib"))) - (supported-systems '("x86_64-linux" "i686-linux")) - (home-page "https://www.tianocore.org") - (synopsis "UEFI firmware for QEMU") - (description "OVMF is an EDK II based project to enable UEFI support for -Virtual Machines. OVMF contains a sample UEFI firmware for QEMU and KVM.") - (license (list license:expat - license:bsd-2 license:bsd-3 license:bsd-4))))) + (deprecated-package "ovmf" ovmf-x86-64)) (define* (make-arm-trusted-firmware platform #:key (triplet "aarch64-linux-gnu")) -- Efraim Flashner <efraim <at> flashner.co.il> רנשלפ םירפא GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted
guix-patches <at> gnu.org
:bug#70913
; Package guix-patches
.
(Mon, 13 May 2024 08:25:05 GMT) Full text and rfc822 format available.Message #38 received at 70913 <at> debbugs.gnu.org (full text, mbox):
From: Efraim Flashner <efraim <at> flashner.co.il> To: 70913 <at> debbugs.gnu.org Cc: Efraim Flashner <efraim <at> flashner.co.il> Subject: [PATCH 11/11] tests: install: Use a default qemu machine for arm architectures. Date: Mon, 13 May 2024 11:22:00 +0300
* gnu/tests/install.scm (qemu-command*): Adjust qemu command when run on armhf-linux or aarch64-linux to include a machine type. (run-install): Same. Change-Id: I32f85183cd8ec39c6a2e66624954743fd5983582 --- gnu/tests/install.scm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm index 90e1ca6e75..36dbd9111f 100644 --- a/gnu/tests/install.scm +++ b/gnu/tests/install.scm @@ -289,6 +289,12 @@ (define* (run-install target-os target-os-source (define marionette (make-marionette `(,(which #$(qemu-command system)) + ;; Neither of these architectures have a default machine. + ,@(if (or (string=? "aarch64-linux" #$system) + (string=? "armhf-linux" #$system)) + '("-machine" "virt" + "-cpu" "host") + '()) "-no-reboot" "-m" "1200" ,@(if #$uefi-firmware @@ -363,6 +369,12 @@ (define* (qemu-command* images #:key (uefi-support? #f) (memory-size 256)) (use-modules (srfi srfi-1)) `(,(string-append #$qemu-minimal "/bin/" #$(qemu-command system)) + ;; Neither of these architectures have a default machine. + ,@(if (or (string=? "aarch64-linux" #$system) + (string=? "armhf-linux" #$system)) + '("-machine" "virt" + "-cpu" "host") + '()) "-snapshot" ;for the volatile, writable overlay ,@(if (file-exists? "/dev/kvm") '("-enable-kvm") -- Efraim Flashner <efraim <at> flashner.co.il> רנשלפ םירפא GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted
Efraim Flashner <efraim <at> flashner.co.il>
:Efraim Flashner <efraim <at> flashner.co.il>
:Message #43 received at 70913-done <at> debbugs.gnu.org (full text, mbox):
From: Efraim Flashner <efraim <at> flashner.co.il> To: 70913-done <at> debbugs.gnu.org Subject: Re: bug#70913: Acknowledgement ([PATCH 00/11] Combine edk2-tools and ovmf firmware) Date: Mon, 27 May 2024 11:44:19 +0300
[Message part 1 (text/plain, inline)]
Patches applied -- Efraim Flashner <efraim <at> flashner.co.il> רנשלפ םירפא GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.