Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added NanoPi R5S support #1217

Merged
merged 1 commit into from Mar 26, 2023
Merged

Added NanoPi R5S support #1217

merged 1 commit into from Mar 26, 2023

Conversation

buglloc
Copy link
Contributor

@buglloc buglloc commented Mar 26, 2023

Should work for both FriendlyElec Nanopi R5S and FriendlyElec Nanopi R5C, but I doesn't have R5C yet to test.

Device tree built from linux 6.1.18. Source code: https://github.com/buglloc/nanopi-r5/tree/main/dtb
u-boot - signed with rockchip binaries: https://github.com/friendlyarm/rkbin/tree/nanopi5 && https://github.com/buglloc/nanopi-r5/tree/main/uboot

@ophub ophub merged commit bc48d0f into ophub:main Mar 26, 2023
@ophub
Copy link
Owner

ophub commented Mar 26, 2023

谢谢分享,我打包下,你随后测试下。

@buglloc buglloc deleted the nanopi-r5s branch March 26, 2023 14:13
ophub added a commit that referenced this pull request Mar 31, 2023
ophub added a commit that referenced this pull request Apr 5, 2023
@altmangood
Copy link

刷了 Armbian_23.05.0_rockchip_nanopi-r5s_bullseye_6.1.26_server_2023.04.27 基本功能使用正常。

2个问题:
1、2 个 2.5G LAN Port, 网络灯不亮,但是能正常分IP 访问外网。
2、USB WiFi 没法识别,我那个USBWiFi在其他板子的固件5.15.x 和 6.1.x 的内核都能直接识别

ophub added a commit that referenced this pull request Jul 27, 2023
@kongjun0
Copy link

kongjun0 commented Aug 18, 2023

You can refer to https://github.com/inindev/nanopi-r5 differentiate between R5S and R5C,I have tested it on R5C。In addition, the nanopi official RTC time should point to RTC1. Hope to modify the kernel compilation code in the next version.Web page source:https://wiki.friendlyelec.com/wiki/index.php/RTC

Build the RTC driver into the kernel (not an external module)
Go to the following location:

│   Location:                                                                                                                  │
│     -> Device Drivers                                                                                                        │
│       -> Real Time Clock (RTC_CLASS [=y])                                                                                    │

Set CONFIG_RTC_DRV_DS1307 to 'y'.

3.2 Specify the correct RTC device
Since the default kernel rtc device is rtc0, and when we use external rtc in Allwinner platform, the external rtc is usually initialized to rtc1, so we also need to modify the following kernel configuration to set the value to rtc1:

CONFIG_RTC_HCTOSYS_DEVICE="rtc1"
CONFIG_RTC_SYSTOHC_DEVICE="rtc1"

The kernel configuration:

diff --git a/arch/arm/configs/sunxi_defconfig b/arch/arm/configs/sunxi_defconfig
index 4c88bbb8..4dbee1a9 100644
--- a/arch/arm/configs/sunxi_defconfig
+++ b/arch/arm/configs/sunxi_defconfig
@@ -1027,11 +1027,12 @@ CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
 CONFIG_LEDS_TRIGGER_PANIC=y
 CONFIG_LEDS_TRIGGER_NETDEV=y
 CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc1"
 CONFIG_RTC_INTF_DEV_UIE_EMUL=y
 CONFIG_RTC_DRV_TEST=m
 CONFIG_RTC_DRV_ABB5ZES3=m
 CONFIG_RTC_DRV_ABX80X=m
-CONFIG_RTC_DRV_DS1307=m
+CONFIG_RTC_DRV_DS1307=y
 CONFIG_RTC_DRV_DS1307_CENTURY=y
 CONFIG_RTC_DRV_DS1374=m
 CONFIG_RTC_DRV_DS1374_WDT=y

I have R5C device to test

@kongjun0
Copy link

image

@ophub
Copy link
Owner

ophub commented Aug 18, 2023

@kongjun0

Thank you for your sharing. Based on the support you provided at https://github.com/inindev/nanopi-r5, I have utilized the precompiled u-boot and dtb files. I've packaged the firmware for the R5C. Please download and test it to confirm its functionality.

https://github.com/ophub/amlogic-s9xxx-armbian/releases/download/Armbian_bullseye_save_2023.08/Armbian_23.08.0_rockchip_nanopi-r5c_bullseye_6.1.46_server_2023.08.17.img.gz

@kongjun0
Copy link

R5C has been roughly tested, and no functional problems have been found, and the LED lights of the two network ports are not on. Data sending and receiving is normal, please refer to https://github.com/indev/nanopi-r5/blob/main/dtb/patches/0001-add-led-triggers.patch to see if it can be repaired.

@ophub
Copy link
Owner

ophub commented Aug 18, 2023

I am using his versions, both the u-boot and dtb are from him, and he has applied these patches. The files are from his latest compilation four days ago:

https://github.com/inindev/nanopi-r5/releases/tag/v12.0.2

Snip20230818_1

@kongjun0
Copy link

看这个能否解决网络led灯亮问题,
Config status LEDs
First determine whether the system already exists the leds initialization service:

sudosystemctl status leds
If the leds service already exists, change the default behavior of the LEDs by editing the following file:

