openwrtv4/target/linux/imx6/base-files/lib/upgrade/platform.sh
Rafał Miłecki 39940fac6b imx6: add platform_pre_upgrade for sysupgrade
We're in process of cleaning nand_do_platform_check. Currently is 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 ar71xx, lantiq and partially bcm53xx.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 46944
2015-09-15 16:05:03 +00:00

29 lines
389 B
Bash
Executable file

#
# Copyright (C) 2010-2015 OpenWrt.org
#
. /lib/imx6.sh
platform_check_image() {
local board=$(imx6_board_name)
case "$board" in
gw54xx)
nand_do_platform_check $board $1
return $?;
;;
esac
echo "Sysupgrade is not yet supported on $board."
return 1
}
platform_pre_upgrade() {
local board=$(imx6_board_name)
case "$board" in
gw54xx)
nand_do_upgrade "$1"
;;
esac
}