diff options
Diffstat (limited to 'target/linux/ipq40xx/base-files/lib/upgrade')
-rw-r--r-- | target/linux/ipq40xx/base-files/lib/upgrade/platform.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh index 605b1e7881..02833ebc3d 100644 --- a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh @@ -55,6 +55,24 @@ zyxel_do_upgrade() { fi } +platform_do_upgrade_mikrotik_nand() { + local fw_mtd=$(find_mtd_part kernel) + fw_mtd="${fw_mtd/block/}" + [ -n "$fw_mtd" ] || return + + local board_dir=$(tar tf "$1" | grep -m 1 '^sysupgrade-.*/$') + board_dir=${board_dir%/} + [ -n "$board_dir" ] || return + + local kernel_len=$(tar xf "$1" ${board_dir}/kernel -O | wc -c) + [ -n "$kernel_len" ] || return + + tar xf "$1" ${board_dir}/kernel -O | ubiformat "$fw_mtd" -y -S $kernel_len -f - + + CI_KERNPART="none" + nand_do_upgrade "$1" +} + platform_do_upgrade() { case "$(board_name)" in 8dev,jalapeno |\ @@ -119,6 +137,9 @@ platform_do_upgrade() { [ "$(rootfs_type)" = "tmpfs" ] && mtd erase firmware default_do_upgrade "$1" ;; + mikrotik,hap-ac3) + platform_do_upgrade_mikrotik_nand "$1" + ;; netgear,rbr50 |\ netgear,rbs50 |\ netgear,srr60 |\ |