/etc/init.d/leds.sh
Since there is no leds service in the early firmware, you need to refer to the following guide to manually configure the LEDs. First, set the following kernel modules to be automatically loaded at boot:
modprobe ledtrig-netdevecho ledtrig-netdev > /etc/modules-load.d/ledtrig-netdev.conf
Put the following into the autorun script to associate the status leds with the ethernet interface, and you can configure it to behave in other ways by referring to these content:
echonetdev> /sys/class/leds/wan_led/triggerecho eth0 > /sys/class/leds/wan_led/device_name
echo 1 > /sys/class/leds/wan_led/link

echonetdev> /sys/class/leds/lan_led/triggerecho eth1 > /sys/class/leds/lan_led/device_name
echo 1 > /sys/class/leds/lan_led/link

@ophub
Copy link
Owner

ophub commented Aug 19, 2023

你手动执行试试

@ophub
Copy link
Owner

ophub commented Aug 20, 2023

我直接使用的他编好的,我觉的他巳经使用了这个补丁。要不你问一下作者还有什么地方漏了其他设置。

ophub added a commit that referenced this pull request Aug 20, 2023
@kongjun0
Copy link

较新版本的 u-boot(高于 12.0.0 版本)不会在启动分区的目录中查找 DTB 文件,作者提示可以用v12.0.3版本试试?下个版本可否试下
image

@ophub
Copy link
Owner

ophub commented Aug 27, 2023

12.0.3不是比12.0.0更新?你的意思是要用11.xy这种老的吧?

@kongjun0
Copy link

12.0.3吧!
Screenshot_2023-08-27-20-48-36-600_com android chrome

@kongjun0
Copy link

意思就是没调用dtb文件,看有别的方法让调用不,上面截图是r5s人家是uefi启动,修改配置后解决

@ophub
Copy link
Owner

ophub commented Aug 27, 2023

r5s 和 r5c 的 U-BOOT 和 DTB 我都更新了,jammy的2个正在编译,你一会10分钟后到jammy里下载试试。

@kongjun0
Copy link

已经刷机还是不显示,能否通过修改启动引导DTB让加载DTB文件?有没有方法?

@ophub
Copy link
Owner

ophub commented Aug 28, 2023

如果没有加载dtb是无法使用的。

比如你把现在的dtb删了,拿个别的dtb改名成它的名字,肯定启动不了,各种报错网卡找不到之类的错误。

网络正常就可以了,网卡灯不亮就不亮吧

@kongjun0
Copy link

如果没有加载dtb是无法使用的。

比如你把现在的dtb删了,拿个别的dtb改名成它的名字,肯定启动不了,各种报错网卡找不到之类的错误。

网络正常就可以了,网卡灯不亮就不亮吧

好吧

ophub added a commit that referenced this pull request Oct 8, 2023
ophub added a commit that referenced this pull request Dec 6, 2023
@sniperpr
Copy link

sniperpr commented Jan 29, 2024

刷了Armbian_24.2.0_rockchip_nanopi-r5s_jammy_6.1.69_server_2024.01.01.img
nvme识别不了。
确认硬件是OK的。
@ophub 不知道您那里做测试是否OK

cat /etc/ophub-release
PLATFORM='rockchip'
VERSION_CODEID='ubuntu'
VERSION_CODENAME='jammy'
MODEL_ID='r204'
MODEL_NAME='NanoPi-R5S'
SOC='rk3568'
FDTFILE='rk3568-nanopi-r5s.dtb'
FAMILY='rk3568'
BOARD='nanopi-r5s'
KERNEL_REPO='ophub/kernel'
KERNEL_TAGS='6.1.y'
KERNEL_VERSION='6.1.69'
KERNEL_BACKUP='yes'
BOOT_CONF='armbianEnv.txt'
ROOTFS_TYPE='ext4'
DISK_TYPE='usb'
AMPART_STATUS='no'
MLUBOOT_STATUS='no'
MAINLINE_UBOOT='/usr/lib/u-boot/u-boot.itb'
BOOTLOADER_IMG='/usr/lib/u-boot/idbloader.img'
TRUST_IMG='/usr/lib/'
BUILD_REPOSITORY='github.com/armbian/build'
REBUILD_REPOSITORY='github.com/ophub/amlogic-s9xxx-armbian'
CONTRIBUTORS='buglloc'
BUILDER_NAME='ophub'
PACKAGED_DATE='2024-01-01'

@maojianyou
Copy link

谢谢分享,我压缩下,你再测试下。

友善R5C刷机步骤,电脑通过USB3.0--USB3.0公转公刷机到emmc,32G,没有SD卡
1、下载bin引导文件
https://github.com/ophub/u-boot/blob/main/u-boot/rockchip/nanopi-r5s/rk3568_ddr_1560MHz_v1.15.bin

2、下载R5C部分引导文件
https://github.com/ophub/u-boot/blob/main/u-boot/rockchip/nanopi-r5c/idbloader.img

https://github.com/ophub/u-boot/blob/main/u-boot/rockchip/nanopi-r5c/u-boot.itb

3、下载img镜像
https://github.com/ophub/amlogic-s9xxx-armbian/releases/download/Armbian_bookworm_save_2024.04/Armbian_24.5.0_rockchip_nanopi-r5c_bookworm_6.1.84_server_2024.04.08.img.gz

上面下载好后
然后下载驱动跟刻录软件
https://github.com/ophub/kernel/releases/download/tools/Radxa_rock5b_RKDevTool_Release_v2.96__DriverAssitant_v5.1.1.tar.gz

然后把上面工具机系统放入到一个目录下
具体上面如何使用,貌似不行,刷机失败
image

能否提供一个详细的友善R5C刷机教程

ophub added a commit that referenced this pull request Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants