Hello there.
I followed nix.dev to install NixOS on a Raspberry Pi.
Now I need to add something to config.txt
. The guide says:
To tweak bootloader options affecting hardware, see config.txt options and change the options by running mount /dev/disk/by-label/FIRMWARE /mnt
and opening /mnt/config.txt
.
I added dtoverlay=gpio-ir,gpio_pin=23
to get my IR receiver to work, but when I try ir-keytable
it says No devices found
. How can I check if the config.txt
is applied?
Here is the output of
dtc -I fs /sys/firmware/devicetree/base
gistfile1.txt
/dts-v1/;
/ {
#address-cells = <0x02>;
memreserve = <0x3b400000 0x4c00000>;
model = "Raspberry Pi 4 Model B Rev 1.5";
serial-number = "1000000059215be3";
#size-cells = <0x01>;
interrupt-parent = <0x01>;
compatible = "raspberrypi,4-model-b\0brcm,bcm2711";
This file has been truncated. show original
The output is the same after I remove dtoverlay=gpio-ir,gpio_pin=23
from config.txt
, leading me to believe that it does not work…
I used one of these overlays linux/arch/arm/boot/dts/overlays at 326dea65f88e75d25960ecce49df23a0d76bbac0 · raspberrypi/linux · GitHub
With the ovmerge Perl script: utils/ovmerge at 53f7816f275c1b77b6cc8d51e4efa7e863a7c40e · raspberrypi/utils · GitHub
It spit out an overlay that I tried to apply with hardware.deviceTree.overlays
, with no success…
May be related:
opened 09:59AM - 02 Jun 21 UTC
0.kind: bug
6.topic: nixos
In NixOS 21.05, the ``hardware.deviceTree.base`` option can no longer be used. A… fter trying to do some research, I figured out that the lines that I was using successfully:
```
hardware.deviceTree.enable = true;
hardware.deviceTree.base = pkgs.device-tree_rpi;
hardware.deviceTree.overlays = [ "${pkgs.device-tree_rpi.overlays}/rpi-poe.dtbo" ];
```
could be replaced with:
```
hardware.deviceTree.enable = true;
hardware.deviceTree.filter = "*rpi*.dtb";
hardware.deviceTree.overlays = [ { name = "poe"; dtboFile = "${pkgs.device-tree_rpi.overlays}/rpi-poe.dtbo"; } ];
```
However this did not work, the device tree overlay is no longer applied.
I suppose this is a straightforward problem for who made the change. Could the documentation be updated to explain how to migrate from ``hardware.deviceTree.base`` ?
Yay! Replacing the compatible
line works.
# Equivalent to:
# https://github.com/raspberrypi/linux/blob/rpi-5.10.y/arch/arm/boot/dts/overlays/vc4-fkms-v3d-overlay.dts
{
name = "rpi4-vc4-fkms-v3d-overlay";
dtsText = ''
// SPDX-License-Identifier: GPL-2.0
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2711";
fragment@1 {
target = <&fb>;
__overlay__ {
status = "disabled";
};
};
fragment@2 {
target = <&firmwarekms>;
1 Like