diff options
author | Tomasz Maciej Nowak <tmn505@gmail.com> | 2020-11-25 17:33:34 +0100 |
---|---|---|
committer | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2020-11-25 18:13:54 +0100 |
commit | f06adb64bfb1650f16bbd9c894ca47c250df5976 (patch) | |
tree | 81cb5ec64b4c6ecf903c1d392f3b24d12604ce25 /target/linux | |
parent | b9246bbdc9a97041c5573845a7858ef3b1c54ff2 (diff) | |
download | upstream-f06adb64bfb1650f16bbd9c894ca47c250df5976.tar.gz upstream-f06adb64bfb1650f16bbd9c894ca47c250df5976.tar.bz2 upstream-f06adb64bfb1650f16bbd9c894ca47c250df5976.zip |
mvebu: sysupgrade: remove redundant MBR check
This is already done by get_partitions.
Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
[add "redundant" to title, remove declaration of magic variable]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target/linux')
-rw-r--r-- | target/linux/mvebu/base-files/lib/upgrade/sdcard.sh | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/target/linux/mvebu/base-files/lib/upgrade/sdcard.sh b/target/linux/mvebu/base-files/lib/upgrade/sdcard.sh index 184803a50f..3dbd1e2578 100644 --- a/target/linux/mvebu/base-files/lib/upgrade/sdcard.sh +++ b/target/linux/mvebu/base-files/lib/upgrade/sdcard.sh @@ -1,18 +1,6 @@ -get_magic_at() { - local file="$1" - local pos="$2" - get_image "$file" | dd bs=1 count=2 skip="$pos" 2>/dev/null | hexdump -v -n 2 -e '1/1 "%02x"' -} - platform_check_image_sdcard() { local file="$1" - local magic diskdev partdev diff - - magic=$(get_magic_at "$file" 510) - [ "$magic" != "55aa" ] && { - echo "Failed to verify MBR boot signature." - return 1 - } + local diskdev partdev diff export_bootdevice && export_partdevice diskdev 0 || { echo "Unable to determine upgrade device" |