From: Tom Rini Date: Fri, 10 Oct 2025 19:28:42 +0000 (-0600) Subject: Merge patch series "mkimage: fit: various fixes in fit_{import,extract}_data" X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cd01a8164d06fb1f31fddadd78bf17be8d6fa006;p=thirdparty%2Fu-boot.git Merge patch series "mkimage: fit: various fixes in fit_{import,extract}_data" Quentin Schulz says: I had to hunt down a difference between the FIT after running mkimage once and after running it twice. The use-case is typically U-Boot generating an unsigned FIT and then calling mkimage manually to sign it outside any build system. The issue can be reproduced with the following make CROSS_COMPILE=aarch64-linux-gnu- BUILD_TAG= SOURCE_DATE_EPOCH=0 O=build/ringneck ringneck-px30_defconfig make CROSS_COMPILE=aarch64-linux-gnu- BUILD_TAG= SOURCE_DATE_EPOCH=0 O=build/ringneck -j`nproc` cd build/ringneck cp ./simple-bin.fit.itb ./simple-bin.foo.fit cp ./simple-bin.fit.itb ./simple-bin.foo2.fit BUILD_TAG= SOURCE_DATE_EPOCH=0 ./tools/mkimage -E -t -B 200 -F ./simple-bin.foo.fit BUILD_TAG= SOURCE_DATE_EPOCH=0 ./tools/mkimage -E -t -B 200 -F ./simple-bin.foo2.fit BUILD_TAG= SOURCE_DATE_EPOCH=0 ./tools/mkimage -E -t -B 200 -F ./simple-bin.foo2.fit then compare the output of dtc -I dtb -O dts simple-bin.foo.fit dtc -I dtb -O dts simple-bin.foo2.fit data-size and data-offset properties are swapped. While going through the code, I identified a few theoretical issues possibly triggered by not checking the return code of fdt_setprop so those are added. Not tested outside of building. Link: https://lore.kernel.org/r/20250923-mkimage-2-runs-data-size-v1-0-ef3fa57e9645@cherry.de --- cd01a8164d06fb1f31fddadd78bf17be8d6fa006