Reputation: 275
I want to use dt validation for my kernel build in yocto projects. I noticed 2 recipes python3-dtschema-wrapper.bb
and python3-dtschema.bb
but I'm unclear about how to properly use them to validate my device tree files.
Could anyone explain what each recipe does and provide guidance or examples on enabling dt schema validation in a Yocto project?
Upvotes: 0
Views: 20
Reputation: 648
The wrapper was introduced as a work-in-progress in the linux-yocto-dev kernel recipe (since 2021) linked to this configuration:
PACKAGECONFIG += "dt-validation"
However, it looks like it wasn't completed...
To enforce validation, I suggest to run the corresponding Makefile target dtbs_check
. Here's how, from your linux kernel recipe (Ex: linux-yocto_%.bbappend
):
DEPENDS += 'libyaml-native python3-dtschema-native'
do_compile:append() {
oe_runmake dtbs_check ${KERNEL_EXTRA_ARGS}
}
This still carries python exceptions in the log.do_compile but it should be a good start.
Upvotes: 0