diff options
Diffstat (limited to 'poky/meta/recipes-kernel/dtc')
9 files changed, 139 insertions, 92 deletions
diff --git a/poky/meta/recipes-kernel/dtc/dtc.inc b/poky/meta/recipes-kernel/dtc/dtc.inc deleted file mode 100644 index bfdc9f8639..0000000000 --- a/poky/meta/recipes-kernel/dtc/dtc.inc +++ /dev/null @@ -1,28 +0,0 @@ -SUMMARY = "Device Tree Compiler" -HOMEPAGE = "https://devicetree.org/" -DESCRIPTION = "The Device Tree Compiler is a tool used to manipulate the Open-Firmware-like device tree used by PowerPC kernels." -SECTION = "bootloader" -LICENSE = "GPLv2 | BSD-2-Clause" -DEPENDS = "flex-native bison-native" - -SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git \ - file://make_install.patch \ - file://0001-dtc-Fix-Makefile-to-add-CFLAGS-not-override.patch \ - " - -UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)" - -EXTRA_OEMAKE='NO_PYTHON=1 PREFIX="${prefix}" LIBDIR="${libdir}" DESTDIR="${D}"' - -inherit pkgconfig - -S = "${WORKDIR}/git" - -do_install () { - oe_runmake install -} - -PACKAGES =+ "${PN}-misc" -FILES:${PN}-misc = "${bindir}/convert-dtsv0 ${bindir}/ftdump ${bindir}/dtdiff" - -RDEPENDS:${PN}-misc += "bash diffutils" diff --git a/poky/meta/recipes-kernel/dtc/dtc/0001-dtc-Fix-Makefile-to-add-CFLAGS-not-override.patch b/poky/meta/recipes-kernel/dtc/dtc/0001-dtc-Fix-Makefile-to-add-CFLAGS-not-override.patch deleted file mode 100644 index a2deb12d4b..0000000000 --- a/poky/meta/recipes-kernel/dtc/dtc/0001-dtc-Fix-Makefile-to-add-CFLAGS-not-override.patch +++ /dev/null @@ -1,36 +0,0 @@ -From f0119060ef1b9bd80e2cae487df1e4aedffb0e9b Mon Sep 17 00:00:00 2001 -From: Oleksiy Obitotskyy <oobitots@cisco.com> -Date: Fri, 22 Jan 2021 09:12:48 +0200 -Subject: [PATCH] dtc: Fix Makefile to add CFLAGS not override - -Makefile override CFLAGS not extend them, so some of them -missing. Sources builds out of kernel tree and probably not all -options could be used (?). We need at least -fmacro-prefix-map/ -debug-prefix-map to eliminate absolute path in binaries. - -Upstream-Status: Pending -Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com> ---- - Makefile | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/Makefile b/Makefile -index 35d936f..b5b13cf 100644 ---- a/Makefile -+++ b/Makefile -@@ -20,10 +20,10 @@ CONFIG_LOCALVERSION = - # See libfdt_internal.h for details - ASSUME_MASK ?= 0 - --CPPFLAGS = -I libfdt -I . -DFDT_ASSUME_MASK=$(ASSUME_MASK) -+CPPFLAGS += -I libfdt -I . -DFDT_ASSUME_MASK=$(ASSUME_MASK) - WARNINGS = -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \ - -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wshadow --CFLAGS = -g -Os $(SHAREDLIB_CFLAGS) -Werror $(WARNINGS) $(EXTRA_CFLAGS) -+CFLAGS += -g -Os $(SHAREDLIB_CFLAGS) -Werror $(WARNINGS) $(EXTRA_CFLAGS) - - BISON = bison - LEX = flex --- -2.25.1 - diff --git a/poky/meta/recipes-kernel/dtc/dtc/0001-fdtdump-fix-Werror-int-to-pointer-cast.patch b/poky/meta/recipes-kernel/dtc/dtc/0001-fdtdump-fix-Werror-int-to-pointer-cast.patch new file mode 100644 index 0000000000..4c3e34b1ff --- /dev/null +++ b/poky/meta/recipes-kernel/dtc/dtc/0001-fdtdump-fix-Werror-int-to-pointer-cast.patch @@ -0,0 +1,40 @@ +Fix the build of fdtdump with mingw. + +Upstream-Status: Backport +Signed-off-by: Ross Burton <ross.burton@arm.com> + +From ae0ce1fa7f4d679b5f8df1fc0e797246e43547fe Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com> +Date: Wed, 25 Aug 2021 16:13:50 +0400 +Subject: [PATCH] fdtdump: fix -Werror=int-to-pointer-cast +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +With mingw64-gcc, the compiler complains with various warnings: +error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] + +Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> +Message-Id: <20210825121350.213551-1-marcandre.lureau@redhat.com> +Acked-by: Rob Herring <robh@kernel.org> +Signed-off-by: David Gibson <david@gibson.dropbear.id.au> +--- + fdtdump.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/fdtdump.c b/fdtdump.c +index d9fb374..483f367 100644 +--- a/fdtdump.c ++++ b/fdtdump.c +@@ -21,7 +21,7 @@ + #define MAX_VERSION 17 + + #define ALIGN(x, a) (((x) + ((a) - 1)) & ~((a) - 1)) +-#define PALIGN(p, a) ((void *)(ALIGN((unsigned long)(p), (a)))) ++#define PALIGN(p, a) ((void *)(ALIGN((uintptr_t)(p), (a)))) + #define GET_CELL(p) (p += 4, *((const fdt32_t *)(p-4))) + + static const char *tagname(uint32_t tag) +-- +2.25.1 + diff --git a/poky/meta/recipes-kernel/dtc/dtc/make_install.patch b/poky/meta/recipes-kernel/dtc/dtc/make_install.patch deleted file mode 100644 index ea9359e815..0000000000 --- a/poky/meta/recipes-kernel/dtc/dtc/make_install.patch +++ /dev/null @@ -1,26 +0,0 @@ -From e9852b9d206df1e42aa4c8afec55a0f5e099b533 Mon Sep 17 00:00:00 2001 -From: Saul Wold <sgw@linux.intel.com> -Date: Thu, 3 Nov 2011 08:35:47 -0700 -Subject: [PATCH] dtc: Add patch to correctly install shared libraries and - -Upstream-Status: Inappropriate [configuration] - ---- - Makefile | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/Makefile b/Makefile -index d8ebc4f..f5e01be 100644 ---- a/Makefile -+++ b/Makefile -@@ -205,8 +205,8 @@ install-bin: all $(SCRIPTS) - install-lib: all - @$(VECHO) INSTALL-LIB - $(INSTALL) -d $(DESTDIR)$(LIBDIR) -- $(INSTALL_LIB) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR) -- ln -sf $(notdir $(LIBFDT_lib)) $(DESTDIR)$(LIBDIR)/$(LIBFDT_soname) -+ $(INSTALL) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR)/$(LIBFDT_soname) -+ ln -sf $(LIBFDT_soname) $(DESTDIR)$(LIBDIR)/$(notdir $(LIBFDT_lib)) - ln -sf $(LIBFDT_soname) $(DESTDIR)$(LIBDIR)/libfdt.$(SHAREDLIB_EXT) - $(INSTALL_DATA) $(LIBFDT_archive) $(DESTDIR)$(LIBDIR) - diff --git a/poky/meta/recipes-kernel/dtc/dtc_1.6.1.bb b/poky/meta/recipes-kernel/dtc/dtc_1.6.1.bb index de9a46d3ef..2610b26a94 100644 --- a/poky/meta/recipes-kernel/dtc/dtc_1.6.1.bb +++ b/poky/meta/recipes-kernel/dtc/dtc_1.6.1.bb @@ -1,10 +1,30 @@ -require dtc.inc +SUMMARY = "Device Tree Compiler" +HOMEPAGE = "https://devicetree.org/" +DESCRIPTION = "The Device Tree Compiler is a tool used to manipulate the Open-Firmware-like device tree used by PowerPC kernels." +SECTION = "bootloader" +LICENSE = "GPLv2 | BSD-2-Clause" LIC_FILES_CHKSUM = "file://GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://libfdt/libfdt.h;beginline=4;endline=7;md5=05bb357cfb75cae7d2b01d2ee8d76407" + file://libfdt/libfdt.h;beginline=4;endline=7;md5=05bb357cfb75cae7d2b01d2ee8d76407" +SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git;branch=master \ + file://0001-fdtdump-fix-Werror-int-to-pointer-cast.patch" SRCREV = "b6910bec11614980a21e46fbccc35934b671bd81" +UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)" + S = "${WORKDIR}/git" +inherit meson pkgconfig + +EXTRA_OEMESON = "-Dpython=disabled -Dvalgrind=disabled" + +PACKAGECONFIG ??= "tools" +PACKAGECONFIG[tools] = "-Dtools=true,-Dtools=false,flex-native bison-native" +PACKAGECONFIG[yaml] = "-Dyaml=enabled,-Dyaml=disabled,libyaml" + +PACKAGES =+ "${PN}-misc" +FILES:${PN}-misc = "${bindir}/convert-dtsv0 ${bindir}/ftdump ${bindir}/dtdiff" +RDEPENDS:${PN}-misc += "${@bb.utils.contains('PACKAGECONFIG', 'tools', 'bash diffutils', '', d)}" + BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-doc-validate b/poky/meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-doc-validate new file mode 100644 index 0000000000..2aa57851c7 --- /dev/null +++ b/poky/meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-doc-validate @@ -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 + diff --git a/poky/meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-mk-schema b/poky/meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-mk-schema new file mode 100644 index 0000000000..24b89d8619 --- /dev/null +++ b/poky/meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-mk-schema @@ -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 + diff --git a/poky/meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-validate b/poky/meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-validate new file mode 100644 index 0000000000..8a4710a7ed --- /dev/null +++ b/poky/meta/recipes-kernel/dtc/python3-dtschema-wrapper/dt-validate @@ -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 + diff --git a/poky/meta/recipes-kernel/dtc/python3-dtschema-wrapper_2021.10.bb b/poky/meta/recipes-kernel/dtc/python3-dtschema-wrapper_2021.10.bb new file mode 100644 index 0000000000..c869274d09 --- /dev/null +++ b/poky/meta/recipes-kernel/dtc/python3-dtschema-wrapper_2021.10.bb @@ -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" |