dtc: fix project and download url
PATCH v2 1/4 dtc: fix project and download url
and rename patches to new convention
--- package/dtc/0001-separate-lib-install.patch | 28 +++++++++++++++++++++++++ package/dtc/0002-extra-cflags.patch | 32 +++++++++++++++++++++++++++++ package/dtc/Config.in | 2 +- package/dtc/dtc-extra_cflags.patch | 32 ----------------------------- package/dtc/dtc-separate-lib-install.patch | 28 ------------------------- package/dtc/dtc.mk | 5 +++-- 6 files changed, 64 insertions(+), 63 deletions(-) create mode 100644 package/dtc/0001-separate-lib-install.patch create mode 100644 package/dtc/0002-extra-cflags.patch delete mode 100644 package/dtc/dtc-extra_cflags.patch delete mode 100644 package/dtc/dtc-separate-lib-install.patch
package/dtc/0001-separate-lib-install.patch new file +28 -0
@@ -0,0 +1,28 @@ +Makefile: add a rule to only install libfdt + +Signed-off-by: "Yann E. MORIN" <[email protected]> + +--- +Patch not sent upstream. + +It's really specific to buildroot, and is probably not +good (aka generic) enough to be pushed upstream. + +diff --git a/Makefile b/Makefile +index 1169e6c..39e7190 100644 +--- a/Makefile ++++ b/Makefile +@@ -160,10 +160,12 @@ endif + # intermediate target and building them again "for real" + .SECONDARY: $(DTC_GEN_SRCS) $(CONVERT_GEN_SRCS) + +-install: all $(SCRIPTS) ++install: all $(SCRIPTS) libfdt_install + @$(VECHO) INSTALL + $(INSTALL) -d $(DESTDIR)$(BINDIR) + $(INSTALL) $(BIN) $(SCRIPTS) $(DESTDIR)$(BINDIR) ++ ++libfdt_install: libfdt + $(INSTALL) -d $(DESTDIR)$(LIBDIR) + $(INSTALL) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR) + ln -sf $(notdir $(LIBFDT_lib)) $(DESTDIR)$(LIBDIR)/$(LIBFDT_soname)
package/dtc/0002-extra-cflags.patch new file +32 -0
@@ -0,0 +1,32 @@ +Makefile: append the CFLAGS to existing ones + +Allow the user to pass custom CFLAGS (eg. optimisation flags). + +Do not use EXTRA_CFLAGS, append to existing CFLAGS with += (Arnout) + +Signed-off-by: "Yann E. MORIN" <[email protected]> +Cc: Arnout Vandecappelle <[email protected]> + +--- +Patch not sent upstream. + +Although not specific to buildroot, I am not sure this is the best +way to handle user-supplied CFLAGS. + +diff --git a/Makefile b/Makefile +index 962f94eba661..bf6b317158cf 100644 +--- a/Makefile ++++ b/Makefile +@@ -16,9 +16,10 @@ LOCAL_VERSION = + CONFIG_LOCALVERSION = + + CPPFLAGS = -I libfdt -I . +-WARNINGS = -Werror -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \ ++WARNINGS = -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \ + -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls +-CFLAGS = -g -Os -fPIC -Werror $(WARNINGS) ++CFLAGS ?= -g -Os ++CFLAGS += -fPIC $(WARNINGS) + + BISON = bison + LEX = flex
package/dtc/Config.in +1 -1
@@ -8,7 +8,7 @@ config BR2_PACKAGE_DTC Note that only the library is installed. If you want the programs, say 'y' here, and to "dtc programs", below. - http://git.jdl.com/gitweb/?p=dtc.git (no home page) + https://git.kernel.org/cgit/utils/dtc/dtc.git if BR2_PACKAGE_DTC
package/dtc/dtc-extra_cflags.patch deleted +0 -32
@@ -1,32 +0,0 @@ -Makefile: append the CFLAGS to existing ones - -Allow the user to pass custom CFLAGS (eg. optimisation flags). - -Do not use EXTRA_CFLAGS, append to existing CFLAGS with += (Arnout) - -Signed-off-by: "Yann E. MORIN" <[email protected]> -Cc: Arnout Vandecappelle <[email protected]> - ---- -Patch not sent upstream. - -Although not specific to buildroot, I am not sure this is the best -way to handle user-supplied CFLAGS. - -diff --git a/Makefile b/Makefile -index 962f94eba661..bf6b317158cf 100644 ---- a/Makefile -+++ b/Makefile -@@ -16,9 +16,10 @@ LOCAL_VERSION = - CONFIG_LOCALVERSION = - - CPPFLAGS = -I libfdt -I . --WARNINGS = -Werror -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \ -+WARNINGS = -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \ - -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls --CFLAGS = -g -Os -fPIC -Werror $(WARNINGS) -+CFLAGS ?= -g -Os -+CFLAGS += -fPIC $(WARNINGS) - - BISON = bison - LEX = flex
package/dtc/dtc-separate-lib-install.patch deleted +0 -28
@@ -1,28 +0,0 @@ -Makefile: add a rule to only install libfdt - -Signed-off-by: "Yann E. MORIN" <[email protected]> - ---- -Patch not sent upstream. - -It's really specific to buildroot, and is probably not -good (aka generic) enough to be pushed upstream. - -diff --git a/Makefile b/Makefile -index 1169e6c..39e7190 100644 ---- a/Makefile -+++ b/Makefile -@@ -160,10 +160,12 @@ endif - # intermediate target and building them again "for real" - .SECONDARY: $(DTC_GEN_SRCS) $(CONVERT_GEN_SRCS) - --install: all $(SCRIPTS) -+install: all $(SCRIPTS) libfdt_install - @$(VECHO) INSTALL - $(INSTALL) -d $(DESTDIR)$(BINDIR) - $(INSTALL) $(BIN) $(SCRIPTS) $(DESTDIR)$(BINDIR) -+ -+libfdt_install: libfdt - $(INSTALL) -d $(DESTDIR)$(LIBDIR) - $(INSTALL) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR) - ln -sf $(notdir $(LIBFDT_lib)) $(DESTDIR)$(LIBDIR)/$(LIBFDT_soname)
package/dtc/dtc.mk +3 -2
@@ -4,8 +4,9 @@ # ################################################################################ -DTC_VERSION = v1.4.0 -DTC_SITE = git://git.jdl.com/software/dtc.git +DTC_VERSION = 1.4.0 +DTC_SOURCE = dtc-$(DTC_VERSION).tar.xz +DTC_SITE = https://www.kernel.org/pub/software/utils/dtc DTC_LICENSE = GPLv2+/BSD-2c DTC_LICENSE_FILES = README.license GPL DTC_INSTALL_STAGING = YES
Signature · 1 line
2.1.2
PATCH v2 2/4 dtc: bump version to 1.4.1
Patch 0001-separate-lib-install.patch is no longer needed, original Makefile already contains separate install-lib target.
Adjust 0002-extra-cflags.patch.
Add hash file.
---
Changes v1 -> v2:
- delete additional invalid comment
--- package/dtc/0001-separate-lib-install.patch | 28 ---------------------------- package/dtc/0002-extra-cflags.patch | 2 +- package/dtc/dtc.hash | 2 ++ package/dtc/dtc.mk | 7 +++---- 4 files changed, 6 insertions(+), 33 deletions(-) delete mode 100644 package/dtc/0001-separate-lib-install.patch create mode 100644 package/dtc/dtc.hash
package/dtc/0001-separate-lib-install.patch deleted +0 -28
@@ -1,28 +0,0 @@ -Makefile: add a rule to only install libfdt - -Signed-off-by: "Yann E. MORIN" <[email protected]> - ---- -Patch not sent upstream. - -It's really specific to buildroot, and is probably not -good (aka generic) enough to be pushed upstream. - -diff --git a/Makefile b/Makefile -index 1169e6c..39e7190 100644 ---- a/Makefile -+++ b/Makefile -@@ -160,10 +160,12 @@ endif - # intermediate target and building them again "for real" - .SECONDARY: $(DTC_GEN_SRCS) $(CONVERT_GEN_SRCS) - --install: all $(SCRIPTS) -+install: all $(SCRIPTS) libfdt_install - @$(VECHO) INSTALL - $(INSTALL) -d $(DESTDIR)$(BINDIR) - $(INSTALL) $(BIN) $(SCRIPTS) $(DESTDIR)$(BINDIR) -+ -+libfdt_install: libfdt - $(INSTALL) -d $(DESTDIR)$(LIBDIR) - $(INSTALL) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR) - ln -sf $(notdir $(LIBFDT_lib)) $(DESTDIR)$(LIBDIR)/$(LIBFDT_soname)
package/dtc/0002-extra-cflags.patch +1 -1
@@ -23,7 +23,7 @@ index 962f94eba661..bf6b317158cf 100644 CPPFLAGS = -I libfdt -I . -WARNINGS = -Werror -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \ +WARNINGS = -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \ - -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls + -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wshadow -CFLAGS = -g -Os -fPIC -Werror $(WARNINGS) +CFLAGS ?= -g -Os +CFLAGS += -fPIC $(WARNINGS)
package/dtc/dtc.hash new file +2 -0
@@ -0,0 +1,2 @@ +# from https://www.kernel.org/pub/software/utils/dtc/sha256sums.asc +sha256 77992ad8eac7b68f553d0ba58e5b51604ac803d126196c99e3ae38aaae28bb94 dtc-1.4.1.tar.xz
package/dtc/dtc.mk +3 -4
@@ -4,7 +4,7 @@ # ################################################################################ -DTC_VERSION = 1.4.0 +DTC_VERSION = 1.4.1 DTC_SOURCE = dtc-$(DTC_VERSION).tar.xz DTC_SITE = https://www.kernel.org/pub/software/utils/dtc DTC_LICENSE = GPLv2+/BSD-2c
@@ -29,8 +29,7 @@ endif else # $(BR2_PACKAGE_DTC_PROGRAMS) != y DTC_BUILD_GOAL = libfdt -#?libfdt_install is our own install rule added by our patch -DTC_INSTALL_GOAL = libfdt_install +DTC_INSTALL_GOAL = install-lib endif # $(BR2_PACKAGE_DTC_PROGRAMS) != y
@@ -42,7 +41,7 @@ endef # For staging, only the library is needed define DTC_INSTALL_STAGING_CMDS - $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) PREFIX=/usr libfdt_install + $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) PREFIX=/usr install-lib endef define DTC_INSTALL_TARGET_CMDS
Signature · 1 line
2.1.2
PATCH v2 2/4 dtc: bump version to 1.4.1
Dear Peter Seiderer,
Quoted 11 lines · Peter Seiderer
Patch 0001-separate-lib-install.patch is no longer needed, original
Makefilealready contains separate install-lib target.Adjust 0002-extra-cflags.patch.
Add hash file.
Signed-off-by Peter Seiderer <[email protected]>---
Changes v1 -> v2:
- delete additional invalid comment
This patch breaks the build, when building only the libfdt and not the programs:
Quoted 1 line
Quoted 1 line
Quoted 1 line
dtc 1.4.1 Installing to staging directory
/usr/bin/make -j5 -C /home/thomas/projets/buildroot/output/build/dtc-1.4.1 DESTDIR=/home/thomas/projets/buildroot/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot PREFIX=/usr install-lib make[1]: Entering directory '/home/thomas/projets/buildroot/output/build/dtc-1.4.1'
CHK version_gen.h
CC util.o
CC srcpos.o
CC convert-dtsv0-lexer.lex.o
CC dtc.o
CC checks.o
CC data.o
CC flattree.o
CC fstree.o
CC livetree.o
CC dtc-lexer.lex.o
CC treesource.o
CC dtc-parser.tab.o
CC fdtdump.o
CC fdtget.o
CC fdtput.o
LD fdtdump
LD convert-dtsv0
LD fdtget
LD dtc/usr/bin/ld: libfdt/libfdt.a(fdt.o): Relocations in generic ELF (EM: 40)
libfdt/libfdt.a: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
Makefile:236: recipe for target 'fdtget' failed
make[1]: *** [fdtget] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/thomas/projets/buildroot/output/build/dtc-1.4.1'
This is due to the fact that the install-lib target depends on all. When building only libfdt, we do "make libfdt" during the build step, and then "make install-lib" during the install step, and this triggers the build of the DTC programs, due to the dependency on the all target. Unfortunately, since we don't pass CC, LD and al. at install time, this doesn't work.
So I would suggest to just build everything (i.e plain "make" for the build), and then use install-lib.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 2/4 dtc: bump version to 1.4.1
Hello Thomas,
Quoted 62 lines
Gesendet: Montag, 12. Januar 2015 um 21:07 Uhr
Von: "Thomas Petazzoni" <[email protected]>
An: "Peter Seiderer" <[email protected]>
Cc: buildroot at busybox.net
Betreff: Re: [Buildroot] [PATCH v2 2/4] dtc: bump version to 1.4.1Dear Peter Seiderer,
Quoted 11 lines · Peter Seiderer
Patch 0001-separate-lib-install.patch is no longer needed, original
Makefilealready contains separate install-lib target.Adjust 0002-extra-cflags.patch.
Add hash file.
Signed-off-by Peter Seiderer <[email protected]>---
Changes v1 -> v2:
- delete additional invalid commentThis patch breaks the build, when building only the libfdt and not the programs:
Quoted 1 line
Quoted 1 line
Quoted 1 line
dtc 1.4.1 Installing to staging directory
/usr/bin/make-j5 -C/home/thomas/projets/buildroot/output/build/dtc-1.4.1DESTDIR=/home/thomas/projets/buildroot/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot PREFIX=/usr install-lib make[1]: Entering directory '/home/thomas/projets/buildroot/output/build/dtc-1.4.1'
CHKversion_gen.h
CC util.o
CC srcpos.o
CC convert-dtsv0-lexer.lex.o
CC dtc.o
CC checks.o
CC data.o
CC flattree.o
CC fstree.o
CC livetree.o
CC dtc-lexer.lex.o
CC treesource.o
CC dtc-parser.tab.o
CC fdtdump.o
CC fdtget.o
CC fdtput.o
LD fdtdump
LD convert-dtsv0
LD fdtget
LD dtc/usr/bin/ld: libfdt/libfdt.a(fdt.o): Relocations in generic ELF (EM: 40)
libfdt/libfdt.a: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
Makefile:236: recipe for target 'fdtget' failed
make[1]: *** [fdtget] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/thomas/projets/buildroot/output/build/dtc-1.4.1'This is due to the fact that the install-lib target depends on all. When building only libfdt, we do "make libfdt" during the build step, and then "make install-lib" during the install step, and this triggers the build of the DTC programs, due to the dependency on the all target. Unfortunately, since we don't pass CC, LD and al. at install time, this doesn't work.
Quoted 3 lines
So I would suggest to just build everything (i.e plain "make" for the build), and then use install-lib.
Many thanks for testing (and failure analysis), will try your suggestion and respin the patchset...
Regards,
Peter
Quoted 8 lines
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 3/4 dtc: add host build
In reply to Peter Seiderer---
Changes v1 -> v2:
- fix host build command (use native compiler instead of cross compiler)
--- package/Config.in.host | 1 + package/dtc/Config.in.host | 9 +++++++++ package/dtc/dtc.mk | 14 ++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 package/dtc/Config.in.host
package/Config.in.host +1 -0
@@ -5,6 +5,7 @@ menu "Host utilities" source "package/dfu-util/Config.in.host" source "package/dos2unix/Config.in.host" source "package/dosfstools/Config.in.host" + source "package/dtc/Config.in.host" source "package/e2fsprogs/Config.in.host" source "package/e2tools/Config.in.host" source "package/genext2fs/Config.in.host"
package/dtc/Config.in.host new file +9 -0
@@ -0,0 +1,9 @@ +config BR2_PACKAGE_HOST_DTC + bool "host dtc" + help + The Device Tree Compiler, dtc, takes as input a device-tree in + a given format and outputs a device-tree in another format. + + Install host tools: dtc, convert-dtsv0, fdtdump, fdtget and fdtput. + + https://git.kernel.org/cgit/utils/dtc/dtc.git
package/dtc/dtc.mk +14 -0
@@ -48,4 +48,18 @@ define DTC_INSTALL_TARGET_CMDS $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) PREFIX=/usr $(DTC_INSTALL_GOAL) endef +# host build +HOST_DTC_DEPENDENCIES = host-bison host-flex + +define HOST_DTC_BUILD_CMDS + $(HOST_CONFIGURE_OPTS) \ + CFLAGS="$(HOST_CFLAGS)" \ + $(MAKE) -C $(@D) PREFIX=/usr +endef + +define HOST_DTC_INSTALL_CMDS + $(MAKE) -C $(@D) DESTDIR=$(HOST_DIR) PREFIX=/usr install-bin +endef + $(eval $(generic-package)) +$(eval $(host-generic-package))
Signature · 1 line
2.1.2
PATCH v2 3/4 dtc: add host build
Dear Peter Seiderer,
Quoted 6 lines · Peter Seiderer
package/dtc/Config.in.host new file +0
-0
package/dtc/Config.in.host line 9
Quoted 9 lines
package/dtc/Config.in.host new file +9
-0@@ -0,0 +1,9 @@ +config BR2_PACKAGE_HOST_DTC + bool "host dtc" + help + The Device Tree Compiler, dtc, takes as input a device-tree in + a given format and outputs a device-tree in another format. + + Install host tools: dtc, convert-dtsv0, fdtdump, fdtget and fdtput. + + https://git.kernel.org/cgit/utils/dtc/dtc.git
I'd like to understand a bit more how this is going to be used exactly, to see whether there is really a need for a menuconfig option for this host package. Most host packages are merely build dependencies for another package, and as such, don't need to appear in menuconfig.
How is host dtc going to be used in your use case?
package/dtc/Config.in.host
Quoted 2 lines
package/dtc/Config.in.host new file +2
-0+# host build +HOST_DTC_DEPENDENCIES = host-bison host-flex
Not really needed, those dependencies are automatically inherited from DTC_DEPENDENCIES.
package/dtc/Config.in.host
Quoted 3 lines
package/dtc/Config.in.host new file +3
-0+define HOST_DTC_BUILD_CMDS + $(HOST_CONFIGURE_OPTS) \ + CFLAGS="$(HOST_CFLAGS)" \
Not needed, this definition of CFLAGS is already in $(HOST_CONFIGURE_OPTS).
Otherwise, looks good.
Thanks,
Thomas Petazzoni
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 3/4 dtc: add host build
Hello Thomas,
Quoted 31 lines
Gesendet: Montag, 12. Januar 2015 um 21:42 Uhr
Von: "Thomas Petazzoni" <[email protected]>
An: "Peter Seiderer" <[email protected]>
Cc: buildroot at busybox.net
Betreff: Re: [Buildroot] [PATCH v2 3/4] dtc: add host buildDear Peter Seiderer,
Quoted 6 lines · Peter Seiderer
package/dtc/Config.in.host new file +0
-0package/dtc/Config.in.host line 9
Quoted 9 lines
package/dtc/Config.in.host new file +9
-0@@ -0,0 +1,9 @@ +config BR2_PACKAGE_HOST_DTC + bool "host dtc" + help + The Device Tree Compiler, dtc, takes as input a device-tree in + a given format and outputs a device-tree in another format. + + Install host tools: dtc, convert-dtsv0, fdtdump, fdtget and fdtput. + + https://git.kernel.org/cgit/utils/dtc/dtc.gitI'd like to understand a bit more how this is going to be used exactly, to see whether there is really a need for a menuconfig option for this host package. Most host packages are merely build dependencies for another package, and as such, don't need to appear in menuconfig.
Quoted 1 line
How is host dtc going to be used in your use case?
With the host dtc tools I can build/rebuild (and debug) the needed dtb files for my Raspberry Pi. With the overlay extension (see next patch in the series) it is possible do deploy extra overlays e.g. enable i2c/spi etc. when using Yann's rpi update [1].
I can give a complete example soon, now I have my rpi tft display runnnig, needed to adjust the videocore dtb to enable the 4 buttons (set gpio pins to pull_up, see [2] for description) and enable spi with an dtb overlay (see [3] for description)...
[1] http://lists.busybox.net/pipermail/buildroot/2015-January/116918.html
[2] http://www.raspberrypi.org/documentation/configuration/pin-configuration.md
[3] https://github.com/raspberrypi/documentation/blob/master/configuration/device-tree.md
The videcore dbt adjusting could be done with the kernel-tree provided dtc, the overlay support needs a patched dtc...
Quoted 6 lines
package/dtc/Config.in.host
Quoted 3 lines
package/dtc/Config.in.host new file +2
-0+# host build +HOST_DTC_DEPENDENCIES = host-bison host-flexNot really needed, those dependencies are automatically inherited from
DTC_DEPENDENCIES.
O.k. thats fine, will remove...
Quoted 8 lines
package/dtc/Config.in.host
Quoted 4 lines
package/dtc/Config.in.host new file +3
-0+define HOST_DTC_BUILD_CMDS + $(HOST_CONFIGURE_OPTS) \ + CFLAGS="$(HOST_CFLAGS)" \Not needed, this definition of CFLAGS is already in $(HOST_CONFIGURE_OPTS).
O.k., will remove...
Regards,
Peter
Quoted 10 lines
Otherwise, looks good.
Thanks,
Thomas Petazzoni
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 4/4 dtc: add patches for raspberry pi overlay support
In reply to Peter SeidererSee [1] for documentation of raspberry pi kernel dt overlay support.
The following patches (see original download urls) where adjusted to dtc-1.4.1:
- 0003-dtc-Dynamic-symbols-fixup-support.patch
https://github.com/RobertCNelson/dtc/commit/dd6a0533e846e8d5e690a618fa35cc15a6103efb.patch
- 0004-dtc-v-takes-no-argument-drop-extra.patch
https://github.com/RobertCNelson/dtc/commit/f345d9e48c9e1169edf047de742da142cc5687bc.patch
[1] https://github.com/raspberrypi/documentation/blob/master/configuration/device-tree.md
--- .../0003-dtc-Dynamic-symbols-fixup-support.patch | 581 +++++++++++++++++++++ .../0004-dtc-v-takes-no-argument-drop-extra.patch | 44 ++ 2 files changed, 625 insertions(+) create mode 100644 package/dtc/0003-dtc-Dynamic-symbols-fixup-support.patch create mode 100644 package/dtc/0004-dtc-v-takes-no-argument-drop-extra.patch
package/dtc/0003-dtc-Dynamic-symbols-fixup-support.patch new file +581 -0
@@ -0,0 +1,581 @@ +From 144952b04835af4ee235ea0735e6ba999eab559c Mon Sep 17 00:00:00 2001 +From: Pantelis Antoniou <[email protected]> +Date: Fri, 4 Jan 2013 21:16:21 +0200 +Subject: [PATCH 3/4] dtc: Dynamic symbols & fixup support + +Enable the generation of symbol & fixup information for +usage with dynamic DT loading. + +Passing the -@ option generates a __symbols__ node at the +root node of the resulting blob for any node labels used. + +When using the /plugin/ tag all unresolved label references +be tracked in the __fixups__ node, while all local phandle +references will the tracked in the __local_fixups__ node. + +This is sufficient to implement a dynamic DT object loader. + +Signed-off-by: Pantelis Antoniou <[email protected]> +Signed-off-by: Stefan Agner <[email protected]> + +Adjusted to dtc-1.4.1: +Signed-off-by: Peter Seiderer <[email protected]> +--- + Documentation/dts-format.txt | 7 +++ + Documentation/manual.txt | 8 +++ + checks.c | 120 +++++++++++++++++++++++++++++++++++-- + dtc-lexer.l | 5 ++ + dtc-parser.y | 23 ++++++- + dtc.c | 9 ++- + dtc.h | 38 ++++++++++++ + flattree.c | 139 +++++++++++++++++++++++++++++++++++++++++++ + 8 files changed, 340 insertions(+), 9 deletions(-) + +diff --git a/Documentation/dts-format.txt b/Documentation/dts-format.txt +index 41741df..4da515c 100644 +--- a/Documentation/dts-format.txt ++++ b/Documentation/dts-format.txt +@@ -115,7 +115,14 @@ Version 1 DTS files have the overall layout: + + * C style (/* ... */) and C++ style (// ...) comments are supported. + ++Device Tree Objects ++------------------- + ++Using the plugin tag enables dynamic tree objects. ++ ++ /plugin/; ++ ++For the full details please see Documentation/dt-object-internal.txt + + -- David Gibson <[email protected]> + -- Yoder Stuart <[email protected]> +diff --git a/Documentation/manual.txt b/Documentation/manual.txt +index 398de32..07321ff 100644 +--- a/Documentation/manual.txt ++++ b/Documentation/manual.txt +@@ -131,6 +131,14 @@ Options: + By default the most recent version is generated. + Relevant for dtb and asm output only. + ++ -@ ++ Dynamic resolution mode. For non /plugin/ compilations generate ++ a __symbols__ node containing a list of all nodes with a label. ++ When /plugin/ is used, unresolved references are recorded in ++ a __fixups__ node, while local phandle references are recorded ++ in a __local_fixups__ node. ++ See Documentation/dt-object-internal.txt ++ + + The <output_version> defines what version of the "blob" format will be + generated. Supported versions are 1, 2, 3, 16 and 17. The default is +diff --git a/checks.c b/checks.c +index 3bf0fa4..078a50e 100644 +--- a/checks.c ++++ b/checks.c +@@ -457,22 +457,93 @@ static void fixup_phandle_references(struct check *c, struct node *dt, + struct node *node, struct property *prop) + { + struct marker *m = prop->val.markers; ++ struct fixup *f, **fp; ++ struct fixup_entry *fe, **fep; + struct node *refnode; + cell_t phandle; ++ int has_phandle_refs; ++ ++ has_phandle_refs = 0; ++ for_each_marker_of_type(m, REF_PHANDLE) { ++ has_phandle_refs = 1; ++ break; ++ } ++ ++ if (!has_phandle_refs) ++ return; + + for_each_marker_of_type(m, REF_PHANDLE) { + assert(m->offset + sizeof(cell_t) <= prop->val.len); + + refnode = get_node_by_ref(dt, m->ref); +- if (! refnode) { ++ if (!refnode && !symbol_fixup_support) { + FAIL(c, "Reference to non-existent node or label \"%s\"\n", +- m->ref); ++ m->ref); + continue; + } + +- phandle = get_node_phandle(dt, refnode); +- *((cell_t *)(prop->val.val + m->offset)) = cpu_to_fdt32(phandle); ++ if (!refnode) { ++ /* allocate fixup entry */ ++ fe = xmalloc(sizeof(*fe)); ++ ++ fe->node = node; ++ fe->prop = prop; ++ fe->offset = m->offset; ++ fe->next = NULL; ++ ++ /* search for an already existing fixup */ ++ for_each_fixup(dt, f) ++ if (strcmp(f->ref, m->ref) == 0) ++ break; ++ ++ /* no fixup found, add new */ ++ if (f == NULL) { ++ f = xmalloc(sizeof(*f)); ++ f->ref = m->ref; ++ f->entries = NULL; ++ f->next = NULL; ++ ++ /* add it to the tree */ ++ fp = &dt->fixups; ++ while (*fp) ++ fp = &(*fp)->next; ++ *fp = f; ++ } ++ ++ /* and now append fixup entry */ ++ fep = &f->entries; ++ while (*fep) ++ fep = &(*fep)->next; ++ *fep = fe; ++ ++ /* mark the entry as unresolved */ ++ phandle = 0xdeadbeef; ++ } else { ++ phandle = get_node_phandle(dt, refnode); ++ ++ /* if it's a plugin, we need to record it */ ++ if (symbol_fixup_support && dt->is_plugin) { ++ ++ /* allocate a new local fixup entry */ ++ fe = xmalloc(sizeof(*fe)); ++ ++ fe->node = node; ++ fe->prop = prop; ++ fe->offset = m->offset; ++ fe->next = NULL; ++ ++ /* append it to the local fixups */ ++ fep = &dt->local_fixups; ++ while (*fep) ++ fep = &(*fep)->next; ++ *fep = fe; ++ } ++ } ++ ++ *((cell_t *)(prop->val.val + m->offset)) = ++ cpu_to_fdt32(phandle); + } ++ + } + ERROR(phandle_references, NULL, NULL, fixup_phandle_references, NULL, + &duplicate_node_names, &explicit_phandles); +@@ -651,6 +722,45 @@ static void check_obsolete_chosen_interrupt_controller(struct check *c, + } + TREE_WARNING(obsolete_chosen_interrupt_controller, NULL); + ++static void check_auto_label_phandles(struct check *c, struct node *dt, ++ struct node *node) ++{ ++ struct label *l; ++ struct symbol *s, **sp; ++ int has_label; ++ ++ if (!symbol_fixup_support) ++ return; ++ ++ has_label = 0; ++ for_each_label(node->labels, l) { ++ has_label = 1; ++ break; ++ } ++ ++ if (!has_label) ++ return; ++ ++ /* force allocation of a phandle for this node */ ++ (void)get_node_phandle(dt, node); ++ ++ /* add the symbol */ ++ for_each_label(node->labels, l) { ++ ++ s = xmalloc(sizeof(*s)); ++ s->label = l; ++ s->node = node; ++ s->next = NULL; ++ ++ /* add it to the symbols list */ ++ sp = &dt->symbols; ++ while (*sp) ++ sp = &((*sp)->next); ++ *sp = s; ++ } ++} ++NODE_WARNING(auto_label_phandles, NULL); ++ + static struct check *check_table[] = { + &duplicate_node_names, &duplicate_property_names, + &node_name_chars, &node_name_format, &property_name_chars, +@@ -669,6 +779,8 @@ static struct check *check_table[] = { + &avoid_default_addr_size, + &obsolete_chosen_interrupt_controller, + ++ &auto_label_phandles, ++ + &always_fail, + }; + +diff --git a/dtc-lexer.l b/dtc-lexer.l +index 0ee1caf..dd44ba2 100644 +--- a/dtc-lexer.l ++++ b/dtc-lexer.l +@@ -113,6 +113,11 @@ static void lexical_error(const char *fmt, ...); + return DT_V1; + } + ++<*>"/plugin/" { ++ DPRINT("Keyword: /plugin/\n"); ++ return DT_PLUGIN; ++ } ++ + <*>"/memreserve/" { + DPRINT("Keyword: /memreserve/\n"); + BEGIN_DEFAULT(); +diff --git a/dtc-parser.y b/dtc-parser.y +index ea57e0a..687ccad 100644 +--- a/dtc-parser.y ++++ b/dtc-parser.y +@@ -19,6 +19,7 @@ + */ + %{ + #include <stdio.h> ++#include <inttypes.h> + + #include "dtc.h" + #include "srcpos.h" +@@ -52,9 +53,11 @@ extern bool treesource_error; + struct node *nodelist; + struct reserve_info *re; + uint64_t integer; ++ int is_plugin; + } + + %token DT_V1 ++%token DT_PLUGIN + %token DT_MEMRESERVE + %token DT_LSHIFT DT_RSHIFT DT_LE DT_GE DT_EQ DT_NE DT_AND DT_OR + %token DT_BITS +@@ -71,6 +74,7 @@ extern bool treesource_error; + + %type <data> propdata + %type <data> propdataprefix ++%type <is_plugin> plugindecl + %type <re> memreserve + %type <re> memreserves + %type <array> arrayprefix +@@ -101,10 +105,23 @@ extern bool treesource_error; + %% + + sourcefile: +- DT_V1 ';' memreserves devicetree ++ DT_V1 ';' plugindecl memreserves devicetree + { +- the_boot_info = build_boot_info($3, $4, +- guess_boot_cpuid($4)); ++ $5->is_plugin = $3; ++ $5->is_root = 1; ++ the_boot_info = build_boot_info($4, $5, ++ guess_boot_cpuid($5)); ++ } ++ ; ++ ++plugindecl: ++ /* empty */ ++ { ++ $$ = 0; ++ } ++ | DT_PLUGIN ';' ++ { ++ $$ = 1; + } + ; + +diff --git a/dtc.c b/dtc.c +index 8c4add6..f4d56e5 100644 +--- a/dtc.c ++++ b/dtc.c +@@ -29,6 +29,7 @@ int reservenum; /* Number of memory reservation slots */ + int minsize; /* Minimum blob size */ + int padsize; /* Additional padding to blob */ + int phandle_format = PHANDLE_BOTH; /* Use linux,phandle or phandle properties */ ++int symbol_fixup_support = 0; + + static void fill_fullpaths(struct node *tree, const char *prefix) + { +@@ -51,7 +52,7 @@ static void fill_fullpaths(struct node *tree, const char *prefix) + #define FDT_VERSION(version) _FDT_VERSION(version) + #define _FDT_VERSION(version) #version + static const char usage_synopsis[] = "dtc [options] <input file>"; +-static const char usage_short_opts[] = "qI:O:o:V:d:R:S:p:fb:i:H:sW:E:hv"; ++static const char usage_short_opts[] = "qI:O:o:V:d:R:S:p:fb:i:H:sW:E:hv:@"; + static struct option const usage_long_opts[] = { + {"quiet", no_argument, NULL, 'q'}, + {"in-format", a_argument, NULL, 'I'}, +@@ -69,6 +70,7 @@ static struct option const usage_long_opts[] = { + {"phandle", a_argument, NULL, 'H'}, + {"warning", a_argument, NULL, 'W'}, + {"error", a_argument, NULL, 'E'}, ++ {"symbols", a_argument, NULL, '@'}, + {"help", no_argument, NULL, 'h'}, + {"version", no_argument, NULL, 'v'}, + {NULL, no_argument, NULL, 0x0}, +@@ -99,6 +101,7 @@ static const char * const usage_opts_help[] = { + "\t\tboth - Both \"linux,phandle\" and \"phandle\" properties", + "\n\tEnable/disable warnings (prefix with \"no-\")", + "\n\tEnable/disable errors (prefix with \"no-\")", ++ "\n\tSymbols and Fixups support", + "\n\tPrint this help and exit", + "\n\tPrint version and exit", + NULL, +@@ -186,7 +189,9 @@ int main(int argc, char *argv[]) + case 'E': + parse_checks_option(false, true, optarg); + break; +- ++ case '@': ++ symbol_fixup_support = 1; ++ break; + case 'h': + usage(NULL); + default: +diff --git a/dtc.h b/dtc.h +index 56212c8..fe45748 100644 +--- a/dtc.h ++++ b/dtc.h +@@ -54,6 +54,7 @@ extern int reservenum; /* Number of memory reservation slots */ + extern int minsize; /* Minimum blob size */ + extern int padsize; /* Additional padding to blob */ + extern int phandle_format; /* Use linux,phandle or phandle properties */ ++extern int symbol_fixup_support;/* enable symbols & fixup support */ + + #define PHANDLE_LEGACY 0x1 + #define PHANDLE_EPAPR 0x2 +@@ -132,6 +133,25 @@ struct label { + struct label *next; + }; + ++struct fixup_entry { ++ int offset; ++ struct node *node; ++ struct property *prop; ++ struct fixup_entry *next; ++}; ++ ++struct fixup { ++ char *ref; ++ struct fixup_entry *entries; ++ struct fixup *next; ++}; ++ ++struct symbol { ++ struct label *label; ++ struct node *node; ++ struct symbol *next; ++}; ++ + struct property { + bool deleted; + char *name; +@@ -158,6 +178,12 @@ struct node { + int addr_cells, size_cells; + + struct label *labels; ++ ++ int is_root; ++ int is_plugin; ++ struct fixup *fixups; ++ struct symbol *symbols; ++ struct fixup_entry *local_fixups; + }; + + #define for_each_label_withdel(l0, l) \ +@@ -181,6 +207,18 @@ struct node { + for_each_child_withdel(n, c) \ + if (!(c)->deleted) + ++#define for_each_fixup(n, f) \ ++ for ((f) = (n)->fixups; (f); (f) = (f)->next) ++ ++#define for_each_fixup_entry(f, fe) \ ++ for ((fe) = (f)->entries; (fe); (fe) = (fe)->next) ++ ++#define for_each_symbol(n, s) \ ++ for ((s) = (n)->symbols; (s); (s) = (s)->next) ++ ++#define for_each_local_fixup_entry(n, fe) \ ++ for ((fe) = (n)->local_fixups; (fe); (fe) = (fe)->next) ++ + void add_label(struct label **labels, char *label); + void delete_labels(struct label **labels); + +diff --git a/flattree.c b/flattree.c +index bd99fa2..7f3df74 100644 +--- a/flattree.c ++++ b/flattree.c +@@ -262,6 +262,12 @@ static void flatten_tree(struct node *tree, struct emitter *emit, + struct property *prop; + struct node *child; + bool seen_name_prop = false; ++ struct symbol *sym; ++ struct fixup *f; ++ struct fixup_entry *fe; ++ char *name, *s; ++ const char *fullpath; ++ int namesz, nameoff, vallen; + + if (tree->deleted) + return; +@@ -310,6 +316,139 @@ static void flatten_tree(struct node *tree, struct emitter *emit, + flatten_tree(child, emit, etarget, strbuf, vi); + } + ++ if (!symbol_fixup_support) ++ goto no_symbols; ++ ++ /* add the symbol nodes (if any) */ ++ if (tree->symbols) { ++ ++ emit->beginnode(etarget, NULL); ++ emit->string(etarget, "__symbols__", 0); ++ emit->align(etarget, sizeof(cell_t)); ++ ++ for_each_symbol(tree, sym) { ++ ++ vallen = strlen(sym->node->fullpath); ++ ++ nameoff = stringtable_insert(strbuf, sym->label->label); ++ ++ emit->property(etarget, NULL); ++ emit->cell(etarget, vallen + 1); ++ emit->cell(etarget, nameoff); ++ ++ if ((vi->flags & FTF_VARALIGN) && vallen >= 8) ++ emit->align(etarget, 8); ++ ++ emit->string(etarget, sym->node->fullpath, ++ strlen(sym->node->fullpath)); ++ emit->align(etarget, sizeof(cell_t)); ++ } ++ ++ emit->endnode(etarget, NULL); ++ } ++ ++ /* add the fixup nodes */ ++ if (tree->fixups) { ++ ++ /* emit the external fixups */ ++ emit->beginnode(etarget, NULL); ++ emit->string(etarget, "__fixups__", 0); ++ emit->align(etarget, sizeof(cell_t)); ++ ++ for_each_fixup(tree, f) { ++ ++ namesz = 0; ++ for_each_fixup_entry(f, fe) { ++ fullpath = fe->node->fullpath; ++ if (fullpath[0] == '\0') ++ fullpath = "/"; ++ namesz += strlen(fullpath) + 1; ++ namesz += strlen(fe->prop->name) + 1; ++ namesz += 32; /* space for :<number> + '\0' */ ++ } ++ ++ name = xmalloc(namesz); ++ ++ s = name; ++ for_each_fixup_entry(f, fe) { ++ fullpath = fe->node->fullpath; ++ if (fullpath[0] == '\0') ++ fullpath = "/"; ++ snprintf(s, name + namesz - s, "%s:%s:%d", ++ fullpath, ++ fe->prop->name, fe->offset); ++ s += strlen(s) + 1; ++ } ++ ++ nameoff = stringtable_insert(strbuf, f->ref); ++ vallen = s - name - 1; ++ ++ emit->property(etarget, NULL); ++ emit->cell(etarget, vallen + 1); ++ emit->cell(etarget, nameoff); ++ ++ if ((vi->flags & FTF_VARALIGN) && vallen >= 8) ++ emit->align(etarget, 8); ++ ++ emit->string(etarget, name, vallen); ++ emit->align(etarget, sizeof(cell_t)); ++ ++ free(name); ++ } ++ ++ emit->endnode(etarget, tree->labels); ++ } ++ ++ /* add the local fixup property */ ++ if (tree->local_fixups) { ++ ++ /* emit the external fixups */ ++ emit->beginnode(etarget, NULL); ++ emit->string(etarget, "__local_fixups__", 0); ++ emit->align(etarget, sizeof(cell_t)); ++ ++ namesz = 0; ++ for_each_local_fixup_entry(tree, fe) { ++ fullpath = fe->node->fullpath; ++ if (fullpath[0] == '\0') ++ fullpath = "/"; ++ namesz += strlen(fullpath) + 1; ++ namesz += strlen(fe->prop->name) + 1; ++ namesz += 32; /* space for :<number> + '\0' */ ++ } ++ ++ name = xmalloc(namesz); ++ ++ s = name; ++ for_each_local_fixup_entry(tree, fe) { ++ fullpath = fe->node->fullpath; ++ if (fullpath[0] == '\0') ++ fullpath = "/"; ++ snprintf(s, name + namesz - s, "%s:%s:%d", ++ fullpath, fe->prop->name, ++ fe->offset); ++ s += strlen(s) + 1; ++ } ++ ++ nameoff = stringtable_insert(strbuf, "fixup"); ++ vallen = s - name - 1; ++ ++ emit->property(etarget, NULL); ++ emit->cell(etarget, vallen + 1); ++ emit->cell(etarget, nameoff); ++ ++ if ((vi->flags & FTF_VARALIGN) && vallen >= 8) ++ emit->align(etarget, 8); ++ ++ emit->string(etarget, name, vallen); ++ emit->align(etarget, sizeof(cell_t)); ++ ++ free(name); ++ ++ emit->endnode(etarget, tree->labels); ++ } ++ ++no_symbols: + emit->endnode(etarget, tree->labels); + } + +-- +2.1.2 +
package/dtc/0004-dtc-v-takes-no-argument-drop-extra.patch new file +44 -0
44 lines not on this page · raw message
Signature · 1 line
2.1.2
PATCH v2 4/4 dtc: add patches for raspberry pi overlay support
Peter,
Quoted 1 line · Peter Seiderer
See [1] for documentation of raspberry pi kernel dt overlay support.
Do you happen to know if this overlay support is identical to the approach used in the beaglebone dts overlays? (I'm guessing so) Currently the beaglebone support in Buildroot lacks overlay support. So if the capability is similar, I'll work on an update to the beaglebone package to use the dtc package instead of the linux kernel dtc (I think the kernel dtc install may need a new check to see if the dtc is enabled to prevent it from installing the kernel dtc).
<snip>
Signature · 3 lines
Matthew L Weber / Pr Software Engineer Airborne Information Systems / Security Systems and Software www.rockwellcollins.com
PATCH v2 4/4 dtc: add patches for raspberry pi overlay support
Hello Matthew,
Quoted 6 lines
Gesendet: Montag, 12. Januar 2015 um 14:57 Uhr
Von: "Matthew Weber" <[email protected]>
An: "Peter Seiderer" <[email protected]>
Cc: buildroot at busybox.net
Betreff: Re: [Buildroot] [PATCH v2 4/4] dtc: add patches for raspberry pi overlay support
Quoted 7 lines
Peter,
Quoted 1 line · Peter Seiderer
See [1] for documentation of raspberry pi kernel dt overlay support.
Do you happen to know if this overlay support is identical to the approach used in the beaglebone dts overlays? (I'm guessing so)
Looking at [2] I think so too, same input format, same dtc paraemter '-@' and same source [3] for the dtc tool enhancement....
Quoted 5 lines
Currently the beaglebone support in Buildroot lacks overlay support. So if the capability is similar, I'll work on an update to the beaglebone package to use the dtc package instead of the linux kernel dtc (I think the kernel dtc install may need a new check to see if the dtc is enabled to prevent it from installing the kernel dtc).
Good point, will add kernel dtc install prevention (missed this one until now) on next patch iteration...
Regards,
Peter
[2] https://learn.adafruit.com/introduction-to-the-beaglebone-black-device-tree/compiling-an-overlay
[3] https://raw.githubusercontent.com/RobertCNelson/tools/master/pkgs/dtc.sh
Quoted 7 lines
<snip>
Signature · 3 lines
Matthew L Weber / Pr Software Engineer Airborne Information Systems / Security Systems and Software www.rockwellcollins.com
PATCH v2 4/4 dtc: add patches for raspberry pi overlay support
In reply to Peter SeidererDear Peter Seiderer,
Quoted 12 lines · Peter Seiderer
See [1] for documentation of raspberry pi kernel dt overlay support.
The following patches (see original download urls) where adjusted to dtc-1.4.1:
- 0003-dtc-Dynamic-symbols-fixup-support.patch
https://github.com/RobertCNelson/dtc/commit/dd6a0533e846e8d5e690a618fa35cc15a6103efb.patch- 0004-dtc-v-takes-no-argument-drop-extra.patch
https://github.com/RobertCNelson/dtc/commit/f345d9e48c9e1169edf047de742da142cc5687bc.patch[1] https://github.com/raspberrypi/documentation/blob/master/configuration/device-tree.md
Quoted 7 lines
Signed-off-by Peter Seiderer <[email protected]>--- .../0003-dtc-Dynamic-symbols-fixup-support.patch | 581 +++++++++++++++++++++ .../0004-dtc-v-takes-no-argument-drop-extra.patch | 44 ++ 2 files changed, 625 insertions(+) create mode 100644 package/dtc/0003-dtc-Dynamic-symbols-fixup-support.patch create mode 100644 package/dtc/0004-dtc-v-takes-no-argument-drop-extra.patch
We normally don't really like to include patches adding new features:
those should be included upstream first. However, for the case of the DT overlay mechanism, it's now being more and more widely used for the BeagleBone Black and the Raspberry Pi, so maybe we should make an exception for this.
Opinion of other Buildroot developers on this is welcome.
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 4/4 dtc: add patches for raspberry pi overlay support
Hello Thomas,
Quoted 29 lines
Gesendet: Montag, 12. Januar 2015 um 21:50 Uhr
Von: "Thomas Petazzoni" <[email protected]>
An: "Peter Seiderer" <[email protected]>
Cc: buildroot at busybox.net
Betreff: Re: [Buildroot] [PATCH v2 4/4] dtc: add patches for raspberry pi overlay supportDear Peter Seiderer,
Quoted 12 lines · Peter Seiderer
See [1] for documentation of raspberry pi kernel dt overlay support.
The following patches (see original download urls) where adjusted to dtc-1.4.1:
- 0003-dtc-Dynamic-symbols-fixup-support.patch
https://github.com/RobertCNelson/dtc/commit/dd6a0533e846e8d5e690a618fa35cc15a6103efb.patch- 0004-dtc-v-takes-no-argument-drop-extra.patch
https://github.com/RobertCNelson/dtc/commit/f345d9e48c9e1169edf047de742da142cc5687bc.patch[1] https://github.com/raspberrypi/documentation/blob/master/configuration/device-tree.md
Quoted 7 lines
Signed-off-by Peter Seiderer <[email protected]>--- .../0003-dtc-Dynamic-symbols-fixup-support.patch | 581 +++++++++++++++++++++ .../0004-dtc-v-takes-no-argument-drop-extra.patch | 44 ++ 2 files changed, 625 insertions(+) create mode 100644 package/dtc/0003-dtc-Dynamic-symbols-fixup-support.patch create mode 100644 package/dtc/0004-dtc-v-takes-no-argument-drop-extra.patch
Quoted 1 line
We normally don't really like to include patches adding new features:
Yes, expected this point...
Quoted 4 lines
those should be included upstream first. However, for the case of the DT overlay mechanism, it's now being more and more widely used for the BeagleBone Black and the Raspberry Pi, so maybe we should make an exception for this.
Hoped for this...the RPI/BeagleBone description is download some magic script (which will download/git clone the https://github.com/RobertCNelson/dtc
version and compile)..., the aproach with official package plus 2 patches is a little bit nicer (and more up to date)...
Regards,
Peter
Quoted 11 lines
Opinion of other Buildroot developers on this is welcome.
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 1/4 dtc: fix project and download url
In reply to Peter SeidererDear Peter Seiderer,
Quoted 15 lines · Peter Seiderer
and rename patches to new convention
Signed-off-by Peter Seiderer <[email protected]>--- package/dtc/0001-separate-lib-install.patch | 28 +++++++++++++++++++++++++ package/dtc/0002-extra-cflags.patch | 32 +++++++++++++++++++++++++++++ package/dtc/Config.in | 2 +- package/dtc/dtc-extra_cflags.patch | 32 ----------------------------- package/dtc/dtc-separate-lib-install.patch | 28 ------------------------- package/dtc/dtc.mk | 5 +++-- 6 files changed, 64 insertions(+), 63 deletions(-) create mode 100644 package/dtc/0001-separate-lib-install.patch create mode 100644 package/dtc/0002-extra-cflags.patch delete mode 100644 package/dtc/dtc-extra_cflags.patch delete mode 100644 package/dtc/dtc-separate-lib-install.patch
Thanks. I was going to apply this, but since PATCH 2 has some issues, I'll give some minor comments on this one as well:
1/ You're doing two separate things here: change the project URL, and
rename the patches. So this should be done in two separate patches.
2/ Please enable rename detection in Git, so we can clearly see in the
patch that it's a rename.
Can you resend with this fixed?
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 1/4 dtc: fix project and download url
Hello Thomas,
Quoted 25 lines
Gesendet: Montag, 12. Januar 2015 um 21:39 Uhr
Von: "Thomas Petazzoni" <[email protected]>
An: "Peter Seiderer" <[email protected]>
Cc: buildroot at busybox.net
Betreff: Re: [Buildroot] [PATCH v2 1/4] dtc: fix project and download urlDear Peter Seiderer,
Quoted 15 lines · Peter Seiderer
and rename patches to new convention
Signed-off-by Peter Seiderer <[email protected]>--- package/dtc/0001-separate-lib-install.patch | 28 +++++++++++++++++++++++++ package/dtc/0002-extra-cflags.patch | 32 +++++++++++++++++++++++++++++ package/dtc/Config.in | 2 +- package/dtc/dtc-extra_cflags.patch | 32 ----------------------------- package/dtc/dtc-separate-lib-install.patch | 28 ------------------------- package/dtc/dtc.mk | 5 +++-- 6 files changed, 64 insertions(+), 63 deletions(-) create mode 100644 package/dtc/0001-separate-lib-install.patch create mode 100644 package/dtc/0002-extra-cflags.patch delete mode 100644 package/dtc/dtc-extra_cflags.patch delete mode 100644 package/dtc/dtc-separate-lib-install.patch
Quoted 6 lines
Thanks. I was going to apply this, but since PATCH 2 has some issues, I'll give some minor comments on this one as well:
1/ You're doing two separate things here: change the project URL, and
rename the patches. So this should be done in two separate patches.
O.k.
Quoted 3 lines
2/ Please enable rename detection in Git, so we can clearly see in the
patch that it's a rename.
O.k.
Quoted 2 lines
Can you resend with this fixed?
Will do....
Regards,
Peter
Quoted 8 lines
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com