]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
u-boot-tools: Use PATH_MAX for path length
authorMingli Yu <mingli.yu@windriver.com>
Tue, 20 Jun 2023 02:56:31 +0000 (10:56 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 21 Jun 2023 17:38:21 +0000 (18:38 +0100)
Fixes:
   | uboot-mkimage -D "-I dts -O dtb -p 2000" -F -k "/buildarea1/test/wr_build/wrtestLTS_secureboot/test1-what/test2-what/test3-what/test4-what/test5-what/test6-what/test7-what/test8-what/test9-what/test10-what/test11-what/test12-what/layers/xilinx-zynqmp/zynqmp_keys/fitImage-rsa2048-keys" -K "u-boot.dtb" -r /buildarea1/test/wr_build/wrtestLTS_secureboot/test1-what/test2-what/test3-what/test4-what/test5-what/test6-what/test7-what/test8-what/test9-what/test10-what/test11-what/test12-what/build/tmp-glibc/work/xilinx_zynqmp-wrs-linux/u-boot-xlnx/1_v2023.01-xilinx-v2023.1+gitAUTOINC+40a08d69e7-r0/build/fitImage-linux
   | /buildarea1/test/wr_build/wrtestLTS_secureboot/test1-what/test2-what/test3-what/test4-what/test5-what/test6-what/test7-what/test8-what/test9-what/test10-what/test11-what/test12-what/build/tmp-glibc/work/xilinx_zynqmp-wrs-linux/u-boot-xlnx/1_v2023.01-xilinx-v2023.1+gitAUTOINC+40a08d69e7-r0/build/fitImage-linux: Image file name (uboot-mkimage) too long, can't create tmpfile.

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-bsp/u-boot/files/0001-mkimage-Use-PATH_MAX-for-path-length.patch [new file with mode: 0644]
meta/recipes-bsp/u-boot/u-boot-tools_2023.04.bb

diff --git a/meta/recipes-bsp/u-boot/files/0001-mkimage-Use-PATH_MAX-for-path-length.patch b/meta/recipes-bsp/u-boot/files/0001-mkimage-Use-PATH_MAX-for-path-length.patch
new file mode 100644 (file)
index 0000000..9f38736
--- /dev/null
@@ -0,0 +1,40 @@
+From dcd3d272975863128e25a4e25453cb6521cddc53 Mon Sep 17 00:00:00 2001
+From: Mingli Yu <mingli.yu@windriver.com>
+Date: Wed, 14 Jun 2023 16:09:59 +0800
+Subject: [PATCH] mkimage: Use PATH_MAX for path length
+
+Fixed when build xilinx_zynqmp in long directory ( >256):
+  |  /buildarea1/testtest/wr_build/wr1023test_secureboot/test1-what/test2-what/test3-what/test4-what/test5-what/test6-what/test7-what/test8-what/test9-what/test10-what/test11-what/test12-what/build/tmp-glibc/work/xilinx_zynqmp-wrs-linux/u-boot-xlnx/1_v2023.01-xilinx-v2023.1+gitAUTOINC+40a08d69e7-r0/build/fitImage-linux: Image file name (uboot-mkimage) too long, can't create tmpfile.
+  | Error: Bad parameters for FIT image type
+
+Upstream-Status: Submitted [https://patchwork.ozlabs.org/project/uboot/patch/20230619062250.3244894-1-mingli.yu@eng.windriver.com/]
+
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+---
+ tools/mkimage.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/tools/mkimage.h b/tools/mkimage.h
+index f5ca65e2ed..d92a3ff811 100644
+--- a/tools/mkimage.h
++++ b/tools/mkimage.h
+@@ -17,6 +17,7 @@
+ #include <sys/stat.h>
+ #include <time.h>
+ #include <unistd.h>
++#include <limits.h>
+ #include <u-boot/sha1.h>
+ #include "fdt_host.h"
+ #include "imagetool.h"
+@@ -44,7 +45,7 @@ static inline ulong map_to_sysmem(void *ptr)
+ #define ALLOC_CACHE_ALIGN_BUFFER(type, name, size) type name[size]
+ #define MKIMAGE_TMPFILE_SUFFIX                ".tmp"
+-#define MKIMAGE_MAX_TMPFILE_LEN               256
++#define MKIMAGE_MAX_TMPFILE_LEN               PATH_MAX
+ #define MKIMAGE_DEFAULT_DTC_OPTIONS   "-I dts -O dtb -p 500"
+ #define MKIMAGE_MAX_DTC_CMDLINE_LEN   2 * MKIMAGE_MAX_TMPFILE_LEN + 35
+-- 
+2.25.1
+
index 7eaf721ca837ab834b963d34982ebc0de1de7305..b77a49af87343267582c90df9ee84ab45a5b7d17 100644 (file)
@@ -1,2 +1,6 @@
 require u-boot-common.inc
 require u-boot-tools.inc
+
+SRC_URI += " \
+    file://0001-mkimage-Use-PATH_MAX-for-path-length.patch \
+"