Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos rpi bootloader: install files for raspberry pi 4 (rpi4) #112677

Closed
wants to merge 1 commit into from

Conversation

colemickens
Copy link
Member

Motivation for this change

NixOS currently has a few bootloader "builders":

  • generations-dir
  • generic-extlinux-compatible
  • grub
  • init-script
  • raspberrypi
  • systemd-boot

The raspberrypi option, itself, has multiple different bootloader builders that you choose from:

  • raspberry-pi-builder
    • just drops a config.txt, kernel, initrd and an old dir with old generation kernel/initrd
  • u-boot
    • drops the version-appropriate u-boot binary to /boot
    • drops the rpi firmware files to /boot
    • calls the generic-extlinux-compatible bootloader builder which in turn drops extlinux-compatible files and dir structures.

The u-boot scenario is more ideal because the user has a chance to choose a different generation to boot, including kernel and initrd. Without u-boot, the user must manually intervene and edit the sd card to switch to an old generation.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@colemickens
Copy link
Member Author

One other note, my firmware is a bit ahead of what we have in nixpkgs, but the note on it requests that I update the rpi foundation kernel do, which I'm not trying to do right now. I'm hoping this doesn't matter...

# Add the config.txt
copyForced @configTxt@ $target/config.txt
# Add the raspberry pi 4 specific files
if [[ "@version@" == "4" ]]; then
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was previously wrong. I noticed since I wiped my rpi4 /boot and these files were missing afterward.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we shouldn't rather support all aarch64 Raspberry Pi at once.

Right now configuring for the Raspberry Pi 4 means you also get the files for the Raspberry Pi 3 family, but not the inverse. Unless I'm mistaken?

Doing so would require config.txt to be aware of the [pi_] sections I guess.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think your analysis is right, and the improvement you suggest would be the next/last big thing on the road to re-using this exact logic/builder for the sd-card image...

... but I can't sign-up for that right now.

@colemickens
Copy link
Member Author

colemickens commented Feb 11, 2021

Alright, I've now tested this by:

  • removing all other pi-related commits from my nixpkgs
  • cherry-picking this commit (27b6d45)
  • re-deploying my rpi4 system
  • sshing in, cd /boot; rm -rf *
  • sudo /run/current-system/bin/switch-to-configuration switch
  • sudo reboot

And the system came back correctly. This rpi4 system boot config looks like this:

    boot = {
      loader.grub.enable = false;
      loader.raspberryPi.enable = true;
      loader.raspberryPi.version = 4;
      loader.raspberryPi.uboot.enable = true;
      loader.raspberryPi.uboot.configurationLimit = 5;
      # ...
    };

@colemickens colemickens marked this pull request as ready for review February 11, 2021 06:12
@felschr felschr requested a review from samueldr March 13, 2021 19:04
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/493

else
throw "U-Boot is not yet supported on the raspberry pi 4.";
throw "U-Boot is not yet supported on the raspberry pi 5.";
Copy link
Member

@mweinelt mweinelt Apr 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
throw "U-Boot is not yet supported on the raspberry pi 5.";
throw "U-Boot is not yet supported on the raspberry pi ${toString version}.";

@SEbbaDK
Copy link
Contributor

SEbbaDK commented Apr 11, 2021

I have tested this on my pi4 and it does indeed boot and work nicely via the uboot loader

@mweinelt
Copy link
Member

mweinelt commented Apr 12, 2021

I can also confirm this boots mainline kernel. Get the serial up and running by adding

{
  boot.kernelParams = [
    "console=ttyS1,115200n8"
  ];
}

Unfortunately the serial is a bit messy.

