diff options
Diffstat (limited to 'target/linux/ipq40xx/base-files')
3 files changed, 33 insertions, 1 deletions
diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network b/target/linux/ipq40xx/base-files/etc/board.d/02_network index c39890ecd9..11ebb2ef83 100644 --- a/target/linux/ipq40xx/base-files/etc/board.d/02_network +++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network @@ -140,6 +140,11 @@ ipq40xx_setup_interfaces() ucidef_add_switch "switch0" \ "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "0u@eth1" "5:wan" ;; + zte,mf286d) + ucidef_set_interfaces_lan_wan "eth0" "eth1" + ucidef_add_switch "switch0" \ + "0u@eth0" "2:lan:4" "3:lan:3" "4:lan:2" "0u@eth1" "5:wan" + ;; *) echo "Unsupported hardware. Network interfaces not initialized" ;; diff --git a/target/linux/ipq40xx/base-files/etc/board.d/03_gpio_switches b/target/linux/ipq40xx/base-files/etc/board.d/03_gpio_switches index 5d39d37c08..a52a33d2f4 100644 --- a/target/linux/ipq40xx/base-files/etc/board.d/03_gpio_switches +++ b/target/linux/ipq40xx/base-files/etc/board.d/03_gpio_switches @@ -24,6 +24,9 @@ mikrotik,cap-ac) mikrotik,hap-ac3) ucidef_add_gpio_switch "poe_passtrough" "PoE Passthrough" "452" "0" ;; +zte,mf286d) + ucidef_add_gpio_switch "power_btn_block" "Power button blocker" "421" "0" + ;; esac board_config_flush diff --git a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh index d0e9b5b020..e8c94409a7 100644 --- a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh @@ -25,6 +25,29 @@ Once this is done. Retry. EOF return 1 ;; + zte,mf286d) + CI_UBIPART="rootfs" + local mtdnum="$( find_mtd_index $CI_UBIPART )" + [ ! "$mtdnum" ] && return 1 + ubiattach -m "$mtdnum" || true + local ubidev="$( nand_find_ubi $CI_UBIPART )" + local ubi_rootfs=$(nand_find_volume $ubidev ubi_rootfs) + local ubi_rootfs_data=$(nand_find_volume $ubidev ubi_rootfs_data) + + [ -n "$ubi_rootfs" ] || [ -n "$ubi_rootfs_data" ] || return 0 + + cat << EOF +ubi_rootfs partition is still present. + +You need to delete the stock partition first: +# ubirmvol /dev/ubi0 -N ubi_rootfs +Please also delete ubi_rootfs_data, if exist: +# ubirmvol /dev/ubi0 -N ubi_rootfs_data + +Once this is done. Retry. +EOF + return 1 + ;; esac return 0; } @@ -161,7 +184,8 @@ platform_do_upgrade() { PART_NAME="inactive" platform_do_upgrade_dualboot_datachk "$1" ;; - teltonika,rutx10) + teltonika,rutx10 |\ + zte,mf286d) CI_UBIPART="rootfs" nand_do_upgrade "$1" ;; |