Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
kiddin9 committed Jan 19, 2024
1 parent 9028614 commit 382134b
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 61 deletions.
2 changes: 2 additions & 0 deletions devices/meson_meson8b/.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ CONFIG_TARGET_ROOTFS_EXT4FS=y

CONFIG_PACKAGE_perf=n

CONFIG_PACKAGE_kmod-rtl8821cu=m
CONFIG_PACKAGE_kmod-rtl88x2bu=m
1 change: 0 additions & 1 deletion devices/rockchip_armv8/.config
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ CONFIG_KERNEL_XDP_SOCKETS=y

CONFIG_TARGET_DEVICE_rockchip_armv8_DEVICE_radxa_rock-pi-4=n
CONFIG_TARGET_DEVICE_rockchip_armv8_DEVICE_pine64_rockpro64=n
CONFIG_TARGET_DEVICE_rockchip_armv8_DEVICE_panther_x2=n

CONFIG_PACKAGE_kmod-rtl88x2bu=m
CONFIG_PACKAGE_kmod-pcie_mhi=m
Expand Down
6 changes: 3 additions & 3 deletions devices/rockchip_armv8/patches/99-r2c-plus.patch
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
+ BUILD_SUBTARGET:=armv8
+ NAME:=NanoPi R2C Plus
+ BUILD_DEVICES:= \
+ friendlyarm_nanopi-plus-r2c
+ DEPENDS:=+PACKAGE_u-boot-nanopi-r2c-rk3328:arm-trusted-firmware-rk3328
+ friendlyarm_nanopi-r2c-plus
+ DEPENDS:=+PACKAGE_u-boot-nanopi-r2c-plus-rk3328:arm-trusted-firmware-rk3328
+ PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip-vendor
+ ATF:=rk322xh_bl31_v1.49.elf
+ USE_RKBIN:=1
Expand All @@ -72,7 +72,7 @@
dilusense-dlfr100-rk3399 \
xiaobao-nas-v1-rk3399 \
nanopi-r2c-rk3328 \
+ nanopi-r2c-plus-rk3328 \
+ nanopi-r2c-plus-rk3328 \
nanopi-r2s-rk3328 \
orangepi-r1-plus-rk3328 \
orangepi-r1-plus-lts-rk3328
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,35 @@
--- a/target/linux/rockchip/image/armv8.mk
+++ b/target/linux/rockchip/image/armv8.mk
@@ -52,4 +52,31 @@
TARGET_DEVICES += friendlyarm_nanopi-r2s
@@ -162,6 +162,42 @@
endef
TARGET_DEVICES += friendlyarm_nanopi-r5s

+define Device/friendlyarm_nanopi-r6c
+define Device/friendlyarm_nanopi-m4
+ DEVICE_VENDOR := FriendlyARM
+ DEVICE_MODEL := NanoPi R6C
+ DEVICE_MODEL := NanoPi M4
+ SOC := rk3328
+ DEVICE_PACKAGES := -luci-app-gpsysupgrade
+ DEVICE_DTS = rockchip/rk3328-nanopi-r2s
+endef
+TARGET_DEVICES += friendlyarm_nanopi-r6c
+TARGET_DEVICES += friendlyarm_nanopi-m4
+
+define Device/friendlyarm_nanopi-r6s
+define Device/friendlyarm_nanopi-neo4
+ DEVICE_VENDOR := FriendlyARM
+ DEVICE_MODEL := NanoPi R6S
+ DEVICE_MODEL := NanoPi NEO4
+ SOC := rk3328
+ DEVICE_PACKAGES := -luci-app-gpsysupgrade
+ DEVICE_DTS = rockchip/rk3328-nanopi-r2s
+endef
+TARGET_DEVICES += friendlyarm_nanopi-r6s
+TARGET_DEVICES += friendlyarm_nanopi-neo4
+
+define Device/friendlyarm_nanopc-t4
+ DEVICE_VENDOR := FriendlyARM
+ DEVICE_MODEL := NanoPC T4
+ SOC := rk3328
+ DEVICE_PACKAGES := -luci-app-gpsysupgrade
+ DEVICE_DTS = rockchip/rk3328-nanopi-r2s
+endef
+TARGET_DEVICES += friendlyarm_nanopc-t4
+
+define Device/friendlyarm_nanopc-t6
+ DEVICE_VENDOR := FriendlyARM
Expand All @@ -30,31 +40,58 @@
+endef
+TARGET_DEVICES += friendlyarm_nanopc-t6
+
define Device/friendlyarm_nanopi-r4s
DEVICE_VENDOR := FriendlyARM
define Device/firefly_station-p2
DEVICE_VENDOR := Firefly
DEVICE_MODEL := Station P2

--- a/target/linux/rockchip/armv8/base-files/etc/board.d/02_network
+++ b/target/linux/rockchip/armv8/base-files/etc/board.d/02_network
@@ -21,9 +21,14 @@ rockchip_setup_interfaces()
@@ -23,8 +23,15 @@
sharevdi,h3399pc|\
sharevdi,guangmiao-g4c|\
xunlong,orangepi-r1-plus|\
- xunlong,orangepi-r1-plus-lts)
+ xunlong,orangepi-r1-plus-lts|\
+ friendlyarm,nanopc-t6|\
+ friendlyarm,nanopi-r6c)
+ friendlyarm,nanopc-t6)
ucidef_set_interfaces_lan_wan 'eth1' 'eth0'
;;
+ friendlyarm,nanopi-r6s)
+ ucidef_set_interfaces_lan_wan "eth1 eth0" "eth2"
+ ;;
+ friendlyarm,nanopc-t4 | \
+ friendlyarm,nanopi-m4 | \
+ friendlyarm,nanopi-neo4 | \
+ som-rk3399 | cm3588)
+ ucidef_set_interfaces_lan_wan 'wlan0' 'eth0'
;;
fastrhino,r66s|\
firefly,rk3568-roc-pc|\
friendlyarm,nanopi-r5c|\
@@ -45,10 +50,10 @@ rockchip_setup_interfaces()
@@ -48,10 +56,10 @@
esac
}

