diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2024-04-30 16:31:36 +0300 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2024-05-27 10:26:24 +0300 |
commit | 5013d0286ec4792960698167c01b162253f67aff (patch) | |
tree | 80c421c118ebde0f37dd39c414245221126166c1 /gnu/packages/firmware.scm | |
parent | e0caba9cb86a7b241c61dff115bfb7c62b17195e (diff) | |
download | guix-5013d0286ec4792960698167c01b162253f67aff.tar.gz guix-5013d0286ec4792960698167c01b162253f67aff.zip |
gnu: ovmf-riscv64: Update to 202402.
* gnu/packages/firmware.scm (ovmf-riscv64): Update to 202402. Build
using make-ovmf-firmware.
Change-Id: I1a7dcaac3975669a61723b929162ad33affa1619
Diffstat (limited to 'gnu/packages/firmware.scm')
-rw-r--r-- | gnu/packages/firmware.scm | 54 |
1 files changed, 16 insertions, 38 deletions
diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index 85fdaf3fba..5088232214 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -1071,6 +1071,22 @@ Virtual Machines. OVMF contains a sample UEFI firmware for QEMU and KVM.") "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 @@ -1171,44 +1187,6 @@ 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-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 () |