summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2022-01-14 13:22:24 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-01-25 12:06:55 +0000
commit744c593c3dc8123d30036eb1b77334b024fde7e9 (patch)
treeaeb37462ee40e4be30bc678439fd062fdc408d05 /meta
parent243f90cb86e5b603f0d73712fb1fb96b18d7b9df (diff)
downloadpoky-744c593c3dc8123d30036eb1b77334b024fde7e9.tar.gz
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>
Diffstat (limited to 'meta')
-rw-r--r--meta/conf/distro/include/maintainers.inc1
-rw-r--r--meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-doc-validate20
-rw-r--r--meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-mk-schema20
-rw-r--r--meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-validate20
-rw-r--r--meta/recipes-kernel/dtc/python3-dtschema-wrapper_2021.10.bb17
5 files changed, 78 insertions, 0 deletions
diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc
index 895cf89487..1575fce8c7 100644
--- a/meta/conf/distro/include/maintainers.inc
+++ b/meta/conf/distro/include/maintainers.inc
@@ -576,6 +576,7 @@ RECIPE_MAINTAINER_pn-python3 = "Oleksandr Kravchuk <open.source@oleksandr-kravch
576RECIPE_MAINTAINER_pn-python3-async = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>" 576RECIPE_MAINTAINER_pn-python3-async = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
577RECIPE_MAINTAINER_pn-python3-dbus = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>" 577RECIPE_MAINTAINER_pn-python3-dbus = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
578RECIPE_MAINTAINER_pn-python3-docutils = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>" 578RECIPE_MAINTAINER_pn-python3-docutils = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
579RECIPE_MAINTAINER_pn-python3-dtschema-wrapper = "Bruce Ashfield <bruce.ashfield@gmail.com>"
579RECIPE_MAINTAINER_pn-python3-pycryptodome = "Joshua Watt <JPEWhacker@gmail.com>" 580RECIPE_MAINTAINER_pn-python3-pycryptodome = "Joshua Watt <JPEWhacker@gmail.com>"
580RECIPE_MAINTAINER_pn-python3-pycryptodomex = "Joshua Watt <JPEWhacker@gmail.com>" 581RECIPE_MAINTAINER_pn-python3-pycryptodomex = "Joshua Watt <JPEWhacker@gmail.com>"
581RECIPE_MAINTAINER_pn-python3-extras = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>" 582RECIPE_MAINTAINER_pn-python3-extras = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
diff --git a/meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-doc-validate b/meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-doc-validate
new file mode 100644
index 0000000000..2aa57851c7
--- /dev/null
+++ b/meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-doc-validate
@@ -0,0 +1,20 @@
1#!/bin/sh
2# dt-doc-validate wrapper to allow kernel dt-validation to pass
3#
4# Copyright (C) 2021 Bruce Ashfield <bruce.ashfield@gmail.com>
5# License: MIT (see COPYING.MIT at the root of the repository for terms)
6
7for arg; do
8 case "$arg" in
9 --version)
10 echo "v2021.10"
11 ;;
12 esac
13done
14
15# TBD: left for future consideration
16# exec dt-doc-validate.real "$@"
17
18# we always succeed
19exit 0
20
diff --git a/meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-mk-schema b/meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-mk-schema
new file mode 100644
index 0000000000..24b89d8619
--- /dev/null
+++ b/meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-mk-schema
@@ -0,0 +1,20 @@
1#!/bin/sh
2# dt-mk-schema wrapper to allow kernel dt-validation to pass
3#
4# Copyright (C) 2021 Bruce Ashfield <bruce.ashfield@gmail.com>
5# License: MIT (see COPYING.MIT at the root of the repository for terms)
6
7for arg; do
8 case "$arg" in
9 --version)
10 echo "v2021.10"
11 ;;
12 esac
13done
14
15# TBD: left for future consideration
16# exec dt-mk-schema.real "$@"
17
18# we always succeed
19exit 0
20
diff --git a/meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-validate b/meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-validate
new file mode 100644
index 0000000000..8a4710a7ed
--- /dev/null
+++ b/meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-validate
@@ -0,0 +1,20 @@
1#!/bin/sh
2# dt-validate wrapper to allow kernel dt-validation to pass
3#
4# Copyright (C) 2021 Bruce Ashfield <bruce.ashfield@gmail.com>
5# License: MIT (see COPYING.MIT at the root of the repository for terms)
6
7for arg; do
8 case "$arg" in
9 --version)
10 echo "v2021.10"
11 ;;
12 esac
13done
14
15# TBD: left for future consideration
16# exec dt-validate.real "$@"
17
18# we always succeed
19exit 0
20
diff --git a/meta/recipes-kernel/dtc/python3-dtschema-wrapper_2021.10.bb b/meta/recipes-kernel/dtc/python3-dtschema-wrapper_2021.10.bb
new file mode 100644
index 0000000000..c869274d09
--- /dev/null
+++ b/meta/recipes-kernel/dtc/python3-dtschema-wrapper_2021.10.bb
@@ -0,0 +1,17 @@
1DESCRIPTION = "Wrapper for tooling for devicetree validation using YAML and jsonschema"
2HOMEPAGE = "https://yoctoproject.org"
3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
5
6SRC_URI = "file://dt-doc-validate \
7 file://dt-mk-schema \
8 file://dt-validate"
9
10do_install() {
11 install -d ${D}${bindir}/
12 install -m 755 ${WORKDIR}/dt-doc-validate ${D}${bindir}/
13 install -m 755 ${WORKDIR}/dt-mk-schema ${D}${bindir}/
14 install -m 755 ${WORKDIR}/dt-validate ${D}${bindir}/
15}
16
17BBCLASSEXTEND = "native nativesdk"