From patchwork Mon Sep 26 10:34:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Craven X-Patchwork-Id: 16011 Received: (qmail 53192 invoked by uid 89); 26 Sep 2016 10:35:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.2 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.8 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=BOARD, malta, H*r:Unknown X-Spam-Status: No, score=-4.8 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: lists.gnu.org Received: from lists.gnu.org (HELO lists.gnu.org) (208.118.235.17) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 26 Sep 2016 10:35:25 +0000 Received: from localhost ([::1]:43151 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boTFr-00020F-5X for patchwork@sourceware.org; Mon, 26 Sep 2016 06:35:23 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55419) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boTFd-0001wM-4W for guix-devel@gnu.org; Mon, 26 Sep 2016 06:35:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1boTFa-0004N4-Or for guix-devel@gnu.org; Mon, 26 Sep 2016 06:35:08 -0400 Received: from so254-10.mailgun.net ([198.61.254.10]:44801) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boTFZ-0004Hj-Gf for guix-devel@gnu.org; Mon, 26 Sep 2016 06:35:06 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=craven.ch; q=dns/txt; s=mx; t=1474886104; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=xiA831OHt2uFAuXKEyLEiF19oWzPRl+H7z451UWzWCc=; b=U+hx4uikT+qcfnt8cJGkxNSpcq6rzQcQX2hWz2RD7yK0m1MO1bNaNs+GcGpkmogqDxHyg809 gATVZF7nwMsXtyWqRXIWTdwf3imJdVGSUBX34jXr17Z5YTxtNrxkbRBqQMVO5zm0rvozzsiQ gTMkW18HRHpsH/EfAHzJpAvD9Kg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=craven.ch; s=mx; q=dns; h=Sender: From: To: Cc: Subject: Date: Message-Id: In-Reply-To: References; b=E/eamBGYt5QkwToEYW9IwvaUs9gTdfqCTcGSPSqNTVlsbYRuv2oPYW9+Dh6fIQ+beL3jY9 +xtq1HHls1q0PdOEJGM1iI8Oa0wjf05toRpqGt1nKvV99nq4/b6bXIMSx2DsOEjMtS21uMKy qMUZhhx9yDlBx5Xs9uNrQ5q5luRi4= X-Mailgun-Sending-Ip: 198.61.254.10 X-Mailgun-Sid: WyIxMzZlMCIsICJndWl4LWRldmVsQGdudS5vcmciLCAiMDFiMjAiXQ== Received: from xps.campus.intern (Unknown [147.88.200.113]) by mxa.mailgun.org with ESMTP id 57e8f9d7.7f86586c8b58-in06; Mon, 26 Sep 2016 10:35:03 -0000 (UTC) From: David Craven 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 Message-Id: <20160926103447.31830-5-david@craven.ch> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160926103447.31830-1-david@craven.ch> References: <20160926103447.31830-1-david@craven.ch> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 198.61.254.10 X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+patchwork=sourceware.org@gnu.org Sender: "Guix-devel" * 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")))