mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 23:42:43 +00:00
0b3a64f862
This changes the sysupgrade format. To support upgrades from the old firmware to the new one, legacy images are provided. Because of the old partition split, these have to be specific to the NOR or SPI device. The new sysupgrade images are suitable for begin put on flash directly, and they are independent of NOR vs SPI flash variant. Flashing back to old firmware is supported via using the old full-flash images instead of the old sysupgrade images. Signed-off-by: Felix Fietkau <nbd@nbd.name>
32 lines
589 B
Bash
32 lines
589 B
Bash
PART_NAME=firmware
|
|
|
|
CI_BLKSZ=65536
|
|
|
|
platform_check_image() {
|
|
local magic="$(get_magic_long "$1")"
|
|
|
|
[ "$#" -gt 1 ] && return 1
|
|
|
|
[ "$magic" != "27051956" ] && {
|
|
echo "Invalid image type."
|
|
return 1
|
|
}
|
|
return 0
|
|
}
|
|
|
|
platform_do_upgrade() {
|
|
default_do_upgrade "$ARGV"
|
|
}
|
|
|
|
disable_watchdog() {
|
|
v "killing watchdog"
|
|
killall watchdog
|
|
( ps | grep -v 'grep' | grep '/dev/watchdog' ) && {
|
|
echo 'Could not disable watchdog'
|
|
return 1
|
|
}
|
|
}
|
|
|
|
# CONFIG_WATCHDOG_NOWAYOUT=y - can't kill watchdog unless kernel cmdline has a mpcore_wdt.nowayout=0
|
|
#append sysupgrade_pre_upgrade disable_watchdog
|