From dcb92f18204001f3fc75814c84f398fecf8c2237 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C2=B7=F0=90=91=91=F0=90=91=B4=F0=90=91=95=F0=90=91=91?= =?UTF-8?q?=F0=90=91=A9=F0=90=91=A4?= Date: Sat, 22 Aug 2026 12:56:52 -0700 Subject: [PATCH 1/9] asus/proart/px13/hn7306eac: drop patches @ Linux 7.2 tas2783 patches appear to be upstreamed finally. Move assertion to the top-level for Linux 7.0 at minimum. --- asus/proart/px13/hn7306eac/default.nix | 9 +++ .../px13/hn7306eac/tas2783-kernel-patches.nix | 57 +++++++++---------- 2 files changed, 35 insertions(+), 31 deletions(-) diff --git a/asus/proart/px13/hn7306eac/default.nix b/asus/proart/px13/hn7306eac/default.nix index 9472d98a..d55dee72 100644 --- a/asus/proart/px13/hn7306eac/default.nix +++ b/asus/proart/px13/hn7306eac/default.nix @@ -1,4 +1,5 @@ { + config, pkgs, lib, ... @@ -7,9 +8,17 @@ { imports = [ ../default.nix + # no effect at Linux 7.2 as patches are merged ./tas2783-kernel-patches.nix ]; + assertions = [ + { + assertion = lib.versionAtLeast config.boot.kernelPackages.kernel.version "7.0"; + message = "ASUS ProArt PX13 (HN7306EAC) hardware requires Linux ≥ 7.0 (current ${config.boot.kernelPackages.kernel.version})"; + } + ]; + hardware = { alsa.enablePersistence = lib.mkDefault true; firmware = lib.optional (lib.versionOlder pkgs.linux-firmware.version "20260519") ( diff --git a/asus/proart/px13/hn7306eac/tas2783-kernel-patches.nix b/asus/proart/px13/hn7306eac/tas2783-kernel-patches.nix index 0eed3c6b..17e308c2 100644 --- a/asus/proart/px13/hn7306eac/tas2783-kernel-patches.nix +++ b/asus/proart/px13/hn7306eac/tas2783-kernel-patches.nix @@ -1,7 +1,7 @@ { + config, pkgs, lib, - config, ... }: @@ -18,34 +18,29 @@ let }; in { - assertions = [ - { - assertion = lib.versionAtLeast config.boot.kernelPackages.kernel.version "7.0"; - message = "tas2783 patches require Linux ≥ 7.0 (found ${config.boot.kernelPackages.kernel.version})"; - } - ]; - - boot.kernelPatches = [ - (mkPatch "0001-ALSA-tas2783-sdw-add-Playback-to-volume-control" "sha512-IdIy81PXtmQAQ+MVChYDYkoa5RDhQwP2L5efN8cz+tST3nM0Oc0x4SJ4sBnVL7QDJc/WBB0OEnFfTkEt9Id+cQ==") - (mkPatch "0002-Names-to-match-snd_soc_dai_driver-playback-capturest" "sha512-SrCgzceh3rhyYz5tNWHY2jNWyG/qgmU7ZVLtV71iir8HwOrSES7JsunV2E7mb8R66dShY+loV8ovNeMkyuDB7w==") - (mkPatch "0003-removed-unused-fields" "sha512-mWKqFg8AG00TE3oPy5usPPxWf6aIvhxMLDGI+/0+vvjBIFwWv6qh9jSUeid6CAKgAcluPSA8Sag4ESguCeinyw==") - (mkPatch "0004-SOC_SINGLE_RANGE_TLV-uses-snd_soc_get_volsw-snd_soc_" "sha512-G51v725q17UHvfPg4H8V92eSbZ5lcuiF97Zt1EbAtuwrhXefeaZy+hl79sSpVlzzY8pvzIwf6wodAuvp44M01A==") - (mkPatch "0005-dev_set_drvdata-already-called-intas_sdw_probe" "sha512-zk+rKZ/l0oB7JdABtb89x6tUzggP99TSy+3cr+q6QjZFdjGsLPXHxre0YACuKBNx6+JazZE/zEilIvahS4wOLQ==") - (mkPatch "0006-refactor-setting-sa_func_data" "sha512-8djgIJV1LCzDhFLFn/PNfDkE+U0mh2h4Rm2LJMeLUYKQlwzgPMbICh5B3HhCgEVTaUd54OGOSFEf0i6AIm2SIQ==") - (mkPatch "0007-check-AF01-for-init-data" "sha512-gjpdnJDzve37MnyVE52+E9sRkXF9+HtA4XTrBZQiV8ozFwWgIzhO2ZDKSpWbE/kd23PdaUcKX/fPj3J7ZD5YqA==") - (mkPatch "0008-setup-ports" "sha512-uuDa92VXlCsszswv8PHcDbbyfseL6Jt7DWPc5ajG1WSM/FGojRIbbl/2smQyGfE2jPquy5GQfJps7k1cRfpl8w==") - (mkPatch "0009-Already-set-by-SOC_SINGLE_RANGE_TLV-Speaker-Playback" "sha512-qBveCsmwezD13oWF5jBlUybdns5OsDDZji0y0smaKWi9GPAvhw/v66WUnEyC77UF1mvq+OyrWpA4yXwxAFza3Q==") - (mkPatch "0010-control-to-set-channel" "sha512-pL8Ol1ml2QhyKnzZvD+oTaVUPyqOO49uuiEUzyKdnskFwVH+jIluY3IDsmzWv5wTg/9D+CTGC4J8gW55xKwWfg==") - (mkPatch "0011-mute-unmute-using-SND_SOC_DAPM_SWITCH" "sha512-6aB8mBACTIQxU7CTrpR3UXJFdR4KbUOT9/AymyGiuV/9PfWdXZoW/0A09SHFptxRwCv4FG5tZSDZRtKvvYNQdQ==") - (mkPatch "0012-use-SND_SOC_DAPM_REG-to-power-on-off" "sha512-mJ93TxZQ1GuDGar0/6tBd/dlJ3B/41AVhRsViuSaEhykPC4NlIAOWaN9eJj4bxjEEyEQ3REfjHXVnJ3wdCRK9w==") - (mkPatch "0013-reattach-after-resume" "sha512-OdkYPzRDkd4FCd1OTOAfRrQW6JQ9D3Opic/X+sg+pLNGoEEXfph/sLXVYGo9u6DGPJndQZNrXyS4qhJMGPWVMw==") - (mkPatch "0014-defer-check" "sha512-ABSrwsOB+KU39LMxh3N47Ji+edhu5rDQMKMi5rEVXtCU8W56qANpU+ui+bJmOLYyq8c9H1qme+b5nQ6u9zv01w==") - (mkPatch "0015-to-help-alsa-find-them" "sha512-gVJ+0ZO9Oz15/rC08moVSlVglbishJctjH5SnDdI8m3s9hkEY56o8v+R/PlRS3rL+mOa9q3VuO5J40+LrcxDKw==") - (mkPatch "0016-cleanup-controls" "sha512-Jkp7kdi0FmVMlBL/VVzq7hYkCmKoELO0epnExP7ggQuopCzRbVpUQ3giMlj10O69aUBZJ4z3gaMkb1HTYjIXmA==") - # Upstream linux-firmware took a different naming approach to the original patches - { - name = "0017-fix-tas2783-fw-name-0x"; - patch = ./fix-tas2783-fw-name-0x.patch; - } - ]; + boot.kernelPatches = + lib.optionals (lib.versionOlder config.boot.kernelPackages.kernel.version "7.2") + [ + (mkPatch "0001-ALSA-tas2783-sdw-add-Playback-to-volume-control" "sha512-IdIy81PXtmQAQ+MVChYDYkoa5RDhQwP2L5efN8cz+tST3nM0Oc0x4SJ4sBnVL7QDJc/WBB0OEnFfTkEt9Id+cQ==") + (mkPatch "0002-Names-to-match-snd_soc_dai_driver-playback-capturest" "sha512-SrCgzceh3rhyYz5tNWHY2jNWyG/qgmU7ZVLtV71iir8HwOrSES7JsunV2E7mb8R66dShY+loV8ovNeMkyuDB7w==") + (mkPatch "0003-removed-unused-fields" "sha512-mWKqFg8AG00TE3oPy5usPPxWf6aIvhxMLDGI+/0+vvjBIFwWv6qh9jSUeid6CAKgAcluPSA8Sag4ESguCeinyw==") + (mkPatch "0004-SOC_SINGLE_RANGE_TLV-uses-snd_soc_get_volsw-snd_soc_" "sha512-G51v725q17UHvfPg4H8V92eSbZ5lcuiF97Zt1EbAtuwrhXefeaZy+hl79sSpVlzzY8pvzIwf6wodAuvp44M01A==") + (mkPatch "0005-dev_set_drvdata-already-called-intas_sdw_probe" "sha512-zk+rKZ/l0oB7JdABtb89x6tUzggP99TSy+3cr+q6QjZFdjGsLPXHxre0YACuKBNx6+JazZE/zEilIvahS4wOLQ==") + (mkPatch "0006-refactor-setting-sa_func_data" "sha512-8djgIJV1LCzDhFLFn/PNfDkE+U0mh2h4Rm2LJMeLUYKQlwzgPMbICh5B3HhCgEVTaUd54OGOSFEf0i6AIm2SIQ==") + (mkPatch "0007-check-AF01-for-init-data" "sha512-gjpdnJDzve37MnyVE52+E9sRkXF9+HtA4XTrBZQiV8ozFwWgIzhO2ZDKSpWbE/kd23PdaUcKX/fPj3J7ZD5YqA==") + (mkPatch "0008-setup-ports" "sha512-uuDa92VXlCsszswv8PHcDbbyfseL6Jt7DWPc5ajG1WSM/FGojRIbbl/2smQyGfE2jPquy5GQfJps7k1cRfpl8w==") + (mkPatch "0009-Already-set-by-SOC_SINGLE_RANGE_TLV-Speaker-Playback" "sha512-qBveCsmwezD13oWF5jBlUybdns5OsDDZji0y0smaKWi9GPAvhw/v66WUnEyC77UF1mvq+OyrWpA4yXwxAFza3Q==") + (mkPatch "0010-control-to-set-channel" "sha512-pL8Ol1ml2QhyKnzZvD+oTaVUPyqOO49uuiEUzyKdnskFwVH+jIluY3IDsmzWv5wTg/9D+CTGC4J8gW55xKwWfg==") + (mkPatch "0011-mute-unmute-using-SND_SOC_DAPM_SWITCH" "sha512-6aB8mBACTIQxU7CTrpR3UXJFdR4KbUOT9/AymyGiuV/9PfWdXZoW/0A09SHFptxRwCv4FG5tZSDZRtKvvYNQdQ==") + (mkPatch "0012-use-SND_SOC_DAPM_REG-to-power-on-off" "sha512-mJ93TxZQ1GuDGar0/6tBd/dlJ3B/41AVhRsViuSaEhykPC4NlIAOWaN9eJj4bxjEEyEQ3REfjHXVnJ3wdCRK9w==") + (mkPatch "0013-reattach-after-resume" "sha512-OdkYPzRDkd4FCd1OTOAfRrQW6JQ9D3Opic/X+sg+pLNGoEEXfph/sLXVYGo9u6DGPJndQZNrXyS4qhJMGPWVMw==") + (mkPatch "0014-defer-check" "sha512-ABSrwsOB+KU39LMxh3N47Ji+edhu5rDQMKMi5rEVXtCU8W56qANpU+ui+bJmOLYyq8c9H1qme+b5nQ6u9zv01w==") + (mkPatch "0015-to-help-alsa-find-them" "sha512-gVJ+0ZO9Oz15/rC08moVSlVglbishJctjH5SnDdI8m3s9hkEY56o8v+R/PlRS3rL+mOa9q3VuO5J40+LrcxDKw==") + (mkPatch "0016-cleanup-controls" "sha512-Jkp7kdi0FmVMlBL/VVzq7hYkCmKoELO0epnExP7ggQuopCzRbVpUQ3giMlj10O69aUBZJ4z3gaMkb1HTYjIXmA==") + # Upstream linux-firmware took a different naming approach to the original patches + { + name = "0017-fix-tas2783-fw-name-0x"; + patch = ./fix-tas2783-fw-name-0x.patch; + } + ]; } From 2e1a5e1d39b322ac0ba4a6d9c3ba889b02e771b2 Mon Sep 17 00:00:00 2001 From: dmfrpro Date: Mon, 12 Oct 2026 03:23:44 +0300 Subject: [PATCH 2/9] asus/zephyrus/shared: fix param typo Signed-off-by: dmfrpro --- asus/zephyrus/shared/backlight.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asus/zephyrus/shared/backlight.nix b/asus/zephyrus/shared/backlight.nix index 938ce4ac..770efbfb 100644 --- a/asus/zephyrus/shared/backlight.nix +++ b/asus/zephyrus/shared/backlight.nix @@ -4,6 +4,6 @@ boot.kernelParams = [ "i915.enable_dpcd_backlight=1" "nvidia.NVreg_EnableBacklightHandler=0" - "nvidia.NVReg_RegistryDwords=EnableBrightnessControl=0" + "nvidia.NVreg_RegistryDwords=EnableBrightnessControl=0" ]; } From 9d17af9966d80a3e5d698753cc875e3be1f30790 Mon Sep 17 00:00:00 2001 From: Cryolitia PukNgae Date: Mon, 19 Oct 2026 16:01:18 +0800 Subject: [PATCH 3/9] raspberry-pi: Disable unused Pi 1 kernel modules Nixpkgs enables optional kernel modules by default, including the RP1 PWM and camera drivers and the DesignWare I2C driver. The ARM32 build fails in modpost when these drivers reference __aeabi_uldivmod and __aeabi_ldivmod, which are unavailable to kernel modules. Disable the affected drivers when rpiVersion is 1. The Pi 1 uses BCM2835 peripherals and has no RP1 or DesignWare I2C controller, so these drivers are not needed. The BCM2835 PWM and camera drivers remain enabled. OpenWrt excludes the DesignWare I2C core on its older 32-bit Raspberry Pi targets for the same reason. Link: https://github.com/openwrt/openwrt/commit/11de7145c95259899d8880f4d53f933c591fbd00 Link: https://github.com/NixOS/nixpkgs/issues/464515 Signed-off-by: Cryolitia PukNgae --- raspberry-pi/common/kernel.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/raspberry-pi/common/kernel.nix b/raspberry-pi/common/kernel.nix index 92b73547..641bce6c 100644 --- a/raspberry-pi/common/kernel.nix +++ b/raspberry-pi/common/kernel.nix @@ -83,6 +83,18 @@ in PREEMPT = lib.mkForce no; PREEMPT_LAZY = lib.mkForce no; PREEMPT_VOLUNTARY = lib.mkForce yes; + } + # These controllers are absent on Pi 1. Nixpkgs' automatic module selection + # enables them, but they use division helpers unavailable to 32-bit modules. + # https://github.com/NixOS/nixpkgs/issues/464515 + // lib.optionalAttrs (rpiVersion == 1) { + PWM_RP1 = no; + I2C_DESIGNWARE_CORE = no; + I2C_DESIGNWARE_SLAVE = no; + I2C_DESIGNWARE_PLATFORM = no; + I2C_DESIGNWARE_PCI = no; + VIDEO_RP1_CFE = no; + VIDEO_RP1_CFE_DOWNSTREAM = no; }; extraMeta = From 11cefffd510b175f081f9d6424c319730ca165ae Mon Sep 17 00:00:00 2001 From: Cryolitia PukNgae Date: Mon, 19 Oct 2026 16:01:58 +0800 Subject: [PATCH 4/9] raspberry-pi/1: Add Raspberry Pi 1 support The Raspberry Pi SD installer remains in nixpkgs, but its sd-image-raspberrypi.nix configuration still selects linuxKernel.packages.linux_rpi1. Commit b1c58b82b98f ("linux-rpi*: remove") removed that kernel from nixpkgs, leaving the installer unable to evaluate. Move the Pi 1 image configuration to nixos-hardware alongside the vendor kernel. The shared vendor kernel builder accepts rpiVersion = 1, but there is no corresponding board profile. Add an ARMv6 profile with 32-bit U-Boot and the shared firmware installer. Use the legacy boot and initrd settings without the graphics defaults for newer boards. Provide SD-image and installer modules adapted from the nixpkgs image, and exclude the profile from checks without ARMv6 coverage. The image has been cross-compiled but has not been tested on a board, as no Pi 1 hardware was available. Link: https://github.com/NixOS/nixpkgs/blob/b1c58b82b98ff287751c78ee2b96dc5c4384e3b3/nixos/modules/installer/sd-card/sd-image-raspberrypi.nix#L20 Link: https://github.com/NixOS/nixpkgs/commit/b1c58b82b98ff287751c78ee2b96dc5c4384e3b3 Signed-off-by: Cryolitia PukNgae --- README.md | 1 + flake.nix | 1 + raspberry-pi/1/default.nix | 46 +++++++++++++++++++++++++++ raspberry-pi/1/sd-image-installer.nix | 11 +++++++ raspberry-pi/1/sd-image.nix | 28 ++++++++++++++++ raspberry-pi/README.md | 11 ++++--- tests/nixos-tests.nix | 2 ++ 7 files changed, 95 insertions(+), 5 deletions(-) create mode 100644 raspberry-pi/1/default.nix create mode 100644 raspberry-pi/1/sd-image-installer.nix create mode 100644 raspberry-pi/1/sd-image.nix diff --git a/README.md b/README.md index f7f3ac5d..f97b5a9a 100644 --- a/README.md +++ b/README.md @@ -459,6 +459,7 @@ See code for all available configurations. | [Radxa ROCK Pi 4](radxa/rock-pi-4) | `` | `rock-pi-4` | | [Radxa ROCK Pi E](radxa/rock-pi-e) | `` | `rock-pi-e` | | [Razer Blade 14 (RZ09-0530)](razer/blade/14/RZ09-0530) | `` | `razer-blade-14-RZ09-0530` | +| [Raspberry Pi 1](raspberry-pi/1) | `` | `raspberry-pi-1` | | [Raspberry Pi 2](raspberry-pi/2) | `` | `raspberry-pi-2` | | [Raspberry Pi 3](raspberry-pi/3) | `` | `raspberry-pi-3` | | [Raspberry Pi 4](raspberry-pi/4) | `` | `raspberry-pi-4` | diff --git a/flake.nix b/flake.nix index 380a4b1c..ee957f94 100644 --- a/flake.nix +++ b/flake.nix @@ -418,6 +418,7 @@ purism-librem-15v3 = import ./purism/librem/15v3; purism-librem-5r4 = import ./purism/librem/5r4; razer-blade-14-RZ09-0530 = import ./razer/blade/14/RZ09-0530; + raspberry-pi-1 = import ./raspberry-pi/1; raspberry-pi-2 = import ./raspberry-pi/2; raspberry-pi-3 = import ./raspberry-pi/3; raspberry-pi-4 = import ./raspberry-pi/4; diff --git a/raspberry-pi/1/default.nix b/raspberry-pi/1/default.nix new file mode 100644 index 00000000..525f81de --- /dev/null +++ b/raspberry-pi/1/default.nix @@ -0,0 +1,46 @@ +{ lib, pkgs, ... }: + +{ + # Preserve the legacy ARMv6 boot configuration rather than opting into the + # graphics and camera defaults used by the newer Raspberry Pi profiles. + imports = [ + ../common/config-txt.nix + ../common/firmware.nix + ]; + + nixpkgs.hostPlatform = lib.mkDefault "armv6l-linux"; + + boot = { + consoleLogLevel = lib.mkDefault 7; + kernelPackages = lib.mkDefault ( + pkgs.linuxPackagesFor (pkgs.callPackage ../common/kernel.nix { rpiVersion = 1; }) + ); + # The vendor defconfig does not provide the generic PCI storage drivers. + initrd = { + includeDefaultModules = lib.mkDefault false; + systemd.tpm2.enable = lib.mkDefault false; + availableKernelModules = { + mmc_block = true; + usb_storage = true; + usbhid = true; + # EFI variable access is not needed for the U-Boot boot path. + efivarfs = lib.mkForce false; + }; + }; + loader = { + grub.enable = lib.mkDefault false; + generic-extlinux-compatible.enable = lib.mkDefault true; + }; + }; + + hardware.raspberry-pi = { + configtxt.settings.all = { + enable_uart = lib.mkDefault true; + avoid_warnings = lib.mkDefault 1; + }; + firmware.uboot = { + enable = lib.mkDefault true; + package = lib.mkDefault pkgs.ubootRaspberryPi; + }; + }; +} diff --git a/raspberry-pi/1/sd-image-installer.nix b/raspberry-pi/1/sd-image-installer.nix new file mode 100644 index 00000000..1053e2a4 --- /dev/null +++ b/raspberry-pi/1/sd-image-installer.nix @@ -0,0 +1,11 @@ +{ modulesPath, ... }: + +{ + imports = [ + "${modulesPath}/profiles/installation-device.nix" + ./sd-image.nix + ]; + + # The installation media is also the installation target. + installer.cloneConfig = false; +} diff --git a/raspberry-pi/1/sd-image.nix b/raspberry-pi/1/sd-image.nix new file mode 100644 index 00000000..36024ac0 --- /dev/null +++ b/raspberry-pi/1/sd-image.nix @@ -0,0 +1,28 @@ +# Adapted from nixpkgs' installer/sd-card/sd-image-raspberrypi.nix. +{ + config, + lib, + modulesPath, + ... +}: + +{ + imports = [ + # The generic installer utilities include EFI tools broken on 32-bit ARM. + "${modulesPath}/profiles/minimal.nix" + "${modulesPath}/installer/sd-card/sd-image.nix" + ./default.nix + ]; + + # This image targets the Pi 1, whose vendor kernel lacks generic PCI drivers. + hardware.enableAllHardware = lib.mkForce false; + + sdImage = { + # The shared firmware installer also copies the device-tree overlays. + firmwareSize = lib.mkDefault 128; + populateRootCommands = '' + mkdir -p ./files/boot + ${config.boot.loader.generic-extlinux-compatible.populateCmd} -c ${config.system.build.toplevel} -d ./files/boot + ''; + }; +} diff --git a/raspberry-pi/README.md b/raspberry-pi/README.md index 4d894b18..8f7fa228 100644 --- a/raspberry-pi/README.md +++ b/raspberry-pi/README.md @@ -5,8 +5,9 @@ NixOS profiles and modules for Raspberry Pi boards. ## What's here - `common/` has the shared bits: the `linux-rpi` kernel build (vendor defconfig, matching firmware), the `config.txt` generation module, a pinned wireless firmware, and the firmware-partition install module. -- `2/`, `3/`, `4/`, `5/` are the board profiles. Each one picks the right kernel and kernel params. Pi 4 and 5 also set DT filters and the initrd modules they need. +- `1/`, `2/`, `3/`, `4/`, `5/` are the board profiles. They select vendor kernels and configure board-specific boot and hardware settings. Pi 4 and 5 also set DT filters and the initrd modules they need. - The extra files under `4/` are opt-in toggles for Pi 4 hardware: audio, GPIO, I2C, LEDs, touchscreens, and so on. +- Where provided, `sd-image.nix` and `sd-image-installer.nix` combine a board profile with nixpkgs' SD-image builder, optionally adding the NixOS installation environment. ## Using a board profile @@ -24,7 +25,7 @@ These profiles assume the `generic-extlinux-compatible` bootloader (the NixOS mo `hardware.raspberry-pi.firmware` stages the files the Pi firmware needs before Linux starts onto the firmware partition (default `/boot/firmware`): GPU boot code (`bootcode.bin`, `start*.elf`, `fixup*.dat`), vendor device trees and overlays, the rendered `config.txt`, and optionally U-Boot. It is not a new boot method; it just supplies the files the existing `generic-extlinux-compatible` + U-Boot path needs. -When you build an SD image, the module sets `sdImage.populateFirmwareCommands` itself, so the firmware partition is populated at build time with no extra configuration. +When you build an SD image, the module sets `sdImage.populateFirmwareCommands` itself, so the firmware partition is populated at build time with no extra configuration. For cross-compilation, set `nixpkgs.buildPlatform` to the build machine's architecture and `nixpkgs.hostPlatform` to the target board's architecture, unless the profile already selects it. For a running system, set `hardware.raspberry-pi.firmware.enable = true`. An activation script then repopulates the firmware partition on every `nixos-rebuild switch`. It is off by default. @@ -39,11 +40,11 @@ To chainload U-Boot from the firmware, enable `uboot.enable`. It copies `u-boot. } ``` -`uboot.enable` defaults `uboot.package` to nixpkgs' `pkgs.ubootRaspberryPiAarch64`, built from the upstream `rpi_arm64_defconfig`, which covers every 64-bit board (Pi 3/4/5). For a 32-bit board, override `uboot.package` with the matching U-Boot build. On the Pi 5 this boots from SD, but U-Boot can't drive USB/PCIe/RP1 yet, so USB boot, NVMe boot, and a USB keyboard at the U-Boot prompt don't work until Linux takes over. +The shared firmware module defaults `uboot.package` to `pkgs.ubootRaspberryPiAarch64`, built from `rpi_arm64_defconfig` for 64-bit Pi 3/4/5 systems. Board profiles can override this default. For 32-bit systems, use the package matching the board: `pkgs.ubootRaspberryPi` for Pi 1, `pkgs.ubootRaspberryPi2` for Pi 2, or `pkgs.ubootRaspberryPi3_32bit` for Pi 3. On the Pi 5 this boots from SD, but U-Boot can't drive USB/PCIe/RP1 yet, so USB boot, NVMe boot, and a USB keyboard at the U-Boot prompt don't work until Linux takes over. ## `config.txt` -Board profiles import `hardware.raspberry-pi.configtxt`, which renders `config.txt` from Nix options. The defaults track the Raspberry Pi OS pi-gen image: camera and display autodetect, KMS, audio on, `arm_boost`. +Board profiles import `hardware.raspberry-pi.configtxt`, which renders `config.txt` from Nix options. The Pi 2–5 profiles also import `common/config-txt-defaults.nix`, which tracks the Raspberry Pi OS pi-gen image: camera and display autodetect, KMS, audio on, `arm_boost`. ```nix { @@ -174,4 +175,4 @@ To supply your own file, set `configtxt.file`. The module then ignores `settings - No bootloader module: There's no `boot.loader.raspberry-pi` here. Boards rely on `generic-extlinux-compatible` plus U-Boot. Raspberry Pi OS has the GPU firmware load the kernel directly; we go through U-Boot so it reads `extlinux.conf`, which is what gives you the NixOS boot-generation menu and rollbacks. The firmware install module just stages the boot code and (optionally) U-Boot; it doesn't add a firmware-level direct-boot path. Pi 5 boots from SD via U-Boot, but USB, PCIe, and the RP1 don't come up until Linux takes over, so a USB keyboard at the U-Boot prompt won't work on Pi 5 today. - Single pinned kernel: `common/kernel.nix` pins one `linux-rpi` version rather than matching each kernel to its firmware release. -- No Pi 0/02/1 board profiles: `common/kernel.nix` accepts `rpiVersion = 1`, but there's no `0/`, `02/`, or `1/` directory wiring that kernel up into a profile you can import via ``. +- No Pi Zero or Zero 2 board profiles. diff --git a/tests/nixos-tests.nix b/tests/nixos-tests.nix index f4c2b423..6a633f32 100644 --- a/tests/nixos-tests.nix +++ b/tests/nixos-tests.nix @@ -9,6 +9,8 @@ let blackList = [ # does import-from-derivation "toshiba-swanky" + # ARMv6 is not covered by the test platforms + "raspberry-pi-1" # uses custom nixpkgs config "raspberry-pi-2" # deprecated profiles From 4188fc24f46fe4f86e993e75aadc311cbee6702e Mon Sep 17 00:00:00 2001 From: liberodark Date: Thu, 25 Jun 2026 15:37:24 +0200 Subject: [PATCH 5/9] bananapi/bpi-sm10: init --- bananapi/bpi-sm10/default.nix | 12 ++++ bananapi/bpi-sm10/sd-image.nix | 114 +++++++++++++++++++++++++++++++++ flake.nix | 1 + 3 files changed, 127 insertions(+) create mode 100644 bananapi/bpi-sm10/default.nix create mode 100644 bananapi/bpi-sm10/sd-image.nix diff --git a/bananapi/bpi-sm10/default.nix b/bananapi/bpi-sm10/default.nix new file mode 100644 index 00000000..4b3825f6 --- /dev/null +++ b/bananapi/bpi-sm10/default.nix @@ -0,0 +1,12 @@ +{ + lib, + ... +}: + +{ + # The BPI-SM10 (K3-CoM260) shares the same SoC, firmware and boot flow as the + # K3 Pico-ITX. Only the device tree differs. + imports = [ ../../spacemit/k3-pico-itx ]; + + hardware.deviceTree.name = lib.mkForce "spacemit/k3-com260-ifx.dtb"; +} diff --git a/bananapi/bpi-sm10/sd-image.nix b/bananapi/bpi-sm10/sd-image.nix new file mode 100644 index 00000000..2b47b6fd --- /dev/null +++ b/bananapi/bpi-sm10/sd-image.nix @@ -0,0 +1,114 @@ +{ + config, + lib, + modulesPath, + pkgs, + ... +}: + +{ + imports = [ + "${modulesPath}/profiles/base.nix" + "${modulesPath}/installer/sd-card/sd-image.nix" + ./default.nix + ]; + + hardware.enableAllHardware = lib.mkForce false; + + fileSystems."/" = lib.mkForce { + device = "/dev/disk/by-partlabel/nixos-rootfs"; + fsType = "ext4"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-label/ESP"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" + ]; + }; + + image.fileName = "${config.image.baseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}-bpi-sm10.img"; + + sdImage = { + expandOnBoot = true; + firmwarePartitionOffset = 12; + firmwarePartitionName = "ESP"; + firmwareSize = 256; + + populateFirmwareCommands = + let + systemdBoot = "${pkgs.systemd}/lib/systemd/boot/efi/systemd-bootriscv64.efi"; + kernel = "${config.system.build.kernel}/${config.system.boot.loader.kernelFile}"; + initrd = "${config.system.build.initialRamdisk}/${config.system.boot.loader.initrdFile}"; + dtb = "${config.hardware.deviceTree.package}/${config.hardware.deviceTree.name}"; + kernelParams = lib.concatStringsSep " " config.boot.kernelParams; + in + '' + mkdir -p firmware/EFI/BOOT firmware/EFI/systemd firmware/EFI/nixos + mkdir -p firmware/loader/entries + + cp ${systemdBoot} firmware/EFI/BOOT/BOOTRISCV64.EFI + cp ${systemdBoot} firmware/EFI/systemd/systemd-bootriscv64.efi + + cp ${kernel} firmware/EFI/nixos/kernel.efi + cp ${initrd} firmware/EFI/nixos/initrd + cp ${dtb} firmware/EFI/nixos/k3_com260_ifx.dtb + + cat > firmware/loader/loader.conf < firmware/loader/entries/nixos.conf < firmware/startup.nsh < Date: Fri, 23 Oct 2026 02:41:23 +0600 Subject: [PATCH 6/9] dell/latitude/3530: init --- README.md | 1 + dell/latitude/3530/default.nix | 9 +++++++++ flake.nix | 1 + 3 files changed, 11 insertions(+) create mode 100644 dell/latitude/3530/default.nix diff --git a/README.md b/README.md index f7f3ac5d..0284d5bd 100644 --- a/README.md +++ b/README.md @@ -163,6 +163,7 @@ See code for all available configurations. | [Dell Inspiron 7559](dell/inspiron/7559) | `` | `dell-inspiron-7559` | | [Dell Latitude 3340](dell/latitude/3340) | `` | `dell-latitude-3340` | | [Dell Latitude 3480](dell/latitude/3480) | `` | `dell-latitude-3480` | +| [Dell Latitude 3530](dell/latitude/3530) | `` | `dell-latitude-3530` | | [Dell Latitude 5490](dell/latitude/5490) | `` | `dell-latitude-5490` | | [Dell Latitude 5520](dell/latitude/5520) | `` | `dell-latitude-5520` | | [Dell Latitude 7280](dell/latitude/7280) | `` | `dell-latitude-7280` | diff --git a/dell/latitude/3530/default.nix b/dell/latitude/3530/default.nix new file mode 100644 index 00000000..27e359f6 --- /dev/null +++ b/dell/latitude/3530/default.nix @@ -0,0 +1,9 @@ +{ ... }: + +{ + imports = [ + ../../../common/cpu/intel/alder-lake + ../../../common/pc/laptop + ../../../common/pc/ssd + ]; +} diff --git a/flake.nix b/flake.nix index ae1b93b4..a7b299b0 100644 --- a/flake.nix +++ b/flake.nix @@ -119,6 +119,7 @@ dell-inspiron-7559 = import ./dell/inspiron/7559; dell-latitude-3340 = import ./dell/latitude/3340; dell-latitude-3480 = import ./dell/latitude/3480; + dell-latitude-3530 = import ./dell/latitude/3530; dell-latitude-5490 = import ./dell/latitude/5490; dell-latitude-5520 = import ./dell/latitude/5520; dell-latitude-7280 = import ./dell/latitude/7280; From 0cc5d9231c00e597687f598a55040f0ebf4fd04c Mon Sep 17 00:00:00 2001 From: Faeiz Mahrus Date: Fri, 23 Oct 2026 02:55:30 +0600 Subject: [PATCH 7/9] dell/latitude/3530: added README.md --- dell/latitude/3530/README.md | 95 ++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 dell/latitude/3530/README.md diff --git a/dell/latitude/3530/README.md b/dell/latitude/3530/README.md new file mode 100644 index 00000000..4dec689b --- /dev/null +++ b/dell/latitude/3530/README.md @@ -0,0 +1,95 @@ +# Dell Latitude 3530 + +Laptop was release in 2022, Has official Ubuntu Certification: https://ubuntu.com/certified/202205-30271 +Every hardware in this laptop works with/is supported by upstream Linux Kernel 6.18 LTS as of 23-10-2026 +The UEFI firmware of this laptop has an issue where it will cause random system hangs if Hyperthreading is turned off, behavior observed under both Windows and various Linux distros. + +`lspci` output and product name confirmation : + +```bash +❯ cat /sys/class/dmi/id/product_name +Latitude 3530 + +❯ lspci -nnk +00:00.0 Host bridge [0600]: Intel Corporation Device [8086:4609] (rev 04) + Subsystem: Dell Device [1028:0bc3] +00:02.0 VGA compatible controller [0300]: Intel Corporation Alder Lake-UP3 GT1 [UHD Graphics] [8086:46b3] (rev 0c) + Subsystem: Dell Device [1028:0bc3] + Kernel driver in use: i915 + Kernel modules: i915, xe +00:04.0 Signal processing controller [1180]: Intel Corporation Alder Lake Innovation Platform Framework Processor Participant [8086:461d] (rev 04) + Subsystem: Dell Device [1028:0bc3] + Kernel driver in use: proc_thermal_pci + Kernel modules: processor_thermal_device_pci +00:06.0 PCI bridge [0604]: Intel Corporation 12th Gen Core Processor PCI Express x4 Controller #0 [8086:464d] (rev 04) + Subsystem: Dell Device [1028:0bc3] + Kernel driver in use: pcieport +00:07.0 PCI bridge [0604]: Intel Corporation Alder Lake-P Thunderbolt 4 PCI Express Root Port #0 [8086:466e] (rev 04) + Subsystem: Dell Device [1028:0bc3] + Kernel driver in use: pcieport +00:08.0 System peripheral [0880]: Intel Corporation 12th Gen Core Processor Gaussian & Neural Accelerator [8086:464f] (rev 04) + Subsystem: Dell Device [1028:0bc3] +00:0d.0 USB controller [0c03]: Intel Corporation Alder Lake-P Thunderbolt 4 USB Controller [8086:461e] (rev 04) + Subsystem: Dell Device [1028:0bc3] + Kernel driver in use: xhci_hcd + Kernel modules: xhci_pci +00:0d.2 USB controller [0c03]: Intel Corporation Alder Lake-P Thunderbolt 4 NHI #0 [8086:463e] (rev 04) + Subsystem: Dell Device [1028:0bc3] + Kernel driver in use: thunderbolt + Kernel modules: thunderbolt +00:12.0 Serial controller [0700]: Intel Corporation Alder Lake-P Integrated Sensor Hub [8086:51fc] (rev 01) + Subsystem: Dell Device [1028:0bc3] + Kernel driver in use: intel_ish_ipc + Kernel modules: 8250_pci, intel_ish_ipc +00:14.0 USB controller [0c03]: Intel Corporation Alder Lake PCH USB 3.2 xHCI Host Controller [8086:51ed] (rev 01) + Subsystem: Dell Device [1028:0bc3] + Kernel driver in use: xhci_hcd + Kernel modules: xhci_pci +00:14.2 RAM memory [0500]: Intel Corporation Alder Lake PCH Shared SRAM [8086:51ef] (rev 01) + Subsystem: Dell Device [1028:0bc3] +00:14.3 Network controller [0280]: Intel Corporation Alder Lake-P PCH CNVi WiFi [8086:51f0] (rev 01) + Subsystem: Intel Corporation Dual Band Wi-Fi 6(802.11ax) AX201 160MHz 2x2 [Harrison Peak] [8086:4070] + Kernel driver in use: iwlwifi + Kernel modules: iwlwifi +00:15.0 Serial bus controller [0c80]: Intel Corporation Alder Lake PCH Serial IO I2C Controller #0 [8086:51e8] (rev 01) + Subsystem: Dell Device [1028:0bc3] + Kernel driver in use: intel-lpss + Kernel modules: intel_lpss_pci +00:15.1 Serial bus controller [0c80]: Intel Corporation Alder Lake PCH Serial IO I2C Controller #1 [8086:51e9] (rev 01) + Subsystem: Dell Device [1028:0bc3] + Kernel driver in use: intel-lpss + Kernel modules: intel_lpss_pci +00:16.0 Communication controller [0780]: Intel Corporation Alder Lake PCH HECI Controller [8086:51e0] (rev 01) + Subsystem: Dell Device [1028:0bc3] + Kernel driver in use: mei_me + Kernel modules: mei_me +00:17.0 SATA controller [0106]: Intel Corporation Alder Lake-P SATA AHCI Controller [8086:51d3] (rev 01) + Subsystem: Dell Device [1028:0bc3] + Kernel driver in use: ahci + Kernel modules: ahci +00:1d.0 PCI bridge [0604]: Intel Corporation Alder Lake PCI Express Root Port #9 [8086:51b0] (rev 01) + Subsystem: Dell Device [1028:0bc3] + Kernel driver in use: pcieport +00:1f.0 ISA bridge [0601]: Intel Corporation Alder Lake PCH eSPI Controller [8086:5182] (rev 01) + Subsystem: Dell Device [1028:0bc3] +00:1f.3 Multimedia audio controller [0401]: Intel Corporation Alder Lake PCH-P High Definition Audio Controller [8086:51c8] (rev 01) + Subsystem: Dell Device [1028:0bc3] + Kernel driver in use: sof-audio-pci-intel-tgl + Kernel modules: snd_soc_avs, snd_sof_pci_intel_tgl, snd_hda_intel +00:1f.4 SMBus [0c05]: Intel Corporation Alder Lake PCH-P SMBus Host Controller [8086:51a3] (rev 01) + Subsystem: Dell Device [1028:0bc3] + Kernel driver in use: i801_smbus + Kernel modules: i2c_i801 +00:1f.5 Serial bus controller [0c80]: Intel Corporation Alder Lake-P PCH SPI Controller [8086:51a4] (rev 01) + Subsystem: Dell Device [1028:0bc3] + Kernel driver in use: intel-spi + Kernel modules: spi_intel_pci +01:00.0 Non-Volatile memory controller [0108]: SK hynix BC901 NVMe Solid State Drive (DRAM-less) [1c5c:1d59] (rev 03) + Subsystem: SK hynix BC901 NVMe Solid State Drive (DRAM-less) [1c5c:1d59] + Kernel driver in use: nvme + Kernel modules: nvme +2c:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15) + Subsystem: Dell Device [1028:0bc3] + Kernel driver in use: r8169 + Kernel modules: r8169 +``` From 5d01b9f3431c2fc054a8953b375ea6d3ea2bd102 Mon Sep 17 00:00:00 2001 From: Jamie Magee Date: Sat, 24 Oct 2026 17:08:22 -0700 Subject: [PATCH 8/9] raspberry-pi: migrate PWM0 to its firmware overlay --- raspberry-pi/4/pwm0.nix | 75 ++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 43 deletions(-) diff --git a/raspberry-pi/4/pwm0.nix b/raspberry-pi/4/pwm0.nix index da93a767..13b11c56 100644 --- a/raspberry-pi/4/pwm0.nix +++ b/raspberry-pi/4/pwm0.nix @@ -1,50 +1,39 @@ -{ config, lib, ... }: +{ lib, ... }: -let - cfg = config.hardware.raspberry-pi."4".pwm0; -in { - options.hardware = { - raspberry-pi."4".pwm0 = { - enable = lib.mkEnableOption "support for the hardware pwm0 channel on GPIO_18"; - }; - }; + imports = [ + (lib.mkRemovedOptionModule + [ + "hardware" + "raspberry-pi" + "4" + "pwm0" + ] + '' + If hardware.raspberry-pi."4".pwm0.enable was false, remove it without adding firmware configuration. + If it was true, use the pwm firmware overlay for PWM0 on GPIO18: - config = lib.mkIf cfg.enable { - hardware.deviceTree = { - overlays = [ - { - name = "pwm-overlay"; - dtsText = '' - /dts-v1/; - /plugin/; - / { - compatible = "brcm,bcm2711"; - - fragment@0 { - target = <&gpio>; - __overlay__ { - pwm_pins: pwm_pins { - brcm,pins = <18>; - brcm,function = <2>; /* Alt5 */ - }; + { + boot.loader.generic-extlinux-compatible.useGenerationDeviceTree = false; + hardware.raspberry-pi.configtxt.deviceTreeOverlays.pi4 = [ + { + pwm = { + pin = 18; + func = 2; + clock = 100000000; }; - }; + } + ]; + } - fragment@1 { - target = <&pwm>; - __overlay__ { - pinctrl-names = "default"; - assigned-clock-rates = <100000000>; - status = "okay"; - pinctrl-0 = <&pwm_pins>; - }; - }; + The removed pwm0 module explicitly assigned a 100 MHz clock. + Keep clock = 100000000 to preserve that assignment. + Without clock, the pwm overlay leaves the base clock configuration unchanged: + https://github.com/raspberrypi/linux/blob/e165a3e0c5c6729d077c30c6d720c029d688d99d/arch/arm/boot/dts/overlays/pwm-overlay.dts - }; - ''; - } - ]; - }; - }; + Before switching, migrate any remaining hardware.deviceTree.overlays used only in generation DTBs. + For firmware installation, read "Device tree overlays" in raspberry-pi/README.md. + '' + ) + ]; } From 6075dd2edd23bbca2959be4400473146a361f6b4 Mon Sep 17 00:00:00 2001 From: Jamie Magee Date: Sun, 25 Oct 2026 15:18:55 -0700 Subject: [PATCH 9/9] raspberry-pi: clarify PWM0 migration guidance --- raspberry-pi/4/pwm0.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/raspberry-pi/4/pwm0.nix b/raspberry-pi/4/pwm0.nix index 13b11c56..d4d076a1 100644 --- a/raspberry-pi/4/pwm0.nix +++ b/raspberry-pi/4/pwm0.nix @@ -10,8 +10,7 @@ "pwm0" ] '' - If hardware.raspberry-pi."4".pwm0.enable was false, remove it without adding firmware configuration. - If it was true, use the pwm firmware overlay for PWM0 on GPIO18: + To enable PWM0 on GPIO18, use the pwm firmware overlay: { boot.loader.generic-extlinux-compatible.useGenerationDeviceTree = false; @@ -29,7 +28,7 @@ The removed pwm0 module explicitly assigned a 100 MHz clock. Keep clock = 100000000 to preserve that assignment. Without clock, the pwm overlay leaves the base clock configuration unchanged: - https://github.com/raspberrypi/linux/blob/e165a3e0c5c6729d077c30c6d720c029d688d99d/arch/arm/boot/dts/overlays/pwm-overlay.dts + https://github.com/raspberrypi/linux/blob/rpi-6.18.y/arch/arm/boot/dts/overlays/pwm-overlay.dts Before switching, migrate any remaining hardware.deviceTree.overlays used only in generation DTBs. For firmware installation, read "Device tree overlays" in raspberry-pi/README.md.