Skip to contentSkip to conversation

dtc: Bump to version v1.5.0

PATCH New Joel Stanley 2 participants 2 messages Jul 22, 2019 – Jul 29, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dtc: Bump to version v1.5.0

Upstream now optionally supports a yaml output format, and support is detected through pkg-config. It has not been added as a dependency but could in the future if someone asks for it.

Patches applied upstream:

- Kill bogus TYPE_BLOB marker type
- checks: fix simple-bus compatible matching

New patch:

- Makefile: Add EXTRA_CFLAGS variable

The new patch is required to correctly add buildroot's cflags. The existing packaging was overwriting those set by the package's makefile, which was breaking the yaml detection.

---
 ...rds-for-older-kernel-u-boot-sources.patch} |   0
 ...001-Kill-bogus-TYPE_BLOB-marker-type.patch | 138 ------------------
 ...2-Makefile-Add-EXTRA_CFLAGS-variable.patch |  37 +++++
 ...s-fix-simple-bus-compatible-matching.patch | 120 ---------------
 package/dtc/dtc.hash                          |   2 +-
 package/dtc/dtc.mk                            |  10 +-
 6 files changed, 43 insertions(+), 264 deletions(-)
 rename package/dtc/{0002-Fix-include-guards-for-older-kernel-u-boot-sources.patch => 0001-Fix-include-guards-for-older-kernel-u-boot-sources.patch} (100%)
 delete mode 100644 package/dtc/0001-Kill-bogus-TYPE_BLOB-marker-type.patch
 create mode 100644 package/dtc/0002-Makefile-Add-EXTRA_CFLAGS-variable.patch
 delete mode 100644 package/dtc/0003-checks-fix-simple-bus-compatible-matching.patch
package/dtc/0001-Fix-include-guards-for-older-kernel-u-boot-sources.patch renamed from package/dtc/0002-Fix-include-guards-for-older-kernel-u-boot-sources.patch +0 -0
similarity index 100%
rename from package/dtc/0002-Fix-include-guards-for-older-kernel-u-boot-sources.patch
rename to package/dtc/0001-Fix-include-guards-for-older-kernel-u-boot-sources.patch
package/dtc/0001-Kill-bogus-TYPE_BLOB-marker-type.patch deleted +0 -138

138 lines not on this page · raw message

package/dtc/0002-Makefile-Add-EXTRA_CFLAGS-variable.patch new file +37 -0
new file mode 100644
index 000000000000..b3f14a69911f
@@ -0,0 +1,37 @@
+From f7c659d7daff5dbf4a0be959a544f15eab7fc49c Mon Sep 17 00:00:00 2001
+From: Joel Stanley <[email protected]>
+Date: Mon, 22 Jul 2019 12:21:49 +0930
+Subject: [PATCH] Makefile: Add EXTRA_CFLAGS variable
+
+Distributions packaging dtc may need to set extra flags. Currently when
+they do that it overrides the ones set by the makefile. This is
+particularly problematic when compiling without yaml, as the yaml
+detection is ignored.
+
+ ld: dtc.o: in function `main':
+ dtc.c:(.text.startup+0x718): undefined reference to `dt_to_yaml'
+
+This patch provides a EXTRA_CFLAGS variable that is added to the list of
+CFLAGS, and can be set on the command line when packaging.
+
+Signed-off-by: Joel Stanley <[email protected]>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index e6b32cf1cbf5..6807669569b3 100644
+--- a/Makefile
++++ b/Makefile
+@@ -18,7 +18,7 @@ CONFIG_LOCALVERSION =
+ CPPFLAGS = -I libfdt -I .
+ WARNINGS = -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \
+ 	-Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wshadow
+-CFLAGS = -g -Os $(SHAREDLIB_CFLAGS) -Werror $(WARNINGS)
++CFLAGS = -g -Os $(SHAREDLIB_CFLAGS) -Werror $(WARNINGS) $(EXTRA_CFLAGS)
+ 
+ BISON = bison
+ LEX = flex
+-- 
+2.20.1
+
package/dtc/0003-checks-fix-simple-bus-compatible-matching.patch deleted +0 -120

120 lines not on this page · raw message

package/dtc/dtc.hash +1 -1
index b402c2249b13..e197d8896774 100644
@@ -1,2 +1,2 @@
 # from https://www.kernel.org/pub/software/utils/dtc/sha256sums.asc
