aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/base-files/lib/upgrade
diff options
context:
space:
mode:
authorChristian Lamparter <chunkeey@gmail.com>2017-12-17 15:18:46 +0100
committerÁlvaro Fernández Rojas <noltari@gmail.com>2017-12-25 12:19:36 +0100
commite79b096ee175219c072aeb8d228a07f3361c14ea (patch)
treed62dbad04344c3e313fe7b67228ae78539ff683c /target/linux/brcm2708/base-files/lib/upgrade
parent67c1c145f0e9e9614df9a4fcb891447ab0eef2ee (diff)
downloadupstream-e79b096ee175219c072aeb8d228a07f3361c14ea.tar.gz
upstream-e79b096ee175219c072aeb8d228a07f3361c14ea.tar.bz2
upstream-e79b096ee175219c072aeb8d228a07f3361c14ea.zip
brcm2708: convert to metadata
This patch converts all the raspberrypi images to utilize the common metadata-based image verification. Note: the CM1 and CM3 currently use the same "rpi-cm" boardname. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Diffstat (limited to 'target/linux/brcm2708/base-files/lib/upgrade')
-rw-r--r--target/linux/brcm2708/base-files/lib/upgrade/platform.sh17
1 files changed, 2 insertions, 15 deletions
diff --git a/target/linux/brcm2708/base-files/lib/upgrade/platform.sh b/target/linux/brcm2708/base-files/lib/upgrade/platform.sh
index b7613b446d..5b8e1e15b3 100644
--- a/target/linux/brcm2708/base-files/lib/upgrade/platform.sh
+++ b/target/linux/brcm2708/base-files/lib/upgrade/platform.sh
@@ -1,20 +1,7 @@
-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"'
-}
+REQUIRE_IMAGE_METADATA=1
platform_check_image() {
- local file="$1"
- local magic
-
- magic=$(get_magic_at "$file" 510)
- [ "$magic" != "55aa" ] && {
- echo "Failed to verify MBR boot signature."
- return 1
- }
-
- return 0;
+ return 0
}
platform_do_upgrade() {