[OpenWrt-Devel] [PATCH] lantiq: add platform_pre_upgrade for sysupgrade
Rafał Miłecki
zajec5 at gmail.com
Sun May 10 13:03:15 EDT 2015
As explained in recent sysupgrade/nand.sh commits, current NAND
sysupgrade is a bit misleading because of nand_do_platform_check
behavior. It leaves a special mark in /tmp/sysupgrade-nand-path
triggering some diffent code path in nand_upgrade_stage1.
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.
Please note that because of current nand_upgrade_stage1 implemntation
this patch doesn't change any behavior yet. It only prepares lantiq
target for changing nand_do_platform_check (it will be possible after
preparing all other targets as well).
Signed-off-by: Rafał Miłecki <zajec5 at gmail.com>
---
target/linux/lantiq/base-files/lib/upgrade/platform.sh | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/target/linux/lantiq/base-files/lib/upgrade/platform.sh b/target/linux/lantiq/base-files/lib/upgrade/platform.sh
index 1688d3a..a892805 100755
--- a/target/linux/lantiq/base-files/lib/upgrade/platform.sh
+++ b/target/linux/lantiq/base-files/lib/upgrade/platform.sh
@@ -25,6 +25,17 @@ platform_check_image() {
esac
}
+platform_pre_upgrade() {
+ local board=$(lantiq_board_name)
+
+ case "$board" in
+ BTHOMEHUBV2B|BTHOMEHUBV3A|P2812HNUF* )
+ nand_do_upgrade $1
+ ;;
+ esac
+}
+
+
# use default for platform_do_upgrade()
disable_watchdog() {
--
1.8.4.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list