summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp
diff options
context:
space:
mode:
authorMingli Yu <mingli.yu@windriver.com>2023-06-20 10:56:31 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-06-21 18:38:25 +0100
commit0a1c0f1396b059cc794721764f6bf87d61ca92cf (patch)
tree47c630c4ae7fca05278d8b783106c51f6c53f881 /meta/recipes-bsp
parentcc2c3b1b62070db2b84d967ce20a1651fd50b7fb (diff)
downloadpoky-0a1c0f1396b059cc794721764f6bf87d61ca92cf.tar.gz
u-boot-tools: Use PATH_MAX for path length
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. (From OE-Core rev: b913f6c1f9d8ed40fd83bfe73e32b8a6613a7880) 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>
Diffstat (limited to 'meta/recipes-bsp')
-rw-r--r--meta/recipes-bsp/u-boot/files/0001-mkimage-Use-PATH_MAX-for-path-length.patch40
-rw-r--r--meta/recipes-bsp/u-boot/u-boot-tools_2023.04.bb4
2 files changed, 44 insertions, 0 deletions
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
index 0000000000..9f38736bcd
--- /dev/null
+++ b/meta/recipes-bsp/u-boot/files/0001-mkimage-Use-PATH_MAX-for-path-length.patch
@@ -0,0 +1,40 @@
1From dcd3d272975863128e25a4e25453cb6521cddc53 Mon Sep 17 00:00:00 2001
2From: Mingli Yu <mingli.yu@windriver.com>
3Date: Wed, 14 Jun 2023 16:09:59 +0800
4Subject: [PATCH] mkimage: Use PATH_MAX for path length
5
6Fixed when build xilinx_zynqmp in long directory ( >256):
7 | /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.
8 | Error: Bad parameters for FIT image type
9
10Upstream-Status: Submitted [https://patchwork.ozlabs.org/project/uboot/patch/20230619062250.3244894-1-mingli.yu@eng.windriver.com/]
11
12Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
13---
14 tools/mkimage.h | 3 ++-
15 1 file changed, 2 insertions(+), 1 deletion(-)
16
17diff --git a/tools/mkimage.h b/tools/mkimage.h
18index f5ca65e2ed..d92a3ff811 100644
19--- a/tools/mkimage.h
20+++ b/tools/mkimage.h
21@@ -17,6 +17,7 @@
22 #include <sys/stat.h>
23 #include <time.h>
24 #include <unistd.h>
25+#include <limits.h>
26 #include <u-boot/sha1.h>
27 #include "fdt_host.h"
28 #include "imagetool.h"
29@@ -44,7 +45,7 @@ static inline ulong map_to_sysmem(void *ptr)
30 #define ALLOC_CACHE_ALIGN_BUFFER(type, name, size) type name[size]
31
32 #define MKIMAGE_TMPFILE_SUFFIX ".tmp"
33-#define MKIMAGE_MAX_TMPFILE_LEN 256
34+#define MKIMAGE_MAX_TMPFILE_LEN PATH_MAX
35 #define MKIMAGE_DEFAULT_DTC_OPTIONS "-I dts -O dtb -p 500"
36 #define MKIMAGE_MAX_DTC_CMDLINE_LEN 2 * MKIMAGE_MAX_TMPFILE_LEN + 35
37
38--
392.25.1
40
diff --git a/meta/recipes-bsp/u-boot/u-boot-tools_2023.04.bb b/meta/recipes-bsp/u-boot/u-boot-tools_2023.04.bb
index 7eaf721ca8..b77a49af87 100644
--- a/meta/recipes-bsp/u-boot/u-boot-tools_2023.04.bb
+++ b/meta/recipes-bsp/u-boot/u-boot-tools_2023.04.bb
@@ -1,2 +1,6 @@
1require u-boot-common.inc 1require u-boot-common.inc
2require u-boot-tools.inc 2require u-boot-tools.inc
3
4SRC_URI += " \
5 file://0001-mkimage-Use-PATH_MAX-for-path-length.patch \
6"