From 1acd0bf826bcf7b2bde57677960398eea71d6491 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 31 Aug 2021 10:31:35 +0300 Subject: 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 --- gnu/packages/bootloaders.scm | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'gnu/packages/bootloaders.scm') 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"))) -- cgit v1.2.3