From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: [PATCH v2 1/2] gnu: Add dtc. Date: Wed, 31 Aug 2016 23:34:36 +0200 Message-ID: <20160831213437.31115-2-dannym@scratchpost.org> References: <20160831213437.31115-1-dannym@scratchpost.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------2.9.1" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57548) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfD9n-0001rB-Vk for guix-devel@gnu.org; Wed, 31 Aug 2016 17:34:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bfD9i-0003G8-Fm for guix-devel@gnu.org; Wed, 31 Aug 2016 17:34:50 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:37318) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfD9i-0003Fy-5s for guix-devel@gnu.org; Wed, 31 Aug 2016 17:34:46 -0400 In-Reply-To: <20160831213437.31115-1-dannym@scratchpost.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: guix-devel@gnu.org This is a multi-part message in MIME format. --------------2.9.1 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: quoted-printable gnu: Add dtc. * gnu/packages/u-boot.scm (dtc): New variable. Co-authored-by: David Craven --- gnu/local.mk | 4 ++ gnu/packages/patches/dtc-01_build_doc.patch | 22 ++++++++ ...t-Add-missing-functions-to-shared-library.patch | 30 ++++++++++ ...t-Add-some-missing-symbols-to-version.lds.patch | 33 +++++++++++ gnu/packages/u-boot.scm | 65 ++++++++++++++++= ++++++ 5 files changed, 154 insertions(+) create mode 100644 gnu/packages/patches/dtc-01_build_doc.patch create mode 100644 gnu/packages/patches/dtc-23-libfdt-Add-missing-functi= ons-to-shared-library.patch create mode 100644 gnu/packages/patches/dtc-24_libfdt-Add-some-missing-s= ymbols-to-version.lds.patch create mode 100644 gnu/packages/u-boot.scm --------------2.9.1 Content-Type: text/x-patch; name="0001-gnu-Add-dtc.patch" Content-Disposition: attachment; filename="0001-gnu-Add-dtc.patch" Content-Transfer-Encoding: quoted-printable diff --git a/gnu/local.mk b/gnu/local.mk index 66ef07b..799b6f0 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -345,6 +345,7 @@ GNU_SYSTEM_MODULES =3D \ %D%/packages/tor.scm \ %D%/packages/tre.scm \ %D%/packages/tv.scm \ + %D%/packages/u-boot.scm \ %D%/packages/unrtf.scm \ %D%/packages/upnp.scm \ %D%/packages/uucp.scm \ @@ -809,6 +810,9 @@ dist_patch_DATA =3D \ %D%/packages/patches/torsocks-dns-test.patch \ %D%/packages/patches/totem-debug-format-fix.patch \ %D%/packages/patches/tuxpaint-stamps-path.patch \ + %D%/packages/patches/u-boot-dtc-01_build_doc.patch \ + %D%/packages/patches/u-boot-dtc-23-libfdt-Add-missing-functions-to-sha= red-library.patch \ + %D%/packages/patches/u-boot-dtc-24_libfdt-Add-some-missing-symbols-to-= version.lds.patch \ %D%/packages/patches/unzip-CVE-2014-8139.patch \ %D%/packages/patches/unzip-CVE-2014-8140.patch \ %D%/packages/patches/unzip-CVE-2014-8141.patch \ diff --git a/gnu/packages/patches/dtc-01_build_doc.patch b/gnu/packages/p= atches/dtc-01_build_doc.patch new file mode 100644 index 0000000..0ecafa3 --- /dev/null +++ b/gnu/packages/patches/dtc-01_build_doc.patch @@ -0,0 +1,22 @@ +Note: the patch is from +Index: device-tree-compiler-1.0.0/Documentation/Makefile +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ device-tree-compiler-1.0.0/Documentation/Makefile 2007-08-23 18:26:2= 2.000000000 +0200 +@@ -0,0 +1,16 @@ ++all: dtc-paper.ps dtc-paper.pdf dtc-manual.txt ++ ++dtc-manual.txt: manual.txt ++ cp -f $< $@ ++ ++dtc-paper.dvi: dtc-paper.tex ++ latex $< ++ ++dtc-paper.ps: dtc-paper.dvi ++ dvips $< ++ ++dtc-paper.pdf: dtc-paper.tex ++ pdflatex $< ++ ++clean: ++ rm -f *.aux *.log *.dvi *.ps *.pdf dtc-manual.txt diff --git a/gnu/packages/patches/dtc-23-libfdt-Add-missing-functions-to-= shared-library.patch b/gnu/packages/patches/dtc-23-libfdt-Add-missing-fun= ctions-to-shared-library.patch new file mode 100644 index 0000000..3bfde67 --- /dev/null +++ b/gnu/packages/patches/dtc-23-libfdt-Add-missing-functions-to-shared-= library.patch @@ -0,0 +1,30 @@ +From a4b093f7366fdb429ca1781144d3985fa50d0fbb Mon Sep 17 00:00:00 2001 +From: Julien Grall +Date: Tue, 17 Mar 2015 16:00:34 +0000 +Subject: [PATCH] libfdt: Add missing functions to shared library + +The commit 4e76ec7 "libfdt: Add fdt_next_subnode() to permit easy +subnode iteration" adds new functions (fdt_{first,next}_subnode) but +forgot to mark them as 'global' in the shared library. + +Signed-off-by: Julien Grall +--- + libfdt/version.lds | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/libfdt/version.lds b/libfdt/version.lds +index 80b322b..941208e 100644 +--- a/libfdt/version.lds ++++ b/libfdt/version.lds +@@ -54,6 +54,8 @@ LIBFDT_1.2 { + fdt_get_property_by_offset; + fdt_getprop_by_offset; + fdt_next_property_offset; ++ fdt_first_subnode; ++ fdt_next_subnode; +=20 + local: + *; +--=20 +2.8.1 + diff --git a/gnu/packages/patches/dtc-24_libfdt-Add-some-missing-symbols-= to-version.lds.patch b/gnu/packages/patches/dtc-24_libfdt-Add-some-missin= g-symbols-to-version.lds.patch new file mode 100644 index 0000000..4f825c4 --- /dev/null +++ b/gnu/packages/patches/dtc-24_libfdt-Add-some-missing-symbols-to-vers= ion.lds.patch @@ -0,0 +1,33 @@ +From f58799be130e27cc729cb2d45566daa0bb3b8605 Mon Sep 17 00:00:00 2001 +From: David Gibson +Date: Tue, 1 Dec 2015 12:55:21 +1100 +Subject: [PATCH] libfdt: Add some missing symbols to version.lds + +Several functions in the header file were missing from the version.lds +script, meaning that they couldn't be used from a libfdt shared library. + +Reported by Ken Aaker, via github issue tracker. + +Signed-off-by: David Gibson +--- + libfdt/version.lds | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/libfdt/version.lds b/libfdt/version.lds +index f19f157..1f4e1ea 100644 +--- a/libfdt/version.lds ++++ b/libfdt/version.lds +@@ -57,6 +57,10 @@ LIBFDT_1.2 { + fdt_next_property_offset; + fdt_first_subnode; + fdt_next_subnode; ++ fdt_address_cells; ++ fdt_size_cells; ++ fdt_stringlist_contains; ++ fdt_resize; +=20 + local: + *; +--=20 +2.8.1 + diff --git a/gnu/packages/u-boot.scm b/gnu/packages/u-boot.scm new file mode 100644 index 0000000..5f3fd49 --- /dev/null +++ b/gnu/packages/u-boot.scm @@ -0,0 +1,65 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2016 Danny Milosavljevic +;;; Copyright =C2=A9 2016 David Craven +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (a= t +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages u-boot) + #:use-module (guix build-system gnu) + #:use-module (guix download) + #:use-module (guix packages) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (gnu packages) + #:use-module (gnu packages bison) + #:use-module (gnu packages flex)) + +(define-public dtc + (package + (name "dtc") + (version "1.4.1") + (source (origin + (method url-fetch) + (uri (string-append + "https://www.kernel.org/pub/software/utils/dtc/" + "dtc-" version ".tar.xz")) + (sha256 + (base32 + "155v52palf5fwfcnq696s41whjk0a5dqx98b7maqzdn7xbc2m6bp")) + (patches (search-patches "u-boot-dtc-01_build_doc.patch" + "u-boot-dtc-23-libfdt-Add-missing= -functions-to-shared-library.patch" + "u-boot-dtc-24_libfdt-Add-some-mi= ssing-symbols-to-version.lds.patch")))) + (build-system gnu-build-system) + (native-inputs + `(("bison" ,bison) + ("flex" ,flex))) + (arguments + `(#:make-flags + (list "CC=3Dgcc" (string-append "PREFIX=3D" (assoc-ref %outputs "= out"))) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-paths + (lambda _ + (substitute* "Makefile" + (("/usr/bin/install") "install")) + (substitute* "Makefile" + (("PREFIX =3D \\$\\(HOME\\)") "")))) + (delete 'configure)))) + (home-page "https://www.devicetree.org") + (synopsis "Compiles device tree source files") + (description "@command{dtc} compiles device tree source (.dts) Files= to +device tree binary (.dtb) files.=20 +These are hardware (board) description files (used by Linux and BSD).") + (license license:gpl2+))) --------------2.9.1--