summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/dtc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-kernel/dtc')
-rw-r--r--meta/recipes-kernel/dtc/dtc.inc28
-rw-r--r--meta/recipes-kernel/dtc/dtc/0001-dtc-Fix-Makefile-to-add-CFLAGS-not-override.patch36
-rw-r--r--meta/recipes-kernel/dtc/dtc/0001-fdtdump-Fix-gcc11-warning.patch35
-rw-r--r--meta/recipes-kernel/dtc/dtc/make_install.patch26
-rw-r--r--meta/recipes-kernel/dtc/dtc_1.6.0.bb12
-rw-r--r--meta/recipes-kernel/dtc/dtc_1.7.2.bb31
-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.bb19
10 files changed, 110 insertions, 137 deletions
diff --git a/meta/recipes-kernel/dtc/dtc.inc b/meta/recipes-kernel/dtc/dtc.inc
deleted file mode 100644
index 5da6c24fbf..0000000000
--- a/meta/recipes-kernel/dtc/dtc.inc
+++ /dev/null
@@ -1,28 +0,0 @@
1SUMMARY = "Device Tree Compiler"
2HOMEPAGE = "https://devicetree.org/"
3DESCRIPTION = "The Device Tree Compiler is a tool used to manipulate the Open-Firmware-like device tree used by PowerPC kernels."
4SECTION = "bootloader"
5LICENSE = "GPLv2 | BSD"
6DEPENDS = "flex-native bison-native"
7
8SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git \
9 file://make_install.patch \
10 file://0001-dtc-Fix-Makefile-to-add-CFLAGS-not-override.patch \
11 "
12
13UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
14
15EXTRA_OEMAKE='NO_PYTHON=1 PREFIX="${prefix}" LIBDIR="${libdir}" DESTDIR="${D}"'
16
17inherit pkgconfig
18
19S = "${WORKDIR}/git"
20
21do_install () {
22 oe_runmake install
23}
24
25PACKAGES =+ "${PN}-misc"
26FILES_${PN}-misc = "${bindir}/convert-dtsv0 ${bindir}/ftdump ${bindir}/dtdiff"
27
28RDEPENDS_${PN}-misc += "bash diffutils"
diff --git a/meta/recipes-kernel/dtc/dtc/0001-dtc-Fix-Makefile-to-add-CFLAGS-not-override.patch b/meta/recipes-kernel/dtc/dtc/0001-dtc-Fix-Makefile-to-add-CFLAGS-not-override.patch
deleted file mode 100644
index a2deb12d4b..0000000000
--- a/meta/recipes-kernel/dtc/dtc/0001-dtc-Fix-Makefile-to-add-CFLAGS-not-override.patch
+++ /dev/null
@@ -1,36 +0,0 @@
1From f0119060ef1b9bd80e2cae487df1e4aedffb0e9b Mon Sep 17 00:00:00 2001
2From: Oleksiy Obitotskyy <oobitots@cisco.com>
3Date: Fri, 22 Jan 2021 09:12:48 +0200
4Subject: [PATCH] dtc: Fix Makefile to add CFLAGS not override
5
6Makefile override CFLAGS not extend them, so some of them
7missing. Sources builds out of kernel tree and probably not all
8options could be used (?). We need at least -fmacro-prefix-map/
9debug-prefix-map to eliminate absolute path in binaries.
10
11Upstream-Status: Pending
12Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com>
13---
14 Makefile | 4 ++--
15 1 file changed, 2 insertions(+), 2 deletions(-)
16
17diff --git a/Makefile b/Makefile
18index 35d936f..b5b13cf 100644
19--- a/Makefile
20+++ b/Makefile
21@@ -20,10 +20,10 @@ CONFIG_LOCALVERSION =
22 # See libfdt_internal.h for details
23 ASSUME_MASK ?= 0
24
25-CPPFLAGS = -I libfdt -I . -DFDT_ASSUME_MASK=$(ASSUME_MASK)
26+CPPFLAGS += -I libfdt -I . -DFDT_ASSUME_MASK=$(ASSUME_MASK)
27 WARNINGS = -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \
28 -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wshadow
29-CFLAGS = -g -Os $(SHAREDLIB_CFLAGS) -Werror $(WARNINGS) $(EXTRA_CFLAGS)
30+CFLAGS += -g -Os $(SHAREDLIB_CFLAGS) -Werror $(WARNINGS) $(EXTRA_CFLAGS)
31
32 BISON = bison
33 LEX = flex
34--
352.25.1
36
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
deleted file mode 100644
index ec825cbf7b..0000000000
--- a/meta/recipes-kernel/dtc/dtc/0001-fdtdump-Fix-gcc11-warning.patch
+++ /dev/null
@@ -1,35 +0,0 @@
1From 4827e0db6c4f7dea7f4094f49d3bb48ef6dfdc2d Mon Sep 17 00:00:00 2001
2From: David Gibson <david@gibson.dropbear.id.au>
3Date: Wed, 6 Jan 2021 14:52:26 +1100
4Subject: [PATCH] fdtdump: Fix gcc11 warning
5
6In one place, fdtdump abuses fdt_set_magic(), passing it just a small char
7array instead of the full fdt header it expects. That's relying on the
8fact that in fact fdt_set_magic() will only actually access the first 4
9bytes of the buffer.
10
11This trips a new warning in GCC 11 - and it's entirely possible it was
12always UB. So, don't do that.
13
14Upstream-Status: Backport [https://git.kernel.org/pub/scm/utils/dtc/dtc.git/patch/?id=ca16a723fa9dde9c5da80dba567f48715000e77c]
15Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
16---
17 fdtdump.c | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20diff --git a/fdtdump.c b/fdtdump.c
21index 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--
342.30.1
35
diff --git a/meta/recipes-kernel/dtc/dtc/make_install.patch b/meta/recipes-kernel/dtc/dtc/make_install.patch
deleted file mode 100644
index ea9359e815..0000000000
--- a/meta/recipes-kernel/dtc/dtc/make_install.patch
+++ /dev/null
@@ -1,26 +0,0 @@
1From e9852b9d206df1e42aa4c8afec55a0f5e099b533 Mon Sep 17 00:00:00 2001
2From: Saul Wold <sgw@linux.intel.com>
3Date: Thu, 3 Nov 2011 08:35:47 -0700
4Subject: [PATCH] dtc: Add patch to correctly install shared libraries and
5
6Upstream-Status: Inappropriate [configuration]
7
8---
9 Makefile | 4 ++--
10 1 file changed, 2 insertions(+), 2 deletions(-)
11
12diff --git a/Makefile b/Makefile
13index d8ebc4f..f5e01be 100644
14--- a/Makefile
15+++ b/Makefile
16@@ -205,8 +205,8 @@ install-bin: all $(SCRIPTS)
17 install-lib: all
18 @$(VECHO) INSTALL-LIB
19 $(INSTALL) -d $(DESTDIR)$(LIBDIR)
20- $(INSTALL_LIB) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR)
21- ln -sf $(notdir $(LIBFDT_lib)) $(DESTDIR)$(LIBDIR)/$(LIBFDT_soname)
22+ $(INSTALL) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR)/$(LIBFDT_soname)
23+ ln -sf $(LIBFDT_soname) $(DESTDIR)$(LIBDIR)/$(notdir $(LIBFDT_lib))
24 ln -sf $(LIBFDT_soname) $(DESTDIR)$(LIBDIR)/libfdt.$(SHAREDLIB_EXT)
25 $(INSTALL_DATA) $(LIBFDT_archive) $(DESTDIR)$(LIBDIR)
26
diff --git a/meta/recipes-kernel/dtc/dtc_1.6.0.bb b/meta/recipes-kernel/dtc/dtc_1.6.0.bb
deleted file mode 100644
index a407137859..0000000000
--- a/meta/recipes-kernel/dtc/dtc_1.6.0.bb
+++ /dev/null
@@ -1,12 +0,0 @@
1require dtc.inc
2
3LIC_FILES_CHKSUM = "file://GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
4 file://libfdt/libfdt.h;beginline=4;endline=7;md5=05bb357cfb75cae7d2b01d2ee8d76407"
5
6SRCREV = "2525da3dba9beceb96651dc2986581871dbeca30"
7
8SRC_URI += "file://0001-fdtdump-Fix-gcc11-warning.patch"
9
10S = "${WORKDIR}/git"
11
12BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-kernel/dtc/dtc_1.7.2.bb b/meta/recipes-kernel/dtc/dtc_1.7.2.bb
new file mode 100644
index 0000000000..92e83a9404
--- /dev/null
+++ b/meta/recipes-kernel/dtc/dtc_1.7.2.bb
@@ -0,0 +1,31 @@
1SUMMARY = "Device Tree Compiler"
2HOMEPAGE = "https://devicetree.org/"
3DESCRIPTION = "The Device Tree Compiler is a toolchain for working with device tree source and binary files."
4SECTION = "bootloader"
5LICENSE = "GPL-2.0-only | BSD-2-Clause"
6
7LIC_FILES_CHKSUM = "file://GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
8 file://BSD-2-Clause;md5=5d6306d1b08f8df623178dfd81880927 \
9 file://README.license;md5=a1eb22e37f09df5b5511b8a278992d0e"
10
11SRC_URI = " \
12 git://git.kernel.org/pub/scm/utils/dtc/dtc.git;branch=main;protocol=https \
13"
14SRCREV = "2d10aa2afe35527728db30b35ec491ecb6959e5c"
15
16UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
17
18inherit meson pkgconfig
19
20EXTRA_OEMESON = "-Dpython=disabled -Dvalgrind=disabled"
21
22PACKAGECONFIG ??= "tools"
23PACKAGECONFIG[tests] = "-Dtests=true,-Dtests=false,"
24PACKAGECONFIG[tools] = "-Dtools=true,-Dtools=false,flex-native bison-native"
25PACKAGECONFIG[yaml] = "-Dyaml=enabled,-Dyaml=disabled,libyaml"
26
27PACKAGES =+ "${PN}-misc"
28FILES:${PN}-misc = "${bindir}/convert-dtsv0 ${bindir}/ftdump ${bindir}/dtdiff"
29RDEPENDS:${PN}-misc += "${@bb.utils.contains('PACKAGECONFIG', 'tools', 'bash diffutils', '', d)}"
30
31BBCLASSEXTEND = "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
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..b19f53e20d
--- /dev/null
+++ b/meta/recipes-kernel/dtc/python3-dtschema-wrapper_2021.10.bb
@@ -0,0 +1,19 @@
1SUMMARY = "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
10S = "${UNPACKDIR}"
11
12do_install() {
13 install -d ${D}${bindir}/
14 install -m 755 ${UNPACKDIR}/dt-doc-validate ${D}${bindir}/
15 install -m 755 ${UNPACKDIR}/dt-mk-schema ${D}${bindir}/
16 install -m 755 ${UNPACKDIR}/dt-validate ${D}${bindir}/
17}
18
19BBCLASSEXTEND = "native nativesdk"