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

u-boot: Add Raspberry Pi 4 build #70796

Closed
wants to merge 4 commits into from

Conversation

samueldr
Copy link
Member

@samueldr samueldr commented Oct 8, 2019

Builds on #70793

Things done
Things done
  • ✔️ Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nix-review --run "nix-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.

Yet untested, though this was verified as building using cross-compilation, for both 32 and 64 bit variants.

@tkerber
Copy link
Member

tkerber commented Oct 13, 2019

Just gave this a whirl, changing nixos/modules/system/boot/loader/raspberrypi/uboot-builder.{nix,sh} to accommodate it. Unfortunately, I got stuck at the rainbow boot screen, so I cannot confirm this working.

@samueldr
Copy link
Member Author

Hmm, there's changes missing for an sd-image to work. Though I won't have the time to do that until after NixCon.

Around there the u-boot for raspberry 4 will need to be copied, and config.txt will need to be extended to configure per-generation around here:

Once done, a build of the generic sd image, with the generic latest kernel, and hopefully it works.

@tkerber
Copy link
Member

tkerber commented Oct 14, 2019

I deployed straight to my running machine with nixops, fortunately making a backup of /boot beforehand. I'll try an sd card image later.

@samueldr samueldr force-pushed the u-boot/raspberry-pi-4 branch 2 times, most recently from f9be333 to c14eec3 Compare November 4, 2019 03:26
@samueldr
Copy link
Member Author

This is blocked until there is a bcm2711-rpi-4-b.dts from mainline.

With the current state of this branch, adding a bcm2711-rpi-4-b.dtb to the root of the FIRMWARE partition of the sd_image will make u-boot successfully boot. Though, since mainline kernel does not yet have the rpi 4 device tree, it fails to continue booting.

This might be a bigger issue since it's looking like the next LTS (5.4) will not have rpi 4 support. In this situation, building the firmware partition may differ depending on the kernel it is built with. Or, alternatively, depend on a mainline latest kernel build in addition to last LTS. Or, final alternative, is that u-boot imports the kernel device trees (as they usually do) with an rpi-4 dts, and then everything is fine and self-contained.

@ardumont
Copy link
Contributor

With the current state of this branch, adding a bcm2711-rpi-4-b.dtb to the root of the FIRMWARE partition of the sd_image will make u-boot successfully boot.

yes, u-boot starts up fine.

Though, since mainline kernel does not yet have the rpi 4 device tree, it fails to continue booting.

And there i'm stuck on 'Starting kernel...` (extlinux.conf is read alright).
So that must be why i got stuck here.

@timokau
Copy link
Member

timokau commented Dec 26, 2019

Here's an issue tracking the mainlining efforts.

@stale
Copy link

stale bot commented Jun 23, 2020

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 23, 2020
@samueldr
Copy link
Member Author

Still desired, still blocked.

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 23, 2020
@mohe2015
Copy link
Contributor

mohe2015 commented Jul 26, 2020

@samueldr Would this not work with pkgs.linuxPackages_rpi4 ?
Edit: seems like it doesn't...

@aneeshusa
Copy link
Contributor

AFAICT this has been superseded by #97883 so closing - please reopen if this if I missed something and this is still desired as a separate PR.

@aneeshusa aneeshusa closed this Oct 4, 2020
@samueldr samueldr deleted the u-boot/raspberry-pi-4 branch October 4, 2020 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
NixOS on ARM
Awaiting triage
Development

Successfully merging this pull request may close these issues.

None yet

7 participants