aboutsummaryrefslogtreecommitdiff
path: root/tools/mkimage.h
diff options
context:
space:
mode:
authorMingli Yu2023-06-19 14:22:50 +0800
committerTom Rini2023-06-23 14:38:16 -0400
commit99d430f344bfdb0641022fd3efa26c29c957df02 (patch)
treead29800eb54122624025a222f0952149f1683b14 /tools/mkimage.h
parent48cb77012396867ca46986c5f1b0aabd0d74c2fd (diff)
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 Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Diffstat (limited to 'tools/mkimage.h')
-rw-r--r--tools/mkimage.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/mkimage.h b/tools/mkimage.h
index f5ca65e2edf..d92a3ff8117 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