Bump the version of dtc from 1.6.1 to to 1.7.0.

Add support for building the python wrapper around libfdt.

Signed-off-by: Trevor Woerner <twoer...@gmail.com>
---
 ...tdump-fix-Werror-int-to-pointer-cast.patch | 40 -------------------
 meta/recipes-kernel/dtc/dtc/0001-meson.patch  | 37 +++++++++++++++++
 .../dtc/{dtc_1.6.1.bb => dtc_1.7.0.bb}        | 18 +++++----
 3 files changed, 48 insertions(+), 47 deletions(-)
 delete mode 100644 
meta/recipes-kernel/dtc/dtc/0001-fdtdump-fix-Werror-int-to-pointer-cast.patch
 create mode 100644 meta/recipes-kernel/dtc/dtc/0001-meson.patch
 rename meta/recipes-kernel/dtc/{dtc_1.6.1.bb => dtc_1.7.0.bb} (51%)

diff --git 
a/meta/recipes-kernel/dtc/dtc/0001-fdtdump-fix-Werror-int-to-pointer-cast.patch 
b/meta/recipes-kernel/dtc/dtc/0001-fdtdump-fix-Werror-int-to-pointer-cast.patch
deleted file mode 100644
index 4c3e34b1ffd2..000000000000
--- 
a/meta/recipes-kernel/dtc/dtc/0001-fdtdump-fix-Werror-int-to-pointer-cast.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-Fix the build of fdtdump with mingw.
-
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.bur...@arm.com>
-
-From ae0ce1fa7f4d679b5f8df1fc0e797246e43547fe Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lur...@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.lur...@redhat.com>
-Message-Id: <20210825121350.213551-1-marcandre.lur...@redhat.com>
-Acked-by: Rob Herring <r...@kernel.org>
-Signed-off-by: David Gibson <da...@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/meta/recipes-kernel/dtc/dtc/0001-meson.patch 
b/meta/recipes-kernel/dtc/dtc/0001-meson.patch
new file mode 100644
index 000000000000..10c4f8706194
--- /dev/null
+++ b/meta/recipes-kernel/dtc/dtc/0001-meson.patch
@@ -0,0 +1,37 @@
+From faa02d4a60859089017bf92e0e3f49d600c44d73 Mon Sep 17 00:00:00 2001
+From: Trevor Woerner <twoer...@gmail.com>
+Date: Sun, 12 Feb 2023 14:37:04 -0500
+Subject: [PATCH] allow pylibfdt in cross
+
+Allow pylibfdt to be built even in cross-development scenarios.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Trevor Woerner <twoer...@gmail.com>
+---
+ meson.build | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index b23ea1b159b2..34a21a6dc783 100644
+--- a/meson.build
++++ b/meson.build
+@@ -118,11 +118,11 @@ if get_option('tools')
+   )
+ endif
+ 
+-if not meson.is_cross_build()
+-  if py.found() and swig.found()
+-    subdir('pylibfdt')
+-  endif
++if py.found() and swig.found()
++  subdir('pylibfdt')
++endif
+ 
++if not meson.is_cross_build()
+   if get_option('tools')
+     subdir('tests')
+   endif
+-- 
+2.36.0.rc2.17.g4027e30c53
+
diff --git a/meta/recipes-kernel/dtc/dtc_1.6.1.bb 
b/meta/recipes-kernel/dtc/dtc_1.7.0.bb
similarity index 51%
rename from meta/recipes-kernel/dtc/dtc_1.6.1.bb
rename to meta/recipes-kernel/dtc/dtc_1.7.0.bb
index 2a6ac089a338..445bf54f8581 100644
--- a/meta/recipes-kernel/dtc/dtc_1.6.1.bb
+++ b/meta/recipes-kernel/dtc/dtc_1.7.0.bb
@@ -1,15 +1,18 @@
 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."
+DESCRIPTION = "The Device Tree Compiler is a toolchain for working with device 
tree source and binary files."
+DEPENDS = "bison-native python3-setuptools-scm-native swig-native libyaml"
 SECTION = "bootloader"
 LICENSE = "GPL-2.0-only | BSD-2-Clause"
 
 LIC_FILES_CHKSUM = "file://GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-                    
file://libfdt/libfdt.h;beginline=4;endline=7;md5=05bb357cfb75cae7d2b01d2ee8d76407"
+                    file://BSD-2-Clause;md5=5d6306d1b08f8df623178dfd81880927 \
+                    file://README.license;md5=a1eb22e37f09df5b5511b8a278992d0e"
 
 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"
+           file://0001-meson.patch"
+PV = "1.7.0+git${SRCPV}"
+SRCREV = "039a99414e778332d8f9c04cbd3072e1dcc62798"
 
 UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
 
@@ -17,14 +20,15 @@ S = "${WORKDIR}/git"
 
 inherit meson pkgconfig
 
-EXTRA_OEMESON = "-Dpython=disabled -Dvalgrind=disabled"
+EXTRA_OEMESON = "-Dvalgrind=disabled"
 
 PACKAGECONFIG ??= "tools"
-PACKAGECONFIG[tools] = "-Dtools=true,-Dtools=false,flex-native bison-native"
+PACKAGECONFIG[tools] = "-Dtools=true,-Dtools=false,flex-native"
 PACKAGECONFIG[yaml] = "-Dyaml=enabled,-Dyaml=disabled,libyaml"
 
-PACKAGES =+ "${PN}-misc"
+PACKAGES =+ "${PN}-misc ${PN}-pylibfdt"
 FILES:${PN}-misc = "${bindir}/convert-dtsv0 ${bindir}/ftdump ${bindir}/dtdiff"
+FILES:${PN}-pylibfdt = "${PYTHON_SITEPACKAGES_DIR}"
 RDEPENDS:${PN}-misc += "${@bb.utils.contains('PACKAGECONFIG', 'tools', 'bash 
diffutils', '', d)}"
 
 BBCLASSEXTEND = "native nativesdk"
-- 
2.36.0.rc2.17.g4027e30c53

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#177170): 
https://lists.openembedded.org/g/openembedded-core/message/177170
Mute This Topic: https://lists.openembedded.org/mt/96966808/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to