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

ubootRaspberryPi4: backport fix for C0 revisions #139865

Closed
wants to merge 1 commit into from
Closed

ubootRaspberryPi4: backport fix for C0 revisions #139865

wants to merge 1 commit into from

Conversation

K900
Copy link
Contributor

@K900 K900 commented Sep 29, 2021

Backport a (yet unmerged) patch that allows NixOS to boot correctly on new Pi4 boards using the BCM2711C0 SoC. Revert this when the patch is available in mainline U-Boot.

A precompiled binary is available here: https://static.0upti.me/pi4/ if anyone wants to test - just drop it into your firmware partition.

To easily reproduce the build locally, use this Nix expression:

{ pkgs ? import <nixpkgs> { } }:
pkgs.ubootRaspberryPi4_64bit.overrideAttrs (old: {
  patches = old.patches ++ [
    (pkgs.fetchpatch {
      url = "https://patchwork.ozlabs.org/series/259129/mbox/";
      sha256 = "04x55a62a5p4mv0ddpx7dnsh5pnx46vibnq8cry7hgwf4krl64gl";
    })
  ];
})

(save it to uboot.nix, then nix-build uboot.nix, the final binary will be in result/, drop it into the firmware partition and rename to u-boot-rpi4.bin)

NB: to cross-compile from a desktop, use pkgs.pkgsCross.aarch64-multiplatform.ubootRaspberryPi4_64bit instead of pkgs.ubootRaspberryPi4_64bit.

Motivation for this change

See #135828

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 via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all packages 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/)
  • 21.11 Release Notes (or backporting 21.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
  • Fits CONTRIBUTING.md.

@samueldr
Copy link
Member

cc @alyssais who reported facing the same issue.

@cole-h
Copy link
Member

cole-h commented Oct 1, 2021

@ofborg eval

Copy link
Member

@VergeDX VergeDX left a comment

Choose a reason for hiding this comment

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

LGTM

@K900
Copy link
Contributor Author

K900 commented Oct 4, 2021

Rebased the PR on latest master, also updated the prebuilt files to include a39ca1b - this should allow running the mainline kernel again.

Backport a (yet unmerged) patch that allows NixOS to boot correctly on new Pi4 boards using the BCM2711C0 SoC. Revert this when the patch is available in mainline U-Boot.
@ofborg ofborg bot requested a review from samueldr October 4, 2021 18:57
@samueldr
Copy link
Member

samueldr commented Oct 5, 2021

Hmm... that's why I was hoping to get the 2021.10 release quickly enough: I wanted to check for potential issues with the patch before merging, and it looks like it doesn't apply cleanly as-it-is on 2021.10.

I'll port the patch.

@samueldr samueldr mentioned this pull request Oct 5, 2021
12 tasks
@K900
Copy link
Contributor Author

K900 commented Oct 5, 2021

Obsoleted by #140552 .

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.

4 participants