From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: Re: [PATCH] Add gnu/packages/u-boot.scm with all the boards that u-boot supports right now Date: Thu, 21 Jul 2016 19:56:33 +0200 Message-ID: <20160721195633.43ac2a3f@scratchpost.org> References: <5f0fbebb97ed071ef040f4bb0e3f046c@d4n1.org> <87vb0a10ys.fsf@elephly.net> <20160713111136.645c3248@scratchpost.org> <20160714002213.41c4fe2c@scratchpost.org> <20160719220702.36d966d4@scratchpost.org> <87oa5rnp41.fsf@gnu.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]:39593) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQIDE-0005cT-EX for guix-devel@gnu.org; Thu, 21 Jul 2016 13:56:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bQID8-0003Q8-GN for guix-devel@gnu.org; Thu, 21 Jul 2016 13:56:43 -0400 In-Reply-To: <87oa5rnp41.fsf@gnu.org> 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: Ludovic =?UTF-8?B?Q291cnTDqHM=?= , guix-devel@gnu.org > 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. OK, will do that. > It seems to me that a lot of stuff is Debian-specific and not needed > (the debian/ directory is definitely not needed.) I agree. However, I figured it would be better for ... maintenance... if we= didn't fiddle around with other people's distributed patches. Mainstream dtc work is kinda... stalled and so lots of people made custom p= atches to make basic functionality work. For example there is no fdtget sup= port in the normal device-tree-compiler. Also, the documentation actually d= oesn't build otherwise. One can search for "patches/" in the patch which yields: +++ device-tree-compiler-1.4.0+dfsg/debian/patches/01_build_doc.patch +++ device-tree-compiler-1.4.0+dfsg/debian/patches/02_remove-unused-check-v= ariable.patch +++ device-tree-compiler-1.4.0+dfsg/debian/patches/03_Remove-unused-variabl= e-in-flat_read_mem_reserve.patch +++ device-tree-compiler-1.4.0+dfsg/debian/patches/04_Split-out-is_printabl= e_string-into-util.patch +++ device-tree-compiler-1.4.0+dfsg/debian/patches/05_Add-missing-tests-to-= gitignore.patch +++ device-tree-compiler-1.4.0+dfsg/debian/patches/06_Refactor-character-li= teral-parsing-code.patch +++ device-tree-compiler-1.4.0+dfsg/debian/patches/07_Remove-gcc-4.6-set-bu= t-not-used-warnings.patch +++ device-tree-compiler-1.4.0+dfsg/debian/patches/08_Support-character-lit= erals-in-cell-lists.patch +++ device-tree-compiler-1.4.0+dfsg/debian/patches/09_Create-Makefile_utils= -and-move-ftdump-into-it.patch +++ device-tree-compiler-1.4.0+dfsg/debian/patches/10_Add-fdt-read_write-ut= ility-functions.patch +++ device-tree-compiler-1.4.0+dfsg/debian/patches/11_Make-testutils-use-ut= ilfdt.patch +++ device-tree-compiler-1.4.0+dfsg/debian/patches/12_use-utilfdt-to-read-b= lob.patch +++ device-tree-compiler-1.4.0+dfsg/debian/patches/13_Add-fdt16_to_cpu-util= ity-function.patch +++ device-tree-compiler-1.4.0+dfsg/debian/patches/14_Add-data_append_integ= er-function.patch +++ device-tree-compiler-1.4.0+dfsg/debian/patches/15_Add-support-for-varia= ble-sized-elements.patch +++ device-tree-compiler-1.4.0+dfsg/debian/patches/16_fdtdump-rename-from-f= tdump.patch +++ device-tree-compiler-1.4.0+dfsg/debian/patches/17_libfdt-Add-support-fo= r-appending-the-values-to-a-exi.patch +++ device-tree-compiler-1.4.0+dfsg/debian/patches/18_libfdt-Activate-testc= ase-for-appending-properties.patch +++ device-tree-compiler-1.4.0+dfsg/debian/patches/19_dtc-Implement-d-optio= n-to-write-out-a-dependency-fil.patch +++ device-tree-compiler-1.4.0+dfsg/debian/patches/20_Add-fdtget-utility-to= -read-property-values-from-a-de.patch +++ device-tree-compiler-1.4.0+dfsg/debian/patches/21_Add-fdtput-utility-to= -write-property-values-to-a-dev.patch +++ device-tree-compiler-1.4.0+dfsg/debian/patches/22_Introduce-TESTS_BIN-i= n-Makefiles-to-identify-tested-.patch +++ device-tree-compiler-1.4.0+dfsg/debian/patches/23-libfdt-Add-missing-fu= nctions-to-shared-library.patch +++ device-tree-compiler-1.4.0+dfsg/debian/patches/24_libfdt-Add-some-missi= ng-symbols-to-version.lds.patch +++ device-tree-compiler-1.4.0+dfsg/debian/patches/local-add-missing-header= -706137.patch Should we carry those? If so, should we split them into extra files and put= them into our "patches" directory? > 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? Yeah, something like that. That's what the part below is supposed to do: +(define u-boot ... + #:phases (modify-phases %standard-phases + (replace + 'configure ... + (zero? (system* "make" "HOSTCC=3Dgcc" configname)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ It's like in the Linux kernel. One does=20 $ make foobar_defconfig in order to load the default config. Then $ make in order to compile. The result is incompatible with other boards. > In that case, I=E2=80=99d suggest writing a procedure like: >=20 > (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. > ))) >=20 > 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 explicit= ly call > =E2=80=98make-u-boot=E2=80=99 with the right board name Yeah, sounds much nicer.=20 How do I test this? How can I call it? Is it also possible to have a function which finds out which defconfig file= s are in the source tarball and tells about them? Maybe have some nice erro= r message if someone guesses the wrong board name? > Could=20 Yeah, I will send an updated patch :D