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:
14
target/linux/mediatek/base-files/etc/hotplug.d/iface/99-mtk-lro
Executable file
14
target/linux/mediatek/base-files/etc/hotplug.d/iface/99-mtk-lro
Executable file
@@ -0,0 +1,14 @@
|
||||
[ ifup = "$ACTION" ] && {
|
||||
[ -n "$DEVICE" ] && {
|
||||
if [ "$INTERFACE" == "lan" ]; then
|
||||
if [ -f /usr/sbin/ethtool ]; then
|
||||
ifname=eth0
|
||||
lan_ip=`uci -q get network.lan.ipaddr`
|
||||
ethdrv=`ethtool -i $ifname | grep mtk_soc_eth`
|
||||
[ -n "$ethdrv" ] && {
|
||||
ethtool -N $ifname flow-type tcp4 dst-ip $lan_ip loc 0
|
||||
}
|
||||
fi
|
||||
fi
|
||||
}
|
||||
}
|
||||
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
|
||||
@@ -0,0 +1,23 @@
|
||||
[ ! -e /etc/fw_env.config ] && exit 0
|
||||
|
||||
. /lib/functions/system.sh
|
||||
|
||||
case "$(board_name)" in
|
||||
bananapi,bpi-r2|\
|
||||
bananapi,bpi-r64|\
|
||||
unielec,u7623-02)
|
||||
[ -z "$(fw_printenv -n ethaddr 2>/dev/null)" ] &&
|
||||
fw_setenv ethaddr "$(cat /sys/class/net/eth0/address)"
|
||||
;;
|
||||
bananapi,bpi-r3|\
|
||||
bananapi,bpi-r3-mini|\
|
||||
bananapi,bpi-r4|\
|
||||
bananapi,bpi-r4-poe)
|
||||
[ -z "$(fw_printenv -n ethaddr 2>/dev/null)" ] &&
|
||||
fw_setenv ethaddr "$(cat /sys/class/net/eth0/address)"
|
||||
[ -z "$(fw_printenv -n eth1addr 2>/dev/null)" ] &&
|
||||
fw_setenv eth1addr "$(macaddr_add $(cat /sys/class/net/eth0/address) 1)"
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,37 @@
|
||||
set_preinit_iface() {
|
||||
case $(board_name) in
|
||||
cudy,m3000-v1|\
|
||||
cudy,tr3000-v1|\
|
||||
glinet,gl-mt3000)
|
||||
ip link set eth1 up
|
||||
ifname=eth1
|
||||
;;
|
||||
cudy,re3000-v1|\
|
||||
ubnt,unifi-6-lr|\
|
||||
zyxel,nwa50ax-pro)
|
||||
ip link set eth0 up
|
||||
ifname=eth0
|
||||
;;
|
||||
smartrg,sdg-8622|\
|
||||
smartrg,sdg-8632)
|
||||
ip link set lan up
|
||||
ifname=lan
|
||||
;;
|
||||
xiaomi,mi-router-ax3000t|\
|
||||
xiaomi,mi-router-ax3000t-ubootmod|\
|
||||
xiaomi,mi-router-wr30u-stock|\
|
||||
xiaomi,mi-router-wr30u-ubootmod|\
|
||||
xiaomi,redmi-router-ax6000-stock|\
|
||||
xiaomi,redmi-router-ax6000-ubootmod)
|
||||
ip link set eth0 up
|
||||
ifname=lan4
|
||||
;;
|
||||
*)
|
||||
ip link set eth0 up
|
||||
ifname=lan1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
boot_hook_add preinit_main set_preinit_iface
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
set_rps_sock_flow() {
|
||||
echo 1024 > /proc/sys/net/core/rps_sock_flow_entries
|
||||
}
|
||||
|
||||
boot_hook_add preinit_main set_rps_sock_flow
|
||||
|
||||
Reference in New Issue
Block a user