dtc: merge .bb/.inc
PATCH 1/6 dtc: merge .bb/.inc
No reason for these to be split, so merge them.
--- meta/recipes-kernel/dtc/dtc.inc | 28 ---------------------------- meta/recipes-kernel/dtc/dtc_1.6.1.bb | 28 ++++++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 30 deletions(-) delete mode 100644 meta/recipes-kernel/dtc/dtc.inc
meta/recipes-kernel/dtc/dtc.inc deleted +0 -28
@@ -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;branch=master \ - 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"
meta/recipes-kernel/dtc/dtc_1.6.1.bb +26 -2
@@ -1,10 +1,34 @@ -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" +DEPENDS = "flex-native bison-native" 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://make_install.patch \ + file://0001-dtc-Fix-Makefile-to-add-CFLAGS-not-override.patch \ + " SRCREV = "b6910bec11614980a21e46fbccc35934b671bd81" +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" + BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.25.1
PATCH 2/6 dtc: use Meson to build
--- ...-Makefile-to-add-CFLAGS-not-override.patch | 36 ------------------- .../recipes-kernel/dtc/dtc/make_install.patch | 26 -------------- meta/recipes-kernel/dtc/dtc_1.6.1.bb | 15 +++----- 3 files changed, 4 insertions(+), 73 deletions(-) delete mode 100644 meta/recipes-kernel/dtc/dtc/0001-dtc-Fix-Makefile-to-add-CFLAGS-not-override.patch delete mode 100644 meta/recipes-kernel/dtc/dtc/make_install.patch
meta/recipes-kernel/dtc/dtc/0001-dtc-Fix-Makefile-to-add-CFLAGS-not-override.patch deleted +0 -36
@@ -1,36 +0,0 @@ -From f0119060ef1b9bd80e2cae487df1e4aedffb0e9b Mon Sep 17 00:00:00 2001 -From: Oleksiy Obitotskyy <[email protected]> -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 <[email protected]> ---- - 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 -
meta/recipes-kernel/dtc/dtc/make_install.patch deleted +0 -26
@@ -1,26 +0,0 @@ -From e9852b9d206df1e42aa4c8afec55a0f5e099b533 Mon Sep 17 00:00:00 2001 -From: Saul Wold <[email protected]> -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) -
meta/recipes-kernel/dtc/dtc_1.6.1.bb +4 -11
@@ -8,23 +8,16 @@ DEPENDS = "flex-native bison-native" LIC_FILES_CHKSUM = "file://GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ 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://make_install.patch \ - file://0001-dtc-Fix-Makefile-to-add-CFLAGS-not-override.patch \ - " +SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git;branch=master" SRCREV = "b6910bec11614980a21e46fbccc35934b671bd81" 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 -} +inherit meson pkgconfig + +EXTRA_OEMESON = "-Dpython=disabled -Dvalgrind=disabled" PACKAGES =+ "${PN}-misc" FILES:${PN}-misc = "${bindir}/convert-dtsv0 ${bindir}/ftdump ${bindir}/dtdiff"
Signature · 1 line
2.25.1
PATCH 3/6 dtc: add PACKAGECONFIGs for tools and yaml
In reply to Ross BurtonLeave yaml off by default.
--- meta/recipes-kernel/dtc/dtc_1.6.1.bb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
meta/recipes-kernel/dtc/dtc_1.6.1.bb +5 -3
@@ -3,7 +3,6 @@ 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" LIC_FILES_CHKSUM = "file://GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ file://libfdt/libfdt.h;beginline=4;endline=7;md5=05bb357cfb75cae7d2b01d2ee8d76407"
@@ -19,9 +18,12 @@ 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 += "bash diffutils" +RDEPENDS:${PN}-misc += "${@bb.utils.contains('PACKAGECONFIG', 'tools', 'bash diffutils', '', d)}" BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.25.1
PATCH 4/6 dtc: fix mingw build
In reply to Ross BurtonBackport a patch to fix the build of fdtdump with mingw, which so the tools now build successfully with mingw.
--- ...tdump-fix-Werror-int-to-pointer-cast.patch | 40 +++++++++++++++++++ meta/recipes-kernel/dtc/dtc_1.6.1.bb | 3 +- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-kernel/dtc/dtc/0001-fdtdump-fix-Werror-int-to-pointer-cast.patch
meta/recipes-kernel/dtc/dtc/0001-fdtdump-fix-Werror-int-to-pointer-cast.patch new file +40 -0
@@ -0,0 +1,40 @@ +Fix the build of fdtdump with mingw. + +Upstream-Status: Backport +Signed-off-by: Ross Burton <[email protected]> + +From ae0ce1fa7f4d679b5f8df1fc0e797246e43547fe Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <[email protected]> +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 <[email protected]> +Message-Id: <[email protected]> +Acked-by: Rob Herring <[email protected]> +Signed-off-by: David Gibson <[email protected]> +--- + 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 +
meta/recipes-kernel/dtc/dtc_1.6.1.bb +2 -1
@@ -7,7 +7,8 @@ LICENSE = "GPLv2 | BSD-2-Clause" LIC_FILES_CHKSUM = "file://GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ file://libfdt/libfdt.h;beginline=4;endline=7;md5=05bb357cfb75cae7d2b01d2ee8d76407" -SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git;branch=master" +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+)+)"
Signature · 1 line
2.25.1
PATCH 5/6 ncurses: poll() works, but only on Linux
In reply to Ross Burtonncurses does AC_TRY_RUN() to determine is poll() actually works. As that doesn't work in cross-compiles, we seed it with 'yes'.
However, MinGW doesn't have a working poll(), so use a :linux override so that this only applies to Linux builds.
The ncurses build now compiles but doesn't link in MinGW, which is a step forwards at least.
--- meta/recipes-core/ncurses/ncurses.inc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
meta/recipes-core/ncurses/ncurses.inc +1 -4
@@ -18,6 +18,7 @@ SRC_URI = "git://salsa.debian.org/debian/ncurses.git;protocol=https;branch=maste EXTRA_AUTORECONF = "-I m4" CACHED_CONFIGUREVARS = "cf_cv_func_nanosleep=yes" +CACHED_CONFIGUREVARS:append:linux = " cf_cv_working_poll=yes" EXTRASITECONFIG = "CFLAGS='${CFLAGS} -I${SYSROOT_DESTDIR}${includedir}'"
@@ -98,10 +99,6 @@ ncurses_configure() { # patched autoconf213 to generate the configure script. This autoconf # is not available so that the shipped script will be used. do_configure() { - # check does not work with cross-compiling and is generally - # broken because it requires stdin to be pollable (which is - # not the case for /dev/null redirections) - export cf_cv_working_poll=yes #Remove ${includedir} from CPPFLAGS, need for cross compile sed -i 's#-I${cf_includedir}##g' ${S}/configure || die "sed CPPFLAGS"
Signature · 1 line
2.25.1
PATCH 6/6 ncurses: clean up pkgconfig install location
In reply to Ross BurtonThese is now an option to set the pkg-config install location, instead of injecting it into the install to override the detected location (which is into the sysroot).
--- meta/recipes-core/ncurses/ncurses.inc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
meta/recipes-core/ncurses/ncurses.inc +2 -4
@@ -86,6 +86,7 @@ ncurses_configure() { --with-termlib=${EX_TERMLIB} \ --enable-sigwinch \ --enable-pc-files \ + --with-pkg-config-libdir=${libdir}/pkgconfig \ --disable-rpath-hack \ ${EXCONFIG_ARGS} \ --with-manpage-format=normal \
@@ -156,10 +157,7 @@ do_test() { _install_opts = " install.libs install.man " -_install_cfgs = "\ - DESTDIR='${D}' \ - PKG_CONFIG_LIBDIR='${libdir}/pkgconfig' \ -" +_install_cfgs = "DESTDIR='${D}'" do_install() { # Order of installation is important; widec installs a 'curses.h'
Signature · 1 line
2.25.1
Re: [OE-core] [PATCH 6/6] ncurses: clean up pkgconfig install location
Quoted 23 lines · Ross Burton
These is now an option to set the pkg-config install location, instead of injecting it into the install to override the detected location (which is into the sysroot).
Signed-off-by Ross Burton <[email protected]>--- meta/recipes-core/ncurses/ncurses.inc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)meta/recipes-core/ncurses/ncurses.inc +1
-0@@ -86,6 +86,7 @@ ncurses_configure() { --with-termlib=${EX_TERMLIB} \ --enable-sigwinch \ --enable-pc-files \ + --with-pkg-config-libdir=${libdir}/pkgconfig \ --disable-rpath-hack \ ${EXCONFIG_ARGS} \ --with-manpage-format=normal \@@ -156,10 +157,7 @@ do_test() {
meta/recipes-core/ncurses/ncurses.inc do_test() { · line 163
Quoted 10 lines
meta/recipes-core/ncurses/ncurses.inc +1
-4_install_opts = " install.libs install.man " -_install_cfgs = "\ - DESTDIR='${D}' \ - PKG_CONFIG_LIBDIR='${libdir}/pkgconfig' \ -" +_install_cfgs = "DESTDIR='${D}'" do_install() { # Order of installation is important; widec installs a 'curses.h'
I'm afraid this doesn't work:
https://autobuilder.yoctoproject.org/typhoon/#/builders/62/builds/4347/steps/11/logs/stdio
and many other failures as well. Note the alsa-utils failure looks related too.
Cheers,
Richard