PM_RSTS: 0x00001000
RPi: BOOTLOADER release VERSION:23a9f59b DATE: May 15 2020 TIME: 11:05:55 BOOTMODE: 0x00000006 part: 0 BUILD_TIMESTAMP=1589537152 0x1ca63f53 0x00c03111
uSD voltage 3.3V
Initialising SDRAM 'Micron' 16Gb x2 total-size: 32 Gbit 3200
Boot mode: SD (01) order f4
SD HOST: 250000000 CTL0: 0x00000000 BUS: 100000 Hz actual: 100000 HZ div: 2500 (1250) status: 0x1fff0000 delay: 1080
SD HOST: 250000000 CTL0: 0x00000f00 BUS: 100000 Hz actual: 100000 HZ div: 2500 (1250) status: 0x1fff0000 delay: 1080
CID: 001b534d45433251543021a6552e0141
CSD: 400e00325b590001dcff7f800a404000
SD: bus-width: 4 spec: 2 SCR: 0x02858483 0x00000000
SD HOST: 250000000 CTL0: 0x00000f04 BUS: 50000000 Hz actual: 41666666 HZ div: 6 (3) status: 0x1fff0000 delay: 2
MBR: 0x00004000, 2097152 type: 0x0b
MBR: 0x00000000,       0 type: 0x00
MBR: 0x00000000,       0 type: 0x00
MBR: 0x00000000,       0 type: 0x00
lba: 16384 oem: 'mkfs.fat' volume: ' FIRMWARE   '
rsc 32 fat-sectors 2048 c-count 261628 c-size 8 r-dir 2 r-sec 0
PM_RSTS: 0x00001000
Partition: 0
lba: 16384 oem: 'mkfs.fat' volume: ' FIRMWARE   '
rsc 32 fat-sectors 2048 c-count 261628 c-size 8 r-dir 2 r-sec 0
Read config.txt bytes      503 hnd 0x0000e567 hash '19c7f64fb7ca570a'
recover4.elf not found (6)
recovery.elf not found (6)
Read start4cd.elf bytes   793116 hnd 0x0000e820 hash '07c5561caf7563d6'
Read fixup4cd.dat bytes     3187 hnd 0x0000e5f8 hash 'b4d9d35bf0b62011'
0x00c03111 0x00000000 0x000000ff
MEM GPU: 16 ARM: 998 TOTAL: 1014
Starting start4cd.elf @ 0xff000200 partition 0



U-Boot 2021.01 (Jan 11 2021 - 18:11:43 +0000)

DRAM:  3.9 GiB
RPI 4 Model B (0xc03111)
MMC:   emmc2@7e340000: 0
Loading Environment from FAT... *** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   eth0: ethernet@7d580000
PCIe BRCM: link up, 5.0 Gbps x1 (SSC)
starting USB...
Bus xhci_pci: Register 5000420 NbrPorts 5
Starting the controller
USB XHCI 1.00
scanning bus xhci_pci for devices... 4 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found /extlinux/extlinux.conf
Retrieving file: /extlinux/extlinux.conf
2939 bytes read in 21 ms (135.7 KiB/s)
------------------------------------------------------------
1:	NixOS - Default
2:	NixOS - Configuration 471 (2021-04-12 01:41 - 21.05pre-git)
3:	NixOS - Configuration 470 (2021-04-12 01:23 - 21.05pre-git)
4:	NixOS - Configuration 469 (2021-04-08 18:43 - 21.05pre-git)
5:	NixOS - Configuration 468 (2021-04-08 18:23 - 21.05pre-git)
6:	NixOS - Configuration 467 (2021-04-06 23:40 - 21.05pre-git)
Enter choice: 1:	NixOS - Default
Retrieving file: /extlinux/../nixos/ljsv9m9mkh6py0ksxnrgd7l96ph1mng3-initrd-linux-5.11.11-initrd
8799381 bytes read in 408 ms (20.6 MiB/s)
Retrieving file: /extlinux/../nixos/7ybggvzp8p6xw8zc7q68szgmbmj0pvl1-linux-5.11.11-Image
43803136 bytes read in 1909 ms (21.9 MiB/s)
append: init=/nix/store/ryxhx9rs4zzfh9p2wq4r66fs6zrpfr0z-nixos-system-dione-21.05pre-git/init console=ttyS1,115200n8 loglevel=4
Retrieving file: /extlinux/../nixos/7ybggvzp8p6xw8zc7q68szgmbmj0pvl1-linux-5.11.11-dtbs/broadcom/bcm2711-rpi-4-b.dtb
25741 bytes read in 41 ms (612.3 KiB/s)
Moving Image from 0x80000 to 0x200000, end=2c70000
## Flattened Device Tree blob at 02e00000
   Booting using the fdt blob at 0x2e00000
   Using Device Tree in place at 0000000002e00000, end 0000000002e0948c

