From: Robert Marko Date: Sun, 9 Aug 2026 09:21:46 +0000 (+0200) Subject: arm-trusted-firmware-airoha: fix BL2 packing on Debian 11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=831900b41bc1edc826c5f21bd0ff93c7821666b7;p=thirdparty%2Fopenwrt.git arm-trusted-firmware-airoha: fix BL2 packing on Debian 11 Debian 11 ships coreutils 8.32, whose cksum does not support the -a crc32b option. This leaves crc empty and causes the subsequent shell arithmetic expression to fail. Use Python's built-in binascii.crc32 implementation instead. Python 3 is already required by the OpenWrt build system and produces the same CRC-32 value before the existing final XOR. Signed-off-by: Robert Marko --- diff --git a/package/boot/arm-trusted-firmware-airoha/scripts/airoha_pack_bl2.sh b/package/boot/arm-trusted-firmware-airoha/scripts/airoha_pack_bl2.sh index b43880c9be9..ab41d58158a 100755 --- a/package/boot/arm-trusted-firmware-airoha/scripts/airoha_pack_bl2.sh +++ b/package/boot/arm-trusted-firmware-airoha/scripts/airoha_pack_bl2.sh @@ -60,7 +60,7 @@ cat $BL22 >> $BL2 cat $BL23 >> $BL2 cat $FLASH_TABLE >> $BL2 -crc=$(cksum -a crc32b $BL2 | cut -d' ' -f1) +crc=$(python3 -c 'import binascii, sys; print(binascii.crc32(sys.stdin.buffer.read()))' < "$BL2") # XOR with 0xffffffff crc=$((0xffffffff ^ $crc))