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:
35
target/linux/rockchip/armv8/base-files/etc/board.d/01_leds
Normal file
35
target/linux/rockchip/armv8/base-files/etc/board.d/01_leds
Normal file
@@ -0,0 +1,35 @@
|
||||
|
||||
. /lib/functions/leds.sh
|
||||
. /lib/functions/uci-defaults.sh
|
||||
|
||||
board=$(board_name)
|
||||
boardname="${board##*,}"
|
||||
|
||||
board_config_update
|
||||
|
||||
case $board in
|
||||
friendlyarm,nanopi-r2c|\
|
||||
friendlyarm,nanopi-r2c-plus|\
|
||||
friendlyarm,nanopi-r2s|\
|
||||
friendlyarm,nanopi-r4s|\
|
||||
friendlyarm,nanopi-r4s-enterprise|\
|
||||
xunlong,orangepi-r1-plus|\
|
||||
xunlong,orangepi-r1-plus-lts)
|
||||
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth0"
|
||||
ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth1"
|
||||
;;
|
||||
friendlyarm,nanopi-r5c)
|
||||
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1"
|
||||
ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0"
|
||||
ucidef_set_led_netdev "wlan" "WLAN" "green:wlan" "phy0-ap0"
|
||||
;;
|
||||
friendlyarm,nanopi-r5s)
|
||||
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth0"
|
||||
ucidef_set_led_netdev "lan1" "LAN1" "green:lan-1" "eth1"
|
||||
ucidef_set_led_netdev "lan2" "LAN2" "green:lan-2" "eth2"
|
||||
;;
|
||||
esac
|
||||
|
||||
board_config_flush
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,80 @@
|
||||
|
||||
. /lib/functions/uci-defaults.sh
|
||||
. /lib/functions/system.sh
|
||||
|
||||
rockchip_setup_interfaces()
|
||||
{
|
||||
local board="$1"
|
||||
|
||||
case "$board" in
|
||||
friendlyarm,nanopi-r2c|\
|
||||
friendlyarm,nanopi-r2c-plus|\
|
||||
friendlyarm,nanopi-r2s|\
|
||||
friendlyarm,nanopi-r4s|\
|
||||
friendlyarm,nanopi-r4s-enterprise|\
|
||||
xunlong,orangepi-r1-plus|\
|
||||
xunlong,orangepi-r1-plus-lts)
|
||||
ucidef_set_interfaces_lan_wan 'eth1' 'eth0'
|
||||
;;
|
||||
friendlyarm,nanopi-r5c|\
|
||||
radxa,e25)
|
||||
ucidef_set_interfaces_lan_wan 'eth0' 'eth1'
|
||||
;;
|
||||
friendlyarm,nanopi-r5s)
|
||||
ucidef_set_interfaces_lan_wan 'eth1 eth2' 'eth0'
|
||||
;;
|
||||
sinovoip,rk3568-bpi-r2pro)
|
||||
ucidef_set_interfaces_lan_wan 'lan0 lan1 lan2 lan3' 'eth0'
|
||||
;;
|
||||
*)
|
||||
ucidef_set_interface_lan 'eth0'
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
rockchip_setup_macs()
|
||||
{
|
||||
local board="$1"
|
||||
local lan_mac=""
|
||||
local wan_mac=""
|
||||
local label_mac=""
|
||||
|
||||
case "$board" in
|
||||
friendlyarm,nanopi-r2c|\
|
||||
friendlyarm,nanopi-r2s)
|
||||
wan_mac=$(macaddr_generate_from_mmc_cid mmcblk0)
|
||||
lan_mac=$(macaddr_add "$wan_mac" 1)
|
||||
;;
|
||||
friendlyarm,nanopi-r2c-plus|\
|
||||
friendlyarm,nanopi-r4s|\
|
||||
friendlyarm,nanopi-r5s|\
|
||||
sinovoip,rk3568-bpi-r2pro)
|
||||
wan_mac=$(macaddr_generate_from_mmc_cid mmcblk1)
|
||||
lan_mac=$(macaddr_add "$wan_mac" 1)
|
||||
;;
|
||||
friendlyarm,nanopi-r4s-enterprise)
|
||||
wan_mac=$(get_mac_binary "/sys/bus/i2c/devices/2-0051/eeprom" 0xfa)
|
||||
lan_mac=$(macaddr_setbit_la "$wan_mac")
|
||||
;;
|
||||
friendlyarm,nanopi-r5c)
|
||||
wan_mac=$(macaddr_generate_from_mmc_cid mmcblk*)
|
||||
lan_mac=$(macaddr_add "$wan_mac" 1)
|
||||
;;
|
||||
xunlong,orangepi-r1-plus|\
|
||||
xunlong,orangepi-r1-plus-lts)
|
||||
wan_mac=$(macaddr_add "$(cat /sys/class/net/eth1/address)" -1)
|
||||
;;
|
||||
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
|
||||
board=$(board_name)
|
||||
rockchip_setup_interfaces $board
|
||||
rockchip_setup_macs $board
|
||||
board_config_flush
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user