mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-25 00:11:13 +00:00
ce7f25066b
We're in process of cleaning nand_do_platform_check. Currently it leaves a special mark in /tmp/sysupgrade-nand-path triggering some diffent code path in nand_upgrade_stage1. This can be a bit confusing. The plan is to have the check function only check the image and nothing else. Then platform code (platform_pre_upgrade) should trigger NAND specific upgrade path. This is what this patch implements. This follows all other targets making it finally possible to change nand_do_platform_check. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 47039
31 lines
465 B
Bash
31 lines
465 B
Bash
#
|
|
# Copyright (C) 2014 OpenWrt.org
|
|
#
|
|
|
|
. /lib/oxnas.sh
|
|
|
|
RAMFS_COPY_DATA=/lib/oxnas.sh
|
|
|
|
platform_check_image() {
|
|
local board=$(oxnas_board_name)
|
|
|
|
[ "$ARGC" -gt 1 ] && return 1
|
|
|
|
nand_do_platform_check $board $1
|
|
return $?
|
|
}
|
|
|
|
platform_pre_upgrade() {
|
|
nand_do_upgrade $1
|
|
}
|
|
|
|
disable_watchdog() {
|
|
killall watchdog
|
|
( ps | grep -v 'grep' | grep '/dev/watchdog' ) && {
|
|
echo 'Could not disable watchdog'
|
|
return 1
|
|
}
|
|
}
|
|
|
|
append sysupgrade_pre_upgrade disable_watchdog
|