2015-09-04 14:45:00 +00:00
|
|
|
. /lib/ipq806x.sh
|
|
|
|
|
|
|
|
PART_NAME=firmware
|
2016-11-14 17:32:04 +01:00
|
|
|
REQUIRE_IMAGE_METADATA=1
|
2015-09-04 14:45:00 +00:00
|
|
|
|
|
|
|
platform_check_image() {
|
2016-11-20 20:06:15 +01:00
|
|
|
return 0;
|
2015-09-04 14:45:00 +00:00
|
|
|
}
|
|
|
|
|
2015-09-15 16:05:10 +00:00
|
|
|
platform_pre_upgrade() {
|
|
|
|
local board=$(ipq806x_board_name)
|
|
|
|
|
|
|
|
case "$board" in
|
2016-01-18 10:46:58 +00:00
|
|
|
ap148 |\
|
2017-05-31 20:50:29 +05:30
|
|
|
ap-dk04.1-c1 |\
|
2016-01-19 10:16:36 +00:00
|
|
|
d7800 |\
|
2016-10-25 08:40:36 +02:00
|
|
|
nbg6817 |\
|
2016-06-21 11:55:00 +02:00
|
|
|
r7500 |\
|
2016-08-19 13:56:24 -07:00
|
|
|
r7500v2 |\
|
2016-06-21 11:55:00 +02:00
|
|
|
r7800)
|
2015-09-15 16:05:10 +00:00
|
|
|
nand_do_upgrade "$1"
|
|
|
|
;;
|
2016-05-13 01:13:15 -05:00
|
|
|
ea8500)
|
|
|
|
linksys_preupgrade "$1"
|
|
|
|
;;
|
2015-09-15 16:05:10 +00:00
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
2016-05-27 22:26:42 +08:00
|
|
|
platform_do_upgrade() {
|
|
|
|
local board=$(ipq806x_board_name)
|
|
|
|
|
|
|
|
case "$board" in
|
|
|
|
c2600)
|
|
|
|
PART_NAME="os-image:rootfs"
|
|
|
|
MTD_CONFIG_ARGS="-s 0x200000"
|
|
|
|
default_do_upgrade "$ARGV"
|
|
|
|
;;
|
2016-05-13 01:13:15 -05:00
|
|
|
ea8500)
|
|
|
|
platform_do_upgrade_linksys "$ARGV"
|
|
|
|
;;
|
2016-11-23 18:51:15 +01:00
|
|
|
vr2600v)
|
|
|
|
PART_NAME="kernel:rootfs"
|
|
|
|
MTD_CONFIG_ARGS="-s 0x200000"
|
|
|
|
default_do_upgrade "$ARGV"
|
|
|
|
;;
|
2017-03-14 17:04:28 +01:00
|
|
|
*)
|
|
|
|
default_do_upgrade "$ARGV"
|
|
|
|
;;
|
2016-05-27 22:26:42 +08:00
|
|
|
esac
|
|
|
|
}
|
2016-09-30 21:36:50 +02:00
|
|
|
|
2016-10-25 08:40:36 +02:00
|
|
|
platform_nand_pre_upgrade() {
|
|
|
|
local board=$(ipq806x_board_name)
|
|
|
|
|
|
|
|
case "$board" in
|
|
|
|
nbg6817)
|
|
|
|
zyxel_do_upgrade "$1"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
2016-09-30 21:36:50 +02:00
|
|
|
blink_led() {
|
|
|
|
. /etc/diag.sh; set_state upgrade
|
|
|
|
}
|
|
|
|
|
|
|
|
append sysupgrade_pre_upgrade blink_led
|