Package: guix-patches;
Reported by: Efraim Flashner <efraim <at> flashner.co.il>
Date: Fri, 21 Mar 2025 08:51:06 UTC
Severity: normal
Tags: patch
To reply to this bug, email your comments to 77148 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
efraim <at> flashner.co.il, vagrant <at> debian.org, guix-patches <at> gnu.org
:bug#77148
; Package guix-patches
.
(Fri, 21 Mar 2025 08:51:07 GMT) Full text and rfc822 format available.Efraim Flashner <efraim <at> flashner.co.il>
:efraim <at> flashner.co.il, vagrant <at> debian.org, guix-patches <at> gnu.org
.
(Fri, 21 Mar 2025 08:51:08 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 0/9] New firmware and updates Date: Fri, 21 Mar 2025 10:50:29 +0200
This adds 3 more firmware bits that are bundled by qemu and updates the edk2 firmware to the latest version. Efraim Flashner (9): gnu: Add u-boot-qemu-ppce550. gnu: Add slof-qemu. gnu: Add skiboot-qemu. gnu: Add ovmf-x86-64-microvm. gnu: ovmf-aarch64: Update installed firmware. gnu: ovmf-arm: Update installed firmware. gnu: ovmf-riscv64: Adjust the installed firmware. gnu: edk2-tools: Update to 202502. gnu: Add ovmf-loongarch64. gnu/packages/bootloaders.scm | 22 +++- gnu/packages/firmware.scm | 191 +++++++++++++++++++++++++++++++++-- 2 files changed, 203 insertions(+), 10 deletions(-) base-commit: e12455a5e8d524c5c3fba1ae56ebc6819b4f9320 -- 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#77148
; Package guix-patches
.
(Fri, 21 Mar 2025 08:54:05 GMT) Full text and rfc822 format available.Message #8 received at 77148 <at> debbugs.gnu.org (full text, mbox):
From: Efraim Flashner <efraim <at> flashner.co.il> To: 77148 <at> debbugs.gnu.org Cc: Efraim Flashner <efraim <at> flashner.co.il>, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Subject: [PATCH 2/9] gnu: Add slof-qemu. Date: Fri, 21 Mar 2025 10:53:03 +0200
* gnu/packages/firmware.scm (slof-qemu): New variable. Change-Id: I01664bae53c79c46b9e293c0cf4287338134bab0 --- gnu/packages/firmware.scm | 51 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index 63f767f72bf..88ee0f5777c 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2014-2016, 2024 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-2024 Efraim Flashner <efraim <at> flashner.co.il> +;;; Copyright © 2017, 2018, 2022-2025 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> @@ -830,6 +830,55 @@ (define-public sgabios after an operating system boots.") (license license:asl2.0)))) +(define-public slof-qemu + (package + (name "slof") + (version "20241106") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/aik/SLOF") + (commit (string-append "qemu-slof-" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1gfqnaxgvdv6s2gkkzrazijgs7rrvigmm878q81l9m5vnyyj12kx")) + (snippet + #~(begin (use-modules (guix build utils)) + (for-each delete-file-recursively + (cons* "FlashingSLOF.pdf" + (find-files "." "\\.oco$"))))))) + (build-system gnu-build-system) + (arguments + (list #:make-flags + #~(list #$@(if (not (string-prefix? "powerpc64" (%current-system))) + `("CROSS=powerpc64-linux-gnu-") + `()) + "qemu") + #:target #f ; Package produces firmware. + #:tests? #f ; No tests. + #:phases + #~(modify-phases %standard-phases + (delete 'configure) ; No configure script. + (replace 'install + (lambda _ + (copy-file "boot_rom.bin" "slof.bin") + (install-file "slof.bin" + (string-append #$output "/share/qemu"))))))) + (native-inputs + (append + (if (not (string-prefix? "powerpc64" (%current-system))) + (list (cross-gcc "powerpc64-linux-gnu") + (cross-binutils "powerpc64-linux-gnu"))) + (list perl))) + (home-page "https://openbios.info/SLOF") + (synopsis "Implementation of IEEE1275 Open Firmware for some POWER ISA systems") + (description + "@acronym{SLOF, Slimline Open Firmware} is an implementation of the IEEE +1275 standard. It can be used as partition firmware for pSeries machines running +on QEMU or KVM.") + (license license:bsd-3))) + (define-public edk2-tools (package (name "edk2-tools") -- 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#77148
; Package guix-patches
.
(Fri, 21 Mar 2025 08:54:08 GMT) Full text and rfc822 format available.Message #11 received at 77148 <at> debbugs.gnu.org (full text, mbox):
From: Efraim Flashner <efraim <at> flashner.co.il> To: 77148 <at> debbugs.gnu.org Cc: Efraim Flashner <efraim <at> flashner.co.il>, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Subject: [PATCH 1/9] gnu: Add u-boot-qemu-ppce550. Date: Fri, 21 Mar 2025 10:53:02 +0200
* gnu/packages/bootloaders.scm (u-boot-qemu-ppce550): New variable. Change-Id: I92ec83741a90dc9e0c3bdcbeeab0ff5eb47024bf --- gnu/packages/bootloaders.scm | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index fcdd3abbba1..8678e1c480a 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -6,7 +6,7 @@ ;;; Copyright © 2016-2018, 2021-2023 Marius Bakke <marius <at> gnu.org> ;;; Copyright © 2016, 2017 Danny Milosavljevic <dannym <at> scratchpost.org> ;;; Copyright © 2016, 2017 David Craven <david <at> craven.ch> -;;; Copyright © 2017, 2018, 2020-2024 Efraim Flashner <efraim <at> flashner.co.il> +;;; Copyright © 2017, 2018, 2020-2025 Efraim Flashner <efraim <at> flashner.co.il> ;;; Copyright © 2018–2022 Tobias Geerinckx-Rice <me <at> tobias.gr> ;;; Copyright © 2019 nee <nee <at> cock.li> ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe <at> gmail.com> @@ -1330,6 +1330,26 @@ (define-public u-boot-qemu-arm64 ;; details. #:configs '("# CONFIG_FIT_SIGNATURE is not set"))) +(define-public u-boot-qemu-ppce550 + (let ((base + (make-u-boot-package "qemu-ppce500" "powerpc-linux-gnu" + ;; Disable features that require OpenSSL due + ;; to GPL/Openssl license incompatibilities. + ;; See https://bugs.gnu.org/34717 for + ;; details. + #:configs '("# CONFIG_FIT_SIGNATURE is not set")))) + (package + (inherit base) + (arguments + (substitute-keyword-arguments (package-arguments base) + ((#:phases phases #~'%standard-phases) + #~(modify-phases #$phases + (replace 'install + (lambda _ + (mkdir-p (string-append #$output "/share/qemu")) + (copy-file "u-boot" (string-append + #$output "/share/qemu/u-boot.e500"))))))))))) + (define-public u-boot-qemu-riscv64 (make-u-boot-package "qemu-riscv64" "riscv64-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
efraim <at> flashner.co.il, vagrant <at> debian.org, guix-patches <at> gnu.org
:bug#77148
; Package guix-patches
.
(Fri, 21 Mar 2025 08:54:09 GMT) Full text and rfc822 format available.Message #14 received at 77148 <at> debbugs.gnu.org (full text, mbox):
From: Efraim Flashner <efraim <at> flashner.co.il> To: 77148 <at> debbugs.gnu.org Cc: Efraim Flashner <efraim <at> flashner.co.il>, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Subject: [PATCH 3/9] gnu: Add skiboot-qemu. Date: Fri, 21 Mar 2025 10:53:04 +0200
* gnu/packages/firmware.scm (skiboot-qemu): New variable. Change-Id: Ieb90171de7e74a4617e2c50b62c317b152d3a0c5 --- gnu/packages/firmware.scm | 65 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index 88ee0f5777c..35bfa6425ac 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -55,6 +55,7 @@ (define-module (gnu packages firmware) #:use-module (gnu packages base) #:use-module (gnu packages bash) #:use-module (gnu packages bison) + #:use-module (gnu packages bootloaders) #:use-module (gnu packages check) #:use-module (gnu packages cmake) #:use-module (gnu packages compression) @@ -830,6 +831,70 @@ (define-public sgabios after an operating system boots.") (license license:asl2.0)))) +(define-public skiboot-qemu + (package + (name "skiboot") + (version "7.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/open-power/skiboot") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1gpgviphai9biw6cmq1bl50i1419b0q6n5c8vjmq7zx3a46mjwqv")))) + (build-system gnu-build-system) + (arguments + (list #:make-flags + #~(list (string-append "SKIBOOT_VERSION=" #$version) + #$@(if (target-little-endian?) + #~("HOSTEND=LITTLE") + #~("HOSTEND=BIG")) + "USE_VALGRIND=0") + #:target #f ; Package produces firmware. + #:parallel-tests? #f + #:phases + #~(modify-phases %standard-phases + (delete 'configure) ; No configure script. + (add-after 'unpack 'patch-files + (lambda _ + (substitute* "external/common/get_arch.sh" + (("/bin/sh") (which "sh"))))) + (add-before 'check 'pre-check + (lambda _ + (delete-file "external/pflash/test/tests/01-info") + (substitute* "libc/test/run-time.c" + (("/usr/include/assert\\.h") + (search-input-file %build-inputs "include/assert.h"))) + (substitute* "external/test/test.sh" + (("/bin/true") (which "true"))) + (substitute* "libstb/secvar/test/Makefile.check" + (("check: secvar-check") "check:\n")))) + (replace 'install + (lambda _ + (install-file "skiboot.lid" + (string-append #$output "/share/qemu"))))))) + (native-inputs + (append + (if (not (string-prefix? "powerpc64" (%current-system))) + (list (cross-gcc "powerpc64-linux-gnu") + (cross-binutils "powerpc64-linux-gnu"))) + (list dtc perl))) + (inputs (list openssl)) + (home-page "https://github.com/open-power/skiboot/") + (synopsis "OPAL boot and runtime firmware for POWER") + (description + "@acronym{OPAL, OpenPower Abstraction Layer} firmware comes in several parts. +The OPAL image is three parts: +@enumerate +@item skiboot (includes OPAL runtime services) +@item skiroot - the bootloader environment, with the kernel and initramfs +(containing the petitboot bootloader) +@end enumerate +They may be all part of one payload or three separate images.") + (license license:asl2.0))) + (define-public slof-qemu (package (name "slof") -- 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#77148
; Package guix-patches
.
(Fri, 21 Mar 2025 08:55:02 GMT) Full text and rfc822 format available.Message #17 received at 77148 <at> debbugs.gnu.org (full text, mbox):
From: Efraim Flashner <efraim <at> flashner.co.il> To: 77148 <at> debbugs.gnu.org Cc: Efraim Flashner <efraim <at> flashner.co.il>, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Subject: [PATCH 6/9] gnu: ovmf-arm: Update installed firmware. Date: Fri, 21 Mar 2025 10:53:07 +0200
* gnu/packages/firmware.scm (ovmf-arm)[arguments]: Adjust the 'install phase to install another binary and to truncate the file to the expected length. Change-Id: Ic3319c88ed03c9c80e466ef78eae60837158a456 --- gnu/packages/firmware.scm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index 049fd9246fb..c8220fe3d66 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -1212,9 +1212,14 @@ (define-public ovmf-arm (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")))))))))))) + (with-directory-excursion "Build/ArmVirtQemu-ARM/RELEASE_GCC/FV" + ;; Make the files the desired length and then install them + (truncate-file "QEMU_EFI.fd" (* 64 1024 1024)) + (truncate-file "QEMU_VARS.fd" (* 64 1024 1024)) + (copy-file "QEMU_VARS.fd" + (string-append fmw "/ovmf_vars_arm.bin")) + (copy-file "QEMU_EFI.fd" + (string-append fmw "/ovmf_arm.bin"))))))))))))) (define-public ovmf-riscv64 (let ((base (make-ovmf-firmware "riscv64"))) -- 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#77148
; Package guix-patches
.
(Fri, 21 Mar 2025 08:55:03 GMT) Full text and rfc822 format available.Message #20 received at 77148 <at> debbugs.gnu.org (full text, mbox):
From: Efraim Flashner <efraim <at> flashner.co.il> To: 77148 <at> debbugs.gnu.org Cc: Efraim Flashner <efraim <at> flashner.co.il>, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Subject: [PATCH 7/9] gnu: ovmf-riscv64: Adjust the installed firmware. Date: Fri, 21 Mar 2025 10:53:08 +0200
* gnu/packages/firmware.scm (ovmf-riscv64)[arguments]: Adjust the 'install phase to truncate the files to their expected lengths. Change-Id: Idb524a7e2ca8b8a8fe8a70a893f57a13ff1e0b56 --- gnu/packages/firmware.scm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index c8220fe3d66..0becefb3b08 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -1234,6 +1234,9 @@ (define-public ovmf-riscv64 (let ((fmw (string-append #$output "/share/firmware"))) (mkdir-p fmw) (with-directory-excursion "Build/RiscVVirtQemu/RELEASE_GCC/FV" + ;; Make the files the desired length and then install them + (truncate-file "RISCV_VIRT_CODE.fd" (* 32 1024 1024)) + (truncate-file "RISCV_VIRT_VARS.fd" (* 32 1024 1024)) (install-file "RISCV_VIRT_CODE.fd" fmw) (install-file "RISCV_VIRT_VARS.fd" fmw)))))))))))) -- 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#77148
; Package guix-patches
.
(Fri, 21 Mar 2025 08:55:04 GMT) Full text and rfc822 format available.Message #23 received at 77148 <at> debbugs.gnu.org (full text, mbox):
From: Efraim Flashner <efraim <at> flashner.co.il> To: 77148 <at> debbugs.gnu.org Cc: Efraim Flashner <efraim <at> flashner.co.il>, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Subject: [PATCH 4/9] gnu: Add ovmf-x86-64-microvm. Date: Fri, 21 Mar 2025 10:53:05 +0200
* gnu/packages/firmware.scm (ovmf-x86-64-microvm): New variable. Change-Id: I1c8d7b037a84d7855d53def4c639a037c429aedb --- gnu/packages/firmware.scm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index 35bfa6425ac..e7d2e390acc 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -1138,6 +1138,24 @@ (define-public ovmf-x86-64 "OVMF_CODE" "OVMF_VARS")))))))))))) +(define-public ovmf-x86-64-microvm + (let ((base (make-ovmf-firmware "x86_64"))) + (package + (inherit base) + (name "ovmf-x86-64-microvm") + (arguments + (substitute-keyword-arguments (package-arguments base) + ((#:phases phases) + #~(modify-phases #$phases + (replace 'build + (lambda _ + (invoke "build" "-a" "X64" "-t" "GCC" "-p" + "OvmfPkg/Microvm/MicrovmX64.dsc"))) + (replace 'install + (lambda _ + (install-file "Build/MicrovmX64/RELEASE_GCC/FV/MICROVM.fd" + (string-append #$output "/share/firmware"))))))))))) + (define-public ovmf-i686 (let ((base (make-ovmf-firmware "i686"))) (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#77148
; Package guix-patches
.
(Fri, 21 Mar 2025 08:55:04 GMT) Full text and rfc822 format available.Message #26 received at 77148 <at> debbugs.gnu.org (full text, mbox):
From: Efraim Flashner <efraim <at> flashner.co.il> To: 77148 <at> debbugs.gnu.org Cc: Efraim Flashner <efraim <at> flashner.co.il>, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Subject: [PATCH 5/9] gnu: ovmf-aarch64: Update installed firmware. Date: Fri, 21 Mar 2025 10:53:06 +0200
* gnu/packages/firmware.scm (ovmf-aarch64)[arguments]: Adjust the 'install phase to install another binary and to truncate the file to the expected length. Change-Id: I53958d5f2ca392e1033630e1dfd29d86c25a74fc --- gnu/packages/firmware.scm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index e7d2e390acc..049fd9246fb 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -1190,9 +1190,14 @@ (define-public ovmf-aarch64 (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")))))))))))) + (with-directory-excursion "Build/ArmVirtQemu-AARCH64/RELEASE_GCC/FV" + ;; Make the files the desired length and then install them + (truncate-file "QEMU_EFI.fd" (* 64 1024 1024)) + (truncate-file "QEMU_VARS.fd" (* 64 1024 1024)) + (copy-file "QEMU_VARS.fd" + (string-append fmw "/ovmf_vars_aarch64.bin")) + (copy-file "QEMU_EFI.fd" + (string-append fmw "/ovmf_aarch64.bin"))))))))))))) (define-public ovmf-arm (let ((base (make-ovmf-firmware "armhf"))) -- 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#77148
; Package guix-patches
.
(Fri, 21 Mar 2025 08:55:05 GMT) Full text and rfc822 format available.Message #29 received at 77148 <at> debbugs.gnu.org (full text, mbox):
From: Efraim Flashner <efraim <at> flashner.co.il> To: 77148 <at> debbugs.gnu.org Cc: Efraim Flashner <efraim <at> flashner.co.il>, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Subject: [PATCH 8/9] gnu: edk2-tools: Update to 202502. Date: Fri, 21 Mar 2025 10:53:09 +0200
* gnu/packages/firmware.scm (edk2-tools): Update to 202502. [arguments]: When building on armhf-linux add a phase to adjust the compiler flags. Change-Id: Ia0586cb748194e4ec0fa35c2a04cee64f1ad6521 --- gnu/packages/firmware.scm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index 0becefb3b08..fe2956fbfdf 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -947,7 +947,7 @@ (define-public slof-qemu (define-public edk2-tools (package (name "edk2-tools") - (version "202402") + (version "202502") (source (origin (method git-fetch) (uri (git-reference @@ -958,7 +958,7 @@ (define-public edk2-tools (file-name (git-file-name name version)) (sha256 (base32 - "0y7jfpijgi099znhzjklnsczn0k0vm1d1qznq9x2a2sa0glydsin")))) + "026h7hadzj1zflgf4qzdby3gmgcqh3m5rvn2yr92jjwn4z8c51la")))) (build-system gnu-build-system) (arguments (list #:make-flags @@ -1047,6 +1047,13 @@ (define* (make-ovmf-firmware arch) "riscv64-linux-gnu-") (setenv (string-append #$toolchain "_LOONGARCH64_PREFIX") "loongarch64-linux-gnu-")))) + #$@(if (target-arm32?) + #~((add-before 'configure 'fix-armhf-flags + (lambda _ + (substitute* "BaseTools/Conf/tools_def.template" + (("(DEFINE GCC_ARM_CC_FLAGS.*)-mstack-protector-guard=global" _ gcc-arm) + (string-append gcc-arm "-fstack-protector-all")))))) + #~()) (replace 'configure (lambda _ (let* ((cwd (getcwd)) -- 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#77148
; Package guix-patches
.
(Fri, 21 Mar 2025 08:55:05 GMT) Full text and rfc822 format available.Message #32 received at 77148 <at> debbugs.gnu.org (full text, mbox):
From: Efraim Flashner <efraim <at> flashner.co.il> To: 77148 <at> debbugs.gnu.org Cc: Efraim Flashner <efraim <at> flashner.co.il>, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Subject: [PATCH 9/9] gnu: Add ovmf-loongarch64. Date: Fri, 21 Mar 2025 10:53:10 +0200
* gnu/packages/firmware.scm (ovmf-loongarch64): New variable. (make-ovmf-firmware)[arguments]: Adjust the 'build phase to add a case for loongarch64. Change-Id: Ibb916b50fd3dc7831ac895cb8b59695688750377 --- gnu/packages/firmware.scm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index fe2956fbfdf..6f784a281d3 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -1090,6 +1090,8 @@ (define* (make-ovmf-firmware arch) "ArmVirtPkg/ArmVirtQemu.dsc") ("riscv64" "OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc") + ("loongarch64" + "OvmfPkg/LoongArchVirt/LoongArchVirtQemu.dsc") (_ #t))))) (add-before 'install 'install-efi-shell (lambda _ @@ -1247,6 +1249,25 @@ (define-public ovmf-riscv64 (install-file "RISCV_VIRT_CODE.fd" fmw) (install-file "RISCV_VIRT_VARS.fd" fmw)))))))))))) +(define-public ovmf-loongarch64 + (let ((base (make-ovmf-firmware "loongarch64"))) + (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/LoongArchVirtQemu/RELEASE_GCC/FV" + ;; Make the files the desired length and then install them + (truncate-file "QEMU_EFI.fd" (* 16 1024 1024)) + (truncate-file "QEMU_VARS.fd" (* 16 1024 1024)) + (install-file "QEMU_EFI.fd" fmw) + (install-file "QEMU_VARS.fd" fmw)))))))))))) + (define-public ovmf (deprecated-package "ovmf" ovmf-x86-64)) -- 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#77148
; Package guix-patches
.
(Fri, 21 Mar 2025 14:13:03 GMT) Full text and rfc822 format available.Message #35 received at 77148 <at> debbugs.gnu.org (full text, mbox):
From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com> To: Efraim Flashner <efraim <at> flashner.co.il> Cc: 77148 <at> debbugs.gnu.org Subject: Re: [PATCH 1/9] gnu: Add u-boot-qemu-ppce550. Date: Fri, 21 Mar 2025 23:12:07 +0900
Hi, Efraim Flashner <efraim <at> flashner.co.il> writes: > * gnu/packages/bootloaders.scm (u-boot-qemu-ppce550): New variable. > > Change-Id: I92ec83741a90dc9e0c3bdcbeeab0ff5eb47024bf > --- > gnu/packages/bootloaders.scm | 22 +++++++++++++++++++++- > 1 file changed, 21 insertions(+), 1 deletion(-) > > diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm > index fcdd3abbba1..8678e1c480a 100644 > --- a/gnu/packages/bootloaders.scm > +++ b/gnu/packages/bootloaders.scm > @@ -6,7 +6,7 @@ > ;;; Copyright © 2016-2018, 2021-2023 Marius Bakke <marius <at> gnu.org> > ;;; Copyright © 2016, 2017 Danny Milosavljevic <dannym <at> scratchpost.org> > ;;; Copyright © 2016, 2017 David Craven <david <at> craven.ch> > -;;; Copyright © 2017, 2018, 2020-2024 Efraim Flashner <efraim <at> flashner.co.il> > +;;; Copyright © 2017, 2018, 2020-2025 Efraim Flashner <efraim <at> flashner.co.il> > ;;; Copyright © 2018–2022 Tobias Geerinckx-Rice <me <at> tobias.gr> > ;;; Copyright © 2019 nee <nee <at> cock.li> > ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe <at> gmail.com> > @@ -1330,6 +1330,26 @@ (define-public u-boot-qemu-arm64 > ;; details. > #:configs '("# CONFIG_FIT_SIGNATURE is not set"))) > > +(define-public u-boot-qemu-ppce550 > + (let ((base > + (make-u-boot-package "qemu-ppce500" "powerpc-linux-gnu" > + ;; Disable features that require OpenSSL due > + ;; to GPL/Openssl license incompatibilities. > + ;; See https://bugs.gnu.org/34717 for > + ;; details. > + #:configs '("# CONFIG_FIT_SIGNATURE is not set")))) I thought the GPL incompatibility had been resolved in recent years (see https://openssl-library.org/post/2017-03-20-license/) ? > + (package > + (inherit base) > + (arguments > + (substitute-keyword-arguments (package-arguments base) > + ((#:phases phases #~'%standard-phases) > + #~(modify-phases #$phases > + (replace 'install > + (lambda _ > + (mkdir-p (string-append #$output "/share/qemu")) > + (copy-file "u-boot" (string-append > + #$output "/share/qemu/u-boot.e500"))))))))))) I'm not sure why we need a qemu variant; just having u-boot-ppce550 with a libvirt/QEMU firmware descriptor should be enough, unless I'm missing something. -- Thanks, Maxim
guix-patches <at> gnu.org
:bug#77148
; Package guix-patches
.
(Sat, 22 Mar 2025 07:12:01 GMT) Full text and rfc822 format available.Message #38 received at 77148 <at> debbugs.gnu.org (full text, mbox):
From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com> To: Efraim Flashner <efraim <at> flashner.co.il> Cc: 77148 <at> debbugs.gnu.org Subject: Re: [PATCH 5/9] gnu: ovmf-aarch64: Update installed firmware. Date: Sat, 22 Mar 2025 16:10:46 +0900
Hi, Efraim Flashner <efraim <at> flashner.co.il> writes: > * gnu/packages/firmware.scm (ovmf-aarch64)[arguments]: Adjust the > 'install phase to install another binary and to truncate the file to the > expected length. > > Change-Id: I53958d5f2ca392e1033630e1dfd29d86c25a74fc > --- > gnu/packages/firmware.scm | 11 ++++++++--- > 1 file changed, 8 insertions(+), 3 deletions(-) > > diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm > index e7d2e390acc..049fd9246fb 100644 > --- a/gnu/packages/firmware.scm > +++ b/gnu/packages/firmware.scm > @@ -1190,9 +1190,14 @@ (define-public ovmf-aarch64 > (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")))))))))))) > + (with-directory-excursion "Build/ArmVirtQemu-AARCH64/RELEASE_GCC/FV" > + ;; Make the files the desired length and then install them > + (truncate-file "QEMU_EFI.fd" (* 64 1024 1024)) > + (truncate-file "QEMU_VARS.fd" (* 64 1024 1024)) > + (copy-file "QEMU_VARS.fd" > + (string-append fmw "/ovmf_vars_aarch64.bin")) > + (copy-file "QEMU_EFI.fd" > + (string-append fmw "/ovmf_aarch64.bin"))))))))))))) It's surprising that the firmware files must be truncated; does it not work if we leave them at their original size (and what would that be?). Expounding the explanatory comment would help. -- Thanks, Maxim
guix-patches <at> gnu.org
:bug#77148
; Package guix-patches
.
(Sat, 22 Mar 2025 07:14:02 GMT) Full text and rfc822 format available.Message #41 received at 77148 <at> debbugs.gnu.org (full text, mbox):
From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com> To: Efraim Flashner <efraim <at> flashner.co.il> Cc: 77148 <at> debbugs.gnu.org Subject: Re: [PATCH 8/9] gnu: edk2-tools: Update to 202502. Date: Sat, 22 Mar 2025 16:12:59 +0900
Hi, Efraim Flashner <efraim <at> flashner.co.il> writes: > * gnu/packages/firmware.scm (edk2-tools): Update to 202502. > [arguments]: When building on armhf-linux add a phase to adjust the > compiler flags. [...] > + #$@(if (target-arm32?) > + #~((add-before 'configure 'fix-armhf-flags > + (lambda _ > + (substitute* "BaseTools/Conf/tools_def.template" > + (("(DEFINE GCC_ARM_CC_FLAGS.*)-mstack-protector-guard=global" _ gcc-arm) > + (string-append gcc-arm "-fstack-protector-all")))))) > + #~()) Is this problem known upstream? If yes, it'd be nice to cross-reference it here; otherwise, it'd be nice to report it to them (and cross-reference the opened issue). -- Thanks, Maxim
guix-patches <at> gnu.org
:bug#77148
; Package guix-patches
.
(Sat, 22 Mar 2025 07:35:01 GMT) Full text and rfc822 format available.Message #44 received at 77148 <at> debbugs.gnu.org (full text, mbox):
From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com> To: Efraim Flashner <efraim <at> flashner.co.il> Cc: 77148 <at> debbugs.gnu.org Subject: Re: [PATCH 9/9] gnu: Add ovmf-loongarch64. Date: Sat, 22 Mar 2025 16:33:37 +0900
Hello, Efraim Flashner <efraim <at> flashner.co.il> writes: > * gnu/packages/firmware.scm (ovmf-loongarch64): New variable. > (make-ovmf-firmware)[arguments]: Adjust the 'build phase to add a case > for loongarch64. > > Change-Id: Ibb916b50fd3dc7831ac895cb8b59695688750377 > --- > gnu/packages/firmware.scm | 21 +++++++++++++++++++++ > 1 file changed, 21 insertions(+) > > diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm > index fe2956fbfdf..6f784a281d3 100644 > --- a/gnu/packages/firmware.scm > +++ b/gnu/packages/firmware.scm > @@ -1090,6 +1090,8 @@ (define* (make-ovmf-firmware arch) > "ArmVirtPkg/ArmVirtQemu.dsc") > ("riscv64" > "OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc") > + ("loongarch64" > + "OvmfPkg/LoongArchVirt/LoongArchVirtQemu.dsc") > (_ #t))))) > (add-before 'install 'install-efi-shell > (lambda _ > @@ -1247,6 +1249,25 @@ (define-public ovmf-riscv64 > (install-file "RISCV_VIRT_CODE.fd" fmw) > (install-file "RISCV_VIRT_VARS.fd" fmw)))))))))))) > > +(define-public ovmf-loongarch64 > + (let ((base (make-ovmf-firmware "loongarch64"))) > + (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) Nitpick: fw is more commond than fwm as an abbrevation. > + (with-directory-excursion "Build/LoongArchVirtQemu/RELEASE_GCC/FV" Other nitpick: I'd break the directory part on a newline to fit under 80 columns, per our code style guidelines. Otherwise, my general comments elsewhere apply it too, but it LGTM otherwise. I think we should add the QEMU firmware descriptors everywhere so that they'll be usable with the libvirt-configuration firmwares field I proposed in bug#77110. Perhaps we can apply that one first to make this slightly easier (it provided some `ovmf-aux-file' procedure you'll probably want to use to locate the a locally kept .json QEMU firmware descriptor file). -- Thanks, Maxim
guix-patches <at> gnu.org
:bug#77148
; Package guix-patches
.
(Sun, 23 Mar 2025 15:15:02 GMT) Full text and rfc822 format available.Message #47 received at 77148 <at> debbugs.gnu.org (full text, mbox):
From: Efraim Flashner <efraim <at> flashner.co.il> To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Cc: 77148 <at> debbugs.gnu.org Subject: Re: [PATCH 1/9] gnu: Add u-boot-qemu-ppce550. Date: Sun, 23 Mar 2025 17:13:52 +0200
[Message part 1 (text/plain, inline)]
On Fri, Mar 21, 2025 at 11:12:07PM +0900, Maxim Cournoyer wrote: > Hi, > > Efraim Flashner <efraim <at> flashner.co.il> writes: > > > * gnu/packages/bootloaders.scm (u-boot-qemu-ppce550): New variable. > > > > Change-Id: I92ec83741a90dc9e0c3bdcbeeab0ff5eb47024bf > > --- > > gnu/packages/bootloaders.scm | 22 +++++++++++++++++++++- > > 1 file changed, 21 insertions(+), 1 deletion(-) > > > > diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm > > index fcdd3abbba1..8678e1c480a 100644 > > --- a/gnu/packages/bootloaders.scm > > +++ b/gnu/packages/bootloaders.scm > > @@ -6,7 +6,7 @@ > > ;;; Copyright © 2016-2018, 2021-2023 Marius Bakke <marius <at> gnu.org> > > ;;; Copyright © 2016, 2017 Danny Milosavljevic <dannym <at> scratchpost.org> > > ;;; Copyright © 2016, 2017 David Craven <david <at> craven.ch> > > -;;; Copyright © 2017, 2018, 2020-2024 Efraim Flashner <efraim <at> flashner.co.il> > > +;;; Copyright © 2017, 2018, 2020-2025 Efraim Flashner <efraim <at> flashner.co.il> > > ;;; Copyright © 2018–2022 Tobias Geerinckx-Rice <me <at> tobias.gr> > > ;;; Copyright © 2019 nee <nee <at> cock.li> > > ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe <at> gmail.com> > > @@ -1330,6 +1330,26 @@ (define-public u-boot-qemu-arm64 > > ;; details. > > #:configs '("# CONFIG_FIT_SIGNATURE is not set"))) > > > > +(define-public u-boot-qemu-ppce550 > > + (let ((base > > + (make-u-boot-package "qemu-ppce500" "powerpc-linux-gnu" > > + ;; Disable features that require OpenSSL due > > + ;; to GPL/Openssl license incompatibilities. > > + ;; See https://bugs.gnu.org/34717 for > > + ;; details. > > + #:configs '("# CONFIG_FIT_SIGNATURE is not set")))) > > I thought the GPL incompatibility had been resolved in recent years (see > https://openssl-library.org/post/2017-03-20-license/) ? I just copied it from the config above it, but I think we can drop it. > > + (package > > + (inherit base) > > + (arguments > > + (substitute-keyword-arguments (package-arguments base) > > + ((#:phases phases #~'%standard-phases) > > + #~(modify-phases #$phases > > + (replace 'install > > + (lambda _ > > + (mkdir-p (string-append #$output "/share/qemu")) > > + (copy-file "u-boot" (string-append > > + #$output "/share/qemu/u-boot.e500"))))))))))) > > I'm not sure why we need a qemu variant; just having u-boot-ppce550 with > a libvirt/QEMU firmware descriptor should be enough, unless I'm missing > something. qemu_ppce550 is the name of the config and I figured for qemu it would be better to have the name of the file match the bundled firmware file. (ins)efraim <at> 3900XT ~/workspace/u-boot$ ls configs/qemu* configs/qemu_arm64_defconfig configs/qemu-arm-sbsa_defconfig configs/qemu-riscv32_smode_defconfig configs/qemu-riscv64_smode_defconfig configs/qemu-x86_defconfig configs/qemu_arm64_lwip_defconfig configs/qemu-ppce500_defconfig configs/qemu-riscv32_spl_defconfig configs/qemu-riscv64_spl_defconfig configs/qemu-xtensa-dc233c_defconfig configs/qemu_arm_defconfig configs/qemu-riscv32_defconfig configs/qemu-riscv64_defconfig configs/qemu-x86_64_defconfig (ins)efraim <at> 3900XT ~/workspace/u-boot$ ls configs/*ppc* configs/qemu-ppce500_defconfig -- 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)]
guix-patches <at> gnu.org
:bug#77148
; Package guix-patches
.
(Sun, 23 Mar 2025 15:22:02 GMT) Full text and rfc822 format available.Message #50 received at 77148 <at> debbugs.gnu.org (full text, mbox):
From: Efraim Flashner <efraim <at> flashner.co.il> To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Cc: 77148 <at> debbugs.gnu.org Subject: Re: [PATCH 5/9] gnu: ovmf-aarch64: Update installed firmware. Date: Sun, 23 Mar 2025 17:21:29 +0200
[Message part 1 (text/plain, inline)]
On Sat, Mar 22, 2025 at 04:10:46PM +0900, Maxim Cournoyer wrote: > Hi, > > Efraim Flashner <efraim <at> flashner.co.il> writes: > > > * gnu/packages/firmware.scm (ovmf-aarch64)[arguments]: Adjust the > > 'install phase to install another binary and to truncate the file to the > > expected length. > > > > Change-Id: I53958d5f2ca392e1033630e1dfd29d86c25a74fc > > --- > > gnu/packages/firmware.scm | 11 ++++++++--- > > 1 file changed, 8 insertions(+), 3 deletions(-) > > > > diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm > > index e7d2e390acc..049fd9246fb 100644 > > --- a/gnu/packages/firmware.scm > > +++ b/gnu/packages/firmware.scm > > @@ -1190,9 +1190,14 @@ (define-public ovmf-aarch64 > > (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")))))))))))) > > + (with-directory-excursion "Build/ArmVirtQemu-AARCH64/RELEASE_GCC/FV" > > + ;; Make the files the desired length and then install them > > + (truncate-file "QEMU_EFI.fd" (* 64 1024 1024)) > > + (truncate-file "QEMU_VARS.fd" (* 64 1024 1024)) > > + (copy-file "QEMU_VARS.fd" > > + (string-append fmw "/ovmf_vars_aarch64.bin")) > > + (copy-file "QEMU_EFI.fd" > > + (string-append fmw "/ovmf_aarch64.bin"))))))))))))) > > It's surprising that the firmware files must be truncated; does it not > work if we leave them at their original size (and what would that be?). > Expounding the explanatory comment would help. ovmf_aarch64.bin is currently 2097152 bytes (2.0 Mb). I'll try to find an actual explanation somewhere, but Debian also uses truncate on their files¹ ¹ https://sources.debian.org/src/edk2/2024.11-5/debian/rules/#L249 -- 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)]
guix-patches <at> gnu.org
:bug#77148
; Package guix-patches
.
(Sun, 23 Mar 2025 15:24:02 GMT) Full text and rfc822 format available.Message #53 received at 77148 <at> debbugs.gnu.org (full text, mbox):
From: Efraim Flashner <efraim <at> flashner.co.il> To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Cc: 77148 <at> debbugs.gnu.org Subject: Re: [PATCH 8/9] gnu: edk2-tools: Update to 202502. Date: Sun, 23 Mar 2025 17:22:26 +0200
[Message part 1 (text/plain, inline)]
On Sat, Mar 22, 2025 at 04:12:59PM +0900, Maxim Cournoyer wrote: > Hi, > > Efraim Flashner <efraim <at> flashner.co.il> writes: > > > * gnu/packages/firmware.scm (edk2-tools): Update to 202502. > > [arguments]: When building on armhf-linux add a phase to adjust the > > compiler flags. > > [...] > > > + #$@(if (target-arm32?) > > + #~((add-before 'configure 'fix-armhf-flags > > + (lambda _ > > + (substitute* "BaseTools/Conf/tools_def.template" > > + (("(DEFINE GCC_ARM_CC_FLAGS.*)-mstack-protector-guard=global" _ gcc-arm) > > + (string-append gcc-arm "-fstack-protector-all")))))) > > + #~()) > > Is this problem known upstream? If yes, it'd be nice to cross-reference > it here; otherwise, it'd be nice to report it to them (and > cross-reference the opened issue). I'll check, but it's probably based on our GCC version. It only happens for the armhf firmware when built on armhf. -- 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)]
guix-patches <at> gnu.org
:bug#77148
; Package guix-patches
.
(Sun, 23 Mar 2025 15:24:02 GMT) Full text and rfc822 format available.Message #56 received at 77148 <at> debbugs.gnu.org (full text, mbox):
From: Efraim Flashner <efraim <at> flashner.co.il> To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com> Cc: 77148 <at> debbugs.gnu.org Subject: Re: [PATCH 9/9] gnu: Add ovmf-loongarch64. Date: Sun, 23 Mar 2025 17:23:22 +0200
[Message part 1 (text/plain, inline)]
On Sat, Mar 22, 2025 at 04:33:37PM +0900, Maxim Cournoyer wrote: > Hello, > > Efraim Flashner <efraim <at> flashner.co.il> writes: > > > * gnu/packages/firmware.scm (ovmf-loongarch64): New variable. > > (make-ovmf-firmware)[arguments]: Adjust the 'build phase to add a case > > for loongarch64. > > > > Change-Id: Ibb916b50fd3dc7831ac895cb8b59695688750377 > > --- > > gnu/packages/firmware.scm | 21 +++++++++++++++++++++ > > 1 file changed, 21 insertions(+) > > > > diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm > > index fe2956fbfdf..6f784a281d3 100644 > > --- a/gnu/packages/firmware.scm > > +++ b/gnu/packages/firmware.scm > > @@ -1090,6 +1090,8 @@ (define* (make-ovmf-firmware arch) > > "ArmVirtPkg/ArmVirtQemu.dsc") > > ("riscv64" > > "OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc") > > + ("loongarch64" > > + "OvmfPkg/LoongArchVirt/LoongArchVirtQemu.dsc") > > (_ #t))))) > > (add-before 'install 'install-efi-shell > > (lambda _ > > @@ -1247,6 +1249,25 @@ (define-public ovmf-riscv64 > > (install-file "RISCV_VIRT_CODE.fd" fmw) > > (install-file "RISCV_VIRT_VARS.fd" fmw)))))))))))) > > > > +(define-public ovmf-loongarch64 > > + (let ((base (make-ovmf-firmware "loongarch64"))) > > + (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) > > Nitpick: fw is more commond than fwm as an abbrevation. > > > + (with-directory-excursion "Build/LoongArchVirtQemu/RELEASE_GCC/FV" > > Other nitpick: I'd break the directory part on a newline to fit under 80 > columns, per our code style guidelines. > > Otherwise, my general comments elsewhere apply it too, but it LGTM > otherwise. > > I think we should add the QEMU firmware descriptors everywhere so that > they'll be usable with the libvirt-configuration firmwares field I > proposed in bug#77110. Perhaps we can apply that one first to make this > slightly easier (it provided some `ovmf-aux-file' procedure you'll > probably want to use to locate the a locally kept .json QEMU firmware > descriptor file). Sounds good to me. -- 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)]
guix-patches <at> gnu.org
:bug#77148
; Package guix-patches
.
(Mon, 24 Mar 2025 00:26:02 GMT) Full text and rfc822 format available.Message #59 received at 77148 <at> debbugs.gnu.org (full text, mbox):
From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com> To: Efraim Flashner <efraim <at> flashner.co.il> Cc: 77148 <at> debbugs.gnu.org Subject: Re: [PATCH 1/9] gnu: Add u-boot-qemu-ppce550. Date: Mon, 24 Mar 2025 09:24:43 +0900
Hi Efraim! Efraim Flashner <efraim <at> flashner.co.il> writes: [...] >> > +(define-public u-boot-qemu-ppce550 >> > + (let ((base >> > + (make-u-boot-package "qemu-ppce500" "powerpc-linux-gnu" >> > + ;; Disable features that require OpenSSL due >> > + ;; to GPL/Openssl license incompatibilities. >> > + ;; See https://bugs.gnu.org/34717 for >> > + ;; details. >> > + #:configs '("# CONFIG_FIT_SIGNATURE is not set")))) >> >> I thought the GPL incompatibility had been resolved in recent years (see >> https://openssl-library.org/post/2017-03-20-license/) ? > > I just copied it from the config above it, but I think we can drop it. Yes! >> > + (package >> > + (inherit base) >> > + (arguments >> > + (substitute-keyword-arguments (package-arguments base) >> > + ((#:phases phases #~'%standard-phases) >> > + #~(modify-phases #$phases >> > + (replace 'install >> > + (lambda _ >> > + (mkdir-p (string-append #$output "/share/qemu")) >> > + (copy-file "u-boot" (string-append >> > + #$output "/share/qemu/u-boot.e500"))))))))))) >> >> I'm not sure why we need a qemu variant; just having u-boot-ppce550 with >> a libvirt/QEMU firmware descriptor should be enough, unless I'm missing >> something. > > qemu_ppce550 is the name of the config and I figured for qemu it would > be better to have the name of the file match the bundled firmware file. Makes sense. Thanks for the clarification. -- Thanks, Maxim
guix-patches <at> gnu.org
:bug#77148
; Package guix-patches
.
(Mon, 24 Mar 2025 00:30:02 GMT) Full text and rfc822 format available.Message #62 received at 77148 <at> debbugs.gnu.org (full text, mbox):
From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com> To: Efraim Flashner <efraim <at> flashner.co.il> Cc: 77148 <at> debbugs.gnu.org Subject: Re: [PATCH 5/9] gnu: ovmf-aarch64: Update installed firmware. Date: Mon, 24 Mar 2025 09:28:40 +0900
Hi, Efraim Flashner <efraim <at> flashner.co.il> writes: > On Sat, Mar 22, 2025 at 04:10:46PM +0900, Maxim Cournoyer wrote: >> Hi, >> >> Efraim Flashner <efraim <at> flashner.co.il> writes: >> >> > * gnu/packages/firmware.scm (ovmf-aarch64)[arguments]: Adjust the >> > 'install phase to install another binary and to truncate the file to the >> > expected length. >> > >> > Change-Id: I53958d5f2ca392e1033630e1dfd29d86c25a74fc >> > --- >> > gnu/packages/firmware.scm | 11 ++++++++--- >> > 1 file changed, 8 insertions(+), 3 deletions(-) >> > >> > diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm >> > index e7d2e390acc..049fd9246fb 100644 >> > --- a/gnu/packages/firmware.scm >> > +++ b/gnu/packages/firmware.scm >> > @@ -1190,9 +1190,14 @@ (define-public ovmf-aarch64 >> > (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")))))))))))) >> > + (with-directory-excursion "Build/ArmVirtQemu-AARCH64/RELEASE_GCC/FV" >> > + ;; Make the files the desired length and then install them >> > + (truncate-file "QEMU_EFI.fd" (* 64 1024 1024)) >> > + (truncate-file "QEMU_VARS.fd" (* 64 1024 1024)) >> > + (copy-file "QEMU_VARS.fd" >> > + (string-append fmw "/ovmf_vars_aarch64.bin")) >> > + (copy-file "QEMU_EFI.fd" >> > + (string-append fmw "/ovmf_aarch64.bin"))))))))))))) >> >> It's surprising that the firmware files must be truncated; does it not >> work if we leave them at their original size (and what would that be?). >> Expounding the explanatory comment would help. > > ovmf_aarch64.bin is currently 2097152 bytes (2.0 Mb). I'll try to find > an actual explanation somewhere, but Debian also uses truncate on their > files¹ > > ¹ https://sources.debian.org/src/edk2/2024.11-5/debian/rules/#L249 That would mean that the truncate to 64 MiB is not useful? I guess it's an historical thing that can be removed then, unless you find a satisfying explanation. -- Thanks, Maxim
guix-patches <at> gnu.org
:bug#77148
; Package guix-patches
.
(Thu, 27 Mar 2025 12:28:04 GMT) Full text and rfc822 format available.Message #65 received at 77148 <at> debbugs.gnu.org (full text, mbox):
From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com> To: Efraim Flashner <efraim <at> flashner.co.il> Cc: 77148 <at> debbugs.gnu.org Subject: Re: [PATCH 9/9] gnu: Add ovmf-loongarch64. Date: Thu, 27 Mar 2025 21:26:46 +0900
Hi Efraim, [...] >> I think we should add the QEMU firmware descriptors everywhere so that >> they'll be usable with the libvirt-configuration firmwares field I >> proposed in bug#77110. Perhaps we can apply that one first to make this >> slightly easier (it provided some `ovmf-aux-file' procedure you'll >> probably want to use to locate the a locally kept .json QEMU firmware >> descriptor file). > > Sounds good to me. I've now merged bug#77110, so feel free to go ahead and add the relevant .json QEMU firmware descriptors that'll make the firmware usable with our libvirt service. -- Thanks, Maxim
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.