Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Olivain via buildroot <buildroot@buildroot.org>
To: Philippe MONTCHO <philippemontcho@gmail.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] package/dtc: bump version to 1.8.1 and switch to meson build
Date: Fri, 07 Aug 2026 19:41:18 +0200	[thread overview]
Message-ID: <4c8da859f1a78442e7364118e6bf4eb2@free.fr> (raw)
In-Reply-To: <20260805141803.1647733-1-philippemontcho@gmail.com>

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 <philippemontcho@gmail.com>
> ---
>  .../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
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2026-08-07 17:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-05 14:17 [Buildroot] [PATCH 1/1] package/dtc: bump version to 1.8.1 and switch to meson build Philippe MONTCHO
2026-08-07 17:41 ` Julien Olivain via buildroot [this message]
2026-08-07 20:02 ` Fiona Klute via buildroot
2026-08-08  7:13   ` Julien Olivain via buildroot
2026-08-10  8:30     ` Philippe MONTCHO
2026-08-13 13:08 ` [Buildroot] [PATCH v2 " Philippe MONTCHO

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4c8da859f1a78442e7364118e6bf4eb2@free.fr \
    --to=buildroot@buildroot.org \
    --cc=ju.o@free.fr \
    --cc=philippemontcho@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox