nixos-rockchip
nixos-rockchip copied to clipboard
Add Radxa Rock 4 (old name Rock Pi 4)
The Raxa family of 3399-based boards are now called "Rock 4", but the two boards that I have are labelled "Rock Pi 4" xxx.
At present, there is no distinguishing between the various models in any of the Nix files. I don't know if there needs to be. I have tested on a Rock Pi 4 SE, and when U-Boot starts it outputs: Model: Radxa ROCK Pi 4A.
At this point, I have only verified that the build image boots successfully. I will do additional testing and also test on a Rock Pi 4B+.
Update: I also booted the Rock Pi 4B+ and verified that Ethernet can ping the router on both boards.
This PR addresses one of the two boards requested in Issue #25
According to U-Boot (see https://docs.u-boot.org/en/latest/board/rockchip/rockchip.html) there are 4 supported variants:
- Radxa ROCK 4C+ (rock-4c-plus-rk3399)
- Radxa ROCK 4SE (rock-4se-rk3399)
- Radxa ROCK Pi 4A/B/A+/B+ (rock-pi-4-rk3399)
- Radxa ROCK Pi 4C (rock-pi-4c-rk3399)
This PR currently only includes rock-pi-4-rk3399 which according to my testing will boot both the "ROCK Pi 4B+" and "ROCK 4SE" variants.
I created a Wiki Page NixOS on ARM/Radxa ROCK 4. I would like to see this board better supported. Whether it is through nixos-rockchip with this PR or via another mechanism (I discovered the U-Boot for Rock 4 is already in nixpkgs) doesn't matter to me, but I think there should be a wiki page that shows the best known ways of installing on the ROCK 4.
There is Tow-Boot support for ROCK 4 so it might be better to use that one. In theory that should allow you to boot a generic NixOS image that uses systemd-boot.
There is Tow-Boot support for ROCK 4 so it might be better to use that one. In theory that should allow you to boot a generic NixOS image that uses systemd-boot.
Thanks for the advice @RadxaYuntian. Is there a link to this project? I would really like to see official/semi-official support for NixOS on Rock 4. At the very least, something in the Radxa wiki about NixOS. Do you have any other recommended Radxa/NixOS links?
It's here. This project is created by Mobile NixOS maintainer.
I'd like to have NixOS officially supported by Radxa but there are a few internal questions I need to answer first.
It's here. This project is created by Mobile NixOS maintainer.
Thanks!
I'd like to have NixOS officially supported by Radxa but there are a few internal questions I need to answer first.
Is there anything I can do to help? Is there anyone I should talk to a Radxa?
It is just that I need to present a business case for NixOS in my proposal, since the #1 question when someone wants to do NixOS commercially is can we actually get users stick with it before they gave up learning?
Fortunately I think we are going to do it in a limited use case initially: edge computing/networking. This way the system is more like an appliance where users don't need to interact with NixOS much. As such, we will generally avoid mentioning NixOS directly in our own websites, and instead looking to have those hosted in the upstream NixOS websites.
going ahead & merging this, going to get the kernel updated today as well
Just realized that README.md is not updated.
@RadxaNaoki and I are also discussing about how to handle the default addr_r in upstream U-Boot for RK3308/3328/3399 to support booting large kernel used by NixOS. The main issue is that for 3308 and 3328, they can have very little memory (64MB & 256MB respectively), and we might need to make those value configurable in defconfig at least on a per device basis instead of per SoC.