From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] Add gnu/packages/u-boot.scm with all the boards that u-boot supports right now Date: Thu, 21 Jul 2016 14:37:50 +0200 Message-ID: <87oa5rnp41.fsf@gnu.org> References: <5f0fbebb97ed071ef040f4bb0e3f046c@d4n1.org> <87vb0a10ys.fsf@elephly.net> <20160713111136.645c3248@scratchpost.org> <20160714002213.41c4fe2c@scratchpost.org> <20160719220702.36d966d4@scratchpost.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36558) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQDEl-0000Mn-0R for guix-devel@gnu.org; Thu, 21 Jul 2016 08:38:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bQDEh-0003Pg-5W for guix-devel@gnu.org; Thu, 21 Jul 2016 08:37:58 -0400 In-Reply-To: <20160719220702.36d966d4@scratchpost.org> (Danny Milosavljevic's message of "Tue, 19 Jul 2016 22:07:02 +0200") 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: Danny Milosavljevic Cc: guix-devel@gnu.org Danny Milosavljevic skribis: > (Note: the patch is from ) This note should go to the top of the .patch file, along with one or two sentences explaining what it does and why we need it. > * gnu/packages/u-boot.scm (u-boot, u-boot-*): New variables. > * gnu/packages/patches/device-tree-compiler_1.4.0+dfsg-2ubuntu1.diff: New= file. [...] > diff --git a/gnu/packages/patches/device-tree-compiler_1.4.0+dfsg-2ubuntu= 1.diff b/gnu/packages/patches/device-tree-compiler_1.4.0+dfsg-2ubuntu1.diff > new file mode 100644 > index 0000000..6b160a7 > --- /dev/null > +++ b/gnu/packages/patches/device-tree-compiler_1.4.0+dfsg-2ubuntu1.diff > @@ -0,0 +1,5059 @@ > +--- device-tree-compiler-1.4.0+dfsg.orig/debian/README.Debian > ++++ device-tree-compiler-1.4.0+dfsg/debian/README.Debian > +@@ -0,0 +1,8 @@ > ++device-tree-compiler for Debian > ++------------------------------- > ++ > ++The original package is named dtc. However, there was already a > ++dtc package in the archive. Therefore, we decided to rename dtc to > ++device-tree-compiler. It seems to me that a lot of stuff is Debian-specific and not needed (the debian/ directory is definitely not needed.) > +(define-public u-boot-T4160RDB > + (package (inherit u-boot) > + (name "u-boot-T4160RDB"))) > +(define-public u-boot-T4240QDS_NAND > + (package (inherit u-boot) > + (name "u-boot-T4240QDS_NAND"))) > +(define-public u-boot-T4240QDS_SDCARD > + (package (inherit u-boot) > + (name "u-boot-T4240QDS_SDCARD"))) This leads to packages with different names but that are otherwise completely identical. I suppose the configure flags must also be changed as a function of the board? In that case, I=E2=80=99d suggest writing a procedure like: (define (make-u-boot-package board) (package (inherit u-boot) (name (string-append "u-boot-" (string-downcase board))) (arguments ;; =E2=80=A6 pass the right configure flags etc. ))) Then it=E2=80=99s probably enough to export =E2=80=98u-boot=E2=80=99 and = =E2=80=98make-u-boot=E2=80=99=E2=80=94having a zillion variables doesn=E2=80=99t seem very helpful. People can explicitly= call =E2=80=98make-u-boot=E2=80=99 with the right board name WDYT? Could=20