5654a03768
mvebu was modifying RAMFS_COPY_BIN and RAMFS_COPY_DATA from a
sysupgrade_pre_upgrade hook. As the ramfs is created from stage2, this
did not have an effect anymore after the staged sysupgrade changes.
As it doesn't really hurt to copy fw_printenv and fw_setenv
unconditionally, simply add them in /lib/upgrade/platform.sh, so stage2
will see them.
Config copying is moved to a function called by platform_copy_config, where
it belongs.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Fixes: FS#821
Fixes: 30f61a34b4
"base-files: always use staged sysupgrade"
55 lines
1.2 KiB
Bash
Executable file
55 lines
1.2 KiB
Bash
Executable file
#
|
|
# Copyright (C) 2014-2016 OpenWrt.org
|
|
# Copyright (C) 2016 LEDE-Project.org
|
|
#
|
|
|
|
. /lib/mvebu.sh
|
|
|
|
RAMFS_COPY_BIN='/usr/sbin/fw_printenv /usr/sbin/fw_setenv'
|
|
RAMFS_COPY_DATA='/lib/mvebu.sh /etc/fw_env.config /var/lock/fw_printenv.lock'
|
|
REQUIRE_IMAGE_METADATA=1
|
|
|
|
platform_check_image() {
|
|
return 0
|
|
}
|
|
|
|
platform_do_upgrade() {
|
|
local board=$(mvebu_board_name)
|
|
|
|
case "$board" in
|
|
armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-xp-linksys-mamba)
|
|
platform_do_upgrade_linksys "$ARGV"
|
|
;;
|
|
armada-388-clearfog-pro)
|
|
platform_do_upgrade_clearfog "$ARGV"
|
|
;;
|
|
armada-388-clearfog-base)
|
|
platform_do_upgrade_clearfog "$ARGV"
|
|
;;
|
|
*)
|
|
default_do_upgrade "$ARGV"
|
|
;;
|
|
esac
|
|
}
|
|
platform_copy_config() {
|
|
local board=$(mvebu_board_name)
|
|
|
|
case "$board" in
|
|
armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-xp-linksys-mamba)
|
|
platform_copy_config_linksys
|
|
;;
|
|
armada-388-clearfog)
|
|
platform_copy_config_clearfog "$ARGV"
|
|
;;
|
|
esac
|
|
}
|
|
|
|
disable_watchdog() {
|
|
killall watchdog
|
|
( ps | grep -v 'grep' | grep '/dev/watchdog' ) && {
|
|
echo 'Could not disable watchdog'
|
|
return 1
|
|
}
|
|
}
|
|
|
|
append sysupgrade_pre_upgrade disable_watchdog
|