mirror of
git://git.yoctoproject.org/poky
synced 2026-08-13 23:06:35 +00:00
kernel: introduce python3-dtschema-wrapper
The 5.16 kernel introduced mandatory schema checking on any dtb file built through the kernel. That funcionality is provided via python3-dt-schema. The dependencies to enable that functionality is not small, and may not always be desired (in particular on architectures that do not support dtbs, or in development cycles). It may also be useful for allowing a non-conformant dts to be compiled. This commit introduces a set of wrapper scripts that when added as a depenency to the kernel, can pass both the validation testing and validation steps of a dts. (From OE-Core rev: 010477bc44a90b1f0dea82fbb824c9c9038edc80) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Backported from oe-core commit 2566563ad49d. Signed-off-by: Paul Barker <paul.barker@sancloud.com> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
243f90cb86
commit
744c593c3d
@ -576,6 +576,7 @@ RECIPE_MAINTAINER_pn-python3 = "Oleksandr Kravchuk <open.source@oleksandr-kravch
|
||||
RECIPE_MAINTAINER_pn-python3-async = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
|
||||
RECIPE_MAINTAINER_pn-python3-dbus = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
|
||||
RECIPE_MAINTAINER_pn-python3-docutils = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
|
||||
RECIPE_MAINTAINER_pn-python3-dtschema-wrapper = "Bruce Ashfield <bruce.ashfield@gmail.com>"
|
||||
RECIPE_MAINTAINER_pn-python3-pycryptodome = "Joshua Watt <JPEWhacker@gmail.com>"
|
||||
RECIPE_MAINTAINER_pn-python3-pycryptodomex = "Joshua Watt <JPEWhacker@gmail.com>"
|
||||
RECIPE_MAINTAINER_pn-python3-extras = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
|
||||
|
||||
@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
# dt-doc-validate wrapper to allow kernel dt-validation to pass
|
||||
#
|
||||
# Copyright (C) 2021 Bruce Ashfield <bruce.ashfield@gmail.com>
|
||||
# License: MIT (see COPYING.MIT at the root of the repository for terms)
|
||||
|
||||
for arg; do
|
||||
case "$arg" in
|
||||
--version)
|
||||
echo "v2021.10"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# TBD: left for future consideration
|
||||
# exec dt-doc-validate.real "$@"
|
||||
|
||||
# we always succeed
|
||||
exit 0
|
||||
|
||||
@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
# dt-mk-schema wrapper to allow kernel dt-validation to pass
|
||||
#
|
||||
# Copyright (C) 2021 Bruce Ashfield <bruce.ashfield@gmail.com>
|
||||
# License: MIT (see COPYING.MIT at the root of the repository for terms)
|
||||
|
||||
for arg; do
|
||||
case "$arg" in
|
||||
--version)
|
||||
echo "v2021.10"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# TBD: left for future consideration
|
||||
# exec dt-mk-schema.real "$@"
|
||||
|
||||
# we always succeed
|
||||
exit 0
|
||||
|
||||
20
meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-validate
Normal file
20
meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-validate
Normal file
@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
# dt-validate wrapper to allow kernel dt-validation to pass
|
||||
#
|
||||
# Copyright (C) 2021 Bruce Ashfield <bruce.ashfield@gmail.com>
|
||||
# License: MIT (see COPYING.MIT at the root of the repository for terms)
|
||||
|
||||
for arg; do
|
||||
case "$arg" in
|
||||
--version)
|
||||
echo "v2021.10"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# TBD: left for future consideration
|
||||
# exec dt-validate.real "$@"
|
||||
|
||||
# we always succeed
|
||||
exit 0
|
||||
|
||||
17
meta/recipes-kernel/dtc/python3-dtschema-wrapper_2021.10.bb
Normal file
17
meta/recipes-kernel/dtc/python3-dtschema-wrapper_2021.10.bb
Normal file
@ -0,0 +1,17 @@
|
||||
DESCRIPTION = "Wrapper for tooling for devicetree validation using YAML and jsonschema"
|
||||
HOMEPAGE = "https://yoctoproject.org"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
|
||||
|
||||
SRC_URI = "file://dt-doc-validate \
|
||||
file://dt-mk-schema \
|
||||
file://dt-validate"
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${bindir}/
|
||||
install -m 755 ${WORKDIR}/dt-doc-validate ${D}${bindir}/
|
||||
install -m 755 ${WORKDIR}/dt-mk-schema ${D}${bindir}/
|
||||
install -m 755 ${WORKDIR}/dt-validate ${D}${bindir}/
|
||||
}
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
Loading…
x
Reference in New Issue
Block a user