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 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

@samueldr samueldr commented Oct 14, 2019

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 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 samueldr:u-boot/raspberry-pi-4 branch from 1da7719 to d6cfb60 Nov 4, 2019
@samueldr samueldr force-pushed the samueldr:u-boot/raspberry-pi-4 branch from 7305484 to ec49a95 Nov 4, 2019
@samueldr samueldr force-pushed the samueldr:u-boot/raspberry-pi-4 branch 2 times, most recently from f9be333 to c14eec3 Nov 4, 2019
@samueldr samueldr force-pushed the samueldr:u-boot/raspberry-pi-4 branch from c14eec3 to 3e4538b Nov 4, 2019
@ofborg ofborg bot requested a review from tavyc Nov 4, 2019
@samueldr
Copy link
Member Author

@samueldr samueldr commented Nov 10, 2019

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

@ardumont ardumont commented Nov 11, 2019

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 timokau commented Dec 26, 2019

Here's an issue tracking the mainlining efforts.

@matthewbauer matthewbauer mentioned this pull request May 8, 2020
3 of 10 tasks complete
@stale
Copy link

@stale 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 label Jun 23, 2020
@samueldr
Copy link
Member Author

@samueldr samueldr commented Jun 23, 2020

Still desired, still blocked.

@stale stale bot removed the 2.status: stale label Jun 23, 2020
@mohe2015
Copy link

@mohe2015 mohe2015 commented Jul 26, 2020

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

@aneeshusa
Copy link
Contributor

@aneeshusa aneeshusa commented Oct 4, 2020

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 samueldr:u-boot/raspberry-pi-4 branch Oct 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
NixOS on ARM
Awaiting triage
Linked issues

Successfully merging this pull request may close these issues.

None yet

7 participants
You can’t perform that action at this time.