-nanopi_r4s_get_mac()
+nanopi_get_mac()
{
local interface=$1
- local eeprom_path="/sys/bus/i2c/devices/2-0051/eeprom"
+ local eeprom_path="/sys/bus/i2c/devices/$2/eeprom"
local address

if [ -f "$eeprom_path" ]; then
@@ -98,8 +106,12 @@
;;
friendlyarm,nanopi-r4s|\
friendlyarm,nanopi-r4se)
- wan_mac=$(nanopi_r4s_get_mac wan)
- lan_mac=$(nanopi_r4s_get_mac lan)
+ wan_mac=$(nanopi_get_mac wan 2-0051)
+ lan_mac=$(nanopi_get_mac lan 2-0051)
+ ;;
+ nanopi-r6s|nanopi-r6c|nanopc-t6)
+ wan_mac=$(nanopi_get_mac wan 6-0053)
+ lan_mac=$(nanopi_get_mac lan 6-0053)
;;
friendlyarm,nanopi-r2c-plus|\
friendlyarm,nanopi-r5c|\

-nanopi_r4s_get_mac()
+nanopi_get_mac()
{
Expand All @@ -80,56 +117,32 @@
friendlyarm,nanopi-r5c|\
friendlyarm,nanopi-r5s|\

--- a/target/linux/rockchip/armv8/base-files/etc/board.d/01_leds
+++ a/target/linux/rockchip/armv8/base-files/etc/board.d/01_leds
@@ -36,6 +36,15 @@ hinlink,opc-h68k|\
hinlink,opc-h69k)
ucidef_set_led_netdev "wan" "WAN" "blue:net" "eth0"
;;
+friendlyarm,nanopi-r6s)
+ ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth2"
+ ucidef_set_led_netdev "lan1" "LAN1" "green:lan1" "eth1"
+ ucidef_set_led_netdev "lan2" "LAN2" "green:lan2" "eth0"
+ ;;
+friendlyarm,nanopi-r6c)
+ ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth0"
+ ucidef_set_led_netdev "lan1" "LAN1" "green:lan" "eth1"
+ ;;
esac
board_config_flush
--- 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
@@ -52,5 +52,25 @@ friendlyarm,nanopi-r5s)
@@ -53,5 +53,19 @@
set_interface_core 2 "eth1"
set_interface_core 4 "eth2"
;;
+friendlyarm,nanopi-r6s)
+ set_interface_core 2 "eth0"
+ echo 3e > /sys/class/net/eth0/queues/rx-0/rps_cpus
+ set_interface_core 10 "eth1-0"
+ set_interface_core 20 "eth1-16"
+ set_interface_core 20 "eth1-18"
+ echo fe > /sys/class/net/eth1/queues/rx-0/rps_cpus
+ set_interface_core 40 "eth2-0"
+ set_interface_core 80 "eth2-16"
+ set_interface_core 80 "eth2-18"
+ echo fe > /sys/class/net/eth2/queues/rx-0/rps_cpus
+ ;;
+friendlyarm,nanopi-r6c)
+ set_interface_core 40 "eth0"
+friendlyarm,nanopc-t6)
+ set_interface_core 8 "eth0-0"
+ set_interface_core 8 "eth0-16"
+ set_interface_core 8 "eth0-18"
+ echo fe > /sys/class/net/eth0/queues/rx-0/rps_cpus
+ set_interface_core 10 "eth1-0"
+ set_interface_core 20 "eth1-16"
+ set_interface_core 20 "eth1-18"
+ set_interface_core 4 "eth1-0"
+ set_interface_core 4 "eth1-16"
+ set_interface_core 4 "eth1-18"
+ echo fe > /sys/class/net/eth1/queues/rx-0/rps_cpus
+ seconds="0"
+ set_interface_core 40 "xhci-hcd:usb5"
+ set_interface_core 40 "xhci-hcd:usb7"
+ set_interface_rps "fe" "wlan0"
+ ;;
esac


--- a/target/linux/rockchip/image/Makefile
+++ b/target/linux/rockchip/image/Makefile
@@ -79,4 +79,15 @@ endif
@@ -79,4 +79,23 @@ endif

include $(SUBTARGET).mk

Expand All @@ -139,7 +152,15 @@
+ export BIN_DIR=$(BIN_DIR); \
+ export TOPDIR=$(TOPDIR); \
+ export MORE=$(MORE); \
+ cd /data/packit/friendlywrt22-rk3588; \
+ cd /data/packit/friendlywrt23-rk3588; \
+ . ~/packit/packit_nanopi.sh; \
+ fi
+ if [[ "$(PROFILE_SANITIZED)" == "friendlyarm_nanopi-m4" || "$(PROFILE_SANITIZED)" == "friendlyarm_nanopc-t4" || "$(PROFILE_SANITIZED)" == "friendlyarm_nanopi-neo4" ]]; then \
+ export IMG_PREFIX="$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED))"; \
+ export BIN_DIR=$(BIN_DIR); \
+ export TOPDIR=$(TOPDIR); \
+ export MORE=$(MORE); \
+ cd /data/packit/friendlywrt23-rk3399; \
+ . ~/packit/packit_nanopi.sh; \
+ fi
+endef
Expand Down

0 comments on commit 382134b

Please sign in to comment.