diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2021-08-31 10:31:35 +0300 |
---|---|---|
committer | Vagrant Cascadian <vagrant@debian.org> | 2021-12-30 20:11:13 -0800 |
commit | 1acd0bf826bcf7b2bde57677960398eea71d6491 (patch) | |
tree | ae2900dbb30ead0c9834c1656e00a5e8af43fa3b /gnu | |
parent | 62b40b96b56dd4a9b48064a9e7422f42994cfbdc (diff) | |
download | guix-1acd0bf826bcf7b2bde57677960398eea71d6491.tar.gz guix-1acd0bf826bcf7b2bde57677960398eea71d6491.zip |
gnu: u-boot-sifive-unmatched: Build with opensbi.
* gnu/packages/bootloaders.scm (u-boot-sifive-unmatched)[arguments]: Add
phase to set location of opensbi firmware.
[inputs]: Add opensbi-generic.
Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/bootloaders.scm | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index be6cb8f22a..54e47059ee 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -924,7 +924,21 @@ to Novena upstream, does not load u-boot.img from the first partition.") (make-u-boot-package "sifive_unleashed" "riscv64-linux-gnu")) (define-public u-boot-sifive-unmatched - (make-u-boot-package "sifive_unmatched" "riscv64-linux-gnu")) + (let ((base (make-u-boot-package "sifive_unmatched" "riscv64-linux-gnu"))) + (package + (inherit base) + (arguments + (substitute-keyword-arguments (package-arguments base) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'unpack 'set-environment + (lambda* (#:key inputs #:allow-other-keys) + (let ((opensbi (string-append (assoc-ref inputs "firmware") + "/fw_dynamic.bin"))) + (setenv "OPENSBI" opensbi)))))))) + (inputs + `(("firmware" ,opensbi-generic) + ,@(package-inputs base)))))) (define-public u-boot-rock64-rk3328 (let ((base (make-u-boot-package "rock64-rk3328" "aarch64-linux-gnu"))) |