1
0
This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
svn-openwrt-archive/target/linux/kirkwood/base-files/lib/upgrade/platform.sh
Luka Perkov a726bd81e4 krikwood: Make Iconnect image use new ubi format style
To flash first time follow instructions in commit:
"kirkwood/dockstar: use ubi(kernel, squashfs, ubifs) images"

Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>

SVN-Revision: 49370
2016-05-10 23:03:43 +00:00

49 lines
786 B
Bash

. /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
;;
"dockstar"|\
"iconnect")
nand_do_platform_check $board $1
return $?
;;
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
}
platform_pre_upgrade() {
local board=$(kirkwood_board_name)
case "$board" in
"dockstar"|\
"iconnect")
nand_do_upgrade $1
;;
esac
}