From 105c702c2e7a1307a8600cb84ffdbcc474a2a8c9 Mon Sep 17 00:00:00 2001 From: Jamie Magee Date: Tue, 5 May 2026 14:03:11 -0700 Subject: [PATCH 1/3] raspberry-pi: wire config.txt module into common profile PR #1788 added hardware.raspberry-pi.configtxt and a defaults file, but nothing imported them, so the options had no effect. Import both from common/default.nix. Board profiles that already import common/ (2, 4, 5) now apply the pi-gen-equivalent defaults. --- raspberry-pi/common/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/raspberry-pi/common/default.nix b/raspberry-pi/common/default.nix index 11f2cfc7..f80e124b 100644 --- a/raspberry-pi/common/default.nix +++ b/raspberry-pi/common/default.nix @@ -1,4 +1,9 @@ { + imports = [ + ./config-txt.nix + ./config-txt-defaults.nix + ]; + boot.initrd.availableKernelModules = [ "usb-storage" "usbhid" From 7bd5ab3ee5541c47509ac6364d9ee06a5a873f9b Mon Sep 17 00:00:00 2001 From: Jamie Magee Date: Tue, 5 May 2026 14:03:19 -0700 Subject: [PATCH 2/3] raspberry-pi/3: import common profile The Pi 3 profile didn't import ../common/default.nix, so it skipped the shared boot.initrd.availableKernelModules (usb-storage, usbhid, vc4). Every other board profile imports common/. Bring Pi 3 in line. --- raspberry-pi/3/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/raspberry-pi/3/default.nix b/raspberry-pi/3/default.nix index 333f2d3f..15dfee8d 100644 --- a/raspberry-pi/3/default.nix +++ b/raspberry-pi/3/default.nix @@ -1,6 +1,10 @@ { lib, pkgs, ... }: { + imports = [ + ../common/default.nix + ]; + boot = { kernelPackages = lib.mkDefault ( pkgs.linuxPackagesFor (pkgs.callPackage ../common/kernel.nix { rpiVersion = 3; }) From e315416e7b84ca8a5e1ce194e6c38618b0ed7184 Mon Sep 17 00:00:00 2001 From: Jasper Chan Date: Mon, 4 May 2026 11:12:07 -0700 Subject: [PATCH 3/3] raspberry/pi/4: disable compat checks when merging overlays --- raspberry-pi/4/apply-overlays-dtmerge.nix | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/raspberry-pi/4/apply-overlays-dtmerge.nix b/raspberry-pi/4/apply-overlays-dtmerge.nix index ab6d5296..d40bcc49 100644 --- a/raspberry-pi/4/apply-overlays-dtmerge.nix +++ b/raspberry-pi/4/apply-overlays-dtmerge.nix @@ -27,17 +27,12 @@ with lib; | xargs -0 cp -v --no-preserve=mode --target-directory "$out" --parents for dtb in $(find "$out" -type f -name '*.dtb'); do - dtbCompat=$(fdtget -t s "$dtb" / compatible 2>/dev/null || true) # skip files without `compatible` string - test -z "$dtbCompat" && continue + fdtget -t s "$dtb" / compatible 2>/dev/null || continue ${flip (concatMapStringsSep "\n") overlays (o: '' - overlayCompat="$(fdtget -t s "${o.dtboFile}" / compatible)" - - # skip incompatible and non-matching overlays - if [[ ! "$dtbCompat" =~ "$overlayCompat" ]]; then - echo "Skipping overlay ${o.name}: incompatible with $(basename "$dtb")" - elif ${ + # skip non-matching overlays + if ${ if ((o.filter or null) == null) then "false" else