Starting kernel ...


<<< NixOS Stage 1 >>>

loading module btrfs...
loading module crc32c...
modprobe: FATAL: Module crc32c not found in directory /lib/modules/5.11.11
loading module dm_mod...
running udev...
Starting version 247
[    4.044699] [drm:vc5_hdmi_init_resources [vc4]] *ERROR* Failed to get HDMI state machine clock
kbd_mode: KDSKBMODE: Inappropriate ioctl for device
starting device mapper and LVM...
Scanning for Btrfs filesystems
waiting for device /dev/disk/by-label/NIXOS to appear...[    4.481506] [drm:vc5_hdmi_init_resources [vc4]] *ERROR* Failed to get HDMI state machine clock
[    4.621070] [drm:vc5_hdmi_init_resources [vc4]] *ERROR* Failed to get HDMI state machine clock
[    4.643324] [drm:vc5_hdmi_init_resources [vc4]] *ERROR* Failed to get HDMI state machine clock
[    4.715873] [drm:vc5_hdmi_init_resources [vc4]] *ERROR* Failed to get HDMI state machine clock
[    4.878142] [drm:vc5_hdmi_init_resources [vc4]] *ERROR* Failed to get HDMI state machine clock

mounting /dev/disk/by-label/NIXOS on /...

<<< NixOS Stage 2 >>>

running activation script...
setting up /etc...
starting systemd...

Welcome to NixOS 21.05 (Okapi)!

[   11.595257] systemd[1]: postgresqlBackup-hass.timer: Timer unit lacks value setting. Refusing.
[  OK  ] Created slice system-getty.slice.
[  OK  ] Created slice system-modprobe.slice.
[  OK  ] Created slice system-serial\x2dgetty.slice.
[  OK  ] Created slice system-systemd\x2dfsck.slice.
[  OK  ] Created slice User and Session Slice.
[  OK  ] Started Dispatch Password …ts to Console Directory Watch.
[  OK  ] Started Forward Password R…uests to Wall Directory Watch.
[  OK  ] Reached target Local Encrypted Volumes.
[  OK  ] Reached target Containers.
[  OK  ] Reached target Remote File Systems.
[  OK  ] Reached target Slices.
[  OK  ] Reached target Swap.
[  OK  ] Reached target System Time Synchronized.
[  OK  ] Listening on Process Core Dump Socket.
[  OK  ] Listening on Journal Audit Socket.
[  OK  ] Listening on Journal Socket (/dev/log).
[  OK  ] Listening on Journal Socket.
[  OK  ] Listening on Network Service Netlink Socket.
[  OK  ] Listening on udev Control Socket.
[  OK  ] Listening on udev Kernel Socket.
         Mounting Huge Pages File System...
         Mounting POSIX Message Queue File System...
         Mounting Kernel Debug File System...
         Starting Create list of st…odes for the current kernel...
         Starting Load Kernel Module configfs...
         Starting Load Kernel Module drm...
         Starting Load Kernel Module fuse...
         Starting Journal Service...
         Starting Load Kernel Modules...
         Starting Remount Root and Kernel File Systems...
         Starting Coldplug All udev Devices...
[  OK  ] Mounted Huge Pages File System.
[  OK  ] Mounted POSIX Message Queue File System.
[  OK  ] Mounted Kernel Debug File System.
[  OK  ] Finished Create list of st… nodes for the current kernel.
[  OK  ] Finished Load Kernel Module configfs.
[  OK  ] Finished Load Kernel Module drm.
[  OK  ] Finished Load Kernel Module fuse.
[  OK  ] Finished Remount Root and Kernel File Systems.
[  OK  ] Started Journal Service.
         Mounting FUSE Control File System...
         Mounting Kernel Configuration File System...
         Starting Flush Journal to Persistent Storage...
         Starting Load/Save Random Seed...
         Starting Create Static Device Nodes in /dev...
