X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fopenwrt.git;a=blobdiff_plain;f=target%2Flinux%2Fipq40xx%2Fbase-files%2Flib%2Fupgrade%2Fplatform.sh;h=60070fa9e3bf939670516bb390c543898f2bd585;hp=f6bc173a76edc44f8ee01ddbaf5024c697f231e8;hb=102c8c55f217606cdbdc9a449667e034676b3e75;hpb=9ad3967f140bd6d08796f1ec151b753186b3eb44 diff --git a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh index f6bc173a76..60070fa9e3 100644 --- a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh @@ -37,8 +37,8 @@ zyxel_do_upgrade() { tar Oxf $tar_file ${board_dir}/kernel | mtd write - kernel - if [ "$SAVE_CONFIG" -eq 1 ]; then - tar Oxf $tar_file ${board_dir}/root | mtd -j "$CONF_TAR" write - rootfs + if [ -n "$UPGRADE_BACKUP" ]; then + tar Oxf $tar_file ${board_dir}/root | mtd -j "$UPGRADE_BACKUP" write - rootfs else tar Oxf $tar_file ${board_dir}/root | mtd write - rootfs fi @@ -46,8 +46,25 @@ zyxel_do_upgrade() { platform_do_upgrade() { case "$(board_name)" in - 8dev,jalapeno) - nand_do_upgrade "$ARGV" + 8dev,jalapeno |\ + aruba,ap-303 |\ + avm,fritzbox-7530 |\ + avm,fritzrepeater-1200 |\ + avm,fritzrepeater-3000 |\ + cilab,meshpoint-one |\ + qxwlan,e2600ac-c2) + nand_do_upgrade "$1" + ;; + 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 + nand_do_upgrade "$1" ;; asus,map-ac2200) CI_KERNPART="linux" @@ -58,35 +75,27 @@ platform_do_upgrade() { CI_KERNPART="linux" nand_do_upgrade "$1" ;; - linksys,ea6350v3) - platform_do_upgrade_linksys "$ARGV" + compex,wpj419) + nand_do_upgrade "$1" ;; - openmesh,a42 |\ - openmesh,a62) - PART_NAME="inactive" - platform_do_upgrade_openmesh "$ARGV" + linksys,ea6350v3 |\ + linksys,ea8300) + platform_do_upgrade_linksys "$1" ;; meraki,mr33) CI_KERNPART="part.safe" nand_do_upgrade "$1" ;; + openmesh,a42 |\ + openmesh,a62) + PART_NAME="inactive" + platform_do_upgrade_openmesh "$1" + ;; zyxel,nbg6617) zyxel_do_upgrade "$1" ;; *) - default_do_upgrade "$ARGV" - ;; - esac -} - -platform_nand_pre_upgrade() { - case "$(board_name)" in - asus,rt-ac58u) - CI_UBIPART="UBI_DEV" - CI_KERNPART="linux" - ;; - meraki,mr33) - CI_KERNPART="part.safe" + default_do_upgrade "$1" ;; esac }