mvebu: sysupgrade: remove redundant MBR check
authorTomasz Maciej Nowak <tmn505@gmail.com>
Wed, 25 Nov 2020 16:33:34 +0000 (17:33 +0100)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Wed, 25 Nov 2020 17:13:54 +0000 (18:13 +0100)
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>
target/linux/mvebu/base-files/lib/upgrade/sdcard.sh

index 184803a50f1482617e5d244d7a9b251e7fc665c6..3dbd1e2578c9f01ac3ee965fcc765978415dc70f 100644 (file)
@@ -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"