nixos-rockchip icon indicating copy to clipboard operation
nixos-rockchip copied to clipboard

Support for Radxa CM3 and/or Rock Pi 4

Open msgilligan opened this issue 1 year ago • 4 comments

I just used this project to build a working image for SoQuartz on the CM4 I/O board.

I would love to be able to to the same thing for the Radxa CM3 on the CM4 I/O board and/or for the Radxa Rock Pi 4.

Is that within scope for this project? If not, is there something similar for those boards?

msgilligan avatar Oct 08 '24 15:10 msgilligan

I'm usually the one putting updates into this repo and I don't have either of those boards to test on. You're welcome to add PRs to support additional boards though

asonix avatar Oct 08 '24 16:10 asonix

I have both of those boards, and am willing to make a PR, but I am new to using Nix for system image building.

msgilligan avatar Oct 08 '24 16:10 msgilligan

So a few things need to happen

  1. New uboots need to be added to the uboot file. It might be as simple as finding the right defconfig and adding lines for the boards here: https://github.com/nabam/nixos-rockchip/blob/main/pkgs/uboot-rockchip.nix#L63
  2. The boards need to be added to the boards list here: https://github.com/nabam/nixos-rockchip/blob/main/flake.nix#L48
  3. Relevant uboot exports should be added here: https://github.com/nabam/nixos-rockchip/blob/main/flake.nix#L143
  4. The uboots should be added to CI here: https://github.com/nabam/nixos-rockchip/blob/main/.github/workflows/checks.yaml#L40 and here: https://github.com/nabam/nixos-rockchip/blob/main/.github/workflows/images.yaml#L32
  5. New boards should be added to CI here: https://github.com/nabam/nixos-rockchip/blob/main/.github/workflows/images.yaml#L131

Then you can use nix build .#your-board locally to produce an image you can try booting. If you have a serial connection to your board you should keep watch to see if it comes up properly

asonix avatar Oct 08 '24 18:10 asonix

So a few things need to happen [1, 2, 3, 4] Then you can use nix build .#your-board locally to produce an image you can try booting. If you have a serial connection to your board you should keep watch to see if it comes up properly

I made a PR: https://github.com/nabam/nixos-rockchip/pull/27 It seems to be working but other than booting I have done no further testing. So it's a DRAFT PR for now.

Thanks for your detailed help!

msgilligan avatar Oct 09 '24 20:10 msgilligan

Closing now that PRs #27 and #28 were merged.

msgilligan avatar Dec 03 '24 15:12 msgilligan