Skip to content
This repository has been archived by the owner on May 31, 2024. It is now read-only.

Other SBCs based on RK3588s #7

Closed
TheiLLeniumStudios opened this issue Apr 19, 2023 · 11 comments
Closed

Other SBCs based on RK3588s #7

TheiLLeniumStudios opened this issue Apr 19, 2023 · 11 comments
Labels
enhancement New feature or request

Comments

@TheiLLeniumStudios
Copy link

TheiLLeniumStudios commented Apr 19, 2023

Hi. Thank you for the great project. I'm wondering if its possible to support other RK3588(s) based SBCs like the Orange Pi 5. How hard would it be to get that added? Can you provide maybe a list of things that need to be done and I can take a look at and see if I can help contribute towards it? Would be a great addition and it would be nice to make it more generic and not just support 1 vendor. Let me know

@milas
Copy link
Owner

milas commented May 14, 2023

I am working on adding support for the Rock 5A, so I'll have a better answer for you soon with a full example.

The biggest steps are to get U-Boot and the kernel in the format (Docker image) that the Talos installer expects.

For U-Boot, you don't need to compile it - I'm actually using the one provided by Radxa in the build here:

rock5-talos/Dockerfile

Lines 672 to 674 in a2b35d1

FROM scratch AS u-boot-rock-5b
ADD https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/rock-5b-spi-image-g3caf61a44c2-debug.img /spi/spi_image.img

For kernel, Talos already has some docs, and you can look at how I'm doing it for the Radxa kernels here: https://github.com/milas/rock5-toolchain/blob/a6cdcb9efe13c250f3f381eef51c66fcd0ce8bb2/Dockerfile#L239-L246

Once that's done, the standard Talos part is to add the SBC config to the Go code -- you should be able to just copy-paste and change some constants from here:

const (
sectorSize = 512
ubootImage = "/usr/install/arm64/u-boot/rock_5b/u-boot.img"
ubootOffset int64 = sectorSize * 0x40
dtb = "/dtb/rockchip/rk3588-rock-5b.dtb"
)

The last part is to add a extlinux.conf for U-Boot:

label Talos
kernel /A/vmlinuz
initrd /A/initramfs.xz
devicetreedir /A/dtbs/
fdt /A/dtbs/rockchip/rk3588-rock-5b.dtb
fdtoverlays /A/dtbs/rockchip/overlay/rk3588-uart7-m2.dtbo
append rootwait keepinitrd retain_initrd talos.board=rock_5b talos.platform=metal slab_nomerge pti=on modprobe.blacklist=pgdrv earlycon=uart8250,mmio32,0xfeb50000 console=ttyFIQ0 console=tty1 consoleblank=0 loglevel=7 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1 irqchip.gicv3_pseudo_nmi=0 switolb=1 coherent_pool=2M

