Initial commit
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
This commit is contained in:
15
target/linux/bcm53xx/base-files/etc/board.d/01_leds
Normal file
15
target/linux/bcm53xx/base-files/etc/board.d/01_leds
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
. /lib/functions/uci-defaults.sh
|
||||
|
||||
board_config_update
|
||||
|
||||
case "$(board_name)" in
|
||||
netgear,r8000)
|
||||
ucidef_set_led_usbport "usb2" "USB 2.0" "bcm53xx:white:usb2" "usb1-port2" "usb2-port2"
|
||||
ucidef_set_led_usbport "usb3" "USB 3.0" "bcm53xx:white:usb3" "usb1-port1" "usb2-port1" "usb4-port1"
|
||||
;;
|
||||
esac
|
||||
|
||||
board_config_flush
|
||||
|
||||
exit 0
|
||||
89
target/linux/bcm53xx/base-files/etc/board.d/02_network
Normal file
89
target/linux/bcm53xx/base-files/etc/board.d/02_network
Normal file
@@ -0,0 +1,89 @@
|
||||
#
|
||||
# Copyright (C) 2011 OpenWrt.org
|
||||
#
|
||||
|
||||
. /lib/functions/system.sh
|
||||
. /lib/functions/uci-defaults.sh
|
||||
|
||||
bcm53xx_setup_interfaces()
|
||||
{
|
||||
local board="$1"
|
||||
|
||||
case "$board" in
|
||||
asus,rt-ac87u)
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan"
|
||||
;;
|
||||
asus,rt-ac88u)
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 extsw" "wan"
|
||||
;;
|
||||
dlink,dwl-8610ap)
|
||||
ucidef_set_interface_lan "eth0 eth1" "dhcp"
|
||||
;;
|
||||
linksys,panamera)
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5 lan6 lan7 lan8 extsw" "wan"
|
||||
;;
|
||||
luxul,xap-1610-v1)
|
||||
ucidef_set_interface_lan "poe lan" "dhcp"
|
||||
;;
|
||||
meraki,mr26 | \
|
||||
meraki,mr32)
|
||||
ucidef_set_interface_lan "poe" "dhcp"
|
||||
;;
|
||||
phicomm,k3)
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan"
|
||||
;;
|
||||
*)
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
bcm53xx_setup_macs()
|
||||
{
|
||||
local board="$1"
|
||||
|
||||
wan_macaddr="$(nvram get wan_hwaddr)"
|
||||
|
||||
case "$board" in
|
||||
asus,rt-ac87u)
|
||||
etXmacaddr=$(nvram get et1macaddr)
|
||||
offset=1
|
||||
;;
|
||||
dlink,dir-885l | \
|
||||
linksys,ea9200 | \
|
||||
linksys,panamera | \
|
||||
netgear,r7900 | \
|
||||
netgear,r8000 | \
|
||||
netgear,r8500)
|
||||
etXmacaddr=$(nvram get et2macaddr)
|
||||
offset=1
|
||||
;;
|
||||
luxul,xwr-3100-v1 | \
|
||||
luxul,xwr-3150-v1)
|
||||
etXmacaddr=$(nvram get et0macaddr)
|
||||
offset=5
|
||||
;;
|
||||
meraki,mr26)
|
||||
label_mac="$(mtd_get_mac_binary_ubi board-config 0x66)"
|
||||
ucidef_set_interface_macaddr "lan" "$label_mac"
|
||||
ucidef_set_label_macaddr "$label_mac"
|
||||
;;
|
||||
*)
|
||||
etXmacaddr=$(nvram get et0macaddr)
|
||||
offset=1
|
||||
;;
|
||||
esac
|
||||
|
||||
# If WAN MAC isn't explicitly set, calculate it using base MAC as reference.
|
||||
[ -z "$wan_macaddr" -a -n "$etXmacaddr" ] && wan_macaddr=$(macaddr_add "$etXmacaddr" $offset)
|
||||
|
||||
[ -n "$wan_macaddr" ] && ucidef_set_interface_macaddr "wan" "$wan_macaddr"
|
||||
}
|
||||
|
||||
board_config_update
|
||||
board=$(board_name)
|
||||
bcm53xx_setup_interfaces "$board"
|
||||
bcm53xx_setup_macs "$board"
|
||||
board_config_flush
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user