From patchwork Mon Apr 27 00:08:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Roederer X-Patchwork-Id: 238565 List-Id: U-Boot discussion From: devel-sven at geroedel.de (Sven Roederer) Date: Mon, 27 Apr 2020 02:08:37 +0200 Subject: [PATCH 0/2] mkimage: fix using long pathnames Message-ID: <20200427000839.26473-1-devel-sven@geroedel.de> 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(-)