2014-07-13 22:12:56 +00:00
|
|
|
#
|
2016-10-13 10:52:20 +00:00
|
|
|
# Copyright (C) 2014-2016 OpenWrt.org
|
|
|
|
# Copyright (C) 2016 LEDE-Project.org
|
2014-07-13 22:12:56 +00:00
|
|
|
#
|
|
|
|
|
2017-07-10 16:37:25 +00:00
|
|
|
RAMFS_COPY_BIN='fw_printenv fw_setenv'
|
2017-05-12 20:36:07 +00:00
|
|
|
RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock'
|
2016-11-21 10:59:37 +00:00
|
|
|
REQUIRE_IMAGE_METADATA=1
|
2014-07-13 22:12:56 +00:00
|
|
|
|
|
|
|
platform_check_image() {
|
2016-11-21 10:59:37 +00:00
|
|
|
return 0
|
2014-07-13 22:12:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
platform_do_upgrade() {
|
2017-05-12 20:36:07 +00:00
|
|
|
case "$(board_name)" in
|
2016-10-13 10:52:20 +00:00
|
|
|
armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-xp-linksys-mamba)
|
2014-07-13 22:12:56 +00:00
|
|
|
platform_do_upgrade_linksys "$ARGV"
|
|
|
|
;;
|
2017-04-06 18:08:41 +00:00
|
|
|
armada-388-clearfog-pro)
|
2016-09-26 10:02:40 +00:00
|
|
|
platform_do_upgrade_clearfog "$ARGV"
|
|
|
|
;;
|
2017-04-06 18:13:31 +00:00
|
|
|
armada-388-clearfog-base)
|
|
|
|
platform_do_upgrade_clearfog "$ARGV"
|
|
|
|
;;
|
2014-07-13 22:12:56 +00:00
|
|
|
*)
|
|
|
|
default_do_upgrade "$ARGV"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|
2016-09-26 10:02:40 +00:00
|
|
|
platform_copy_config() {
|
2017-05-12 20:36:07 +00:00
|
|
|
case "$(board_name)" in
|
2017-06-01 16:39:12 +00:00
|
|
|
armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-xp-linksys-mamba)
|
|
|
|
platform_copy_config_linksys
|
|
|
|
;;
|
2016-09-26 10:02:40 +00:00
|
|
|
armada-388-clearfog)
|
|
|
|
platform_copy_config_clearfog "$ARGV"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|
2014-07-13 22:12:56 +00:00
|
|
|
|
|
|
|
disable_watchdog() {
|
|
|
|
killall watchdog
|
|
|
|
( ps | grep -v 'grep' | grep '/dev/watchdog' ) && {
|
|
|
|
echo 'Could not disable watchdog'
|
|
|
|
return 1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
append sysupgrade_pre_upgrade disable_watchdog
|