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>
This commit is contained in:
Efraim Flashner 2021-08-31 10:31:35 +03:00 committed by Vagrant Cascadian
parent 62b40b96b5
commit 1acd0bf826
No known key found for this signature in database
GPG key ID: DC518FC87F9716AA

View file

@ -924,7 +924,21 @@ (define-public u-boot-sifive-unleashed
(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")))