diff options
author | Luka Perkov <luka@openwrt.org> | 2015-11-10 00:16:42 +0000 |
---|---|---|
committer | Luka Perkov <luka@openwrt.org> | 2015-11-10 00:16:42 +0000 |
commit | b0e7ca4f8f6c85b0382ec54f85cc208f89ec3947 (patch) | |
tree | d5e1cd7bd74a25cf18e1d06493dde2330daf2ec8 /target/linux/kirkwood/base-files/lib/upgrade/platform.sh | |
parent | ea8ac0999cb78399acf3af6d8eb6fe5b92d06f53 (diff) | |
download | upstream-b0e7ca4f8f6c85b0382ec54f85cc208f89ec3947.tar.gz upstream-b0e7ca4f8f6c85b0382ec54f85cc208f89ec3947.tar.bz2 upstream-b0e7ca4f8f6c85b0382ec54f85cc208f89ec3947.zip |
kirkwood: support sysupgrade on Linksys EA[34]500
This automatically writes to the alternate firmware partition
(on Linksys's dual firmware layout) using code borrowed from
the WRT1900AC port.
Signed-off-by: Claudio Leite <leitec@staticky.com>
SVN-Revision: 47434
Diffstat (limited to 'target/linux/kirkwood/base-files/lib/upgrade/platform.sh')
-rw-r--r-- | target/linux/kirkwood/base-files/lib/upgrade/platform.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/target/linux/kirkwood/base-files/lib/upgrade/platform.sh b/target/linux/kirkwood/base-files/lib/upgrade/platform.sh new file mode 100644 index 0000000000..c33229a41b --- /dev/null +++ b/target/linux/kirkwood/base-files/lib/upgrade/platform.sh @@ -0,0 +1,32 @@ +. /lib/kirkwood.sh + +platform_check_image() { + [ "$#" -gt 1 ] && return 1 + local board="$(kirkwood_board_name)" + local magic="$(get_magic_long "$1")" + + case "$board" in + "linksys-audi"|\ + "linksys-viper") + [ "$magic" != "27051956" -a "$magic" != "73797375" ] && { + echo "Invalid image type." + return 1 + } + return 0 + ;; + esac + + echo "Sysupgrade is not yet supported on $board." + return 1 +} + +platform_do_upgrade() { + local board="$(kirkwood_board_name)" + + case "$board" in + "linksys-audi"|\ + "linksys-viper") + platform_do_upgrade_linksys "$ARGV" + ;; + esac +} |