[  OK  ] Mounted FUSE Control File System.
[  OK  ] Mounted Kernel Configuration File System.
[  OK  ] Finished Load/Save Random Seed.
[  OK  ] Finished Create Static Device Nodes in /dev.
[  OK  ] Reached target Local File Systems (Pre).
         Starting Rule-based Manage…for Device Events and Files...
[  OK  ] Finished Load Kernel Modules.
         Starting Apply Kernel Variables...
[  OK  ] Finished Flush Journal to Persistent Storage.
[  OK  ] Finished Apply Kernel Variables.
[  OK  ] Started Rule-based Manager for Device Events and Files.
[  OK  ] Finished Coldplug All udev Devices.
[   13.843007] [drm:vc5_hdmi_init_resources [vc4]] *ERROR* Failed to get HDMI state machine clock
[  OK  ] Found device /dev/ttyS1.
[   13.872850] [drm:vc5_hdmi_init_resources [vc4]] *ERROR* Failed to get HDMI state machine clock
[   13.917454] [drm:vc5_hdmi_init_resources [vc4]] *ERROR* Failed to get HDMI state machine clock
[  OK  ] Found device /dev/disk/by-label/FIRMWARE.
        [   14.014862] [drm:vc5_hdmi_init_resources [vc4]] *ERROR* Failed to get HDMI state machine clock
 Starting File System Check…/dev/disk/by-label/FIRMWARE...
