package/dtc: bump version to 1.8.1 and switch to meson build
PATCH 1/1 package/dtc: bump version to 1.8.1 and switch to meson build
Release note:
https://github.com/dgibson/dtc/releases/tag/v1.8.1
- This commit also removes 0002-fix-discarded-const-qualifiers.patch, since it has been merged in v1.8.0 already
- upstream dtc warns that Makefile-based builds are deprecated in favor of Meson after version was updated. So we migrate to Meson build.
--- .../0002-fix-discarded-const-qualifiers.patch | 88 ------------------- package/dtc/dtc.hash | 4 +- package/dtc/dtc.mk | 52 ++++------- 3 files changed, 17 insertions(+), 127 deletions(-) delete mode 100644 package/dtc/0002-fix-discarded-const-qualifiers.patch
package/dtc/0002-fix-discarded-const-qualifiers.patch deleted +0 -88
@@ -1,88 +0,0 @@ -From 9a1c801a1a3c102bf95c5339c9e985b26b823a21 Mon Sep 17 00:00:00 2001 -From: Stephen Gallagher <[email protected]> -Date: Tue, 6 Jan 2026 14:19:30 -0500 -Subject: Fix discarded const qualifiers - -It's unsafe to implicitly discard the const qualifier on a pointer. In -overlay_fixup_phandle(), this was probably just an oversight, and making -the "sep" variable a const char * is sufficient to fix it. - -In create_node(), however, the "p" variable is directly modifying the -buffer pointed to by "const char* node_name". To fix this, we need to -actually make a duplicate of the buffer and operate on that instead. - -This introduces a malloc()/free() and an unbounded strdup() into the -operation, but fdtput isn't a long-running service and the node_name -argument comes directly from argv, so this shouldn't introduce a -significant performance impact. - -Signed-off-by: Stephen Gallagher <[email protected]> -Signed-off-by: David Gibson <[email protected]> -Upstream: https://git.kernel.org/pub/scm/utils/dtc/dtc.git/commit/?id=9a1c801a1a3c102bf95c5339c9e985b26b823a21 -Signed-off-by: Alexis Lothoré <[email protected]> - ---- - fdtput.c | 8 +++++--- - libfdt/fdt_overlay.c | 3 ++- - meson.build | 1 + - 3 files changed, 8 insertions(+), 4 deletions(-) - -diff --git a/fdtput.c b/fdtput.c -index 05f2b93..fdb581a 100644 ---- a/fdtput.c -+++ b/fdtput.c -@@ -254,19 +254,21 @@ static int create_paths(char **blob, const char *in_path) - static int create_node(char **blob, const char *node_name) - { - int node = 0; -- char *p; -+ const char *p; -+ char *path = NULL; - - p = strrchr(node_name, '/'); - if (!p) { - report_error(node_name, -1, -FDT_ERR_BADPATH); - return -1; - } -- *p = '\0'; - - *blob = realloc_node(*blob, p + 1); - - if (p > node_name) { -- node = fdt_path_offset(*blob, node_name); -+ path = xstrndup(node_name, (size_t)(p - node_name)); -+ node = fdt_path_offset(*blob, path); -+ free(path); - if (node < 0) { - report_error(node_name, -1, node); - return -1; -diff --git a/libfdt/fdt_overlay.c b/libfdt/fdt_overlay.c -index e6b9eb6..51a3859 100644 ---- a/libfdt/fdt_overlay.c -+++ b/libfdt/fdt_overlay.c -@@ -407,7 +407,8 @@ static int overlay_fixup_phandle(void *fdt, void *fdto, int symbols_off, - const char *fixup_str = value; - uint32_t path_len, name_len; - uint32_t fixup_len; -- char *sep, *endptr; -+ const char *sep; -+ char *endptr; - int poffset, ret; - - fixup_end = memchr(value, '\0', len); -diff --git a/meson.build b/meson.build -index 66b44e8..501b706 100644 ---- a/meson.build -+++ b/meson.build -@@ -18,6 +18,7 @@ add_project_arguments( - '-Wshadow', - '-Wsuggest-attribute=format', - '-Wwrite-strings', -+ '-Wdiscarded-qualifiers', - ]), - language: 'c' - ) --- -cgit 1.2.3-korg - -
package/dtc/dtc.hash +2 -2
@@ -1,7 +1,7 @@ # from https://www.kernel.org/pub/software/utils/dtc/sha256sums.asc -sha256 92d8ca769805ae1f176204230438fe52808f4e1c7944053c9eec0e649b237539 dtc-1.7.2.tar.xz +sha256 23526015a6f1550e0541a53fe7acea1b5a11e3697cdf3a3bdc076abc38f6045d dtc-1.8.1.tar.xz # Hash for license files -sha256 78e1e1ce5728a990d59c7de61d4741c49185d5129daf783b386380a214328d68 README.license +sha256 8a516adc332c25503be9de4a511f9fce45370761a67046811b1c5a5268f2327a README.license sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 GPL sha256 6313108c23efffa36948f8b2cff1560a5935373b527b0e1a837cc77e6ed1bacd BSD-2-Clause
package/dtc/dtc.mk +15 -37
74 lines not on this page · raw message
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Philippe,
Thanks for the patch. I have few comments.
Quoted 2 lines · Philippe MONTCHO
Release note:
https://github.com/dgibson/dtc/releases/tag/v1.8.1
Could you also add a link to the v1.8.0, please?
Release notes, since v1.7.1:
https://github.com/dgibson/dtc/releases/tag/v1.8.0
https://github.com/dgibson/dtc/releases/tag/v1.8.1
Quoted 14 lines
- This commit also removes 0002-fix-discarded-const-qualifiers.patch, since it has been merged in v1.8.0 already
- upstream dtc warns that Makefile-based builds are deprecated in favor of Meson after version was updated. So we migrate to Meson build.
Signed-off-by Philippe MONTCHO <[email protected]>--- .../0002-fix-discarded-const-qualifiers.patch | 88 ------------------- package/dtc/dtc.hash | 4 +- package/dtc/dtc.mk | 52 ++++------- 3 files changed, 17 insertions(+), 127 deletions(-) delete mode 100644
package/dtc/0002-fix-discarded-const-qualifiers.patch
[...]
package/dtc/dtc.mk line 8
Quoted 11 lines
package/dtc/dtc.mk +1
-1@@ -4,7 +4,7 @@ # ################################################################################ -DTC_VERSION = 1.7.2 +DTC_VERSION = 1.8.1
This new version is going to be a bit problematic in Buildroot:
Upstream dtc removed the "graph_child_address" checker in:
https://github.com/dgibson/dtc/commit/cba90ce82064ad1e6d25f20d8eaa940bd2fc97ed
first included in v1.8.0.
This option was introduced some time ago:
https://github.com/dgibson/dtc/commit/df536831d02c51556a8e88cd8da0be0244484156
introduced in v1.4.7.
When dtc is called with an unknown warning option:
dtc -Wno-unknown-warning
it fails with error:
FATAL ERROR: Unrecognized check name "unknown-warning".
U-boot passes this -Wno-graph_child_address option to dtc since:
https://source.denx.de/u-boot/u-boot/-/commit/5972ff077e0f6db36f327f303b0c381f56238ef3
first included in version v2020.07.
U-boot removed it much later in:
https://source.denx.de/u-boot/u-boot/-/commit/b427decccfe983eda4f815ddcf5dcbe733cd04f6
first included in version v2026.07.
And in Buildroot, we pass our host-dtc to U-Boot with DTC=...
If we merge this patch as is, many defconfigs will fail to build uboot with an error:
FATAL ERROR: Unrecognized check name "graph_child_address"
Maybe we could add a Buildroot specific patch which downgrade the unknown check error as a warning? See:
https://github.com/dgibson/dtc/blob/v1.8.1/checks.c#L2057
Any opinions?
package/dtc/dtc.mk DTC_INSTALL_STAGING = YES · line 18
Quoted 13 lines
package/dtc/dtc.mk +0
-0DTC_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)package/dtc/dtc.mk +2
-4@@ -14,24 +14,25 @@ DTC_INSTALL_STAGING = YES DTC_DEPENDENCIES = host-bison host-flex host-pkgconf HOST_DTC_DEPENDENCIES = host-bison host-flex host-pkgconf -DTC_MAKE_OPTS = \ - PREFIX=/usr \ - NO_PYTHON=1 \ - NO_VALGRIND=1 +DTC_CONF_OPTS = \ + --prefix=/usr \
Could you remove this "--prefix" option, please? It is already set by the pkg-meson.mk infra.
Quoted 4 lines
package/dtc/dtc.mk +3
-0+ -Dpython=disabled \ + -Dvalgrind=disabled \ + -Dtests=false
package/dtc/dtc.mk DTC_INSTALL_STAGING = YES · line 26
Quoted 10 lines
package/dtc/dtc.mk +2
-6# For the host, we install headers in a special subdirectory to avoid # conflicts with the in-kernel libfdt copy. -HOST_DTC_MAKE_OPTS = \ - PREFIX=$(HOST_DIR) \ - INCLUDEDIR=$(HOST_DIR)/include/libfdt \ - NO_PYTHON=1 \ - NO_VALGRIND=1 \ - NO_YAML=1 +HOST_DTC_CONF_OPTS = \ + --prefix=$(HOST_DIR) \
Same comment:
Could you remove this "--prefix" option, please? It is already set by the pkg-meson.mk infra.
package/dtc/dtc.mk DTC_INSTALL_STAGING = YES · line 33
Quoted 7 lines
package/dtc/dtc.mk +4
-0+ --includedir=$(HOST_DIR)/include/libfdt \ + -Dpython=disabled \ + -Dvalgrind=disabled \ + -Dyaml=disabled ifeq ($(BR2_PACKAGE_LIBYAML),y) DTC_DEPENDENCIES += libyaml
Since the package is now using Meson, could you add here:
DTC_CONF_OPTS += -Dyaml=enabled
Quoted 15 lines
package/dtc/dtc.mk +1
-6else -DTC_MAKE_OPTS += NO_YAML=1 +DTC_CONF_OPTS += -Dyaml=disabled endif define DTC_POST_INSTALL_TARGET_RM_DTDIFF@@ -52,28 +53,5 @@ DTC_INSTALL_GOAL = install-lib endif # $(BR2_PACKAGE_DTC_PROGRAMS) != y -define DTC_BUILD_CMDS - $(TARGET_CONFIGURE_OPTS) $(MAKE) EXTRA_CFLAGS="$(TARGET_CFLAGS) -fPIC" -C $(@D) $(DTC_MAKE_OPTS) -endef -
package/dtc/dtc.mk DTC_INSTALL_GOAL = install-lib · line 57
Quoted 10 lines
package/dtc/dtc.mk +0
-8-# For staging, only the library is needed -define DTC_INSTALL_STAGING_CMDS - $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) $(DTC_MAKE_OPTS) install-lib \ - install-includes -endef - -define DTC_INSTALL_TARGET_CMDS - $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) $(DTC_MAKE_OPTS) $(DTC_INSTALL_GOAL)
Since you remove the use of $(DTC_INSTALL_GOAL) here, you should also remove all other occurrences and the logic around it in the dtc.mk file.
Quoted 17 lines
package/dtc/dtc.mk +0
-5-endef - -# host build -define HOST_DTC_BUILD_CMDS - $(HOST_CONFIGURE_OPTS) $(MAKE) EXTRA_CFLAGS="$(HOST_CFLAGS) -fPIC" -C$(@D) $(HOST_DTC_MAKE_OPTS)
package/dtc/dtc.mk +2
-9-endef - -define HOST_DTC_INSTALL_CMDS - $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) $(HOST_DTC_MAKE_OPTS) install -endef - -$(eval $(generic-package)) -$(eval $(host-generic-package)) +$(eval $(meson-package)) +$(eval $(host-meson-package)) --
Quoted 1 line
2.43.0
Could you have a look at those issues, please?
Best regards,
Julien.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Philippe,
I mostly agree with Julien's comments, but two additional points below.
Am 05.08.26 um 16:17 schrieb Philippe MONTCHO:
Quoted 2 lines
Release note:
https://github.com/dgibson/dtc/releases/tag/v1.8.1
The primary repository is clearly the one on git.kernel.org (the manual doesn't even mention the Github one), so please link there instead [1,2]. Also it's probably the more stable source. ;-)
Quoted 113 lines
- This commit also removes 0002-fix-discarded-const-qualifiers.patch, since it has been merged in v1.8.0 already
- upstream dtc warns that Makefile-based builds are deprecated in favor of Meson after version was updated. So we migrate to Meson build.
Signed-off-by Philippe MONTCHO <[email protected]>--- .../0002-fix-discarded-const-qualifiers.patch | 88 ------------------- package/dtc/dtc.hash | 4 +- package/dtc/dtc.mk | 52 ++++------- 3 files changed, 17 insertions(+), 127 deletions(-)delete mode 100644
package/dtc/0002-fix-discarded-const-qualifiers.patchpackage/dtc/0002-fix-discarded-const-qualifiers.patch deleted +0
-88@@ -1,88 +0,0 @@ -From 9a1c801a1a3c102bf95c5339c9e985b26b823a21 Mon Sep 17 00:00:00 2001 -From: Stephen Gallagher <[email protected]> -Date: Tue, 6 Jan 2026 14:19:30 -0500 -Subject: Fix discarded const qualifiers - -It's unsafe to implicitly discard the const qualifier on a pointer. In -overlay_fixup_phandle(), this was probably just an oversight, and making -the "sep" variable a const char * is sufficient to fix it. - -In create_node(), however, the "p" variable is directly modifying the -buffer pointed to by "const char* node_name". To fix this, we need to -actually make a duplicate of the buffer and operate on that instead. - -This introduces a malloc()/free() and an unbounded strdup() into the -operation, but fdtput isn't a long-running service and the node_name -argument comes directly from argv, so this shouldn't introduce a -significant performance impact. - -Signed-off-by: Stephen Gallagher <[email protected]> -Signed-off-by: David Gibson <[email protected]> -Upstream: https://git.kernel.org/pub/scm/utils/dtc/dtc.git/commit/?id=9a1c801a1a3c102bf95c5339c9e985b26b823a21 -Signed-off-by: Alexis Lothoré <[email protected]> - ---- - fdtput.c | 8 +++++--- - libfdt/fdt_overlay.c | 3 ++- - meson.build | 1 + - 3 files changed, 8 insertions(+), 4 deletions(-) - -diff --git a/fdtput.c b/fdtput.c -index 05f2b93..fdb581a 100644 ---- a/fdtput.c -+++ b/fdtput.c -@@ -254,19 +254,21 @@ static int create_paths(char **blob, const char *in_path) - static int create_node(char **blob, const char *node_name) - { - int node = 0; -- char *p; -+ const char *p; -+ char *path = NULL; - - p = strrchr(node_name, '/'); - if (!p) { - report_error(node_name, -1, -FDT_ERR_BADPATH); - return -1; - } -- *p = '\0'; - - *blob = realloc_node(*blob, p + 1); - - if (p > node_name) { -- node = fdt_path_offset(*blob, node_name); -+ path = xstrndup(node_name, (size_t)(p - node_name)); -+ node = fdt_path_offset(*blob, path); -+ free(path); - if (node < 0) { - report_error(node_name, -1, node); - return -1; -diff --git a/libfdt/fdt_overlay.c b/libfdt/fdt_overlay.c -index e6b9eb6..51a3859 100644 ---- a/libfdt/fdt_overlay.c -+++ b/libfdt/fdt_overlay.c -@@ -407,7 +407,8 @@ static int overlay_fixup_phandle(void *fdt, void *fdto, int symbols_off, - const char *fixup_str = value; - uint32_t path_len, name_len; - uint32_t fixup_len; -- char *sep, *endptr; -+ const char *sep; -+ char *endptr; - int poffset, ret; - - fixup_end = memchr(value, '\0', len); -diff --git a/meson.build b/meson.build -index 66b44e8..501b706 100644 ---- a/meson.build -+++ b/meson.build -@@ -18,6 +18,7 @@ add_project_arguments( - '-Wshadow', - '-Wsuggest-attribute=format', - '-Wwrite-strings', -+ '-Wdiscarded-qualifiers', - ]), - language: 'c' - ) --- -cgit 1.2.3-korg - -package/dtc/dtc.hash +0
-0
package/dtc/dtc.hash line 5
Quoted 7 lines
package/dtc/dtc.hash +2
-2@@ -1,7 +1,7 @@ # from https://www.kernel.org/pub/software/utils/dtc/sha256sums.asc -sha256 92d8ca769805ae1f176204230438fe52808f4e1c7944053c9eec0e649b237539 dtc-1.7.2.tar.xz +sha256 23526015a6f1550e0541a53fe7acea1b5a11e3697cdf3a3bdc076abc38f6045d dtc-1.8.1.tar.xz # Hash for license files -sha256 78e1e1ce5728a990d59c7de61d4741c49185d5129daf783b386380a214328d68 README.license +sha256 8a516adc332c25503be9de4a511f9fce45370761a67046811b1c5a5268f2327a README.license
When updating the hash for a license file, please make a note in the commit message *what* changed there. At a glance it seems to be just a typo fix [3], but it's important to know so we can make sure we don't miss a bigger change.
Best regards,
Fiona
[1] https://git.kernel.org/pub/scm/utils/dtc/dtc.git/tag/?h=v1.8.0
[2] https://git.kernel.org/pub/scm/utils/dtc/dtc.git/tag/?h=v1.8.1
[3] https://git.kernel.org/pub/scm/utils/dtc/dtc.git/commit/README.license?h=v1.8.1&id=205fbef17b7b2f410e34ac79aa1559a8d492b66c
Quoted 73 lines
package/dtc/dtc.hash +0
-0sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 GPL sha256 6313108c23efffa36948f8b2cff1560a5935373b527b0e1a837cc77e6ed1bacd BSD-2-Clausepackage/dtc/dtc.mk +13
-29@@ -4,7 +4,7 @@ # ################################################################################ -DTC_VERSION = 1.7.2 +DTC_VERSION = 1.8.1 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)@@ -14,24 +14,25 @@ DTC_INSTALL_STAGING = YES DTC_DEPENDENCIES = host-bison host-flex host-pkgconf HOST_DTC_DEPENDENCIES = host-bison host-flex host-pkgconf -DTC_MAKE_OPTS = \ - PREFIX=/usr \ - NO_PYTHON=1 \ - NO_VALGRIND=1 +DTC_CONF_OPTS = \ + --prefix=/usr \ + -Dpython=disabled \ + -Dvalgrind=disabled \ + -Dtests=false # For the host, we install headers in a special subdirectory to avoid # conflicts with the in-kernel libfdt copy. -HOST_DTC_MAKE_OPTS = \ - PREFIX=$(HOST_DIR) \ - INCLUDEDIR=$(HOST_DIR)/include/libfdt \ - NO_PYTHON=1 \ - NO_VALGRIND=1 \ - NO_YAML=1 +HOST_DTC_CONF_OPTS = \ + --prefix=$(HOST_DIR) \ + --includedir=$(HOST_DIR)/include/libfdt \ + -Dpython=disabled \ + -Dvalgrind=disabled \ + -Dyaml=disabled ifeq ($(BR2_PACKAGE_LIBYAML),y) DTC_DEPENDENCIES += libyaml else -DTC_MAKE_OPTS += NO_YAML=1 +DTC_CONF_OPTS += -Dyaml=disabled endif define DTC_POST_INSTALL_TARGET_RM_DTDIFF@@ -52,28 +53,5 @@ DTC_INSTALL_GOAL = install-lib endif # $(BR2_PACKAGE_DTC_PROGRAMS) != y -define DTC_BUILD_CMDS - $(TARGET_CONFIGURE_OPTS) $(MAKE) EXTRA_CFLAGS="$(TARGET_CFLAGS) -fPIC" -C $(@D) $(DTC_MAKE_OPTS) -endef - -# For staging, only the library is needed -define DTC_INSTALL_STAGING_CMDS - $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) $(DTC_MAKE_OPTS) install-lib \ - install-includes -endef - -define DTC_INSTALL_TARGET_CMDS - $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) $(DTC_MAKE_OPTS) $(DTC_INSTALL_GOAL) -endef - -# host build -define HOST_DTC_BUILD_CMDS - $(HOST_CONFIGURE_OPTS) $(MAKE) EXTRA_CFLAGS="$(HOST_CFLAGS) -fPIC" -C $(@D) $(HOST_DTC_MAKE_OPTS)
package/dtc/dtc.mk DTC_INSTALL_GOAL = install-lib · line 57
Quoted 10 lines
package/dtc/dtc.mk +2
-8-endef - -define HOST_DTC_INSTALL_CMDS - $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) $(HOST_DTC_MAKE_OPTS) install -endef - -$(eval $(generic-package)) -$(eval $(host-generic-package)) +$(eval $(meson-package)) +$(eval $(host-meson-package))
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Fiona,
Quoted 9 lines · Fiona Klute
Hi Philippe,
I mostly agree with Julien's comments, but two additional points below.
Am 05.08.26 um 16:17 schrieb Philippe MONTCHO:
Quoted 2 lines
Release note:
https://github.com/dgibson/dtc/releases/tag/v1.8.1The primary repository is clearly the one on git.kernel.org (the manual doesn't even mention the Github one), so please link there instead [1,2]. Also it's probably the more stable source. ;-)
I would have accepted this Github URL because it is mentioned in CONTRIBUTING.md:
https://git.kernel.org/pub/scm/utils/dtc/dtc.git/tree/CONTRIBUTING.md?h=v1.8.1#n9
and libfdt/sbom.cdx.json:
https://git.kernel.org/pub/scm/utils/dtc/dtc.git/tree/libfdt/sbom.cdx.json?h=v1.8.1#n39
It seems the project is using both, so I'm fine with one or the other.
[...]
Quoted 3 lines
[1] https://git.kernel.org/pub/scm/utils/dtc/dtc.git/tag/?h=v1.8.0
[2] https://git.kernel.org/pub/scm/utils/dtc/dtc.git/tag/?h=v1.8.1
[3] https://git.kernel.org/pub/scm/utils/dtc/dtc.git/commit/README.license?h=v1.8.1&id=205fbef17b7b2f410e34ac79aa1559a8d492b66c
Best regards,
Julien.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Julien,
Hi Fiona,
Thanks for your comments and explanations.
I will address the various points in the v2 of the patch.
Best regards,
Philippe.
Quoted 30 lines · Julien Olivain
Hi Fiona,
Quoted 11 lines · Fiona Klute
Hi Philippe,
I mostly agree with Julien's comments, but two additional points below.
Am 05.08.26 um 16:17 schrieb Philippe MONTCHO:
Quoted 2 lines
Release note:
https://github.com/dgibson/dtc/releases/tag/v1.8.1The primary repository is clearly the one on git.kernel.org (the manual doesn't even mention the Github one), so please link there instead [1,2]. Also it's probably the more stable source. ;-)
I would have accepted this Github URL because it is mentioned in CONTRIBUTING.md:
https://git.kernel.org/pub/scm/utils/dtc/dtc.git/tree/CONTRIBUTING.md?h=v1.8.1#n9
andlibfdt/sbom.cdx.json:https://git.kernel.org/pub/scm/utils/dtc/dtc.git/tree/libfdt/sbom.cdx.json?h=v1.8.1#n39
It seems the project is using both, so I'm fine with one or the other.
[...]
Quoted 6 lines
Best regards,
Julien.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 1/1 package/dtc: bump version to 1.8.1 and switch to meson build
In reply to Philippe MONTCHORelease note, since 1.7.2:
https://git.kernel.org/pub/scm/utils/dtc/dtc.git/tag/?h=v1.8.0
https://git.kernel.org/pub/scm/utils/dtc/dtc.git/tag/?h=v1.8.1
- Some typos has been fixed in Readme.license:
https://git.kernel.org/pub/scm/utils/dtc/dtc.git/commit/README.license?h=v1.8.1&id=205fbef17b7b2f410e34ac79aa1559a8d492b66c
- This commit also removes 0002-fix-discarded-const-qualifiers.patch, since it has been merged in v1.8.0 already
- upstream dtc warns that Makefile-based builds are deprecated in favor of Meson after version was updated. So we migrate to Meson build.
- we also add a patch to downgrade unrecognized check name fatal error to non-fatal warning, so that unknown check names passed by external tools no longer abort the build.
---
changes v1 -> v2
- add link to the v1.8.0 release note in commit message (Suggested by Julien)
- add package/dtc/0002-downgrade-unrecognized-check-name-error.patch (Suggested by Julien)
- remove the logic around $(DTC_INSTALL_GOAL) (Suggested by Julien)
- update CONF_OPTS (Suggested by Julien)
- add Readme.license changes reason (Suggested by Fiona)
- link git.kernel.org repository in commit message(Suggested by Fiona)
--- ...ngrade-unrecognized-check-name-error.patch | 47 ++++++++++ .../0002-fix-discarded-const-qualifiers.patch | 88 ------------------- package/dtc/dtc.hash | 4 +- package/dtc/dtc.mk | 56 +++--------- 4 files changed, 63 insertions(+), 132 deletions(-) create mode 100644 package/dtc/0002-downgrade-unrecognized-check-name-error.patch delete mode 100644 package/dtc/0002-fix-discarded-const-qualifiers.patch
package/dtc/0002-downgrade-unrecognized-check-name-error.patch new file +47 -0
@@ -0,0 +1,47 @@ +From e23b89701bbfbab629ba11cbce945a439e1ac85f Mon Sep 17 00:00:00 2001 +From: Philippe MONTCHO <[email protected]> +Date: Tue, 11 Aug 2026 15:41:39 +0200 +Subject: [PATCH] checks.c: downgrade unrecognized check name error + +dtc removed the graph_child_address checker in v1.8.0 [1], after +introducing it in v1.4.7 [2]. +U-boot has been passing -Wno-graph_child_address to dtc since +v2020.07 [3], and only stopped doing so in v2026.07 [4]. +Any defconfig pinning a U-boot version older than v2026.07 fails to +build once dtc is bumped to >= v1.8.0, with : + +FATAL ERROR: Unrecognized check name "graph_child_address" + +This buildroot patch downgrades this to a non-fatal warning, so that +outdated or unknown check names passed by external tools (such as U-boot +pinned to pre-v2026.07 release) no longer abort the build. + +This is a Buildroot-specific patch, not intended for submission +upstream: U-Boot has already fixed this on its side as of v2026.07. + +[1] https://github.com/dgibson/dtc/commit/cba90ce82064ad1e6d25f20d8eaa940bd2fc97e +[2] https://github.com/dgibson/dtc/commit/df536831d02c51556a8e88cd8da0be024448415 +[3] https://source.denx.de/u-boot/u-boot/-/commit/5972ff077e0f6db36f327f303b0c381f56238ef +[4] https://source.denx.de/u-boot/u-boot/-/commit/b427decccfe983eda4f815ddcf5dcbe733cd04f + +Signed-off-by: Philippe MONTCHO <[email protected]> +--- + checks.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/checks.c b/checks.c +index a6037ed..ca74677 100644 +--- a/checks.c ++++ b/checks.c +@@ -2054,7 +2054,7 @@ void parse_checks_option(bool warn, bool error, const char *arg) + } + } + +- die("Unrecognized check name \"%s\"\n", name); ++ fprintf(stderr, "Warning: Unrecognized check name \"%s\"\n", name); + } + + void process_checks(bool force, struct dt_info *dti) +-- +2.43.0 +
package/dtc/0002-fix-discarded-const-qualifiers.patch deleted +0 -88
88 lines not on this page · raw message
package/dtc/dtc.hash +2 -2
@@ -1,7 +1,7 @@ # from https://www.kernel.org/pub/software/utils/dtc/sha256sums.asc -sha256 92d8ca769805ae1f176204230438fe52808f4e1c7944053c9eec0e649b237539 dtc-1.7.2.tar.xz +sha256 23526015a6f1550e0541a53fe7acea1b5a11e3697cdf3a3bdc076abc38f6045d dtc-1.8.1.tar.xz # Hash for license files -sha256 78e1e1ce5728a990d59c7de61d4741c49185d5129daf783b386380a214328d68 README.license +sha256 8a516adc332c25503be9de4a511f9fce45370761a67046811b1c5a5268f2327a README.license sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 GPL sha256 6313108c23efffa36948f8b2cff1560a5935373b527b0e1a837cc77e6ed1bacd BSD-2-Clause
package/dtc/dtc.mk +14 -42
84 lines not on this page · raw message
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Philippe,
Quoted 10 lines · Philippe MONTCHO
Release note, since 1.7.2:
https://git.kernel.org/pub/scm/utils/dtc/dtc.git/tag/?h=v1.8.0
https://git.kernel.org/pub/scm/utils/dtc/dtc.git/tag/?h=v1.8.1- Some typos has been fixed in Readme.license:
https://git.kernel.org/pub/scm/utils/dtc/dtc.git/commit/README.license?h=v1.8.1&id=205fbef17b7b2f410e34ac79aa1559a8d492b66c- This commit also removes 0002-fix-discarded-const-qualifiers.patch, since it has been merged in v1.8.0 already
Quoted 8 lines
- upstream dtc warns that Makefile-based builds are deprecated in favor of Meson after version was updated. So we migrate to Meson build.
- we also add a patch to downgrade unrecognized check name fatal error to non-fatal warning, so that unknown check names passed by external tools no longer abort the build.
Signed-off-by Philippe MONTCHO <[email protected]>
Thanks for this work!
Quoted 23 lines
package/dtc/0002-downgrade-unrecognized-check-name-error.patch new file +17
-0@@ -0,0 +1,47 @@ +From e23b89701bbfbab629ba11cbce945a439e1ac85f Mon Sep 17 00:00:00 2001 +From: Philippe MONTCHO <[email protected]> +Date: Tue, 11 Aug 2026 15:41:39 +0200 +Subject: [PATCH] checks.c: downgrade unrecognized check name error + +dtc removed the graph_child_address checker in v1.8.0 [1], after +introducing it in v1.4.7 [2]. +U-boot has been passing -Wno-graph_child_address to dtc since +v2020.07 [3], and only stopped doing so in v2026.07 [4]. +Any defconfig pinning a U-boot version older than v2026.07 fails to +build once dtc is bumped to >= v1.8.0, with : + +FATAL ERROR: Unrecognized check name "graph_child_address" + +This buildroot patch downgrades this to a non-fatal warning, so that +outdated or unknown check names passed by external tools (such as U-boot +pinned to pre-v2026.07 release) no longer abort the build.
package/dtc/0002-downgrade-unrecognized-check-name-error.patch line 27
Quoted 10 lines
package/dtc/0002-downgrade-unrecognized-check-name-error.patch new file +10
-0+ +This is a Buildroot-specific patch, not intended for submission +upstream: U-Boot has already fixed this on its side as of v2026.07. + +[1] https://github.com/dgibson/dtc/commit/cba90ce82064ad1e6d25f20d8eaa940bd2fc97e +[2] https://github.com/dgibson/dtc/commit/df536831d02c51556a8e88cd8da0be024448415 +[3] https://source.denx.de/u-boot/u-boot/-/commit/5972ff077e0f6db36f327f303b0c381f56238ef +[4] https://source.denx.de/u-boot/u-boot/-/commit/b427decccfe983eda4f815ddcf5dcbe733cd04f + +Signed-off-by: Philippe MONTCHO <[email protected]>
This patch needs an Upstream: tag. In this case, it can't be submitted upstream because it doesn't make sense, so maybe:
Upstream: N/A, needed for compatibility with older U-Boot releases
Quoted 53 lines
package/dtc/dtc.mk +12
-12@@ -4,7 +4,7 @@ # ################################################################################ -DTC_VERSION = 1.7.2 +DTC_VERSION = 1.8.1 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)@@ -14,24 +14,24 @@ DTC_INSTALL_STAGING = YES DTC_DEPENDENCIES = host-bison host-flex host-pkgconf HOST_DTC_DEPENDENCIES = host-bison host-flex host-pkgconf -DTC_MAKE_OPTS = \ - PREFIX=/usr \ - NO_PYTHON=1 \ - NO_VALGRIND=1 +DTC_CONF_OPTS = \ + -Dpython=disabled \ + -Dvalgrind=disabled \ + -Dtests=false # For the host, we install headers in a special subdirectory to avoid # conflicts with the in-kernel libfdt copy. -HOST_DTC_MAKE_OPTS = \ - PREFIX=$(HOST_DIR) \ - INCLUDEDIR=$(HOST_DIR)/include/libfdt \ - NO_PYTHON=1 \ - NO_VALGRIND=1 \ - NO_YAML=1 +HOST_DTC_CONF_OPTS = \ + --includedir=$(HOST_DIR)/include/libfdt \ + -Dpython=disabled \ + -Dvalgrind=disabled \ + -Dyaml=disabled ifeq ($(BR2_PACKAGE_LIBYAML),y) DTC_DEPENDENCIES += libyaml +DTC_CONF_OPTS += -Dyaml=enabled else -DTC_MAKE_OPTS += NO_YAML=1 +DTC_CONF_OPTS += -Dyaml=disabled endif define DTC_POST_INSTALL_TARGET_RM_DTDIFF@@ -41,39 +41,11 @@ endef ifeq ($(BR2_PACKAGE_DTC_PROGRAMS),y) DTC_LICENSE += , GPL-2.0+ (programs)
package/dtc/dtc.mk endef · line 48
Quoted 10 lines
package/dtc/dtc.mk +0
-5-DTC_INSTALL_GOAL = install ifeq ($(BR2_PACKAGE_BASH),) DTC_POST_INSTALL_TARGET_HOOKS += DTC_POST_INSTALL_TARGET_RM_DTDIFF endif -else # $(BR2_PACKAGE_DTC_PROGRAMS) != y - -DTC_INSTALL_GOAL = install-lib - endif # $(BR2_PACKAGE_DTC_PROGRAMS) != y
What bothers me here is that BR2_PACKAGE_DTC_PROGRAMS basically doesn't do anything anymore.
The only thing it does now is to remove dtdiff if bash is not available. Among other things, it means that when BR2_PACKAGE_DTC_PROGRAMS is disabled, DTC_LICENSE only contains "GPL-2.0+ or BSD-2-Clause (library)", while programs are actually also installed.
If the installation of programs cannot be disabled with the new meson build system, then I would suggest to just remove the BR2_PACKAGE_DTC_PROGRAMS option.
Thanks a lot!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot