guix-devel
[Top][All Lists]
Advanced

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

[PATCH 5/6] gnu: make-u-boot-package: Add files-to-install argument.


From: David Craven
Subject: [PATCH 5/6] gnu: make-u-boot-package: Add files-to-install argument.
Date: Mon, 26 Sep 2016 12:34:46 +0200

* gnu/packages/u-boot.scm (make-u-boot-package): Add files-to-install.
  (u-boot-vexpress, u-boot-malta, u-boot-beagle-bone-black): Use
  files-to-install.
---
 gnu/packages/u-boot.scm | 27 ++++++++++++---------------
 1 file changed, 12 insertions(+), 15 deletions(-)

diff --git a/gnu/packages/u-boot.scm b/gnu/packages/u-boot.scm
index cdd52d8..60fd48f 100644
--- a/gnu/packages/u-boot.scm
+++ b/gnu/packages/u-boot.scm
@@ -82,7 +82,7 @@ tree binary files. These are board description files used by 
Linux and BSD.")
 also initializes the boards (RAM etc).")
     (license license:gpl2+)))
 
-(define (make-u-boot-package board triplet)
+(define (make-u-boot-package board triplet files-to-install)
   "Returns a u-boot package for BOARD cross-compiled for TRIPLET."
   (package
     (inherit u-boot)
@@ -114,23 +114,20 @@ also initializes the boards (RAM etc).")
                        (closedir dir))
                      #f)))))
          (replace 'install
-           (lambda* (#:key outputs make-flags #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (libexec (string-append out "/libexec"))
-                    (uboot-files (find-files "." ".*\\.(bin|efi|spl)$")))
-               (mkdir-p libexec)
-               (for-each
-                (lambda (file)
-                  (let ((target-file (string-append libexec "/" file)))
-                    (mkdir-p (dirname target-file))
-                    (copy-file file target-file)))
-                uboot-files)))))))))
+           (lambda* (#:key outputs #:allow-other-keys)
+             (for-each (lambda (file)
+                         (let* ((out (assoc-ref outputs "out"))
+                                (source-file (string-append (getcwd) "/" file))
+                                (target-file (string-append out "/" file)))
+                           (mkdir-p (dirname target-file))
+                           (copy-file source-file target-file)))
+                       '(,@files-to-install)))))))))
 
 (define-public u-boot-vexpress
-  (make-u-boot-package "vexpress_ca9x4" "arm-linux-gnueabihf"))
+  (make-u-boot-package "vexpress_ca9x4" "arm-linux-gnueabihf" '("u-boot.bin")))
 
 (define-public u-boot-malta
-  (make-u-boot-package "malta" "mips64el-linux-gnuabi64"))
+  (make-u-boot-package "malta" "mips64el-linux-gnuabi64" '("u-boot.bin")))
 
 (define-public u-boot-beagle-bone-black
-  (make-u-boot-package "am335x_boneblack" "arm-linux-gnueabihf"))
+  (make-u-boot-package "am335x_boneblack" "arm-linux-gnueabihf" '("MLO" 
"u-boot.img")))
-- 
2.9.0



reply via email to

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