NixOS on ARM/Raspberry Pi 4: Difference between revisions
imported>Samueldr m Add detail about 5.10 LTS |
imported>Samueldr m Remove outdated and wrong information, mark some other as outdated |
||
Line 151: | Line 151: | ||
=== USB boot === | === USB boot === | ||
For USB booting to work properly, firmware update might be needed: | For USB booting to work properly, a firmware update might be needed: | ||
{{commands|<nowiki> | {{commands|<nowiki> | ||
nix-shell -p raspberrypi-eeprom | $ nix-shell -p raspberrypi-eeprom | ||
rpi-eeprom-update -d -a | $ rpi-eeprom-update -d -a | ||
</nowiki>}} | </nowiki>}} | ||
Line 162: | Line 162: | ||
When running from USB device without SD card present, kernel spams log about missing SD card, workaround for this is to set: | When running from USB device without SD card present, kernel spams log about missing SD card, workaround for this is to set: | ||
{{ | {{outdated|This will only work when not using U-Boot. Configuring through an overlay will be required.}} | ||
boot.loader.raspberryPi.firmwareConfig = "dtparam=sd_poll_once=on"; | |||
{{file|/etc/nixos/configuration.nix|nix|<nowiki> | |||
{ | |||
boot.loader.raspberryPi.firmwareConfig = "dtparam=sd_poll_once=on"; | |||
} | |||
</nowiki>}} | </nowiki>}} | ||
=== GPU support === | === GPU support === | ||
Line 182: | Line 185: | ||
</nowiki>}} | </nowiki>}} | ||
==== With GPU ==== | ==== With GPU ==== | ||
In [https://github.com/NixOS/nixos-hardware/pull/261 nixos-hardware#261] a new option has been added to use the <code>fkms-3d</code> overlay. This will only work with the vendor kernel. | |||
{{file|/etc/nixos/configuration.nix|nix|<nowiki> | {{file|/etc/nixos/configuration.nix|nix|<nowiki> | ||
{ pkgs, ... }: | { pkgs, ... }: | ||
{ | { | ||
imports = [ | |||
.../nixos-hardware/raspberry-pi/4 | |||
]; | |||
hardware.raspberry-pi."4".fkms-3d.enable = true; | |||
hardware. | |||
services.xserver = { | services.xserver = { | ||
enable = true; | enable = true; | ||
displayManager.lightdm.enable = true; | displayManager.lightdm.enable = true; | ||
desktopManager.gnome3.enable = true; | desktopManager.gnome3.enable = true; | ||
}; | }; | ||
} | } | ||
</nowiki>}} | </nowiki>}} | ||
Line 214: | Line 210: | ||
==== Audio ==== | ==== Audio ==== | ||
{{outdated|An equivalent change that works with U-Boot through <code>hardware.deviceTree</code> is needed.}} | |||
In addition to the usual config, you will need to enable audio support explicitly in the firmwareConfig. | In addition to the usual config, you will need to enable audio support explicitly in the firmwareConfig. | ||
Line 239: | Line 237: | ||
Note that the Type-C USB receptacle for the Raspberry Pi 4B '''does not implement Power Delivery (USB PD)'''. This means that it is limited to whatever the power supply will provide when not negotiating power, which is most likely 5V at some undetermined power level. | Note that the Type-C USB receptacle for the Raspberry Pi 4B '''does not implement Power Delivery (USB PD)'''. This means that it is limited to whatever the power supply will provide when not negotiating power, which is most likely 5V at some undetermined power level. | ||
<hr /> | <hr /> |