-sha256 6643e8f00ff86350f465bb54b2185058b5b1b7bac01a0842c81a52b86589cde7 dtc-1.4.7.tar.xz
+sha256 c672e443c9f7e39f5a7c8e602da6777f9ad55ad70de87de300a43828c8050172  dtc-1.5.0.tar.xz
package/dtc/dtc.mk +5 -5
index 7cb879bff48b..fd736532f304 100644
@@ -4,14 +4,14 @@
 #
 ################################################################################
 
-DTC_VERSION = 1.4.7
+DTC_VERSION = 1.5.0
 DTC_SOURCE = dtc-$(DTC_VERSION).tar.xz
 DTC_SITE = https://www.kernel.org/pub/software/utils/dtc
 DTC_LICENSE = GPL-2.0+ or BSD-2-Clause (library)
 DTC_LICENSE_FILES = README.license GPL
 DTC_INSTALL_STAGING = YES
-DTC_DEPENDENCIES = host-bison host-flex
-HOST_DTC_DEPENDENCIES = host-bison host-flex
+DTC_DEPENDENCIES = host-bison host-flex host-pkgconf
+HOST_DTC_DEPENDENCIES = host-bison host-flex host-pkgconf
 
 DTC_MAKE_OPTS = \
 	PREFIX=/usr \
@@ -40,7 +40,7 @@ DTC_INSTALL_GOAL = install-lib
 endif # $(BR2_PACKAGE_DTC_PROGRAMS) != y
 
 define DTC_BUILD_CMDS
-	$(TARGET_CONFIGURE_OPTS) $(MAKE) CFLAGS="$(TARGET_CFLAGS) -fPIC" -C $(@D) $(DTC_MAKE_OPTS)
+	$(TARGET_CONFIGURE_OPTS) $(MAKE) EXTRA_CFLAGS="$(TARGET_CFLAGS) -fPIC" -C $(@D) $(DTC_MAKE_OPTS)
 endef
 
 # For staging, only the library is needed
@@ -55,7 +55,7 @@ endef
 
 # host build
 define HOST_DTC_BUILD_CMDS
-	$(HOST_CONFIGURE_OPTS) $(MAKE) CFLAGS="$(HOST_CFLAGS) -fPIC" -C $(@D) $(HOST_DTC_MAKE_OPTS)
+	$(HOST_CONFIGURE_OPTS) $(MAKE) EXTRA_CFLAGS="$(HOST_CFLAGS) -fPIC" -C $(@D) $(HOST_DTC_MAKE_OPTS)
 endef
 
 define HOST_DTC_INSTALL_CMDS
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 dtc: Bump to version v1.5.0

Quoted 18 lines · On Mon, 22 Jul 2019 13:51:12 +0930 Joel Stanley <[email protected]> wrote:

Upstream now optionally supports a yaml output format, and support is detected through pkg-config. It has not been added as a dependency but could in the future if someone asks for it.

Patches applied upstream:

- Kill bogus TYPE_BLOB marker type
- checks: fix simple-bus compatible matching

New patch:

- Makefile: Add EXTRA_CFLAGS variable

The new patch is required to correctly add buildroot's cflags. The existing packaging was overwriting those set by the package's makefile, which was breaking the yaml detection.

Quoted 12 lines
---
 ...rds-for-older-kernel-u-boot-sources.patch} |   0
 ...001-Kill-bogus-TYPE_BLOB-marker-type.patch | 138 ------------------
 ...2-Makefile-Add-EXTRA_CFLAGS-variable.patch |  37 +++++
 ...s-fix-simple-bus-compatible-matching.patch | 120 ---------------
 package/dtc/dtc.hash                          |   2 +-
 package/dtc/dtc.mk                            |  10 +-
 6 files changed, 43 insertions(+), 264 deletions(-)
 rename package/dtc/{0002-Fix-include-guards-for-older-kernel-u-boot-sources.patch => 0001-Fix-include-guards-for-older-kernel-u-boot-sources.patch} (100%)
 delete mode 100644 package/dtc/0001-Kill-bogus-TYPE_BLOB-marker-type.patch
 create mode 100644 package/dtc/0002-Makefile-Add-EXTRA_CFLAGS-variable.patch
 delete mode 100644 package/dtc/0003-checks-fix-simple-bus-compatible-matching.patch

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com