milas / rock5-talos

[**DEPRECATED** - see link for replacement!] Friendly fork of Talos Linux for the Radxa Rock 5 SBCs
https://github.com/milas/talos-sbc-rk3588
Mozilla Public License 2.0
16 stars 3 forks source link

Other SBCs based on RK3588s #7

Closed TheiLLeniumStudios closed 1 month ago

TheiLLeniumStudios commented 1 year ago

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 commented 1 year ago

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: https://github.com/milas/rock5-talos/blob/a2b35d11a8d0b9239cd83d302422cf21869983cb/Dockerfile#L672-L674

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: https://github.com/milas/rock5-talos/blob/a2b35d11a8d0b9239cd83d302422cf21869983cb/internal/app/machined/pkg/runtime/v1alpha1/board/rock5b/rock5b.go#L20-L25

The last part is to add a extlinux.conf for U-Boot: https://github.com/milas/rock5-talos/blob/a2b35d11a8d0b9239cd83d302422cf21869983cb/hack/boards/rock-5b/extlinux.conf#L1-L7

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 commented 1 year ago

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 commented 11 months ago

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 commented 3 months ago

@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 commented 3 months ago

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): https://github.com/milas/rock5-talos/blob/c11c261c932f4c0f2eeec4f3713232194bf82ab6/hack/boards/defconfig/rockchip_linux_defconfig#L621

(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 commented 3 months ago

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 commented 2 months ago

@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 commented 2 months ago

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 commented 2 months ago

@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 commented 1 month ago

Posted in the other issue but CCing here as well: https://github.com/milas/rock5-talos/issues/11#issuecomment-2137642033

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 commented 1 month ago

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.