NixOs raspberry pi: no hdmi during boot


I can’t manage (see full config) to get hdmi during the boot process on the raspberry pi 3B (v1.2)… I tried many things:

  • add console=tty0: whithout this option kernels 6.0.2 does not even display anything on tty… with this option at least parts of the boot appear on screen (1 line of stage 1, from the middle of stage 2). On kernel 6.0.7 it does nothing special, and I can’t see anything during the boot except one line complaining about fpm.
  • even if I use boot.initrd.kernelModules = [ "vc4" "bcm2835_dma" "i2c_bcm2835" ]; as recommended in the wiki I still don’t get any hdmi during the first boot process (this is apparently needed to get early KMS)
  • use the linux kernel rpi3. There I can see the full boot process… but then the kernel crashes.

Samuel told me that I could try to inspect the linux kernel to find other modules to put in initrd that may be needed for hdmi… but I don’t really know where to start. I also tried to check the DTs of the rasp module to see how it differs from the linux one but I’m not yet familiar enough with DTs to extract much interesting information.

Any idea?

Seems like everything got solved after upgrading the firmware (or rather I installed raspbian that automatically upgraded the firmware). I’ve only tested with the latest kernel (boot.kernelPackages = pkgs.linuxPackages_latest; + fix in Building a NixOS system with the linux_rpi* kernels fails with `Module ... not found in directory` · Issue #154163 · NixOS/nixpkgs · GitHub). I also use boot.kernelParams = [ "cma=256M" "console=tty0" ]; but not sure how important it is. See the full configuration (with pinned flake) here foosball/config_rasp_3B.nix at 3f68fa2da74b07e756f86e689216dd627d66e065 · cwi-foosball/foosball · GitHub