mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-03-09 15:40:20 +00:00
Add base files for BPI-R2
This commit is contained in:
parent
b2caee7b64
commit
1b9de2ad9e
4 changed files with 256 additions and 0 deletions
36
root/target/linux/mediatek/mt7623/base-files/etc/board.d/02_network
Executable file
36
root/target/linux/mediatek/mt7623/base-files/etc/board.d/02_network
Executable file
|
@ -0,0 +1,36 @@
|
|||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
. /lib/functions/uci-defaults.sh
|
||||
. /lib/functions/system.sh
|
||||
|
||||
mediatek_setup_interfaces()
|
||||
{
|
||||
local board="$1"
|
||||
|
||||
case $board in
|
||||
bananapi,bpi-r2|\
|
||||
unielec,u7623-02-emmc-512m)
|
||||
ucidef_set_interfaces_lan_wan "wan1 wan2 wan3 wan4" "lan"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
mediatek_setup_macs()
|
||||
{
|
||||
local board="$1"
|
||||
|
||||
case $board in
|
||||
unielec,u7623-02-emmc-512m)
|
||||
ucidef_set_interface_macaddr "wan" "$(cat /sys/class/net/wan/address)"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
board_config_update
|
||||
board=$(board_name)
|
||||
mediatek_setup_interfaces $board
|
||||
mediatek_setup_macs $board
|
||||
board_config_flush
|
||||
|
||||
exit 0
|
Loading…
Add table
Add a link
Reference in a new issue