[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Add gnu/packages/u-boot.scm with all the boards that u-boot
From: |
Ludovic Courtès |
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 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Danny Milosavljevic <address@hidden> skribis:
> (Note: the patch is from
> <https://launchpad.net/ubuntu/+archive/primary/+files/device-tree-compiler_1.4.0+dfsg-2ubuntu1.diff.gz>)
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-2ubuntu1.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’d suggest writing a procedure like:
(define (make-u-boot-package board)
(package
(inherit u-boot)
(name (string-append "u-boot-" (string-downcase board)))
(arguments
;; … pass the right configure flags etc.
)))
Then it’s probably enough to export ‘u-boot’ and ‘make-u-boot’—having a
zillion variables doesn’t seem very helpful. People can explicitly call
‘make-u-boot’ with the right board name
WDYT?
Could
Re: GuixSD on ARM, Ludovic Courtès, 2016/07/13
Re: GuixSD on ARM, Eric Bavier, 2016/07/18