This is another largely copy-paste with some changes for the right device tree overlay. There's some duplication with the Go code because in upstream Talos this would be GRUB and auto-templated, but I didn't write code for extlinux templating (#3).

@Lenael
Copy link

Lenael commented Jun 17, 2023

Hi. Thank you for the great project. I'm wondering if its possible to support other RK3588(s) based SBCs like the Orange Pi 5. How hard would it be to get that added? Can you provide maybe a list of things that need to be done and I can take a look at and see if I can help contribute towards it? Would be a great addition and it would be nice to make it more generic and not just support 1 vendor. Let me know

Hi there! First of all, thank you @milas for your great work!
I'm also thinking about utilizing some Orange PIs 5 with RK3588s chip onboard. It's a great alternative to RPIs that suffer with shortages. @TheiLLeniumStudios did you manage to run this image on your orange pi?

@bhuism
Copy link

bhuism commented Jul 21, 2023

I would like to point to the rk1 from turingpi https://turingpi.com/product/turing-rk1/, will be released in the coming months (just went on pre sale), more than willing to help to get this board supported in talos

@Christos822
Copy link

Christos822 commented Apr 8, 2024

@milas,

Firstly, thank you for your great work!

I've embarked on a project to boot Talos on a Radxa CM3 board and have closely followed the instructions in this issue thread. I successfully built the image, incorporating the kernel image, U-Boot SPI image, DTB, and made the necessary modifications to the GO files.

However, I've hit a snag: while the bootloader activates, the LAN LEDs on the IO board show no activity. This contrasts with the behavior when booting with a confirmed working image like 'Ubuntu Jammy CLI B25,' where LAN LED activity is visible.

The extlinux.conf is present and correctly references the dtb for my board. Given the above, could there be a step or configuration specific to Talos that I might be missing for kernel initialization? Any insights or additional steps you could suggest would be greatly appreciated.

Best,
Christos

@milas
Copy link
Owner

milas commented Apr 10, 2024

Oh wow, you made good progress!

It's been a bit, but I think this might be why I compiled the R8125 driver into the kernel (instead of as a module):

(R8125 is the 2.5G ethernet controller on the Rock 5B.)

What's the ethernet controller on the IO board? Try building the module right in.

I honestly don't totally remember what Talos' udev setup is like (nor am I an expert on that for Linux in general 🙈) but I don't think I was able to get it loaded the "correct" way for some reason.

@milas
Copy link
Owner

milas commented Apr 10, 2024

On a sidenote: I'm hoping to come back to this fork soon. I ran into weird problems with my 1.5 branch - I strangely only had it working on my Rock 5A but not the 5B anymore 🫠

Mainline support should be good enough now to get this working on a mostly stock Talos upstream, but should be way less work and I can automate updates.

So despite this falling a bit behind upstream, I am still using my Rock 5B Talos cluster and hoping to pick it up back up until things are fully supportable in upstream Talos directly.

@Christos822
Copy link

@milas, thank you very much for the response!

I adjusted the extlinux.conf as detailed below, which resulted in some LAN activity and the green LED on the Radxa CM3 starting to flash. However, I also encountered errors on the HDMI output while booting (displayed in the photo attached) before the system times out and restart.
boot_errors

Here's the modified part of the extlinux.conf:

extlinux.txt
I added the last part from a working ubuntu image.

Please also keep in mind that I have built kernel 5.10 from the Radxa BSP.

Best,
Christos

@milas
Copy link
Owner

milas commented Apr 19, 2024

I'm honestly not sure. There seem to be a lot of errors in there (some of which I'm sure is normal), but I'm not sure what the cause would be

@Christos822
Copy link

@milas
Thank you for your response.

I've updated the log level in the extlinux configuration to 7 just to take more information about this problem.
Unfortunately, there hasn't been any improvement. Here are the results:

shared image

Apologies for the images; I haven't been able to set up a serial console yet.

Could the issue be related to the Kernel configuration or rootfs, initramfs ? Do you have any suggestions on specific areas I should investigate further?

Thank you once again for your assistance.

@milas
Copy link
Owner

milas commented May 29, 2024

Posted in the other issue but CCing here as well: #11 (comment)

I'm working on 1.7 using mainline-ish components (6.9-based kernel) and the newer installer overlay functionality in Talos, which should make supporting other RK3588 boards much easier.

Hoping to have CI done for the Radxa 5A + 5B today, which are the boards I own and can test on, at which point, I can give guidance on OPi5 bring-up.

@milas milas added the enhancement New feature or request label May 29, 2024
@milas
Copy link
Owner

milas commented May 31, 2024

New overlay + installer images are available at milas/talos-sbc-rk3588.

These are based on the Collabora mainline U-Boot & 6.9 kernel branches with stock Talos 1.7.

(I'm archiving this repo. You can't remove a fork relationship in GitHub 🙃)


Adding Orange Pi 5 builds is easy - I just don't have hardware to test on.

@milas milas closed this as completed May 31, 2024
@milas milas pinned this issue May 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants