-
-
Notifications
You must be signed in to change notification settings - Fork 501
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
Image | NanoPi R5S #5598
Comments
Can't wait to see the image available 😜 |
FriendlyELEC's Debian Buster image does not contain any firmware/kernel/bootloader packages, but all related files are copied/flashed manually. Basically the procedure is done with this repository: https://github.com/friendlyarm/sd-fuse_rk3568 It uses a GPT partitioning. I'll put together the files into a DEB package and host it on our server, so it can be installed onto a single ext4 partition and updates can be easily done (by users). It will look similar like the Quartz64 firmware packages: https://dietpi.com/downloads/binaries/firmware-quartz64a.deb |
Works so far, but room for enhancements. The image we currently offer is converted from FriendlyELEC's Debian image, freed by the overlayfs. I still don't fully understand how this setup works, all intransparently done in the unmountable set of GPT partitions, where I wasn't able to find the sources for. I used the image by @StephanStS, converted to DietPi already and removed the 9th "userdata" partition (along with further cleanup), which appeared to be empty, then did another DietPi-Installer run. I was surprised to see the R5S booting into a desktop, first thinking it booted from internal eMMC. The internal eMMC however holds FriendlyWRT, not a desktop, and further investigation showed that it was indeed the two times via DietPi-Installer converted SD card image which was booted from, however showing the original FriendlyELEC Debian desktop. I'm not 100% sure but think due to the overlayfs, all changes done on that system may have been stored on the userdata partition (not being visible when mounting it on the original image), while the actual root partition stayed untouched. So after removing the userdata partition and rebooting, the actual rootfs was mounted the first time, which was also visible in Previously I generated an image from scratch with a simple MBR partition table and a single ext4 filesystem, but it doesn't boot. I'm not sure whether the device tree partition provided by their GitHub repo is an actual single device tree file or not, probably I need to recompile the kernel to get it, but this is the best guess my end why it may fail to boot. Sadly there are no UART pins, so early boot debugging is difficult until I find time to hopefully find the connectors and soldering the pins manually. One issue with a mainline U-Boot image (as I aim to create) is that the custom FriendlyELEC bootloader will be booted from with priority, i.e. if the internal eMMC isn't changed and an SD card with mainline U-Boot is attached, the board will boot from eMMC unless the mask button is pressed. One needs to flash the mainline U-Boot image onto eMMC or format it (at least the boot sector) to have the desired boot order. @StephanStS @Joulinar One issue I already found, while I'm not sure how to solve best:
|
I'm not able to best in next 2 weeks as I did not take the SBC to the Baltic sea. What a pity 🤣 |
Could have been a handy remote hotspot, ad blocker and VPN relay, actually 😛. Enjoy your well deserved holidays 🙂! |
I took my RPi3B with me running PiHole 😉 |
Just putting this out there, I don't own the board so I can't do any testing myself. Using patches found at an OpenWRT hub that enables one to use U-Boot v2022.07 I'm able to get the board to boot, but it seems to only get as far as Starting kernel ... If someone is interested in experimenting or playing with the u-boot and kernel patches I'm currently using they can be found in the links above. Note: The kernel defconfig and patches are the same ones I use on the Odroid M1 and there appears to be no issue there. |
the nanopi-r5s has uart pins, using them already next to the usbc power connector: but i recommend to use the ones on the other side, so you dont have to remove the board: baudrate is a little different: |
Great, thanks for sharing. Clever to access them from the bottom 👍 . |
Awesome, many thanks for testing. |
With a lot of trial and error and @mstaack helping me out on the boot front, we've now got the board up and running using Mainline U-Boot v2022.07 and Linux 5.19. It's of course not perfect and still needs a lot of work, but I thought @MichaIng and whom ever else, might wanna take a swing at trying to squash whatever bugs and what not there are. And there are plenty :) The credentials |
did a geekbench aarch64 preview run: |
For all features to work, I'd currently prefer to stay with FriendlyELEC's kernel, but probably the device tree from your build works with it. I'm not able to extract it from FriendlyELEC's image, and so far was too lazy to build the kernel from their sources. Ah, but I learned this one, which I'll try first: dtc -I fs -O dts /sys/firmware/devicetree/base -o nanopi5.dtb But the mainline image looks pretty good. Probably we can do some comparison about which hardware feature works on mainline already. |
As far as I know, the only major downer using the mainline kernel is that the PCIe M.2 doesn't work. And no, they can't be setup exactly the same as the vendor kernel. As for the PCIe, there is still several patches awaiting approval that might remedy the issue. Currently waiting for v5 of the patch set to be posted. |
See here for getting Ethernet LED triggers t work: #5679 Sadly with the manually generated device tree, the manually generated image with single partition but FriendlyELEC kernel + bootloader still does not boot. Probably all needs to be compiled manually to work without EFI partition table and the 8 partitions but with a single MBR ext4 and extlinux instead. Interesting, WireGuard support has been actually enabled, but the module is not contained in the latest FriendlyELEC Debian image build, probably on FriendlyWRT only 🤔: friendlyarm/kernel-rockchip@ba2b80a As a general resource: |
I tried using vendor u-boot with a single partition and extlinux and could never get a successful boot, beyond u-boot. U-boot seemed functional, it would just never find the boot / root partition. Hence the reason I ended up going the route I did. If you review the defconfig wireguard isn't ticked on. |
Matches my results so far: It denies to boot without the original GPT partitioning. Will try to check and set the U-Boot configs with fw_printenv/fw_setenv, maybe the defaults are hardcoded so limited in the vendor U-Boot build. |
The multiple partitions are mentioned here: https://github.com/friendlyarm/uboot-rockchip/blob/nanopi5-v2017.09/include/configs/nanopi5.h R5S support was added with this commit: friendlyarm/uboot-rockchip@8c91d15 In the config:
Not sure whether this is what enforces partitioning? |
@pyavitz dd 'if=/root/idbloader.bin' "of=$1" seek=64 conv=fdatasync
dd 'if=/root/u-boot.itb' "of=$1" seek=16384 conv=fdatasync But it does not boot (red LED remains lit instead of blinking), any idea why it might not work? Was flashed to internal eMMC, with and without SD card attached. |
Is this isolated to the eMMC or can you not boot from SD either? Earlier today, someone was running tests on the imgs and was also having trouble flashing them to the eMMC. He kept getting this: unable to select a mode : -70
device_remove: Device '[email protected]' failed to remove, but children are gone Which I've personally never seen before and no one had yet to report the error to me. After some trial and error he reported back and said he got it to boot from eMMC. Unfortunately that error was still visible in the logs and I suspect its got something to do with the freq being used (speed in which u-boot is suggesting the eMMC should operate), but I haven't had time to really look into it. Did you try compiling vendor u-boot with that bit in the defconfig ticked off? |
Not sure if this is the standard for all RK356Xs "using vendor uboot", but it requires GPT along with a partition labelled |
I'll try to boot with your U-Boot build and vendor kernel. When I find time I'll also try to play with the vendor U-Boot configs and compiling them. |
Can I get the uboot configs and DTSI File? |
The people at Armbian also made progress regarding U-Boot and building newer kernels for the R5S: armbian/build#4247 |
I am using the build of pyavitz mentioned here : https://forum.armbian.com/topic/21211-nanopi-r5s-armbian-image/ |
Don’t understand any of this enough to know if this is helpful or not to translate over to Debian/Ubuntu, but this guy is building OpenWRT for the Nanopi R5S with kernel 5.19, 6.0+ and seemingly u-boot 22.10? |
I'll mark this as closed. Our recent image ships with WireGuard module, so the most urgent need has been solved. Depending on how soon an Armbian image is available, I'll however come back to pyavitz's mainline kernel builds. |
Is it possible to boot from nvme? Or boot from sdcard but rootfs on nvme? I tried to alter the |
Currently it is not possible, since the U-Boot environment which defines the rootfs is hardcoded on one of the other partitions where it cannot (easily) be edited, if at all. But I am working on a transition to Armbian's mainline based kernel and bootloader, after which this will work: #6902 Direct boot from NVMe still won't be possible, as the R5S lacks an SPI flash where a bootloader could be put on. So it requires at least the bootloader and boot scripts/configs on an SD card or eMMC, from where you can tell the kernel to take any other partition as rootfs. |
Just to avoid confusion with armbian "mainline" you actually mean their rockchip legacy branch and not the actual linux mainline kernel right? As moving to linux mainline would mean the loss of MPP and such. |
Nope, for R5S/R5C I indeed mean the "current" mainline-based branch. RK3568 has pretty good mainline support already, no need to stick with vendor kernel sources.
Are you sure this is still true with recent mainline kernel? And if so, which applications are effected in particular, which cannot use other video codec interfaces? |
Yes I keep a very close look on this and the people which are responsible for media on the linux kernel are expecting code quality that isn‘t like the current state of the VPU acceleration driver from RK. This would for example affect Jellyfin (technically that feature will be added in 10.9 but there’s a preview and the dev @ nyanmisaka also has merged many changes already). I assume legacy will become rk6.1 too so at least the option to choose between vendor and mainline kernel should be there in the final dietpi update/image. |
To be true, dealing any longer with vendor kernel specifics and even offer a switch and support both cases concurrently, is above what we are able to maintain. If MPP is not even supported in current Jellyfin, then I guess it is not such a huge must-have feature, and there are other accelerated codecs/interfaces (right?), even when they are not as fast. So I will switch to mainline Linux. Of course the |
Will there be a beta image with mainline conponents recently? I'm happy to test it if available.😄 |
It is already there: https://dietpi.com/downloads/images/testing/ |
Hello, |
Creating an image request
Formal device information
Is the SBC officially supported by the Debian installer?
debootstrap
ed image.If not, is a reliable 3rd party Debian image available for this SBC?
If not, are there install instructions for Debian available?
The text was updated successfully, but these errors were encountered: