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
17 stars 3 forks source link

siderolabs/overlays #11

Closed piersdd closed 5 months ago

piersdd commented 8 months ago

Feature Request

Perhaps port this excellent work to the new overlay structure for supporting SBCs

Description

Not being even remotely across what might be needed, I note Sidero Labs are now moving towards supporting SBCs via Talos Linux Overlays. How might I be of assistance to help port your work to the new overlay structure? TIA, Piers

choopm commented 6 months ago

I forked the sbc-rockchip repository and put in the collabora patches. So basically this should be running, but the PCIe patches required for RTL8125 networking have not landed in Talos kernel yet. It boots fine, but without networking it is unuseable as long as Talos uses a kernel <6.7-rc1.

See details in the README of my fork: https://github.com/choopm/sbc-rockchip-rock-5b

Maybe @milas does know how to continue from here.

edit: I'm currently testing a custom Talos kernel based on linux-stable: https://github.com/choopm/pkgs-rock-5b When things are working I will update this message again and publish an installer image to test.

edit: No luck using the custom 6.8.9 kernel, still no networking. I published all images for you to follow along.

Command used to build a flashable image: docker run --rm -t -v $PWD/_out:/out -v /dev:/dev --privileged ghcr.io/choopm/imager:v1.7.1 metal --arch arm64 --overlay-image ghcr.io/choopm/sbc-rockchip:5aefc45 --overlay-name=rock5b

edit: I had used official linux-stable v6.8.9 which does not contain all the required patches. Rebuild of kernel using collabora sources rk3588-v6.8 is running. I will update you on the test results.

milas commented 5 months ago

Hi! Thanks for opening this issue. This has been my plan for a bit now.

I've successfully built images using the Collabora U-Boot + 6.9.x kernel.

Similar to @choopm I had a hard time with networking. I think the Collabora kernel config is actually missing some options for PCIe right now. Anyway, after manually comparing 379 diff hunks between Armbian's kernel config and Talos', I have a functional config that gets an IP on the R8125 adapter on the 5B.

I'm working on CI now but should have 1.7.x builds available soon for the Radxa 5A / 5B.

choopm commented 5 months ago

Anyway, after manually comparing 379 diff hunks between Armbian's kernel config and Talos', I have a functional config that gets an IP on the R8125 adapter on the 5B.

I think it might be related to the DesignWare Controllers. I always encountered issues when it comes to initialization of those: The PCIe Bars for the r8125 controller did not come up due to missing address space. I tried several FDT configs, messing around with the allocations, but no luck. I only managed to register the device by patching the FDT from u-boot and using a different voltage regulator since the bootlog was complaining about vcc3v3_pcie2x1l0 missing. This however resulted in RCU stalls.

Looking forward to try your 5B build and thanks for your hard work :rocket:

milas commented 5 months ago

New overlay + installer images are available at https://github.com/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 lol)