diff options
Diffstat (limited to 'target/linux/mediatek/mt7622/base-files')
4 files changed, 47 insertions, 3 deletions
diff --git a/target/linux/mediatek/mt7622/base-files/etc/board.d/01_leds b/target/linux/mediatek/mt7622/base-files/etc/board.d/01_leds new file mode 100755 index 0000000000..e74944a65f --- /dev/null +++ b/target/linux/mediatek/mt7622/base-files/etc/board.d/01_leds @@ -0,0 +1,18 @@ +#!/bin/sh + +. /lib/functions/leds.sh +. /lib/functions/uci-defaults.sh + +board=$(board_name) + +board_config_update + +case $board in +linksys,e8450) + ucidef_set_led_netdev "wan" "WAN" "inet:blue" "wan" + ;; +esac + +board_config_flush + +exit 0 diff --git a/target/linux/mediatek/mt7622/base-files/etc/board.d/02_network b/target/linux/mediatek/mt7622/base-files/etc/board.d/02_network index 3a409c8ec9..3d2b9ffe49 100755 --- a/target/linux/mediatek/mt7622/base-files/etc/board.d/02_network +++ b/target/linux/mediatek/mt7622/base-files/etc/board.d/02_network @@ -10,9 +10,8 @@ mediatek_setup_interfaces() case $board in bananapi,bpi-r64-rootdisk|\ - bananapi,bpi-r64) - ucidef_set_interfaces_lan_wan "lan0 lan1 lan2 lan3" wan - ;; + bananapi,bpi-r64|\ + linksys,e8450|\ mediatek,mt7622-rfb1) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" wan ;; @@ -31,7 +30,15 @@ mediatek_setup_macs() local board="$1" case $board in + linksys,e8450) + wan_mac=$(mtd_get_mac_ascii devinfo wan_mac_addr) + lan_mac=$(mtd_get_mac_ascii devinfo lan_mac_addr) + label_mac=$wan_mac + ;; esac + [ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac + [ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac + [ -n "$label_mac" ] && ucidef_set_label_macaddr $label_mac } board_config_update diff --git a/target/linux/mediatek/mt7622/base-files/etc/init.d/bootcount b/target/linux/mediatek/mt7622/base-files/etc/init.d/bootcount new file mode 100755 index 0000000000..bc4eeb6530 --- /dev/null +++ b/target/linux/mediatek/mt7622/base-files/etc/init.d/bootcount @@ -0,0 +1,11 @@ +#!/bin/sh /etc/rc.common + +START=99 + +boot() { + case $(board_name) in + linksys,e8450) + mtd erase senv || true + ;; + esac +} diff --git a/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh index 8144476943..95ac8b5657 100755 --- a/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh +++ b/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh @@ -10,6 +10,14 @@ platform_do_upgrade() { mediatek,mt7622,ubi) nand_do_upgrade "$1" ;; + linksys,e8450) + if grep -q mtdparts=slave /proc/cmdline; then + PART_NAME=firmware2 + else + PART_NAME=firmware1 + fi + default_do_upgrade "$1" + ;; *) default_do_upgrade "$1" ;; |