diff mbox series

[bug#60224,v3,06/11] gnu: u-boot-firefly-rk3399: Use gexps and fix cross-build.

Message ID 20230102004637.3920-6-maxim.cournoyer@gmail.com
State New
Headers show
Series [bug#60224,v3,01/11] gnu: make-u-boot-package: Add a u-boot argument and use gexps. | expand

Commit Message

Maxim Cournoyer Jan. 2, 2023, 12:46 a.m. UTC
* gnu/packages/bootloaders.scm (u-boot-firefly-rk3399) [arguments]: Use gexps.
[phases] {set-environment}: Look for the bl31.elf in native-inputs, useful when
cross-compiling.
---

(no changes since v1)

 gnu/packages/bootloaders.scm | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 602ec7f8a3..8a56ee9cec 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -1160,16 +1160,17 @@  (define-public u-boot-firefly-rk3399
       (arguments
        (substitute-keyword-arguments (package-arguments base)
          ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'set-environment
-               (lambda* (#:key inputs #:allow-other-keys)
-                 (setenv "BL31" (search-input-file inputs "/bl31.elf"))))
-             ;; Phases do not succeed on the bl31 ELF.
-             (delete 'strip)
-             (delete 'validate-runpath)))))
+          #~(modify-phases #$phases
+              (add-after 'unpack 'set-environment
+                (lambda* (#:key native-inputs inputs #:allow-other-keys)
+                  (setenv "BL31" (search-input-file (or native-inputs inputs)
+                                                    "bl31.elf"))))
+              ;; Phases do not succeed on the bl31 ELF.
+              (delete 'strip)
+              (delete 'validate-runpath)))))
       (native-inputs
-       `(("firmware" ,arm-trusted-firmware-rk3399)
-         ,@(package-native-inputs base))))))
+       (modify-inputs (package-native-inputs base)
+         (append arm-trusted-firmware-rk3399))))))
 
 (define-public u-boot-rockpro64-rk3399
   (let ((base (make-u-boot-package "rockpro64-rk3399" "aarch64-linux-gnu"