* [PATCH v2 1/2] u-boot-starfive-visionfive2: Fix build with swig 4.3.0
2025-04-11 10:15 [PATCH v2 0/2] Fix riscv64/trixie build Uladzimir Bely
@ 2025-04-11 10:15 ` Uladzimir Bely
2025-04-11 10:15 ` [PATCH v2 2/2] linux-starfive: Fix build with GNU make 4.4 Uladzimir Bely
2025-04-15 7:02 ` [PATCH v2 0/2] Fix riscv64/trixie build Uladzimir Bely
2 siblings, 0 replies; 4+ messages in thread
From: Uladzimir Bely @ 2025-04-11 10:15 UTC (permalink / raw)
To: isar-users
Fixes u-boot build failure on newer trixie that got updated swig-4.3.0
some time ago.
```
scripts/dtc/pylibfdt/libfdt_wrap.c: In function ‘_wrap_fdt_next_node’:
scripts/dtc/pylibfdt/libfdt_wrap.c:5581:17: error: too few arguments
to function ‘SWIG_Python_AppendOutput’
5581 | resultobj = SWIG_Python_AppendOutput(resultobj, val);
| ^~~~~~~~~~~~~~~~~~~~~~~~
```
---
...bfdt-libfdt.i_shipped-Use-SWIG_Appen.patch | 60 +++++++++++++++++++
.../u-boot-starfive-visionfive2_2024.01.bb | 1 +
2 files changed, 61 insertions(+)
create mode 100644 meta-isar/recipes-bsp/u-boot/files/0001-scripts-dtc-pylibfdt-libfdt.i_shipped-Use-SWIG_Appen.patch
diff --git a/meta-isar/recipes-bsp/u-boot/files/0001-scripts-dtc-pylibfdt-libfdt.i_shipped-Use-SWIG_Appen.patch b/meta-isar/recipes-bsp/u-boot/files/0001-scripts-dtc-pylibfdt-libfdt.i_shipped-Use-SWIG_Appen.patch
new file mode 100644
index 00000000..d919eb68
--- /dev/null
+++ b/meta-isar/recipes-bsp/u-boot/files/0001-scripts-dtc-pylibfdt-libfdt.i_shipped-Use-SWIG_Appen.patch
@@ -0,0 +1,60 @@
+From a63456b9191fae2fe49f4b121e025792022e3950 Mon Sep 17 00:00:00 2001
+From: Markus Volk <f_l_k@t-online.de>
+Date: Wed, 30 Oct 2024 06:07:16 +0100
+Subject: [PATCH] scripts/dtc/pylibfdt/libfdt.i_shipped: Use SWIG_AppendOutput
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Swig has changed language specific AppendOutput functions. The helper
+macro SWIG_AppendOutput remains unchanged. Use that instead
+of SWIG_Python_AppendOutput, which would require an extra parameter
+since swig 4.3.0.
+
+/home/flk/poky/build-test/tmp/work/qemux86_64-poky-linux/u-boot/2024.10/git/arch/x86/cpu/u-boot-64.lds
+| scripts/dtc/pylibfdt/libfdt_wrap.c: In function ‘_wrap_fdt_next_node’:
+| scripts/dtc/pylibfdt/libfdt_wrap.c:5581:17: error: too few arguments to function ‘SWIG_Python_AppendOutput’
+| 5581 | resultobj = SWIG_Python_AppendOutput(resultobj, val);
+| | ^~~~~~~~~~~~~~~~~~~~~~~~
+
+Signed-off-by: Markus Volk <f_l_k@t-online.de>
+Reported-by: Rudi Heitbaum <rudi@heitbaum.com>
+Link: https://github.com/dgibson/dtc/pull/154
+---
+ scripts/dtc/pylibfdt/libfdt.i_shipped | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/scripts/dtc/pylibfdt/libfdt.i_shipped b/scripts/dtc/pylibfdt/libfdt.i_shipped
+index 56cc5d48f4f..e4659489a96 100644
+--- a/scripts/dtc/pylibfdt/libfdt.i_shipped
++++ b/scripts/dtc/pylibfdt/libfdt.i_shipped
+@@ -1037,7 +1037,7 @@ typedef uint32_t fdt32_t;
+ fdt_string(fdt1, fdt32_to_cpu($1->nameoff)));
+ buff = PyByteArray_FromStringAndSize(
+ (const char *)($1 + 1), fdt32_to_cpu($1->len));
+- resultobj = SWIG_Python_AppendOutput(resultobj, buff);
++ resultobj = SWIG_AppendOutput(resultobj, buff);
+ }
+ }
+
+@@ -1076,7 +1076,7 @@ typedef uint32_t fdt32_t;
+
+ %typemap(argout) int *depth {
+ PyObject *val = Py_BuildValue("i", *arg$argnum);
+- resultobj = SWIG_Python_AppendOutput(resultobj, val);
++ resultobj = SWIG_AppendOutput(resultobj, val);
+ }
+
+ %apply int *depth { int *depth };
+@@ -1092,7 +1092,7 @@ typedef uint32_t fdt32_t;
+ if (PyTuple_GET_SIZE(resultobj) == 0)
+ resultobj = val;
+ else
+- resultobj = SWIG_Python_AppendOutput(resultobj, val);
++ resultobj = SWIG_AppendOutput(resultobj, val);
+ }
+ }
+
+--
+2.49.0
+
diff --git a/meta-isar/recipes-bsp/u-boot/u-boot-starfive-visionfive2_2024.01.bb b/meta-isar/recipes-bsp/u-boot/u-boot-starfive-visionfive2_2024.01.bb
index 9f819c3e..becd40da 100644
--- a/meta-isar/recipes-bsp/u-boot/u-boot-starfive-visionfive2_2024.01.bb
+++ b/meta-isar/recipes-bsp/u-boot/u-boot-starfive-visionfive2_2024.01.bb
@@ -8,6 +8,7 @@ require recipes-bsp/u-boot/u-boot-custom.inc
COMPATIBLE_MACHINE = "starfive-visionfive2"
SRC_URI += "https://ftp.denx.de/pub/u-boot/u-boot-${PV}.tar.bz2 \
+ file://0001-scripts-dtc-pylibfdt-libfdt.i_shipped-Use-SWIG_Appen.patch \
file://starfive-visionfive2-rules.tmpl"
SRC_URI[sha256sum] = "b99611f1ed237bf3541bdc8434b68c96a6e05967061f992443cb30aabebef5b3"
--
2.49.0
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20250411101752.16954-2-ubely%40ilbers.de.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 2/2] linux-starfive: Fix build with GNU make 4.4
2025-04-11 10:15 [PATCH v2 0/2] Fix riscv64/trixie build Uladzimir Bely
2025-04-11 10:15 ` [PATCH v2 1/2] u-boot-starfive-visionfive2: Fix build with swig 4.3.0 Uladzimir Bely
@ 2025-04-11 10:15 ` Uladzimir Bely
2025-04-15 7:02 ` [PATCH v2 0/2] Fix riscv64/trixie build Uladzimir Bely
2 siblings, 0 replies; 4+ messages in thread
From: Uladzimir Bely @ 2025-04-11 10:15 UTC (permalink / raw)
To: isar-users
After updating "make" in trixie, kernel build fails with errors like:
```
make[10]: *** .NOTINTERMEDIATE and .SECONDARY are mutually exclusive. Stop.
make[9]: *** [../scripts/Makefile.build:480: drivers/gpu/drm/img/img-rogue] Error 2
make[9]: *** Waiting for unfinished jobs....
```
Branch "JH7110_VisionFive2_devel" we are using still doesn't include
required fix, so borrow it from branch "pinetab-6.6.y-devel".
---
...ogue-fix-build-issue-on-GNU-Make-4.4.patch | 29 +++++++++++++++++++
.../linux-starfive_6.6.20-visionfive2.bb | 1 +
2 files changed, 30 insertions(+)
create mode 100644 meta-isar/recipes-kernel/linux/files/0001-drm-img-rogue-fix-build-issue-on-GNU-Make-4.4.patch
diff --git a/meta-isar/recipes-kernel/linux/files/0001-drm-img-rogue-fix-build-issue-on-GNU-Make-4.4.patch b/meta-isar/recipes-kernel/linux/files/0001-drm-img-rogue-fix-build-issue-on-GNU-Make-4.4.patch
new file mode 100644
index 00000000..b7e7a0e6
--- /dev/null
+++ b/meta-isar/recipes-kernel/linux/files/0001-drm-img-rogue-fix-build-issue-on-GNU-Make-4.4.patch
@@ -0,0 +1,29 @@
+From 6b09bb490fb1a575a023c168a6db2d2470129885 Mon Sep 17 00:00:00 2001
+From: Icenowy Zheng <uwu@icenowy.me>
+Date: Sat, 22 Jun 2024 22:03:02 +0800
+Subject: [PATCH] drm: img-rogue: fix build issue on GNU Make 4.4+
+
+Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
+---
+ drivers/gpu/drm/img/img-rogue/Makefile | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/drivers/gpu/drm/img/img-rogue/Makefile b/drivers/gpu/drm/img/img-rogue/Makefile
+index ee37ef8cadbf..fe3bad2b77ea 100644
+--- a/drivers/gpu/drm/img/img-rogue/Makefile
++++ b/drivers/gpu/drm/img/img-rogue/Makefile
+@@ -73,7 +73,11 @@ WINDOW_SYSTEM=nulldrmws
+ #include $(OUT)/config_kernel.mk
+ include $(srctree)/$(src)/config_kernel.mk
+
++ifneq ($(and $(filter notintermediate, $(.FEATURES)),$(filter-out 4.4,$(MAKE_VERSION))),)
++.NOTINTERMEDIATE:
++else
+ .SECONDARY:
++endif
+
+ define symlink-source-file
+ @if [ ! -e $(dir $@) ]; then mkdir -p $(dir $@); fi
+--
+2.49.0
+
diff --git a/meta-isar/recipes-kernel/linux/linux-starfive_6.6.20-visionfive2.bb b/meta-isar/recipes-kernel/linux/linux-starfive_6.6.20-visionfive2.bb
index 80c2d3ff..e4433c5d 100644
--- a/meta-isar/recipes-kernel/linux/linux-starfive_6.6.20-visionfive2.bb
+++ b/meta-isar/recipes-kernel/linux/linux-starfive_6.6.20-visionfive2.bb
@@ -8,6 +8,7 @@ require recipes-kernel/linux/linux-custom.inc
SRC_URI += " \
https://github.com/starfive-tech/linux/archive/${SRCREV}.tar.gz;downloadfilename=linux-starfive-${SRCREV}.tar.gz \
file://0001-btrfs-fix-kvcalloc-arguments-order-in-btrfs_ioctl_se.patch \
+ file://0001-drm-img-rogue-fix-build-issue-on-GNU-Make-4.4.patch \
file://starfive2_extra.cfg"
SRCREV = "d0e7c0486d768a294f4f2b390d00dab8bee5d726"
SRC_URI[sha256sum] = "86f1bb78a84222d4a3d22779e335023a228cd865df866fd08af6a7816eca3add"
--
2.49.0
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20250411101752.16954-3-ubely%40ilbers.de.
^ permalink raw reply [flat|nested] 4+ messages in thread