diff options
Diffstat (limited to 'target/linux/ipq40xx/base-files/lib')
-rw-r--r-- | target/linux/ipq40xx/base-files/lib/upgrade/platform.sh | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh index f6bc173a76..b92a2bfe9f 100644 --- a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh @@ -46,7 +46,8 @@ zyxel_do_upgrade() { platform_do_upgrade() { case "$(board_name)" in - 8dev,jalapeno) + 8dev,jalapeno |\ + alfa-network,ap120c-ac) nand_do_upgrade "$ARGV" ;; asus,map-ac2200) @@ -81,6 +82,16 @@ platform_do_upgrade() { platform_nand_pre_upgrade() { case "$(board_name)" in + alfa-network,ap120c-ac) + part="$(awk -F 'ubi.mtd=' '{printf $2}' /proc/cmdline | sed -e 's/ .*$//')" + if [ "$part" = "rootfs1" ]; then + fw_setenv active 2 || exit 1 + CI_UBIPART="rootfs2" + else + fw_setenv active 1 || exit 1 + CI_UBIPART="rootfs1" + fi + ;; asus,rt-ac58u) CI_UBIPART="UBI_DEV" CI_KERNPART="linux" |