From: David Craven <david@craven.ch>
To: guix-devel@gnu.org
Subject: [PATCH 5/6] gnu: make-u-boot-package: Add files-to-install argument.
Date: Mon, 26 Sep 2016 12:34:46 +0200 [thread overview]
Message-ID: <20160926103447.31830-5-david@craven.ch> (raw)
In-Reply-To: <20160926103447.31830-1-david@craven.ch>
* 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
next prev parent reply other threads:[~2016-09-26 10:35 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-26 10:34 [PATCH 1/6] gnu: Add picocom David Craven
2016-09-26 10:34 ` [PATCH 2/6] gnu: %default-extra-linux-options: Remove redundant options David Craven
2016-09-29 8:40 ` Ludovic Courtès
2016-09-29 8:53 ` David Craven
2016-09-29 10:33 ` David Craven
2016-09-29 12:35 ` Ludovic Courtès
2016-09-26 10:34 ` [PATCH 3/6] gnu: make-linux-libre: Install device tree files David Craven
2016-09-26 10:34 ` [PATCH 4/6] gnu: linux-libre-beagle-bone-black: Remove kernel variant David Craven
2016-09-26 13:23 ` John Darrington
2016-09-26 13:25 ` David Craven
2016-09-26 14:24 ` Vincent Legoll
2016-09-26 15:57 ` Ricardo Wurmus
2016-09-26 16:49 ` John Darrington
2016-09-26 16:57 ` Vincent Legoll
2016-09-26 17:31 ` Leo Famulari
2016-09-26 18:00 ` John Darrington
2016-09-26 18:06 ` David Craven
2016-09-26 18:22 ` Vincent Legoll
2016-09-26 18:28 ` David Craven
2016-09-26 18:34 ` Leo Famulari
2016-09-28 21:13 ` Ludovic Courtès
2016-09-27 10:47 ` Tobias Geerinckx-Rice
2016-09-28 0:14 ` Mark H Weaver
2016-09-28 6:16 ` John Darrington
2016-09-28 21:15 ` Ludovic Courtès
2016-09-28 21:11 ` Ludovic Courtès
2016-10-03 12:49 ` Vincent Legoll
2016-10-03 15:40 ` Ludovic Courtès
2016-10-04 14:32 ` Vincent Legoll
2016-09-26 10:34 ` David Craven [this message]
2016-09-26 12:39 ` [PATCH 5/6] gnu: make-u-boot-package: Add files-to-install argument Danny Milosavljevic
2016-09-26 13:38 ` David Craven
2016-09-26 13:41 ` David Craven
2016-09-26 14:04 ` Danny Milosavljevic
2016-09-26 14:07 ` David Craven
2016-09-26 22:28 ` Danny Milosavljevic
2016-10-07 8:19 ` David Craven
2016-10-07 9:26 ` Danny Milosavljevic
2016-09-26 10:34 ` [PATCH 6/6] gnu: make-u-boot-package: Don't cross compile on arm David Craven
2016-09-26 17:24 ` [PATCH 1/6] gnu: Add picocom Leo Famulari
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160926103447.31830-5-david@craven.ch \
--to=david@craven.ch \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).