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/modules/system/boot/loader/raspberrypi: enable u-boot support for rpi 4 #176018

Closed
wants to merge 1 commit into from

Conversation

uninsane
Copy link
Contributor

@uninsane uninsane commented Jun 2, 2022

Description of changes

allows installation of u-boot to the /boot directory of a rpi4 system via

boot.loader.raspberryPi = {
  enable = true;
  uboot.enable = true;
  version = 4;
};

whereas previously version = 4 would have triggered an assertion in the derivation.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.11 Release Notes (or backporting 22.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

i've been using this for about a month on the raspberry pi 400, which uses the same SOC as the rpi4.
i haven't tested the 32-bit code path.

it's not clear to me why support was previously disabled at this level: i think it's just an artifact of history.
the nixos SD image gained support for rpi4 in cc5baf2 (2019/08/17).
that commit added the branch which throws "U-Boot is not yet supported on the raspberry pi 4" (which my patch removes).
nixpkgs u-boot gained rpi4 support in 95cd8c8 (2020/09/12).
i think at that point we could have enabled rpi support here but it was overlooked.

tagging @tkerber for his earlier involvement in this area.

…or rpi 4

it's not clear to me why support was disabled at this level: i think it's just an artifact of history.
the nixos SD image gained support for rpi4 in cc5baf2 (2019/08/17).
that commit added the branch which throws "U-Boot is not yet supported on the raspberry pi 4" (which my patch removes).
nixpkgs u-boot gained rpi4 support in 95cd8c8 (2020/09/12).
i think at that point we could have enabled rpi support here but it was overlooked.

i've been using this for about a month on the raspberry pi 400 -- which uses the same SOC as the rpi4.
i haven't tested the 32-bit code path.

tagging @tkerber for his earlier involvement in this file.
@astro
Copy link
Contributor

astro commented Jun 10, 2022

See #112677

@uninsane
Copy link
Contributor Author

closing in favor of the PR linked above, which accomplishes everything here but probably handles the armstubs more reliably. thanks for digging that up, astro

@uninsane uninsane closed this Jun 14, 2022
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.

2 participants