mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-09 18:59:13 +08:00
tegra: 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] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This commit is contained in:
parent
456f5680db
commit
fa9e8a008a
@ -1,23 +1,10 @@
|
|||||||
REQUIRE_IMAGE_METADATA=1
|
REQUIRE_IMAGE_METADATA=1
|
||||||
|
|
||||||
get_magic_at() {
|
|
||||||
local pos="$2"
|
|
||||||
get_image "$1" | dd bs=1 count=2 skip="$pos" 2>/dev/null | hexdump -v -n 2 -e '1/1 "%02x"'
|
|
||||||
}
|
|
||||||
|
|
||||||
platform_check_image() {
|
platform_check_image() {
|
||||||
local diskdev partdev diff
|
local diskdev partdev diff
|
||||||
|
|
||||||
[ "$#" -gt 1 ] && return 1
|
[ "$#" -gt 1 ] && return 1
|
||||||
|
|
||||||
case "$(get_magic_at "$1" 510)" in
|
|
||||||
55aa) ;;
|
|
||||||
*)
|
|
||||||
echo "Failed to verify MBR boot signature."
|
|
||||||
return 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
export_bootdevice && export_partdevice diskdev 0 || {
|
export_bootdevice && export_partdevice diskdev 0 || {
|
||||||
echo "Unable to determine upgrade device"
|
echo "Unable to determine upgrade device"
|
||||||
return 1
|
return 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user