From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: Re: [PATCH] gnu: Add u-boot. Date: Mon, 29 Aug 2016 20:27:52 +0200 Message-ID: <20160829202752.3aa6fab0@scratchpost.org> References: <20160829144822.3188-1-david@craven.ch> <20160829161626.25216-1-david@craven.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60657) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1beRHu-0001Dx-TS for guix-devel@gnu.org; Mon, 29 Aug 2016 14:28:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1beRHp-0006dW-Od for guix-devel@gnu.org; Mon, 29 Aug 2016 14:28:01 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:38485) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1beRHp-0006dR-H7 for guix-devel@gnu.org; Mon, 29 Aug 2016 14:27:57 -0400 In-Reply-To: <20160829161626.25216-1-david@craven.ch> 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+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: David Craven Cc: guix-devel@gnu.org > +(define (make-u-boot-package board triplet xgcc) ... > + (begin > + (display "Invalid boardname. Valid boardnames would have been:") > + (newline) > + (system* "ls" "-1" "configs") > + #f))))) I've improved the error message if the board name is unknown: #:phases (modify-phases %standard-phases (replace 'configure (lambda* (#:key outputs make-flags #:allow-other-keys) (let ((configname (string-append ,board "_defconfig"))) (if (zero? (system* "ls" (string-append "configs/" configname))) (zero? (apply system* "make" `(,@make-flags ,configname))) (begin (use-modules (ice-9 match) (ice-9 format)) (display "Invalid boardname. Valid boardnames would have been:") (newline) (let ((dir (opendir "configs"))) (do ((filename (readdir dir) (readdir dir))) ((eof-object? filename)) (if (string-suffix? "_defconfig" filename) (format #t "- ~A\n" (string-drop-right filename (string-length "_defconfig"))))) (closedir dir)) #f))))) (replace 'install (lambda* (#:key outputs make-flags #:allow-other-keys) (let ((out (string-append (assoc-ref outputs "out") "/libexec"))) (mkdir-p out) (for-each (lambda (name) (let ((outname (string-append out "/" name))) (mkdir-p (dirname outname)) (copy-file name outname))) (find-files "." ".*\\.(bin|efi)$"))))))))))