[   14.063568] [drm:vc5_hdmi_init_resources [vc4]] *ERROR* Failed to get HDMI state machine clock
[   14.142417] debugfs: Directory 'fef00700.hdmi' with parent 'vc4-hdmi-0' already present!
[   14.157730] debugfs: Directory 'fef05700.hdmi' with parent 'vc4-hdmi-1' already present!
��`�:�i+73�i�.
�[�۽��-@�i���(�SKI1��min+��E`�:�J�ӭ�H7+���`�:�Kb��i!I��F�ԴTR��Z�@�����7K��E`���+l���7+���`�:�IA*a����Z���I2����z�Aj
�iZ���i�:�IxXl]�B�Zj�I�@FU4@�O� i�KI7K���`�:I%�ZZr� i4�DU���`�:�J�ӭ
                              ��%�eo�i��i�:�IxXl]z��ȵ�Zj�1v���eo+�HKb��(�S
�┬Z�E◆�:I%�Z�X��V����◆�Z�─$[�)�⎺+���◆�:�J�ӭ]��"B.��┴Z�@�␋▒��I≥��]7K��E◆�:I%�Z��◆�#��7+��E◆�:I%�Z�R�������◆�:�K␉����+�����Z���◆�:�K␉���≠%��I���Z���◆���S┌���I◆IM����◆�:I%�Z���▒
                                                                                                                   �����◆��@IA*▒���P���◆�:�J"I3�␋3"+␊
                                                                                                                                                     �Z%�@�␋▒���␋�Z
                                                                                                                                                                   ��◆��D��␋�Z�@I]�Z�I֮њ�Z*@I]�Z:�B�P����I�@I]�ZZ�\��⎺K���◆�:�K␉��$���њ�Z���◆�:I%�ZZ�\��⎺���E◆��@IA*▒����Z���◆�:�J�ӭ��␤A��@I]�Z�A���I�@�␋▒���%�	�⎺K�@I]�ZZ5�$��I�@I]�Z��R�␋Z*�E◆��D*┌�␋·�>����[���◆�:I%�Z�·IU├�R2��␋�Z�@I]�Z���I�@I]�Z��T␍�7K�@I]�ZZ�Z��7K��E◆��D�␉���⎺+���◆�:�K␉���E�[�Z���◆�:I%�Z:7*��E◆��$*┌��)#7�└+���◆�:�J�ӭ�5�����◆�:I%�Z�A�����◆�:�J�ӭ�A�����◆�:I%�ZZI␋	�����◆�:I%�Z���·	H�Z���◆�:I%�ZZ␋$DM�Z���◆�Z�^␋B␋┼+��┌+����H���U �A°����

Either way, it boots. Can you rebase this change, so we can merge it in time for 21.05 and update the docs, so RPi4 users can migrate to mainline?

Broken serial log disappears after blacklisting vc4 kmod.

@mohe2015
Copy link
Contributor

@colemickens Can you rebase please? https://github.com/mohe2015/nixpkgs/tree/rpi4-uboot should be a correct rebase. Also applying the one suggestion would be great!

@mohe2015
Copy link
Contributor

Also is it possible to create an iso/sd image from this? And is this useful?

@colemickens
Copy link
Member Author

The infra in nixpkgs for building an rpi4-capable SD Card already prepare uboot in their own way. I don't think it's a super-wise investment to try to unify the uboot setup between the two right now, for a few different reasons.

@zraexy
Copy link
Member

zraexy commented May 29, 2021

Is there anything preventing this from being merged?

@colemickens
Copy link
Member Author

As the author of this PR, I'm personally more interested in making Tow-Boot and a traditional UEFI installation the preferred way to install. This is messy business, I'd love to let Tow-Boot handle it all. I think @samueldr has done a lot of thinking to arrive at a good model with some fun paths to take things in if it goes well.

I don't really have any opinion one way or the other about this being merged as is.

@zraexy
Copy link
Member

zraexy commented Jun 6, 2021

As the author of this PR, I'm personally more interested in making Tow-Boot and a traditional UEFI installation the preferred way to install. This is messy business, I'd love to let Tow-Boot handle it all. I think @samueldr has done a lot of thinking to arrive at a good model with some fun paths to take things in if it goes well.

While Tow-Boot may be the better solution long term, it is a fundamentally different approach. Unless there is a plan is to completely remove this approach, it would be good to have support for all Pi versions.

@samueldr Thoughts?

@samueldr
Copy link
Member

samueldr commented Jun 8, 2021

This PR only affects installing U-Boot files to a boot partition. This is not how the generic image was conceived to be used.

NixOS should not manage the firmware used to boot itself on ARM. This is because it's unknown exactly how it was installed at the first place, and will work differently depending on the system. Supporting it for a specific class of hardware (Raspberry Pi) is only going to cause some more confusion.

I believe NixOS should not manage the firmware for many reasons. The first is that the firmware should stay neutral to the operating system it intends to boot.

The second, and more important, is that it is impossible to handle the firmware through generations. So a firmware update can break currently working generations, maybe even prevent the system from booting anything at all. Handling firmware updates through a different mechanism (which doesn't exist at this point) ensures a routine NixOS upgrade won't prevent the system from booting at all.

In many ways, the current "FIRMWARE partition" approach is a proto Tow-Boot. It is a distinct firmware blob installed on the same storage media as the OS is. It is not managed by NixOS.

On thing to realize is that right now we produce a NixOS SD image which coincidentally ships with the Raspberry Pi firmware pre-installed because it is prohibitively difficult to install it after the fact. If it wasn't, it would be like other ARM systems, "bring your own firmware".


The boot.loader.raspberryPi is not expected to be used with any the generic SD images produced since adding support for the "FIRMWARE" partition approach. That is, the U-Boot installed on it is not handled by the installed operating system.

Using any boot.loader.raspberryPi option with those images will break assumptions, either in the options themselves or in the behaviour of the images.

If it was just me, the boot.loader.raspberryPi options would have been marked as deprecated already as they do cause confusion (rightfully so!).


The current recommendation is:

If the image you are using was originally built with the boot.loader.raspberryPi approach in mind, continuing to use it should be fine. It should already be working, no? If it does not, it's another problem not fixed by this PR.

If the image you are using was originally built with an unmanaged FIRMWARE partition for a U-Boot install, do not use any boot.loader.raspberryPi options.

Is there anything I'm missing here?

@stale
Copy link

stale bot commented Jan 9, 2022

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jan 9, 2022
@mweinelt
Copy link
Member

mweinelt commented Jan 9, 2022

If anyone finds this issue. I've moved to https://github.com/pftf/RPi4 and the aarch64 installer ISO. Best decision ever.

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jan 9, 2022
@vikanezrimaya
Copy link
Member

What's the status on this PR? I've been using on my Raspberry Pi 4 for a long time already, and it never broke since I've started using it.

@colemickens
Copy link
Member Author

From a few posts back, this is still my take on this PR: #112677 (comment)

I'll have an update on the more ideal solution using tow-boot in a week or two (waiting on a rpi3b to be able to test across all aarch64 rpi devices)

@vikanezrimaya
Copy link
Member

vikanezrimaya commented Feb 16, 2022 via email

@SuperSandro2000
Copy link
Member

SuperSandro2000 commented Jun 29, 2022

Tested on a Pi4 and without this PR it is not rebooting properly. If no one objects I would merge this in the next days.

@astro
Copy link
Contributor

astro commented Jun 29, 2022

PR works well for me. I think it should even be merged into 22.05.

@colemickens
Copy link
Member Author

colemickens commented Jun 30, 2022 via email

@SuperSandro2000
Copy link
Member

We need this for our network booted Pi 4s. Tow boot/UEFI is not done by tomorrow and I don't see a reason to block this PR on that.

@colemickens
Copy link
Member Author

colemickens commented Jun 30, 2022 via email

@samueldr
Copy link
Member

We need this for our network booted Pi 4s.

The boot.loader.raspberrypi options have never been needed, and are more harmful than beneficial. Since way before the introduction of the Raspberry Pi 4 those options have not actually been working as expected. They are present for legacy use of really old NixOS installs. The main change that matters here was done in by mid 2019.

Anyway, if they're network booted, then the boot.loader options shouldn't apply, no?

@SuperSandro2000
Copy link
Member

SuperSandro2000 commented Jun 30, 2022

The boot.loader.raspberrypi options have never been needed, and are more harmful than beneficial. Since way before the introduction of the Raspberry Pi 4 those options have not actually been working as expected. They are present for legacy use of really old NixOS installs. The main change that matters here was done in by mid 2019

How else should you boot then?

Anyway, if they're network booted, then the boot.loader options shouldn't apply, no?

yeah, slight misunderstanding. We are using it for the one Pi we have that is not networking booting. All others are networking booting and don't require this.

I guess I just don't want to merge stuff and then wind up ripping it back
out after the next release given Samuel's hopes and my agreement.

If you find the time and get to it.

@samueldr
Copy link
Member

How else should you boot then?

The platform firmware (stock U-Boot) is already present in the SD images. This module is not used to build the SD images. Deleting this whole set of option wouldn't break any correctly configured AArch64 Raspberry Pi system installed since ~19.09. One issue though is that end-users (through documentation lack/faults) may have misconfigured modern systems.

The correct bootloader configuration to use is boot.loader.generic-extlinux-compatible. The FAT32 partition at the start of the SD image should be ignored entirely, treated as if it was an opaque blob. Do not mount it. Do not modify it (except to modify the config.txt file, which should be seen as changing BIOS options).

@astro
Copy link
Contributor

astro commented Jul 1, 2022

When I installed the RPi4 with a NixOS 21.05 image and subsequently updated the kernel, I was in need of a new U-boot (#139865 iirc) which that configuration would have brought. I am afraid that this could happen again.

@samueldr
Copy link
Member

samueldr commented Jul 1, 2022

I agree that a solution has to be provided for that issue, but this is not it.

The boot.loader.raspberrypi gives the illusion of working correctly, but is easy to accidentally misuse, and could just as well break systems rather than fix them.

I do not know what the proper solution for handling platform firmware (U-Boot) updates is. It should not be tied to the NixOS generations lifecycle, as it cannot fulfill the guarantees from it.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jan 7, 2023
@colemickens
Copy link
Member Author

abandoning, I've given on SBCs for now.

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Sep 19, 2023
@colemickens colemickens deleted the rpi4-uboot branch October 2, 2023 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.