diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2013-09-19 22:36:42 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2013-09-19 22:36:42 +0000 |
commit | 9ceddfbb63a0bab95c0005362e570c3fc5683695 (patch) | |
tree | 9f70a1d1552f209885cea1e23c2427785ff02e13 /target/linux | |
parent | b8a054aff215adebf10ad86299482733d20c5cbe (diff) | |
download | upstream-9ceddfbb63a0bab95c0005362e570c3fc5683695.tar.gz upstream-9ceddfbb63a0bab95c0005362e570c3fc5683695.tar.bz2 upstream-9ceddfbb63a0bab95c0005362e570c3fc5683695.zip |
ar71xx: add sysupgrade support for the WD My Net N600 board
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38075 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-rwxr-xr-x | target/linux/ar71xx/base-files/lib/upgrade/platform.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 8fbd3955ac..508b40ef7a 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -69,6 +69,10 @@ tplink_get_image_boot_size() { get_image "$@" | dd bs=4 count=1 skip=37 2>/dev/null | hexdump -v -n 4 -e '1/1 "%02x"' } +seama_get_type_magic() { + get_image "$@" | dd bs=1 count=4 skip=53 2>/dev/null | hexdump -v -n 4 -e '1/1 "%02x"' +} + platform_check_image() { local board=$(ar71xx_board_name) local magic="$(get_magic_word "$1")" @@ -149,6 +153,20 @@ platform_check_image() { dir825b_check_image "$1" && return 0 ;; + mynet-n600) + [ "$magic_long" != "5ea3a417" ] && { + echo "Invalid image, bad magic: $magic_long" + return 1 + } + + local typemagic=$(seama_get_type_magic "$1") + [ "$typemagic" != "6669726d" ] && { + echo "Invalid image, bad type: $typemagic" + return 1 + } + + return 0; + ;; mr600 | \ mr600v2 | \ om2p | \ |