NixOS support for CM4

just added:

  • sleep support based on paragonnov’s work
  • 4g module tool

Any tips to make make PCIe work with the CM4 module? I am constantly getting this in the kernel logs `brcm-pcie fd500000.pcie: link down`. I tried setting dtparams like this: pcie=on, pcie_gen=2, and as the above as too, but nothing.

it looks so sweet! how fast it runs? and again, every repo available? wonderful wrk btw!

Add dtparam=pcie=off to your config.txt.
You currently don’t have anything hooked up to pcie.

passing the option “nopcie0 = true” to the clockworkpi-uconsole will disable the pcie support in kernel.

i.e:

  hardware.raspberry-pi.config = {
    cm4.dt-overlays = {
      clockworkpi-uconsole.params = {
        nopcie0.enable = true;
        nopcie0.value = true;
      };
    };
  };

in my module ethernet/pcie is enabled by default. you can use nogenet/nopcie0 to disable…

clockworkpi-uconsole
  	nogenet # true: disable cm4 ethernet (FIXME)
   	nopcie0 # true: disable pcie (FIXME)

[warning: the nopcie0 will be changed to no_pcie0 next major release]

just a quick howto: params are defined as:

<name> = {
  enable = [true|false];
  value = <value>;
};

it will add the dtparam=<name>=<value>to config.txt

the snippet I provided will add (assuming that you included oom-hardware.nixosModule.uc.configtxt):

[cm4]
...
dtoverlay=clockworkpi-uconsole
dtparam=nopcie0=true
dtoverlay=
...
1 Like

Hm, sorry if it wasn’t clear, but I actually want to use the PCIe hub with an nvme battery board. The nvme is properly powered, but no PCIe device is detected during boot (still booting from SD card)

check if your connectors are properly connected:

this works for me ((-; it should work. if you see: brcm-pcie fd500000.pcie: link down - that means, that you don’t have anything connected to pcie.

as fast as it can be. repo? let’s say, if U go to the search.nixos.org and something is available for aarch64-linux it will be available here… ((-;

1 Like

NICE! I wonder if this will work with he CM5 module too… we will have to see! :smiley:

I am between building the devterm or buying one to built another prototype now, I do wonder f making the hardware better can help to this too.

it works with the CM5 too - bcm2711 (cm4) image can boot both CM4 and CM5, but there is a separate bcm2712 image (can boot CM5).

Keep in mind that my images/modules are tested only using the uConsole CM4/CM5. There are some overlays for the DevTerm, but since I do not have one (and DevTerm kits are out of stock) I cannot test it. Also there is no support for A-04/A-06 and R-01 uConsole.

I am assuming that if get to prototype one, will get the adapter from Alex and then use the CM5, due to the form factor would love to get the radxa better and d a larger battery, might need some work to be done with a company or service to build a new exterior.