Re: [Buildroot] [PATCH 1/1] package/dtc: bump version to 1.8.1 and switch to meson build
Julien Olivain via buildroot <[email protected]>
| Newsgroups | net.busybox.buildroot |
|---|---|
| Message-ID | <[email protected]> |
Hi Philippe, Thanks for the patch. I have few comments. On 05/08/2026 16:17, Philippe MONTCHO wrote: > 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 > - 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 [...] > diff --git a/package/dtc/dtc.mk b/package/dtc/dtc.mk > index 5b810c6e65..bc4c264a61 100644 > --- a/package/dtc/dtc.mk > +++ b/package/dtc/dtc.mk > @@ -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? > 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 \ Could you remove this "--prefix" option, please? It is already set by the pkg-meson.mk infra. > + -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) \ Same comment: Could you remove this "--prefix" option, please? It is already set by the pkg-meson.mk infra. > + --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 > 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) 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. > -endef > - > -# host build > -define HOST_DTC_BUILD_CMDS > - $(HOST_CONFIGURE_OPTS) $(MAKE) EXTRA_CFLAGS="$(HOST_CFLAGS) -fPIC" -C > $(@D) $(HOST_DTC_MAKE_OPTS) > -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)) > -- > 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