diff options
-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"))) |