aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorTomasz Maciej Nowak <tomek_n@o2.pl>2019-08-23 15:50:48 +0200
committerChristian Lamparter <chunkeey@gmail.com>2019-09-01 00:12:02 +0200
commit8b4109c2b4d60495d046157d1baca9b1cdbf8dc8 (patch)
treee3e0384d46e1ec65e610f71ef5d0ff52573ca0d1 /target/linux
parent900330ff2f5cb568ff3631ebea2888956e2ed8c9 (diff)
downloadupstream-8b4109c2b4d60495d046157d1baca9b1cdbf8dc8.tar.gz
upstream-8b4109c2b4d60495d046157d1baca9b1cdbf8dc8.tar.bz2
upstream-8b4109c2b4d60495d046157d1baca9b1cdbf8dc8.zip
ar71xx: sysupgrade: accept ath79 combined-image
There is md5 sum of whole image embedded in combined-image header which is checked on sysupgrade. The check will fail for ath79 images which may have embedded metadata. This is because metadata are appended after the combined image is created. To allow smooth transition from ar71xx to ath79, strip metadata before calculating md5 sum for whole image. Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
Diffstat (limited to 'target/linux')
-rwxr-xr-xtarget/linux/ar71xx/base-files/lib/upgrade/platform.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 6898c0e0c2..3853140702 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -394,7 +394,7 @@ platform_check_image() {
}
local md5_img=$(dd if="$1" bs=2 skip=9 count=16 2>/dev/null)
- local md5_chk=$(dd if="$1" bs=$CI_BLKSZ skip=1 2>/dev/null | md5sum -); md5_chk="${md5_chk%% *}"
+ local md5_chk=$(fwtool -q -t -i /dev/null "$1"; dd if="$1" bs=$CI_BLKSZ skip=1 2>/dev/null | md5sum -); md5_chk="${md5_chk%% *}"
if [ -n "$md5_img" -a -n "$md5_chk" ] && [ "$md5_img" = "$md5_chk" ]; then
return 0