Initial commit
This commit is contained in:
47
target/linux/ipq40xx/base-files/etc/board.d/01_leds
Executable file
47
target/linux/ipq40xx/base-files/etc/board.d/01_leds
Executable file
@@ -0,0 +1,47 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2015 OpenWrt.org
|
||||
#
|
||||
|
||||
. /lib/functions/uci-defaults.sh
|
||||
|
||||
board_config_update
|
||||
|
||||
board=$(board_name)
|
||||
boardname="${board##*,}"
|
||||
|
||||
case "$board" in
|
||||
asus,rt-ac58u)
|
||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:blue:wlan2G" "phy0tpt"
|
||||
ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:blue:wlan5G" "phy1tpt"
|
||||
ucidef_set_led_usbport "usb" "USB" "${boardname}:blue:usb" "usb1-port1" "usb2-port1" "usb3-port1" "usb4-port1"
|
||||
ucidef_set_led_netdev "wan" "WAN" "${boardname}:blue:wan" "eth1"
|
||||
ucidef_set_led_switch "lan" "LAN" "${boardname}:blue:lan" "switch0" "0x1e"
|
||||
;;
|
||||
avm,fritzbox-4040)
|
||||
ucidef_set_led_wlan "wlan" "WLAN" "fritz4040:green:wlan" "phy0tpt" "phy1tpt"
|
||||
ucidef_set_led_netdev "wan" "WAN" "fritz4040:green:wan" "eth1"
|
||||
ucidef_set_led_switch "lan" "LAN" "fritz4040:green:lan" "switch0" "0x1e"
|
||||
;;
|
||||
glinet,gl-b1300)
|
||||
ucidef_set_led_wlan "wlan" "WLAN" "${boardname}:green:wlan" "phy0tpt"
|
||||
;;
|
||||
netgear,ex6100v2 |\
|
||||
netgear,ex6150v2)
|
||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "ex61x0v2:green:router" "phy0tpt"
|
||||
ucidef_set_led_wlan "wlan5g" "WLAN5G" "ex61x0v2:green:client" "phy1tpt"
|
||||
;;
|
||||
meraki,mr33)
|
||||
ucidef_set_interface_lan "eth0"
|
||||
;;
|
||||
zyxel,wre6606)
|
||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:green:wlan2g" "phy0tpt"
|
||||
ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:green:wlan5g" "phy1tpt"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
board_config_flush
|
||||
|
||||
exit 0
|
||||
58
target/linux/ipq40xx/base-files/etc/board.d/02_network
Executable file
58
target/linux/ipq40xx/base-files/etc/board.d/02_network
Executable file
@@ -0,0 +1,58 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2015 The Linux Foundation. All rights reserved.
|
||||
# Copyright (c) 2011-2015 OpenWrt.org
|
||||
#
|
||||
|
||||
. /lib/functions/uci-defaults.sh
|
||||
. /lib/functions/system.sh
|
||||
|
||||
board_config_update
|
||||
|
||||
board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
8dev,jalapeno)
|
||||
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
||||
;;
|
||||
asus,rt-ac58u)
|
||||
CI_UBIPART=UBI_DEV
|
||||
wan_mac_addr=$(mtd_get_mac_binary_ubi Factory 20486)
|
||||
lan_mac_addr=$(mtd_get_mac_binary_ubi Factory 4102)
|
||||
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
||||
ucidef_add_switch "switch0" \
|
||||
"0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
|
||||
ucidef_set_interface_macaddr "lan" "$lan_mac_addr"
|
||||
ucidef_set_interface_macaddr "wan" "$wan_mac_addr"
|
||||
;;
|
||||
avm,fritzbox-4040)
|
||||
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
||||
ucidef_add_switch "switch0" \
|
||||
"0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
|
||||
;;
|
||||
compex,wpj428)
|
||||
ucidef_set_interface_lan "eth0 eth1"
|
||||
;;
|
||||
glinet,gl-b1300)
|
||||
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
||||
ucidef_add_switch "switch0" \
|
||||
"0u@eth0" "3:lan" "4:lan"
|
||||
;;
|
||||
openmesh,a42 |\
|
||||
openmesh,a62)
|
||||
ucidef_set_interfaces_lan_wan "eth1" "eth0"
|
||||
;;
|
||||
meraki,mr33 |\
|
||||
netgear,ex6100v2 |\
|
||||
netgear,ex6150v2 |\
|
||||
zyxel,wre6606)
|
||||
ucidef_set_interface_lan "eth0"
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported hardware. Network interfaces not intialized"
|
||||
;;
|
||||
esac
|
||||
|
||||
board_config_flush
|
||||
|
||||
exit 0
|
||||
17
target/linux/ipq40xx/base-files/etc/board.d/03_gpio_switches
Executable file
17
target/linux/ipq40xx/base-files/etc/board.d/03_gpio_switches
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions/uci-defaults.sh
|
||||
|
||||
board_config_update
|
||||
|
||||
board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
compex,wpj428)
|
||||
ucidef_add_gpio_switch "sim_card_select" "SIM card select" "3" "0"
|
||||
;;
|
||||
esac
|
||||
|
||||
board_config_flush
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user