RPi4/NixOs: won't boot "Error: Did not find a cmdline Flattened Device Tree"

I'm trying to install NixOs on a Raspberry Pi 4 following these instructions, but it won't boot.

I get an "Error: Did not find a cmdline Flattened Device Tree", "libfdt fdt_check_header(): FDT_ERR_BADMAGIC", and a few other error messages which you can see in the picture below (sorry for the bad picture, but I couldn't do a proper screenshot nor a copy/paste as it did not boot).

The Raspberry does boot with the same hardware if I put the standard Raspberry Pi OS on the microSD card.

I used the image nixos-sd-image-21.11pre319562.c21ba4f7bb4-aarch64-linux.img.zst from https://hydra.nixos.org/build/154874441 which I uncompressed and flashed on the card, nothing more.

After I also followed the instructions to update the firmware, but it did not change anything.

Any idea on what is wrong here?

enter image description here


I have a Raspberry Pi 4B and I ran in to this same issue today. I downloaded the latest version of 21.05 from Hydra (https://hydra.nixos.org/job/nixos/release-21.05/nixos.sd_image_new_kernel.aarch64-linux) and I was stuck with the same error. It seems this is an issue with Linux Kernel 5.14.

When downloading the latest Hydra build of 21.05 but with Linux Kernel version 5.10 instead (https://hydra.nixos.org/job/nixos/release-21.05/nixos.sd_image.aarch64-linux), I was able to succesfully boot in to the live NixOS.

The NixOS Hydra UI is very misleading especially with every related Package/release named the same thing, yet having different dependencies.

To verify you are getting the correct kernel, you can click the "Build dependencies" tab and CTRL + F for "5.10".

Build screenshot:

build screenshot

Kernel verification:

kernel verification