diff options
author | Shiji Yang <yangshiji66@qq.com> | 2022-10-29 22:06:24 +0800 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2022-10-30 23:14:45 +0100 |
commit | e6769d11f38f17fb4427f6022f61c4c2e1ee9d67 (patch) | |
tree | d9613e2740783bcc070577d493b9140fb224c32d /scripts | |
parent | 50f727b7737d118f7d44986181e305af0624c41d (diff) | |
download | upstream-e6769d11f38f17fb4427f6022f61c4c2e1ee9d67.tar.gz upstream-e6769d11f38f17fb4427f6022f61c4c2e1ee9d67.tar.bz2 upstream-e6769d11f38f17fb4427f6022f61c4c2e1ee9d67.zip |
scripts: fix missing character '0' issue in linksys image
In the stock firmware of Linksys, there is a '0' after the crc checksum.
Validated on EA6350V3, EA7300 and EA7300V2's stock images.
Fixes: 892d741259 build: add a script for generating Linksys factory images
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/linksys-image.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/linksys-image.sh b/scripts/linksys-image.sh index c3baf44844..3b4412c06e 100755 --- a/scripts/linksys-image.sh +++ b/scripts/linksys-image.sh @@ -14,7 +14,7 @@ # <VERSION> The version number of upgrade. Not checked so use arbitrary value (8 bytes) # <TYPE> Model of target device, padded (0x20) to (15 bytes) # <CRC> CRC checksum of the image to flash (8 byte) -# <padding> Padding (0x20) (7 bytes) +# <padding> Padding ('0' + 0x20 *7) (8 bytes) # <signature> Signature of signer. Not checked so use arbitrary value (16 bytes) # <padding> Padding (0x00) (192 bytes) # 0x0A (1 byte) @@ -58,7 +58,7 @@ IMG_OUT="${IMG_IN}.new" dd if="${IMG_IN}" of="${IMG_TMP_OUT}" CRC=$(printf "%08X" $(dd if="${IMG_IN}" bs=$(stat -c%s "${IMG_IN}") count=1|cksum| cut -d ' ' -f1)) -printf ".LINKSYS.01000409%-15s%-8s%-7s%-16s" "${TYPE}" "${CRC}" "" "K0000000F0246434" >> "${IMG_TMP_OUT}" +printf ".LINKSYS.01000409%-15s%-8s%-8s%-16s" "${TYPE}" "${CRC}" "0" "K0000000F0246434" >> "${IMG_TMP_OUT}" dd if=/dev/zero bs=1 count=192 conv=notrunc >> "${IMG_TMP_OUT}" |