nabam / nixos-rockchip

31 stars 11 forks source link

Support for Radxa CM3 and/or Rock Pi 4 #25

Open msgilligan opened 1 month ago

msgilligan commented 1 month ago

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?

asonix commented 1 month ago

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

msgilligan commented 1 month ago

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

asonix commented 1 month ago

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

msgilligan commented 1 month ago

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!