Initial commit
This commit is contained in:
28
target/linux/mediatek/base-files/etc/board.d/02_network
Executable file
28
target/linux/mediatek/base-files/etc/board.d/02_network
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
. /lib/functions/uci-defaults.sh
|
||||
. /lib/functions/system.sh
|
||||
|
||||
mediatek_setup_interfaces()
|
||||
{
|
||||
local board="$1"
|
||||
|
||||
case $board in
|
||||
'mediatek,mt7623a-rfb-emmc')
|
||||
ucidef_set_interface_lan "lan0 lan1 lan2 lan3"
|
||||
ucidef_set_interface_wan eth1
|
||||
;;
|
||||
'bananapi,bpi-r2')
|
||||
ucidef_set_interface_lan "lan0 lan1 lan2 lan3"
|
||||
ucidef_set_interface_wan wan
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
board_config_update
|
||||
board=$(board_name)
|
||||
mediatek_setup_interfaces $board
|
||||
board_config_flush
|
||||
|
||||
exit 0
|
||||
3
target/linux/mediatek/base-files/etc/inittab
Normal file
3
target/linux/mediatek/base-files/etc/inittab
Normal file
@@ -0,0 +1,3 @@
|
||||
::sysinit:/etc/init.d/rcS S boot
|
||||
::shutdown:/etc/init.d/rcS K shutdown
|
||||
::askconsole:/usr/libexec/login.sh
|
||||
16
target/linux/mediatek/base-files/etc/uci-defaults/99-net-ps
Executable file
16
target/linux/mediatek/base-files/etc/uci-defaults/99-net-ps
Executable file
@@ -0,0 +1,16 @@
|
||||
uci set network.globals.default_rps_val=14
|
||||
uci set network.globals.default_rps_flow_cnt=256
|
||||
uci set network.globals.default_xps_val=14
|
||||
uci set network.globals.default_ps=1
|
||||
uci set network.eth0=device
|
||||
uci set network.eth0.name=eth0
|
||||
uci set network.lan0=device
|
||||
uci set network.lan0.name=lan0
|
||||
uci set network.lan1=device
|
||||
uci set network.lan1.name=lan1
|
||||
uci set network.lan2=device
|
||||
uci set network.lan2.name=lan2
|
||||
uci set network.lan3=device
|
||||
uci set network.lan3.name=lan3
|
||||
uci commit
|
||||
exit 0
|
||||
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
set_preinit_iface() {
|
||||
ifconfig eth0 up
|
||||
ifname=lan1
|
||||
}
|
||||
|
||||
boot_hook_add preinit_main set_preinit_iface
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
set_rps_sock_flow() {
|
||||
echo 1024 > /proc/sys/net/core/rps_sock_flow_entries
|
||||
}
|
||||
|
||||
boot_hook_add preinit_main set_rps_sock_flow
|
||||
|
||||
29
target/linux/mediatek/base-files/lib/upgrade/platform.sh
Executable file
29
target/linux/mediatek/base-files/lib/upgrade/platform.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
platform_do_upgrade() {
|
||||
default_do_upgrade "$ARGV"
|
||||
}
|
||||
|
||||
PART_NAME=firmware
|
||||
|
||||
platform_check_image() {
|
||||
local board=$(board_name)
|
||||
local magic="$(get_magic_long "$1")"
|
||||
|
||||
[ "$#" -gt 1 ] && return 1
|
||||
|
||||
case "$board" in
|
||||
bananapi,bpi-r2)
|
||||
[ "$magic" != "27051956" ] && {
|
||||
echo "Invalid image type."
|
||||
return 1
|
||||
}
|
||||
return 0
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Sysupgrade is not supported on your board yet."
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
|
||||
return 0
|
||||
}
|
||||
Reference in New Issue
Block a user