From: Quentin Schulz <quentin.schulz@cherry.de>
To: raj.khem@gmail.com, openembedded-core@lists.openembedded.org
Cc: Khem Raj <khem.raj@oss.qualcomm.com>
Subject: Re: [OE-core] [PATCH v2] u-boot-tools: Add dependency on libyaml for dtschema validation
Date: Fri, 24 Apr 2026 13:13:37 +0200 [thread overview]
Message-ID: <52fa5836-b061-4896-be48-673fca5ba3d4@cherry.de> (raw)
In-Reply-To: <20260412035757.134385-1-khem.raj@oss.qualcomm.com>
Hi Khem,
On 4/12/26 5:57 AM, Khem Raj via lists.openembedded.org wrote:
> yamltree host tool, used to emit YAML from the DT, is now
> built as part of the normal u-boot-tools build to support
> the schema infrastructure
>
> Fixes link errors like
>
> | /usr/bin/ld: scripts/dtc/yamltree.o: in function `dt_to_yaml':
> | yamltree.c:(.text+0x91b): undefined reference to `yaml_emitter_initialize'
> | /usr/bin/ld: yamltree.c:(.text+0x926): undefined reference to `yaml_emitter_set_output_file'
> | /usr/bin/ld: yamltree.c:(.text+0x933): undefined reference to `yaml_stream_start_event_initialize'
> | /usr/bin/ld: yamltree.c:(.text+0x93e): undefined reference to `yaml_emitter_emit'
> | /usr/bin/ld: yamltree.c:(.text+0x957): undefined reference to `yaml_document_start_event_initialize'
> | /usr/bin/ld: yamltree.c:(.text+0x962): undefined reference to `yaml_emitter_emit'
> | /usr/bin/ld: yamltree.c:(.text+0x983): undefined reference to `yaml_sequence_start_event_initialize'
> | /usr/bin/ld: yamltree.c:(.text+0x98e): undefined reference to `yaml_emitter_emit'
> | /usr/bin/ld: yamltree.c:(.text+0x9ab): undefined reference to `yaml_sequence_end_event_initialize'
> | /usr/bin/ld: yamltree.c:(.text+0x9b6): undefined reference to `yaml_emitter_emit'
> | /usr/bin/ld: yamltree.c:(.text+0x9c8): undefined reference to `yaml_document_end_event_initialize'
> | /usr/bin/ld: yamltree.c:(.text+0x9d3): undefined reference to `yaml_emitter_emit'
> | /usr/bin/ld: yamltree.c:(.text+0x9e3): undefined reference to `yaml_stream_end_event_initialize'
> | /usr/bin/ld: yamltree.c:(.text+0x9ee): undefined reference to `yaml_emitter_emit'
> | /usr/bin/ld: yamltree.c:(.text+0x9fa): undefined reference to `yaml_emitter_delete'
>
OK so there's a test to check if libyaml is available by looking if
there's a file at $(PKG_CONFIG_SYSROOT_DIR)/usr/include/yaml.h. Then it
uses pkg-config --cflags and pkg-config --libs on yaml-0.1 to find where
that is located. I'm assuming the first one is found, possibly on the
host distro, and the pkg-config possibly returns nothing as libyaml
isn't available in the sysroot? This seems to be what 807bcd844afe
("scripts/dtc: Fix pkg-config behavior under sysroot") is supposed to
handle (specifically mentioning this fixes building with Yocto SDK).
This commit is part of 2026.04, so not sure what's going on there. They
say the error doesn't happen within Yocto because pseudo intercepts and
rewrites the path, so this seems weird.
This logic is also borrowed from the kernel, which funnily enough
dropped this entirely 4 years ago, in commit ef8795f3f1ce ("dt-bindings:
kbuild: Use DTB files for validation"). So maybe something to work on
with U-Boot to update DTC again (Kbuild and DTC updates aren't trivial
in U-Boot as far as I understood as we have "lightly" forked it).
Cheers,
Quentin
prev parent reply other threads:[~2026-04-24 11:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-12 3:57 [PATCH v2] u-boot-tools: Add dependency on libyaml for dtschema validation Khem Raj
2026-04-15 15:32 ` [OE-core] " Ross Burton
2026-04-15 17:34 ` Khem Raj
2026-04-24 10:59 ` Quentin Schulz
2026-04-24 11:13 ` Quentin Schulz [this message]
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=52fa5836-b061-4896-be48-673fca5ba3d4@cherry.de \
--to=quentin.schulz@cherry.de \
--cc=khem.raj@oss.qualcomm.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=raj.khem@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