mbox series

[0/2] mkimage: fix using long pathnames

Message ID 20200427000839.26473-1-devel-sven@geroedel.de
Headers show
Series mkimage: fix using long pathnames | expand

Message

Sven Roederer April 27, 2020, 12:08 a.m. UTC
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(-)