Initial commit
This commit is contained in:
17
target/linux/mediatek/mt7622/base-files/etc/board.d/01_leds
Normal file
17
target/linux/mediatek/mt7622/base-files/etc/board.d/01_leds
Normal file
@@ -0,0 +1,17 @@
|
||||
. /lib/functions/leds.sh
|
||||
. /lib/functions/uci-defaults.sh
|
||||
|
||||
board=$(board_name)
|
||||
|
||||
board_config_update
|
||||
|
||||
case $board in
|
||||
linksys,e8450|\
|
||||
linksys,e8450-ubi)
|
||||
ucidef_set_led_netdev "wan" "WAN" "inet:blue" "wan"
|
||||
;;
|
||||
esac
|
||||
|
||||
board_config_flush
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,37 @@
|
||||
|
||||
. /lib/functions.sh
|
||||
. /lib/functions/uci-defaults.sh
|
||||
. /lib/functions/system.sh
|
||||
|
||||
mediatek_setup_interfaces()
|
||||
{
|
||||
local board="$1"
|
||||
|
||||
case $board in
|
||||
bananapi,bpi-r64|\
|
||||
linksys,e8450|\
|
||||
linksys,e8450-ubi|\
|
||||
mediatek,mt7622-rfb1)
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" wan
|
||||
;;
|
||||
buffalo,wsr-2533dhp2)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0"
|
||||
;;
|
||||
ubnt,unifi-6-lr|\
|
||||
ubnt,unifi-6-lr-ubootmod)
|
||||
ucidef_set_interfaces_lan "eth0"
|
||||
;;
|
||||
*)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6u@eth0" "5u@eth1"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
board_config_update
|
||||
board=$(board_name)
|
||||
mediatek_setup_interfaces $board
|
||||
board_config_flush
|
||||
|
||||
exit 0
|
||||
11
target/linux/mediatek/mt7622/base-files/etc/init.d/bootcount
Executable file
11
target/linux/mediatek/mt7622/base-files/etc/init.d/bootcount
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=99
|
||||
|
||||
boot() {
|
||||
case $(board_name) in
|
||||
linksys,e8450)
|
||||
mtd erase senv || true
|
||||
;;
|
||||
esac
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
. /lib/functions.sh
|
||||
|
||||
kernel_size=$(sed -n 's/mtd[0-9]*: \([0-9a-f]*\).*"\(kernel\|linux\)".*/\1/p' /proc/mtd)
|
||||
|
||||
case "$(board_name)" in
|
||||
buffalo,wsr-2533dhp2)
|
||||
mtd -M 0x44485032 ${kernel_size:+-c 0x$kernel_size} fixtrx firmware && exit 0
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user