mkimage: Use PATH_MAX for path length
PATCH 1/1 mkimage: Use PATH_MAX for path length
From: Mingli Yu <[email protected]>
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
--- tools/mkimage.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/mkimage.h +2 -1
@@ -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
Signature · 1 line
2.25.1
Quoted 7 lines · On Mon, Jun 19, 2023 at 02:22:50PM +0800, [email protected] wrote:
From: Mingli Yu <[email protected]>
Fixed when build
xilinx_zynqmpin 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 typeSigned-off-by Mingli Yu <[email protected]>
Applied to u-boot/master, thanks!
Signature · 1 line
Tom