-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
raspberrypi: update firmware, linux, tools to latest (~2020-12-01) #107637
Conversation
platforms = stdenv.lib.platforms.unix; | ||
license = licenses.asl20; | ||
maintainers = with maintainers; [ cartr ]; | ||
platforms = [ "aarch64-linux" "armv7l-linux" "armv6l-linux" ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This technically builds on regular Linux, but it's really targeted at ARM devices/the Pi, so I think this is reasonable.
https://github.com/raspberrypi/usbboot/blob/d3760e119385a179765f43a50a8e051a44127c25/Readme.md#building
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this a tool I could run on my workstation to "fastload" a raspberry Pi? If so, building it on x86_64-linux
too would be appreciated ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
untested, changes look fine
platforms = stdenv.lib.platforms.unix; | ||
license = licenses.asl20; | ||
maintainers = with maintainers; [ cartr ]; | ||
platforms = [ "aarch64-linux" "armv7l-linux" "armv6l-linux" ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this a tool I could run on my workstation to "fastload" a raspberry Pi? If so, building it on x86_64-linux
too would be appreciated ;-)
Update to the new default branch for the Raspberry Pi vendor kernel.
This only copies unfree redistributables, don't need a compiler for that.
These packages were duplicated, and often weren't being updated in sync. The only difference between them was the lack of pkg-config in libraspberrypi, which is easily fixable.
This tool can run perfectly fine on a x86_64-linux workstation - it's primarily meant to boot Raspberry Pi CM/CM3/Zero devices, not to run on them.
15e1538
to
5deb8af
Compare
I rebased this on latest master, incorporated the fixes from https://github.com/NixOS/nixpkgs/pull/107689/files and fixed the duplicate attribute in the kernel expression. |
libraspberrypi provided an empty directory. The during NixOS#107637, this was refactored to use cmakeFlags. cmakeFlags can't use `$out` directly. `$out` is a bash variable, so to use it there, `${placeholder "out"}` is needed, otherwise it'll pick `"$out"` literally.
My i2s sound card does not work with the 5.4 rpi4 or rpi3 kernel. The device tree overlays fail to build:
This can be reproduced with the following config lines:
|
@petabyteboy yes, the raspberrypi device tree files unfortunately seem to use some custom format/extension which doesn't seem to be understood by the mainline dtc compiler, and its error messages are terrible too. raspberrypi/linux#3198 (comment) claims it should work, but apparently it doesn't (or broke again, who knows). We might want to open a new issue if it clearly doesn't work with the upstream The raspberrypi-specific I did some ground-work in fixing Happy to review a PR that allows compiling devicetress with dtmerge :-) |
I could make my Raspberry Pi 4 work with the HifiBerry Amp2 (which is using the hifiberry-dacplus overlay) by using dtmerge:
However my Raspberry Pi 3 is out of luck. Changing
Or when applying the hifiberry-amp overlay:
These are the same errors I get when trying to apply these overlays to a recent upstream linux kernel by the way. |
I should first say a setup that was quite common with NixOS aarch64 users was actually never supported by upstream: The RPi3 is supposed to be used in 32-bit arm and work exactly like an RPi2, while we use it in aarch64 mode, where it has its own defconfig and so on. From 4.19 to 5.4 this change broke raspberry pi specific device tree overlays for the RPi3 aarch64 config: raspberrypi/linux@9a6d1cb#diff-0c179e16b6e7236b33310a13729679c1c136d2b7a216339ff652d5c4db3a1e21L33 Both the RPi4 aarch64 config and the RPi3 and lower 32-bit arm configs import bcm270x-rpi.dtsi, which specifies some things for raspberry-pi-specific overlays, like vdd_3v3_reg, that are not upstreamed:
But bcm2835-rpi.dtsi does not include bcm270x-rpi.dtsi, so the RPi3 aarch64 config can not use raspberry pi specific overlays. I will try to send a patch to the raspberrypi/linux to add back support for this use case. |
Nevermind, this was already the case with the last 4.19 rpi3 aarch64 kernel, so it's not a problem that was introduced with this PR. |
@petabyteboy I linked to here from https://nixos.wiki/wiki/NixOS_on_ARM/Raspberry_Pi_4, cause others seem to be running into this issue. If you went into contact with upstream, can you please link from here? |
Motivation for this change
Various packages in the Raspberry Pi ecosystem were out of date.
Some commits might need squashed, wanted to leave them separate for now to clarify why/what I did.
Potentially controversial: noticed duplicate
raspberrypi-tools
&&libraspberrypi
. These have the same source & practically the same derivation. I chose to keeplibraspberrypi
because it had a slightly cleaner derivation, but I'll leave it up to the maintainers to decide.Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)