Raspberry Pi native loader (not uboot)

I’m trying to build an SD image for a Raspberry Pi 3B that does not use UBoot.

The Pi has a GPS HAT (for NTP) on the serial port, and the serial traffic interrupts UBoot and generates spurious input. I have solved this in the past for other distributions (Ubuntu) by just configuring the Pi boot process to load the kernel directly.

(I have removed the HAT during these install steps otherwise the initial default SD install image won’t boot)

Using the native boot process

I set up the SD card with partition 1 as FAT32, but bigger than the default image (because now it also needs to hold several generations of kernel and initrd’s).

With this in configuration.nix the install went through and set up all the firmware files and a kernel and initrd in that partition, mounted at /boot

  boot.loader.grub.enable = false;
  
  boot.loader.raspberryPi = {
    enable = true;
    version = 3;
    uboot.enable = false;  # default but be explicit
  };

However the result does not boot. It stops at the GPU’s initial big rainbow square, which suggests that the kernel isn’t being loaded or is somehow not doing anything.

Kernel

What’s the right kernel to be using these days for RPi 3B? All the wiki articles have caveats about being outdated and are unclear.

There’s also a note about HDMI mode that is also old, but might be relevant to my problem (maybe the kernel is getting loaded then dying, but I can’t see it?).

I’m currently not doing anything to select a different kernel than what nixos-unstable gives me by default, which is a 5.15.x (x ~= 55 from memory).

UBoot without serial?

As far as I can tell, the only way to prevent UBoot accessing the serial port is to compile it with custom options. I don’t see options for that in the nix config, but this could be a fallback option.