summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2022-01-14 13:21:50 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-02-09 23:15:15 +0000
commit6560edf43cc26a4c417a93ac5a16f5db9e058588 (patch)
tree3c38758138a0cedb17cc2ef8d9b09b825f8f2793 /meta
parent4d7162798ec19c726877e85509e4c7a99eb6576d (diff)
downloadpoky-6560edf43cc26a4c417a93ac5a16f5db9e058588.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: cc9d4a69e6c6aa99ff58232b37a607ee3ac48a67) 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: Anuj Mittal <anuj.mittal@intel.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 b3b7711a0c..2b54d2d12f 100644
--- a/meta/conf/distro/include/maintainers.inc
+++ b/meta/conf/distro/include/maintainers.inc
@@ -592,6 +592,7 @@ RECIPE_MAINTAINER:pn-python3-cython = "Oleksandr Kravchuk <open.source@oleksandr
592RECIPE_MAINTAINER:pn-python3-dbus = "Zang Ruochen <zangrc.fnst@fujitsu.com>" 592RECIPE_MAINTAINER:pn-python3-dbus = "Zang Ruochen <zangrc.fnst@fujitsu.com>"
593RECIPE_MAINTAINER:pn-python3-dbusmock = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>" 593RECIPE_MAINTAINER:pn-python3-dbusmock = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
594RECIPE_MAINTAINER:pn-python3-docutils = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>" 594RECIPE_MAINTAINER:pn-python3-docutils = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
595RECIPE_MAINTAINER:pn-python3-dtschema-wrapper = "Bruce Ashfield <bruce.ashfield@gmail.com>"
595RECIPE_MAINTAINER:pn-python3-pycryptodome = "Joshua Watt <JPEWhacker@gmail.com>" 596RECIPE_MAINTAINER:pn-python3-pycryptodome = "Joshua Watt <JPEWhacker@gmail.com>"
596RECIPE_MAINTAINER:pn-python3-pycryptodomex = "Joshua Watt <JPEWhacker@gmail.com>" 597RECIPE_MAINTAINER:pn-python3-pycryptodomex = "Joshua Watt <JPEWhacker@gmail.com>"
597RECIPE_MAINTAINER:pn-python3-extras = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>" 598RECIPE_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"