diff options
Diffstat (limited to 'meta/recipes-kernel/dtc')
7 files changed, 115 insertions, 1 deletions
diff --git a/meta/recipes-kernel/dtc/dtc.inc b/meta/recipes-kernel/dtc/dtc.inc index 5da6c24fbf..461ab8fbd3 100644 --- a/meta/recipes-kernel/dtc/dtc.inc +++ b/meta/recipes-kernel/dtc/dtc.inc | |||
@@ -5,7 +5,7 @@ SECTION = "bootloader" | |||
5 | LICENSE = "GPLv2 | BSD" | 5 | LICENSE = "GPLv2 | BSD" |
6 | DEPENDS = "flex-native bison-native" | 6 | DEPENDS = "flex-native bison-native" |
7 | 7 | ||
8 | SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git \ | 8 | SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git;branch=master \ |
9 | file://make_install.patch \ | 9 | file://make_install.patch \ |
10 | file://0001-dtc-Fix-Makefile-to-add-CFLAGS-not-override.patch \ | 10 | file://0001-dtc-Fix-Makefile-to-add-CFLAGS-not-override.patch \ |
11 | " | 11 | " |
diff --git a/meta/recipes-kernel/dtc/dtc/0001-fdtdump-Fix-gcc11-warning.patch b/meta/recipes-kernel/dtc/dtc/0001-fdtdump-Fix-gcc11-warning.patch new file mode 100644 index 0000000000..ec825cbf7b --- /dev/null +++ b/meta/recipes-kernel/dtc/dtc/0001-fdtdump-Fix-gcc11-warning.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From 4827e0db6c4f7dea7f4094f49d3bb48ef6dfdc2d Mon Sep 17 00:00:00 2001 | ||
2 | From: David Gibson <david@gibson.dropbear.id.au> | ||
3 | Date: Wed, 6 Jan 2021 14:52:26 +1100 | ||
4 | Subject: [PATCH] fdtdump: Fix gcc11 warning | ||
5 | |||
6 | In one place, fdtdump abuses fdt_set_magic(), passing it just a small char | ||
7 | array instead of the full fdt header it expects. That's relying on the | ||
8 | fact that in fact fdt_set_magic() will only actually access the first 4 | ||
9 | bytes of the buffer. | ||
10 | |||
11 | This trips a new warning in GCC 11 - and it's entirely possible it was | ||
12 | always UB. So, don't do that. | ||
13 | |||
14 | Upstream-Status: Backport [https://git.kernel.org/pub/scm/utils/dtc/dtc.git/patch/?id=ca16a723fa9dde9c5da80dba567f48715000e77c] | ||
15 | Signed-off-by: David Gibson <david@gibson.dropbear.id.au> | ||
16 | --- | ||
17 | fdtdump.c | 2 +- | ||
18 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
19 | |||
20 | diff --git a/fdtdump.c b/fdtdump.c | ||
21 | index 9613bef..d9fb374 100644 | ||
22 | --- a/fdtdump.c | ||
23 | +++ b/fdtdump.c | ||
24 | @@ -217,7 +217,7 @@ int main(int argc, char *argv[]) | ||
25 | char *p = buf; | ||
26 | char *endp = buf + len; | ||
27 | |||
28 | - fdt_set_magic(smagic, FDT_MAGIC); | ||
29 | + fdt32_st(smagic, FDT_MAGIC); | ||
30 | |||
31 | /* poor man's memmem */ | ||
32 | while ((endp - p) >= FDT_MAGIC_SIZE) { | ||
33 | -- | ||
34 | 2.30.1 | ||
35 | |||
diff --git a/meta/recipes-kernel/dtc/dtc_1.6.0.bb b/meta/recipes-kernel/dtc/dtc_1.6.0.bb index 92df70d9fc..a407137859 100644 --- a/meta/recipes-kernel/dtc/dtc_1.6.0.bb +++ b/meta/recipes-kernel/dtc/dtc_1.6.0.bb | |||
@@ -5,6 +5,8 @@ LIC_FILES_CHKSUM = "file://GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | |||
5 | 5 | ||
6 | SRCREV = "2525da3dba9beceb96651dc2986581871dbeca30" | 6 | SRCREV = "2525da3dba9beceb96651dc2986581871dbeca30" |
7 | 7 | ||
8 | SRC_URI += "file://0001-fdtdump-Fix-gcc11-warning.patch" | ||
9 | |||
8 | S = "${WORKDIR}/git" | 10 | S = "${WORKDIR}/git" |
9 | 11 | ||
10 | BBCLASSEXTEND = "native nativesdk" | 12 | BBCLASSEXTEND = "native nativesdk" |
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 | |||
7 | for arg; do | ||
8 | case "$arg" in | ||
9 | --version) | ||
10 | echo "v2021.10" | ||
11 | ;; | ||
12 | esac | ||
13 | done | ||
14 | |||
15 | # TBD: left for future consideration | ||
16 | # exec dt-doc-validate.real "$@" | ||
17 | |||
18 | # we always succeed | ||
19 | exit 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 | |||
7 | for arg; do | ||
8 | case "$arg" in | ||
9 | --version) | ||
10 | echo "v2021.10" | ||
11 | ;; | ||
12 | esac | ||
13 | done | ||
14 | |||
15 | # TBD: left for future consideration | ||
16 | # exec dt-mk-schema.real "$@" | ||
17 | |||
18 | # we always succeed | ||
19 | exit 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 | |||
7 | for arg; do | ||
8 | case "$arg" in | ||
9 | --version) | ||
10 | echo "v2021.10" | ||
11 | ;; | ||
12 | esac | ||
13 | done | ||
14 | |||
15 | # TBD: left for future consideration | ||
16 | # exec dt-validate.real "$@" | ||
17 | |||
18 | # we always succeed | ||
19 | exit 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 @@ | |||
1 | DESCRIPTION = "Wrapper for tooling for devicetree validation using YAML and jsonschema" | ||
2 | HOMEPAGE = "https://yoctoproject.org" | ||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | ||
5 | |||
6 | SRC_URI = "file://dt-doc-validate \ | ||
7 | file://dt-mk-schema \ | ||
8 | file://dt-validate" | ||
9 | |||
10 | do_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 | |||
17 | BBCLASSEXTEND = "native nativesdk" | ||