[Buildroot] Linux kernel: host-libyaml dependency

Peter Korsgaard peter at korsgaard.com
Thu Jan 30 22:33:34 UTC 2020

>>>>> "Yegor" == Yegor Yefremov <yegorslists at googlemail.com> writes:

 > I had a build breakage during the 5.4.15 kernel compilation because of
 > the missing yaml library. The code in kernel is under scripts/dtc.

Hmm, what is the error exactly?

Is it this? From scripts/dtc/Makefile:

ifeq ($(shell pkg-config --exists yaml-0.1 2>/dev/null && echo yes),)
ifneq ($(CHECK_DTBS),)
$(error dtc needs libyaml for DT schema validation support. \
        Install the necessary libyaml development package.)

This seems to come from:

commit 4f0e3a57d6eb727c54249542c509e0b7aa122465
Author: Rob Herring <robh at kernel.org>
Date:   Thu Sep 6 13:26:07 2018 -0500

    kbuild: Add support for DT binding schema checks

    This adds the build infrastructure for checking DT binding schema
    documents and validating dts files using the binding schema.

    Check DT binding schema documents:
    make dt_binding_check

    Build dts files and check using DT binding schema:
    make dtbs_check

    Optionally, DT_SCHEMA_FILES can be passed in with a schema file(s) to
    use for validation. This makes it easier to find and fix errors
    generated by a specific schema.

    Currently, the validation targets are separate from a normal build to
    avoid a hard dependency on the external DT schema project and because
    there are lots of warnings generated.

But this shouldn't trigger unless you are running 'make dtbs_check',
which you presumably aren't?

 > Has anyone encountered such a problem? Should we add host-libyaml
 > unconditionally?

We should definately not do it unconditionally, as it seems to only be
needed for (a subset of the) systems using device-tree.

Can you be more specific about what config triggers this for you?

Bye, Peter Korsgaard

More information about the buildroot mailing list