Talk:NixOS on ARM/Installation

From NixOS Wiki

Build SD-card images based on u-boot specific defconfig

While trying to build an SD image for a `BananaPi-M2-Berry` I got almost immediately stuck, because [this article](https://wiki.nixos.org/wiki/NixOS_on_ARM/Banana_Pi) just starts with how to build `u-boot` out of the blue, without providing any context how this would relate to any `img` one might need. The "next step" refers [here](https://wiki.nixos.org/wiki/NixOS_on_ARM#NixOS_installation_.26_configuration), which essentially tells me that if I'm on a standard `aarch64` device I can download an image, if not ... _<looks for banana pi, finds link and clicks it>_ ... and we're back at the `u-boot` page.

It would be cool if we'd have a brief explanation how we can actually make a booting SD card image based on `u-boot`. I'm starting to understand (?) that the way forward might be something that overrides a `pkgs.ubootSomething.override { defconfig = "bananapi_m2_berry_defconfig"; }` and then somehow use `populateFirmwareCommands` to copy the outputs of that derivation to some intermediate `firmware/` directory???

Then there's the question what to do about `.dts` files? The one that seems to be necessary in this case (`sun8i-v40-bananapi-m2-berry.dtb`) is actually available within the rource of `u-boot` (`./arch/arm/dts/sun8i-v40-bananapi-m2-berry.dtb`), so we can/should copy it as well with `populateFirmwareCommands`? How? Where? (And looking at the `armbian` image for this device, I noticed there is no separate `FIRMWARE` partition. How does that relate to this?)

Does anyone have an idea how this is supposed to work? I guess the nice thing is that if some actual context would be available, we would have all `u-boot` supported systems instantly covered with an actual actionable recipe? Ppenguin (talk) 13:57, 13 September 2024 (UTC)Reply