[PATCH 0/2] mkimage: fix using long pathnames

Sven Roederer devel-sven at geroedel.de
Mon Apr 27 02:08:37 CEST 2020


When running an buildbot with OpenWrt-CI I got the following error:

mkimage -f /var/lib/buildbot/slaves/slave/ipq40xx-generic/build/firmware/openwrt/
build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/tmp/
freifunk-berlin-dev-daily-1907-f66973b-ipq40xx-generic-asus_map-ac2200-initramfs-fit-uImage.itb.its
 /var/lib/buildbot/slaves/slave/ipq40xx-generic/build/firmware/openwrt/build_dir/
target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/tmp/
freifunk-berlin-dev-daily-1907-f66973b-ipq40xx-generic-asus_map-ac2200-initramfs-fit-uImage.itb.new
sh: 1: Syntax error: Unterminated quoted string

The syntax error is reported by the system()-call of fit_image.c as the cmd-
variable get truncated when using such long pathnames for teh output and the
FIT-file.
It's fixed by redefining the MKIMAGE_MAX_DTC_CMDLINE_LEN based on the size.
of MKIMAGE_MAX_TMPFILE_LEN. Also a Warning will be printed when detecting 
that the cmd-variable has reached its maximal size.

Sven Roederer (2):
  tools/mkimage: fix handling long filenames
  tools/fit-image: print a warning when cmd-line for dtc might be
    truncated

 tools/fit_image.c | 4 ++++
 tools/mkimage.h   | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

-- 
2.20.1



More information about the U-Boot mailing list