|
@@ -0,0 +1,74 @@
|
|
|
+--- a/target/linux/rockchip/image/armv8.mk
|
|
|
++++ b/target/linux/rockchip/image/armv8.mk
|
|
|
+@@ -52,4 +52,13 @@
|
|
|
+ TARGET_DEVICES += friendlyarm_nanopi-r2s
|
|
|
+
|
|
|
++define Device/friendlyarm_nanopi-r5s
|
|
|
++ DEVICE_VENDOR := FriendlyARM
|
|
|
++ DEVICE_MODEL := NanoPi R5S
|
|
|
++ SOC := rk3328
|
|
|
++ DEVICE_PACKAGES := kmod-r8125 luci-app-emmc-tools
|
|
|
++ DEVICE_DTS = rockchip/rk3328-nanopi-r2s
|
|
|
++endef
|
|
|
++TARGET_DEVICES += friendlyarm_nanopi-r5s
|
|
|
++
|
|
|
+ define Device/friendlyarm_nanopi-r4s
|
|
|
+ DEVICE_VENDOR := FriendlyARM
|
|
|
+
|
|
|
+--- a/target/linux/rockchip/armv8/base-files/etc/board.d/02_network
|
|
|
++++ b/target/linux/rockchip/armv8/base-files/etc/board.d/02_network
|
|
|
+@@ -18,6 +18,9 @@ rockchip_setup_interfaces()
|
|
|
+ xunlong,orangepi-r1-plus-lts)
|
|
|
+ ucidef_set_interfaces_lan_wan 'eth1' 'eth0'
|
|
|
+ ;;
|
|
|
++ friendlyelec,nanopi-r5s)
|
|
|
++ ucidef_set_interfaces_lan_wan 'eth1 eth2' 'eth0'
|
|
|
++ ;;
|
|
|
+ *)
|
|
|
+ ucidef_set_interface_lan 'eth0'
|
|
|
+ ;;
|
|
|
+@@ -60,6 +63,10 @@ rockchip_setup_macs()
|
|
|
+ lan_mac=$(cat /sys/class/net/eth1/address)
|
|
|
+ wan_mac=$(macaddr_add "$lan_mac" -1)
|
|
|
+ ;;
|
|
|
++ friendlyelec,nanopi-r5s)
|
|
|
++ wan_mac=$(nanopi_r2s_generate_mac mmcblk2)
|
|
|
++ lan_mac=$(macaddr_add "$wan_mac" 1)
|
|
|
++ ;;
|
|
|
+ esac
|
|
|
+
|
|
|
+ [ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
|
|
|
+
|
|
|
+--- a/target/linux/rockchip/armv8/base-files/etc/board.d/01_leds
|
|
|
++++ a/target/linux/rockchip/armv8/base-files/etc/board.d/01_leds
|
|
|
+@@ -24,4 +24,9 @@
|
|
|
+ ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth1"
|
|
|
+ ;;
|
|
|
++friendlyelec,nanopi-r5s)
|
|
|
++ ucidef_set_led_netdev "wan" "WAN" "wan_led" "eth0" "link"
|
|
|
++ ucidef_set_led_netdev "lan1" "LAN1" "lan1_led" "eth1" "link"
|
|
|
++ ucidef_set_led_netdev "lan2" "LAN2" "lan2_led" "eth2" "link"
|
|
|
++ ;;
|
|
|
+ esac
|
|
|
+
|
|
|
+
|
|
|
+--- a/target/linux/rockchip/armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity
|
|
|
++++ a/target/linux/rockchip/armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity
|
|
|
+@@ -43,4 +43,16 @@
|
|
|
+ set_interface_core 20 "eth1"
|
|
|
+ ;;
|
|
|
++friendlyelec,nanopi-r5s)
|
|
|
++ set_interface_core 8 "eth0"
|
|
|
++ echo f > /sys/class/net/eth0/queues/rx-0/rps_cpus
|
|
|
++ set_interface_core 4 "eth1-0"
|
|
|
++ set_interface_core 4 "eth1-16"
|
|
|
++ set_interface_core 4 "eth1-18"
|
|
|
++ echo b > /sys/class/net/eth1/queues/rx-0/rps_cpus
|
|
|
++ set_interface_core 2 "eth2-0"
|
|
|
++ set_interface_core 2 "eth2-16"
|
|
|
++ set_interface_core 2 "eth2-18"
|
|
|
++ echo d > /sys/class/net/eth2/queues/rx-0/rps_cpus
|
|
|
++ ;;
|
|
|
+ esac
|
|
|
+
|
|
|
+
|