* [PATCH] u-boot: Fix u-boot-tools-native build after DTC update
@ 2026-04-29 0:18 Fabio Estevam
2026-04-29 8:03 ` [OE-core] " Richard Purdie
0 siblings, 1 reply; 10+ messages in thread
From: Fabio Estevam @ 2026-04-29 0:18 UTC (permalink / raw)
To: openembedded-core; +Cc: khem.raj, marek.vasut, Fabio Estevam
From: Marek Vasut <marek.vasut@mailbox.org>
Set PKG_CONFIG_SYSROOT_DIR as invalid path, so the host tools
build will surely not find host /usr/include/yaml.h file and
will disable yamltree build. For details, see U-Boot commit
807bcd844afe ("scripts/dtc: Fix pkg-config behavior under sysroot").
Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
meta/recipes-bsp/u-boot/u-boot-tools.inc | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-bsp/u-boot/u-boot-tools.inc b/meta/recipes-bsp/u-boot/u-boot-tools.inc
index a055409c2cb0..071746b64e24 100644
--- a/meta/recipes-bsp/u-boot/u-boot-tools.inc
+++ b/meta/recipes-bsp/u-boot/u-boot-tools.inc
@@ -1,5 +1,5 @@
SUMMARY = "U-Boot bootloader tools"
-DEPENDS += "gnutls openssl util-linux swig-native libyaml-native"
+DEPENDS += "gnutls openssl util-linux swig-native"
inherit python3native
export STAGING_INCDIR = "${STAGING_INCDIR_NATIVE}"
@@ -88,3 +88,8 @@ RDEPENDS:${PN}:class-native = ""
BBCLASSEXTEND = "native nativesdk"
+# Set PKG_CONFIG_SYSROOT_DIR as invalid path, so the host tools
+# build will surely not find host /usr/include/yaml.h file and
+# will disable yamltree build. For details, see U-Boot commit
+# 807bcd844afe ("scripts/dtc: Fix pkg-config behavior under sysroot")
+PKG_CONFIG_SYSROOT_DIR:prepend = "/invalid/"
--
2.43.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [OE-core] [PATCH] u-boot: Fix u-boot-tools-native build after DTC update
2026-04-29 0:18 [PATCH] u-boot: Fix u-boot-tools-native build after DTC update Fabio Estevam
@ 2026-04-29 8:03 ` Richard Purdie
2026-04-29 8:36 ` Marek Vasut
2026-04-29 8:43 ` Joao Marcos Costa
0 siblings, 2 replies; 10+ messages in thread
From: Richard Purdie @ 2026-04-29 8:03 UTC (permalink / raw)
To: festevam, openembedded-core; +Cc: khem.raj, marek.vasut
On Tue, 2026-04-28 at 21:18 -0300, Fabio Estevam via lists.openembedded.org wrote:
> From: Marek Vasut <marek.vasut@mailbox.org>
>
> Set PKG_CONFIG_SYSROOT_DIR as invalid path, so the host tools
> build will surely not find host /usr/include/yaml.h file and
> will disable yamltree build. For details, see U-Boot commit
> 807bcd844afe ("scripts/dtc: Fix pkg-config behavior under sysroot").
>
> Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ---
> meta/recipes-bsp/u-boot/u-boot-tools.inc | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-bsp/u-boot/u-boot-tools.inc b/meta/recipes-bsp/u-boot/u-boot-tools.inc
> index a055409c2cb0..071746b64e24 100644
> --- a/meta/recipes-bsp/u-boot/u-boot-tools.inc
> +++ b/meta/recipes-bsp/u-boot/u-boot-tools.inc
> @@ -1,5 +1,5 @@
> SUMMARY = "U-Boot bootloader tools"
> -DEPENDS += "gnutls openssl util-linux swig-native libyaml-native"
> +DEPENDS += "gnutls openssl util-linux swig-native"
>
> inherit python3native
> export STAGING_INCDIR = "${STAGING_INCDIR_NATIVE}"
> @@ -88,3 +88,8 @@ RDEPENDS:${PN}:class-native = ""
>
> BBCLASSEXTEND = "native nativesdk"
>
> +# Set PKG_CONFIG_SYSROOT_DIR as invalid path, so the host tools
> +# build will surely not find host /usr/include/yaml.h file and
> +# will disable yamltree build. For details, see U-Boot commit
> +# 807bcd844afe ("scripts/dtc: Fix pkg-config behavior under sysroot")
> +PKG_CONFIG_SYSROOT_DIR:prepend = "/invalid/"
This feels a bit like a hack. Is there not a config option we can pass
to u-boot to make this deterministic, i.e. always disable libyaml?
Cheers,
Richard
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [OE-core] [PATCH] u-boot: Fix u-boot-tools-native build after DTC update
2026-04-29 8:03 ` [OE-core] " Richard Purdie
@ 2026-04-29 8:36 ` Marek Vasut
2026-04-29 8:56 ` Richard Purdie
2026-04-29 8:43 ` Joao Marcos Costa
1 sibling, 1 reply; 10+ messages in thread
From: Marek Vasut @ 2026-04-29 8:36 UTC (permalink / raw)
To: Richard Purdie, festevam, openembedded-core; +Cc: khem.raj
On 4/29/26 10:03 AM, Richard Purdie wrote:
> On Tue, 2026-04-28 at 21:18 -0300, Fabio Estevam via lists.openembedded.org wrote:
>> From: Marek Vasut <marek.vasut@mailbox.org>
>>
>> Set PKG_CONFIG_SYSROOT_DIR as invalid path, so the host tools
>> build will surely not find host /usr/include/yaml.h file and
>> will disable yamltree build. For details, see U-Boot commit
>> 807bcd844afe ("scripts/dtc: Fix pkg-config behavior under sysroot").
>>
>> Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
>> Signed-off-by: Fabio Estevam <festevam@gmail.com>
>> ---
>> meta/recipes-bsp/u-boot/u-boot-tools.inc | 7 ++++++-
>> 1 file changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/meta/recipes-bsp/u-boot/u-boot-tools.inc b/meta/recipes-bsp/u-boot/u-boot-tools.inc
>> index a055409c2cb0..071746b64e24 100644
>> --- a/meta/recipes-bsp/u-boot/u-boot-tools.inc
>> +++ b/meta/recipes-bsp/u-boot/u-boot-tools.inc
>> @@ -1,5 +1,5 @@
>> SUMMARY = "U-Boot bootloader tools"
>> -DEPENDS += "gnutls openssl util-linux swig-native libyaml-native"
>> +DEPENDS += "gnutls openssl util-linux swig-native"
>>
>> inherit python3native
>> export STAGING_INCDIR = "${STAGING_INCDIR_NATIVE}"
>> @@ -88,3 +88,8 @@ RDEPENDS:${PN}:class-native = ""
>>
>> BBCLASSEXTEND = "native nativesdk"
>>
>> +# Set PKG_CONFIG_SYSROOT_DIR as invalid path, so the host tools
>> +# build will surely not find host /usr/include/yaml.h file and
>> +# will disable yamltree build. For details, see U-Boot commit
>> +# 807bcd844afe ("scripts/dtc: Fix pkg-config behavior under sysroot")
>> +PKG_CONFIG_SYSROOT_DIR:prepend = "/invalid/"
>
> This feels a bit like a hack. Is there not a config option we can pass
> to u-boot to make this deterministic, i.e. always disable libyaml?
Currently there is not, but Linux did drop the whole yamltree part in
ef8795f3f1ce ("dt-bindings: kbuild: Use DTB files for validation") and
U-Boot should do the same. This path change is the minimum invasive
change to achieve disabled yamltree with current U-Boot, until this is
fixed upstream the same way Linux fixed it.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [OE-core] [PATCH] u-boot: Fix u-boot-tools-native build after DTC update
2026-04-29 8:03 ` [OE-core] " Richard Purdie
2026-04-29 8:36 ` Marek Vasut
@ 2026-04-29 8:43 ` Joao Marcos Costa
2026-04-29 9:01 ` Quentin Schulz
1 sibling, 1 reply; 10+ messages in thread
From: Joao Marcos Costa @ 2026-04-29 8:43 UTC (permalink / raw)
To: richard.purdie, festevam, openembedded-core; +Cc: khem.raj, marek.vasut
Hello,
On 4/29/26 10:03, Richard Purdie via lists.openembedded.org wrote:
> On Tue, 2026-04-28 at 21:18 -0300, Fabio Estevam via lists.openembedded.org wrote:
>> From: Marek Vasut <marek.vasut@mailbox.org>
>>
>> Set PKG_CONFIG_SYSROOT_DIR as invalid path, so the host tools
>> build will surely not find host /usr/include/yaml.h file and
>> will disable yamltree build. For details, see U-Boot commit
>> 807bcd844afe ("scripts/dtc: Fix pkg-config behavior under sysroot").
>>
>> Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
>> Signed-off-by: Fabio Estevam <festevam@gmail.com>
(...)
>>
>> +# Set PKG_CONFIG_SYSROOT_DIR as invalid path, so the host tools
>> +# build will surely not find host /usr/include/yaml.h file and
>> +# will disable yamltree build. For details, see U-Boot commit
>> +# 807bcd844afe ("scripts/dtc: Fix pkg-config behavior under sysroot")
>> +PKG_CONFIG_SYSROOT_DIR:prepend = "/invalid/"
>
> This feels a bit like a hack. Is there not a config option we can pass
> to u-boot to make this deterministic, i.e. always disable libyaml?
>
> Cheers,
>
> Richard
Maybe setting/appending "-DNO_YAML" at HOST_EXTRACFLAGS (e.g., through
EXTRA_OEMAKE or BUILD_CFLAGS)?
In the end, that's a direct consequence of having an invalid
PKG_CONFIG_SYSROOT_DIR:
https://github.com/u-boot/u-boot/blob/master/scripts/dtc/Makefile#L21
It is still kind of a hack, though, but I hope it helps!
--
Best regards,
João Marcos Costa
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [OE-core] [PATCH] u-boot: Fix u-boot-tools-native build after DTC update
2026-04-29 8:36 ` Marek Vasut
@ 2026-04-29 8:56 ` Richard Purdie
2026-04-29 9:47 ` Marek Vasut
0 siblings, 1 reply; 10+ messages in thread
From: Richard Purdie @ 2026-04-29 8:56 UTC (permalink / raw)
To: Marek Vasut, festevam, openembedded-core; +Cc: khem.raj
On Wed, 2026-04-29 at 10:36 +0200, Marek Vasut wrote:
> On 4/29/26 10:03 AM, Richard Purdie wrote:
> > On Tue, 2026-04-28 at 21:18 -0300, Fabio Estevam via lists.openembedded.org wrote:
> > > From: Marek Vasut <marek.vasut@mailbox.org>
> > >
> > > Set PKG_CONFIG_SYSROOT_DIR as invalid path, so the host tools
> > > build will surely not find host /usr/include/yaml.h file and
> > > will disable yamltree build. For details, see U-Boot commit
> > > 807bcd844afe ("scripts/dtc: Fix pkg-config behavior under sysroot").
> > >
> > > Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
> > > Signed-off-by: Fabio Estevam <festevam@gmail.com>
> > > ---
> > > meta/recipes-bsp/u-boot/u-boot-tools.inc | 7 ++++++-
> > > 1 file changed, 6 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/meta/recipes-bsp/u-boot/u-boot-tools.inc b/meta/recipes-bsp/u-boot/u-boot-tools.inc
> > > index a055409c2cb0..071746b64e24 100644
> > > --- a/meta/recipes-bsp/u-boot/u-boot-tools.inc
> > > +++ b/meta/recipes-bsp/u-boot/u-boot-tools.inc
> > > @@ -1,5 +1,5 @@
> > > SUMMARY = "U-Boot bootloader tools"
> > > -DEPENDS += "gnutls openssl util-linux swig-native libyaml-native"
> > > +DEPENDS += "gnutls openssl util-linux swig-native"
> > >
> > > inherit python3native
> > > export STAGING_INCDIR = "${STAGING_INCDIR_NATIVE}"
> > > @@ -88,3 +88,8 @@ RDEPENDS:${PN}:class-native = ""
> > >
> > > BBCLASSEXTEND = "native nativesdk"
> > >
> > > +# Set PKG_CONFIG_SYSROOT_DIR as invalid path, so the host tools
> > > +# build will surely not find host /usr/include/yaml.h file and
> > > +# will disable yamltree build. For details, see U-Boot commit
> > > +# 807bcd844afe ("scripts/dtc: Fix pkg-config behavior under sysroot")
> > > +PKG_CONFIG_SYSROOT_DIR:prepend = "/invalid/"
> >
> > This feels a bit like a hack. Is there not a config option we can pass
> > to u-boot to make this deterministic, i.e. always disable libyaml?
> Currently there is not, but Linux did drop the whole yamltree part in
> ef8795f3f1ce ("dt-bindings: kbuild: Use DTB files for validation") and
> U-Boot should do the same. This path change is the minimum invasive
> change to achieve disabled yamltree with current U-Boot, until this is
> fixed upstream the same way Linux fixed it.
Lets just explicitly patch the code out then or something, I'm not sure
we need to be minimally invasive here.
I really don't like hacks which people may copy/propagate and which can
have interesting unintended side effects.
Cheers,
Richard
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [OE-core] [PATCH] u-boot: Fix u-boot-tools-native build after DTC update
2026-04-29 8:43 ` Joao Marcos Costa
@ 2026-04-29 9:01 ` Quentin Schulz
2026-04-29 9:51 ` Marek Vasut
0 siblings, 1 reply; 10+ messages in thread
From: Quentin Schulz @ 2026-04-29 9:01 UTC (permalink / raw)
To: joaomarcos.costa, richard.purdie, festevam, openembedded-core
Cc: khem.raj, marek.vasut
Hi,
On 4/29/26 10:43 AM, Joao Marcos Costa via lists.openembedded.org wrote:
> Hello,
>
> On 4/29/26 10:03, Richard Purdie via lists.openembedded.org wrote:
>> On Tue, 2026-04-28 at 21:18 -0300, Fabio Estevam via
>> lists.openembedded.org wrote:
>>> From: Marek Vasut <marek.vasut@mailbox.org>
>>>
>>> Set PKG_CONFIG_SYSROOT_DIR as invalid path, so the host tools
>>> build will surely not find host /usr/include/yaml.h file and
>>> will disable yamltree build. For details, see U-Boot commit
>>> 807bcd844afe ("scripts/dtc: Fix pkg-config behavior under sysroot").
>>>
>>> Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
>>> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> (...)
>>> +# Set PKG_CONFIG_SYSROOT_DIR as invalid path, so the host tools
>>> +# build will surely not find host /usr/include/yaml.h file and
>>> +# will disable yamltree build. For details, see U-Boot commit
>>> +# 807bcd844afe ("scripts/dtc: Fix pkg-config behavior under sysroot")
>>> +PKG_CONFIG_SYSROOT_DIR:prepend = "/invalid/"
>>
>> This feels a bit like a hack. Is there not a config option we can pass
>> to u-boot to make this deterministic, i.e. always disable libyaml?
>>
>> Cheers,
>>
>> Richard
>
> Maybe setting/appending "-DNO_YAML" at HOST_EXTRACFLAGS (e.g., through
> EXTRA_OEMAKE or BUILD_CFLAGS)?
>
> In the end, that's a direct consequence of having an invalid
> PKG_CONFIG_SYSROOT_DIR:
> https://eur02.safelinks.protection.outlook.com/?
> url=https%3A%2F%2Fgithub.com%2Fu-boot%2Fu-
> boot%2Fblob%2Fmaster%2Fscripts%2Fdtc%2FMakefile%23L21&data=05%7C02%7Cquentin.schulz%40cherry.de%7C73feb8ea44e0468f38ea08dea5cb6a9f%7C5e0e1b5221b54e7b83bb514ec460677e%7C0%7C0%7C639130490251925693%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=%2BbKkw2HVgw52EWv%2FxeSlWRZ%2Ba3%2F3ireKwMxCLBvIwyg%3D&reserved=0
>
> It is still kind of a hack, though, but I hope it helps!
>
dtc-objs will still contain yamltree and thus attempt to build it.
Fabio, you are not explaining why you don't want to add the libyaml
dependency, Khem attempted to add it in
https://lore.kernel.org/openembedded-core/20260412035757.134385-1-khem.raj@oss.qualcomm.com/
but I don't see any follow-up or statement it should be dropped.
I'm very much against setting a variable in the recipe that applies to
all version of the recipes and will not be looked at again. Instead, add
a patch for U-Boot that removes this (but again, why?) logic so that
next time we do an upgrade there are more chances of someone looking at
patches and trying to figure out if they are still needed.
In any case, we absolutely need a justification otherwise I'm afraid
we'll never be able to do a cleanup because we don't know why it was
needed in the first place. This is something that has happened already
enough time for me in OE-Core/YP that it really is a PITA for upgrades
and cleanups.
Cheers,
Quentin
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [OE-core] [PATCH] u-boot: Fix u-boot-tools-native build after DTC update
2026-04-29 8:56 ` Richard Purdie
@ 2026-04-29 9:47 ` Marek Vasut
0 siblings, 0 replies; 10+ messages in thread
From: Marek Vasut @ 2026-04-29 9:47 UTC (permalink / raw)
To: Richard Purdie, festevam, openembedded-core; +Cc: khem.raj
On 4/29/26 10:56 AM, Richard Purdie wrote:
> On Wed, 2026-04-29 at 10:36 +0200, Marek Vasut wrote:
>> On 4/29/26 10:03 AM, Richard Purdie wrote:
>>> On Tue, 2026-04-28 at 21:18 -0300, Fabio Estevam via lists.openembedded.org wrote:
>>>> From: Marek Vasut <marek.vasut@mailbox.org>
>>>>
>>>> Set PKG_CONFIG_SYSROOT_DIR as invalid path, so the host tools
>>>> build will surely not find host /usr/include/yaml.h file and
>>>> will disable yamltree build. For details, see U-Boot commit
>>>> 807bcd844afe ("scripts/dtc: Fix pkg-config behavior under sysroot").
>>>>
>>>> Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
>>>> Signed-off-by: Fabio Estevam <festevam@gmail.com>
>>>> ---
>>>> meta/recipes-bsp/u-boot/u-boot-tools.inc | 7 ++++++-
>>>> 1 file changed, 6 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/meta/recipes-bsp/u-boot/u-boot-tools.inc b/meta/recipes-bsp/u-boot/u-boot-tools.inc
>>>> index a055409c2cb0..071746b64e24 100644
>>>> --- a/meta/recipes-bsp/u-boot/u-boot-tools.inc
>>>> +++ b/meta/recipes-bsp/u-boot/u-boot-tools.inc
>>>> @@ -1,5 +1,5 @@
>>>> SUMMARY = "U-Boot bootloader tools"
>>>> -DEPENDS += "gnutls openssl util-linux swig-native libyaml-native"
>>>> +DEPENDS += "gnutls openssl util-linux swig-native"
>>>>
>>>> inherit python3native
>>>> export STAGING_INCDIR = "${STAGING_INCDIR_NATIVE}"
>>>> @@ -88,3 +88,8 @@ RDEPENDS:${PN}:class-native = ""
>>>>
>>>> BBCLASSEXTEND = "native nativesdk"
>>>>
>>>> +# Set PKG_CONFIG_SYSROOT_DIR as invalid path, so the host tools
>>>> +# build will surely not find host /usr/include/yaml.h file and
>>>> +# will disable yamltree build. For details, see U-Boot commit
>>>> +# 807bcd844afe ("scripts/dtc: Fix pkg-config behavior under sysroot")
>>>> +PKG_CONFIG_SYSROOT_DIR:prepend = "/invalid/"
>>>
>>> This feels a bit like a hack. Is there not a config option we can pass
>>> to u-boot to make this deterministic, i.e. always disable libyaml?
>> Currently there is not, but Linux did drop the whole yamltree part in
>> ef8795f3f1ce ("dt-bindings: kbuild: Use DTB files for validation") and
>> U-Boot should do the same. This path change is the minimum invasive
>> change to achieve disabled yamltree with current U-Boot, until this is
>> fixed upstream the same way Linux fixed it.
>
> Lets just explicitly patch the code out then or something, I'm not sure
> we need to be minimally invasive here.
>
> I really don't like hacks which people may copy/propagate and which can
> have interesting unintended side effects.
This is fine by me. Let me comment on the email from Quentin real quick
with a bit more elaborate patch plan.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [OE-core] [PATCH] u-boot: Fix u-boot-tools-native build after DTC update
2026-04-29 9:01 ` Quentin Schulz
@ 2026-04-29 9:51 ` Marek Vasut
2026-04-29 9:54 ` Quentin Schulz
0 siblings, 1 reply; 10+ messages in thread
From: Marek Vasut @ 2026-04-29 9:51 UTC (permalink / raw)
To: Quentin Schulz, joaomarcos.costa, richard.purdie, festevam,
openembedded-core
Cc: khem.raj
On 4/29/26 11:01 AM, Quentin Schulz wrote:
> Hi,
>
> On 4/29/26 10:43 AM, Joao Marcos Costa via lists.openembedded.org wrote:
>> Hello,
>>
>> On 4/29/26 10:03, Richard Purdie via lists.openembedded.org wrote:
>>> On Tue, 2026-04-28 at 21:18 -0300, Fabio Estevam via
>>> lists.openembedded.org wrote:
>>>> From: Marek Vasut <marek.vasut@mailbox.org>
>>>>
>>>> Set PKG_CONFIG_SYSROOT_DIR as invalid path, so the host tools
>>>> build will surely not find host /usr/include/yaml.h file and
>>>> will disable yamltree build. For details, see U-Boot commit
>>>> 807bcd844afe ("scripts/dtc: Fix pkg-config behavior under sysroot").
>>>>
>>>> Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
>>>> Signed-off-by: Fabio Estevam <festevam@gmail.com>
>> (...)
>>>> +# Set PKG_CONFIG_SYSROOT_DIR as invalid path, so the host tools
>>>> +# build will surely not find host /usr/include/yaml.h file and
>>>> +# will disable yamltree build. For details, see U-Boot commit
>>>> +# 807bcd844afe ("scripts/dtc: Fix pkg-config behavior under sysroot")
>>>> +PKG_CONFIG_SYSROOT_DIR:prepend = "/invalid/"
>>>
>>> This feels a bit like a hack. Is there not a config option we can pass
>>> to u-boot to make this deterministic, i.e. always disable libyaml?
>>>
>>> Cheers,
>>>
>>> Richard
>>
>> Maybe setting/appending "-DNO_YAML" at HOST_EXTRACFLAGS (e.g., through
>> EXTRA_OEMAKE or BUILD_CFLAGS)?
>>
>> In the end, that's a direct consequence of having an invalid
>> PKG_CONFIG_SYSROOT_DIR:
>> https://eur02.safelinks.protection.outlook.com/?
>> url=https%3A%2F%2Fgithub.com%2Fu-boot%2Fu-
>> boot%2Fblob%2Fmaster%2Fscripts%2Fdtc%2FMakefile%23L21&data=05%7C02%7Cquentin.schulz%40cherry.de%7C73feb8ea44e0468f38ea08dea5cb6a9f%7C5e0e1b5221b54e7b83bb514ec460677e%7C0%7C0%7C639130490251925693%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=%2BbKkw2HVgw52EWv%2FxeSlWRZ%2Ba3%2F3ireKwMxCLBvIwyg%3D&reserved=0
>>
>> It is still kind of a hack, though, but I hope it helps!
>>
>
> dtc-objs will still contain yamltree and thus attempt to build it.
>
> Fabio, you are not explaining why you don't want to add the libyaml
> dependency, Khem attempted to add it in https://lore.kernel.org/
> openembedded-core/20260412035757.134385-1-khem.raj@oss.qualcomm.com/ but
> I don't see any follow-up or statement it should be dropped.
>
> I'm very much against setting a variable in the recipe that applies to
> all version of the recipes and will not be looked at again. Instead, add
> a patch for U-Boot that removes this (but again, why?) logic so that
> next time we do an upgrade there are more chances of someone looking at
> patches and trying to figure out if they are still needed.
>
> In any case, we absolutely need a justification otherwise I'm afraid
> we'll never be able to do a cleanup because we don't know why it was
> needed in the first place. This is something that has happened already
> enough time for me in OE-Core/YP that it really is a PITA for upgrades
> and cleanups.
In short, see the U-Boot commit 807bcd844afe ("scripts/dtc: Fix
pkg-config behavior under sysroot") referenced in the commit message of
this patch, and the matching Linux kernel commit ef8795f3f1ce
("dt-bindings: kbuild: Use DTB files for validation") .
I think we need to port that kernel commit to U-Boot, upstream that
kernel commit (should be easy) and then add it here into OE too. Then it
will be really a problem solved all over the place and case closed.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [OE-core] [PATCH] u-boot: Fix u-boot-tools-native build after DTC update
2026-04-29 9:51 ` Marek Vasut
@ 2026-04-29 9:54 ` Quentin Schulz
2026-04-29 13:55 ` Joao Marcos Costa
0 siblings, 1 reply; 10+ messages in thread
From: Quentin Schulz @ 2026-04-29 9:54 UTC (permalink / raw)
To: Marek Vasut, joaomarcos.costa, richard.purdie, festevam,
openembedded-core
Cc: khem.raj
Hi Marek,
On 4/29/26 11:51 AM, Marek Vasut wrote:
> On 4/29/26 11:01 AM, Quentin Schulz wrote:
>> Hi,
>>
>> On 4/29/26 10:43 AM, Joao Marcos Costa via lists.openembedded.org wrote:
>>> Hello,
>>>
>>> On 4/29/26 10:03, Richard Purdie via lists.openembedded.org wrote:
>>>> On Tue, 2026-04-28 at 21:18 -0300, Fabio Estevam via
>>>> lists.openembedded.org wrote:
>>>>> From: Marek Vasut <marek.vasut@mailbox.org>
>>>>>
>>>>> Set PKG_CONFIG_SYSROOT_DIR as invalid path, so the host tools
>>>>> build will surely not find host /usr/include/yaml.h file and
>>>>> will disable yamltree build. For details, see U-Boot commit
>>>>> 807bcd844afe ("scripts/dtc: Fix pkg-config behavior under sysroot").
>>>>>
>>>>> Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
>>>>> Signed-off-by: Fabio Estevam <festevam@gmail.com>
>>> (...)
>>>>> +# Set PKG_CONFIG_SYSROOT_DIR as invalid path, so the host tools
>>>>> +# build will surely not find host /usr/include/yaml.h file and
>>>>> +# will disable yamltree build. For details, see U-Boot commit
>>>>> +# 807bcd844afe ("scripts/dtc: Fix pkg-config behavior under sysroot")
>>>>> +PKG_CONFIG_SYSROOT_DIR:prepend = "/invalid/"
>>>>
>>>> This feels a bit like a hack. Is there not a config option we can pass
>>>> to u-boot to make this deterministic, i.e. always disable libyaml?
>>>>
>>>> Cheers,
>>>>
>>>> Richard
>>>
>>> Maybe setting/appending "-DNO_YAML" at HOST_EXTRACFLAGS (e.g.,
>>> through EXTRA_OEMAKE or BUILD_CFLAGS)?
>>>
>>> In the end, that's a direct consequence of having an invalid
>>> PKG_CONFIG_SYSROOT_DIR:
>>> https://eur02.safelinks.protection.outlook.com/?
>>> url=https%3A%2F%2Fgithub.com%2Fu-boot%2Fu-
>>> boot%2Fblob%2Fmaster%2Fscripts%2Fdtc%2FMakefile%23L21&data=05%7C02%7Cquentin.schulz%40cherry.de%7C73feb8ea44e0468f38ea08dea5cb6a9f%7C5e0e1b5221b54e7b83bb514ec460677e%7C0%7C0%7C639130490251925693%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=%2BbKkw2HVgw52EWv%2FxeSlWRZ%2Ba3%2F3ireKwMxCLBvIwyg%3D&reserved=0
>>>
>>> It is still kind of a hack, though, but I hope it helps!
>>>
>>
>> dtc-objs will still contain yamltree and thus attempt to build it.
>>
>> Fabio, you are not explaining why you don't want to add the libyaml
>> dependency, Khem attempted to add it in https://
>> eur02.safelinks.protection.outlook.com/?
>> url=https%3A%2F%2Flore.kernel.org%2F&data=05%7C02%7Cquentin.schulz%40cherry.de%7C51022e2ce9de4d74fada08dea5d4e18f%7C5e0e1b5221b54e7b83bb514ec460677e%7C0%7C0%7C639130530938248835%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=fXgk4FZc6wnMD37AUWBnyJQBwmuAnjURis5JlZnT9iM%3D&reserved=0 openembedded-core/20260412035757.134385-1-khem.raj@oss.qualcomm.com/ but I don't see any follow-up or statement it should be dropped.
>>
>> I'm very much against setting a variable in the recipe that applies to
>> all version of the recipes and will not be looked at again. Instead,
>> add a patch for U-Boot that removes this (but again, why?) logic so
>> that next time we do an upgrade there are more chances of someone
>> looking at patches and trying to figure out if they are still needed.
>>
>> In any case, we absolutely need a justification otherwise I'm afraid
>> we'll never be able to do a cleanup because we don't know why it was
>> needed in the first place. This is something that has happened already
>> enough time for me in OE-Core/YP that it really is a PITA for upgrades
>> and cleanups.
> In short, see the U-Boot commit 807bcd844afe ("scripts/dtc: Fix pkg-
> config behavior under sysroot") referenced in the commit message of this
> patch, and the matching Linux kernel commit ef8795f3f1ce ("dt-bindings:
> kbuild: Use DTB files for validation") .
>
I know, I brought this up here:
https://lore.kernel.org/openembedded-core/52fa5836-b061-4896-be48-673fca5ba3d4@cherry.de/
> I think we need to port that kernel commit to U-Boot, upstream that
> kernel commit (should be easy) and then add it here into OE too. Then it
> will be really a problem solved all over the place and case closed.
Yes, someone needs to do the work.
Cheers,
Quentin
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [OE-core] [PATCH] u-boot: Fix u-boot-tools-native build after DTC update
2026-04-29 9:54 ` Quentin Schulz
@ 2026-04-29 13:55 ` Joao Marcos Costa
0 siblings, 0 replies; 10+ messages in thread
From: Joao Marcos Costa @ 2026-04-29 13:55 UTC (permalink / raw)
To: Quentin Schulz, Marek Vasut, richard.purdie, festevam,
openembedded-core
Cc: khem.raj
Hello,
(...)
>> In short, see the U-Boot commit 807bcd844afe ("scripts/dtc: Fix pkg-
>> config behavior under sysroot") referenced in the commit message of
>> this patch, and the matching Linux kernel commit ef8795f3f1ce
>> ("dt-bindings: kbuild: Use DTB files for validation") .
>>
>
> I know, I brought this up here:
> https://lore.kernel.org/openembedded-core/52fa5836-b061-4896-be48-673fca5ba3d4@cherry.de/
>
>> I think we need to port that kernel commit to U-Boot, upstream that
>> kernel commit (should be easy) and then add it here into OE too. Then
>> it will be really a problem solved all over the place and case closed.
>
> Yes, someone needs to do the work.
>
> Cheers,
> Quentin
Just in case, I wrote the patch for that, and started the build to test
it. Once I'm done testing, I will send it here and to U-Boot's mailing
list as well.
--
Best regards,
João Marcos Costa
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2026-04-29 13:56 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-29 0:18 [PATCH] u-boot: Fix u-boot-tools-native build after DTC update Fabio Estevam
2026-04-29 8:03 ` [OE-core] " Richard Purdie
2026-04-29 8:36 ` Marek Vasut
2026-04-29 8:56 ` Richard Purdie
2026-04-29 9:47 ` Marek Vasut
2026-04-29 8:43 ` Joao Marcos Costa
2026-04-29 9:01 ` Quentin Schulz
2026-04-29 9:51 ` Marek Vasut
2026-04-29 9:54 ` Quentin Schulz
2026-04-29 13:55 ` Joao Marcos Costa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox