guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

28/37: gnu: u-boot-sifive-unmatched: Build with opensbi.


From: guix-commits
Subject: 28/37: gnu: u-boot-sifive-unmatched: Build with opensbi.
Date: Tue, 2 Nov 2021 03:27:16 -0400 (EDT)

efraim pushed a commit to branch wip-riscv
in repository guix.

commit 30c0c141abb41b9a2f6f24c1a70f25bde5dd936d
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Tue Aug 31 10:31:35 2021 +0300

    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-firmware-fu540.
---
 gnu/packages/bootloaders.scm | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index bb66868..e00599b 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -918,7 +918,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-sifive-fu540)
+         ,@(package-inputs base))))))
 
 (define-public u-boot-rock64-rk3328
   (let ((base (make-u-boot-package "rock64-rk3328" "aarch64-linux-gnu")))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]