summaryrefslogtreecommitdiffstats
path: root/recipes-kernel
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2022-01-19 13:15:42 -0500
committerBruce Ashfield <bruce.ashfield@gmail.com>2022-01-19 13:18:15 -0500
commit198eb61ae372457beba51db176195f2a3153d6da (patch)
tree782201bc82df8221739faa74d777a836f7a575fe /recipes-kernel
parentb0c10d29cb77fa6de202eeafa000d514893f5d26 (diff)
downloadmeta-virtualization-198eb61ae372457beba51db176195f2a3153d6da.tar.gz
python3-dtc: add SRCPV and fix missing symbol
We need some of the latest dtc functionality for lopper, but that puts us out of sync with the main dtc recipe in oe-core master. To show that we are running ahead, bumping the PV to include SRCPV. To fix the following missing symbol: | ImportError: qemuarm64-poky-linux/xen-image-minimal/1.0-r0/recipe-sysroot-native/usr/lib/python3.10/site-packages/_libfdt.cpython-310-x86_64-linux-gnu.so: undefined symbol: fdt_overlay_target_offset We revert the commit that introduces it (since we don't need that functionality), and will drop our revert when oe-core updates to a similar version. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-kernel')
-rw-r--r--recipes-kernel/dtc/python3-dtc/0001-Revert-libfdt-overlay-make-overlay_get_target-public.patch129
-rw-r--r--recipes-kernel/dtc/python3-dtc_1.6.1.bb2
2 files changed, 131 insertions, 0 deletions
diff --git a/recipes-kernel/dtc/python3-dtc/0001-Revert-libfdt-overlay-make-overlay_get_target-public.patch b/recipes-kernel/dtc/python3-dtc/0001-Revert-libfdt-overlay-make-overlay_get_target-public.patch
new file mode 100644
index 00000000..cf4739eb
--- /dev/null
+++ b/recipes-kernel/dtc/python3-dtc/0001-Revert-libfdt-overlay-make-overlay_get_target-public.patch
@@ -0,0 +1,129 @@
1From 4d4703e0199fb3556c37694e4d951785abca22fd Mon Sep 17 00:00:00 2001
2From: Bruce Ashfield <bruce.ashfield@gmail.com>
3Date: Wed, 19 Jan 2022 12:46:42 -0500
4Subject: [PATCH] Revert "libfdt: overlay: make overlay_get_target() public"
5
6This reverts commit 45f3d1a095dd3440578d5c6313eba555a791f3fb.
7---
8 libfdt/fdt_overlay.c | 29 ++++++++++++++++++++++-------
9 libfdt/libfdt.h | 18 ------------------
10 libfdt/version.lds | 1 -
11 3 files changed, 22 insertions(+), 26 deletions(-)
12
13diff --git a/libfdt/fdt_overlay.c b/libfdt/fdt_overlay.c
14index 5c0c398..d217e79 100644
15--- a/libfdt/fdt_overlay.c
16+++ b/libfdt/fdt_overlay.c
17@@ -40,22 +40,37 @@ static uint32_t overlay_get_target_phandle(const void *fdto, int fragment)
18 return fdt32_to_cpu(*val);
19 }
20
21-int fdt_overlay_target_offset(const void *fdt, const void *fdto,
22- int fragment_offset, char const **pathp)
23+/**
24+ * overlay_get_target - retrieves the offset of a fragment's target
25+ * @fdt: Base device tree blob
26+ * @fdto: Device tree overlay blob
27+ * @fragment: node offset of the fragment in the overlay
28+ * @pathp: pointer which receives the path of the target (or NULL)
29+ *
30+ * overlay_get_target() retrieves the target offset in the base
31+ * device tree of a fragment, no matter how the actual targeting is
32+ * done (through a phandle or a path)
33+ *
34+ * returns:
35+ * the targeted node offset in the base device tree
36+ * Negative error code on error
37+ */
38+static int overlay_get_target(const void *fdt, const void *fdto,
39+ int fragment, char const **pathp)
40 {
41 uint32_t phandle;
42 const char *path = NULL;
43 int path_len = 0, ret;
44
45 /* Try first to do a phandle based lookup */
46- phandle = overlay_get_target_phandle(fdto, fragment_offset);
47+ phandle = overlay_get_target_phandle(fdto, fragment);
48 if (phandle == (uint32_t)-1)
49 return -FDT_ERR_BADPHANDLE;
50
51 /* no phandle, try path */
52 if (!phandle) {
53 /* And then a path based lookup */
54- path = fdt_getprop(fdto, fragment_offset, "target-path", &path_len);
55+ path = fdt_getprop(fdto, fragment, "target-path", &path_len);
56 if (path)
57 ret = fdt_path_offset(fdt, path);
58 else
59@@ -621,7 +636,7 @@ static int overlay_merge(void *fdt, void *fdto)
60 if (overlay < 0)
61 return overlay;
62
63- target = fdt_overlay_target_offset(fdt, fdto, fragment, NULL);
64+ target = overlay_get_target(fdt, fdto, fragment, NULL);
65 if (target < 0)
66 return target;
67
68@@ -764,7 +779,7 @@ static int overlay_symbol_update(void *fdt, void *fdto)
69 return -FDT_ERR_BADOVERLAY;
70
71 /* get the target of the fragment */
72- ret = fdt_overlay_target_offset(fdt, fdto, fragment, &target_path);
73+ ret = overlay_get_target(fdt, fdto, fragment, &target_path);
74 if (ret < 0)
75 return ret;
76 target = ret;
77@@ -786,7 +801,7 @@ static int overlay_symbol_update(void *fdt, void *fdto)
78
79 if (!target_path) {
80 /* again in case setprop_placeholder changed it */
81- ret = fdt_overlay_target_offset(fdt, fdto, fragment, &target_path);
82+ ret = overlay_get_target(fdt, fdto, fragment, &target_path);
83 if (ret < 0)
84 return ret;
85 target = ret;
86diff --git a/libfdt/libfdt.h b/libfdt/libfdt.h
87index a7f432c..7f117e8 100644
88--- a/libfdt/libfdt.h
89+++ b/libfdt/libfdt.h
90@@ -2116,24 +2116,6 @@ int fdt_del_node(void *fdt, int nodeoffset);
91 */
92 int fdt_overlay_apply(void *fdt, void *fdto);
93
94-/**
95- * fdt_overlay_target_offset - retrieves the offset of a fragment's target
96- * @fdt: Base device tree blob
97- * @fdto: Device tree overlay blob
98- * @fragment_offset: node offset of the fragment in the overlay
99- * @pathp: pointer which receives the path of the target (or NULL)
100- *
101- * fdt_overlay_target_offset() retrieves the target offset in the base
102- * device tree of a fragment, no matter how the actual targeting is
103- * done (through a phandle or a path)
104- *
105- * returns:
106- * the targeted node offset in the base device tree
107- * Negative error code on error
108- */
109-int fdt_overlay_target_offset(const void *fdt, const void *fdto,
110- int fragment_offset, char const **pathp);
111-
112 /**********************************************************************/
113 /* Debugging / informational functions */
114 /**********************************************************************/
115diff --git a/libfdt/version.lds b/libfdt/version.lds
116index cbce5d4..7ab85f1 100644
117--- a/libfdt/version.lds
118+++ b/libfdt/version.lds
119@@ -77,7 +77,6 @@ LIBFDT_1.2 {
120 fdt_appendprop_addrrange;
121 fdt_setprop_inplace_namelen_partial;
122 fdt_create_with_flags;
123- fdt_overlay_target_offset;
124 local:
125 *;
126 };
127--
1282.19.1
129
diff --git a/recipes-kernel/dtc/python3-dtc_1.6.1.bb b/recipes-kernel/dtc/python3-dtc_1.6.1.bb
index dd2c6e6e..a82e6d05 100644
--- a/recipes-kernel/dtc/python3-dtc_1.6.1.bb
+++ b/recipes-kernel/dtc/python3-dtc_1.6.1.bb
@@ -7,6 +7,7 @@ LICENSE = "GPLv2 | BSD-2-Clause"
7DEPENDS = "flex-native bison-native swig-native python3-setuptools-scm-native libyaml dtc" 7DEPENDS = "flex-native bison-native swig-native python3-setuptools-scm-native libyaml dtc"
8 8
9SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git;branch=master \ 9SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git;branch=master \
10 file://0001-Revert-libfdt-overlay-make-overlay_get_target-public.patch \
10 " 11 "
11 12
12UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)" 13UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
@@ -15,6 +16,7 @@ LIC_FILES_CHKSUM = "file://pylibfdt/libfdt.i;beginline=1;endline=6;md5=afda088c9
15 16
16SRCREV = "4048aed12b81c5a0154b9af438edc99ec7d2b6a1" 17SRCREV = "4048aed12b81c5a0154b9af438edc99ec7d2b6a1"
17 18
19PV = "1.6.1+git${SRCPV}"
18S = "${WORKDIR}/git" 20S = "${WORKDIR}/git"
19 21
20inherit setuptools3 pkgconfig 22inherit setuptools3 pkgconfig