-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
feat: add support for the RaspberryPi CM4 #170528
Conversation
@@ -19,10 +20,10 @@ | |||
}: | |||
|
|||
let | |||
defaultVersion = "2021.10"; | |||
defaultVersion = "2022.01"; |
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.
Why not the newer version?
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.
Because our precious patches don't work there yet.
I might try rebasing them later, but I must admit I'm running out of gas :P
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.
[See other comment too]
I know I haven't been updating the last two releases (I wonder why r-ryantm didn't notice, and no one else did), but the goal is to prevent any kind of foward-incompatible drift; so we shouldn't block the upgrade to the current version.
08e109e
to
3c4d257
Compare
Result of 1 package marked as broken and skipped:
1 package blacklisted:
20 packages built:
|
Result of 1 package blacklisted:
4 packages built:
|
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.
Only two outright problems, everything else is nitpicky or small issues.
- Patches going against mainline
- USB being enabled outright on the CM4
@@ -19,10 +20,10 @@ | |||
}: | |||
|
|||
let | |||
defaultVersion = "2021.10"; | |||
defaultVersion = "2022.01"; |
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.
[See other comment too]
I know I haven't been updating the last two releases (I wonder why r-ryantm didn't notice, and no one else did), but the goal is to prevent any kind of foward-incompatible drift; so we shouldn't block the upgrade to the current version.
outputHashMode = "recursive"; | ||
outputHashAlgo = "sha256"; | ||
outputHash = "sha256-Fw8EC1jzszWg9rNH01oaOIHnSYDuF6ov6ulmIAPuNz4="; | ||
|
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.
AFAIK all firmware packages should use FOD to reduce unneeded rebuilds. [citation needed].
(Personally I find it is an abuse of FODs, though that might only apply to the big linux-firmware package.)
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.
Yeah, this doesn't really cause any big rebuilds AFAICT
pkgs/os-specific/linux/firmware/raspberrypi-wireless/default.nix
Outdated
Show resolved
Hide resolved
pkgs/os-specific/linux/firmware/raspberrypi-wireless/default.nix
Outdated
Show resolved
Hide resolved
# Enable host mode on the 2711 built-in XHCI USB controller. | ||
# This line should be removed if the legacy DWC2 controller is required | ||
# (e.g. for USB device mode) or if USB support is not required. | ||
otg_mode=1 |
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 might be problematic, depending on the CM4 usage. Is it a good idea to outright apply this?
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.
I think the vast majority of users will want this, and the minority who don't can still override it.
a6ce6db
to
0594277
Compare
This actually fixes wifi on the rpizero (and likely others) that had been broken. Found out when my own version of it didn't rebase when I went to send it... -_-. thanks @lovesegfault ! |
Description of changes
With this, you can boot NixOS on the CM4 via SD, eMMC, USB, or NVMe using u-boot
and the mainline kernel. Wi-Fi and Bluetooth are also working.
The main caution is you must use the sd-image with a new kernel, 5.17 or later.
Huge thanks to @cleverca22, @ElvishJerricco, and @samueldr who helped me hack on
this in the last couple of days.
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes