Commit graph

123 commits

Author SHA1 Message Date
Sandro Jäckel
50a9758cc0
raspberry-pi/common: fix infinite recursion when building options.json 2026-05-14 23:59:22 +02:00
Doron Behar
9bd7c80d43
Merge pull request #1824 from Gigahawk/rpi4-always-apply-overlay
raspberry/pi/4: disable compat checks when merging overlays
2026-05-12 13:37:22 +00:00
Doron Behar
0a1d15fc50
Merge pull request #1862 from JamieMagee/raspberry-pi/3-import-common
raspberry-pi/3: import common profile
2026-05-12 13:26:04 +00:00
Doron Behar
c0573b3113
Merge pull request #1861 from JamieMagee/raspberry-pi/wire-configtxt
raspberry-pi: wire config.txt module into common profile
2026-05-12 13:25:37 +00:00
Jasper Chan
e315416e7b raspberry/pi/4: disable compat checks when merging overlays 2026-05-11 12:07:46 -07:00
Jamie Magee
7bd5ab3ee5 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.
2026-05-05 14:04:57 -07:00
Jamie Magee
105c702c2e 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.
2026-05-05 14:04:51 -07:00
Jamie Magee
ae243122dd raspberry-pi: restore postConfigure sed for LOCALVERSION
freeform "" can't emit an empty string through nixpkgs mkValue; it renders as the literal "", so CONFIG_LOCALVERSION ends up two chars and modDirVersion becomes 6.12.75"". Bring back the sed from before #1841.

Fixes #1859.
2026-05-05 13:34:59 -07:00
Jamie Magee
88cd2fa6e9 raspberry-pi: match RPi vendor defconfigs in kernel config
Override the nixpkgs common-config.nix values that conflict with the RPi
vendor defconfigs. Without these the kernel config silently differs from
the vendor defconfig.

mkForce is used only on options where nixpkgs common-config sets a
conflicting value at normal priority.

Ref: https://github.com/raspberrypi/linux/tree/rpi-6.12.y/arch/arm64/configs
2026-05-04 08:50:24 -07:00
Jamie Magee
554e00a592 raspberry-pi: replace postConfigure sed hack with structuredExtraConfig
Set CONFIG_LOCALVERSION via structuredExtraConfig instead of patching
.config and auto.conf with sed after configure. The vendor defconfigs
set -v7, -v8, -v8-16k which breaks modDirVersion.
2026-05-04 08:49:55 -07:00
Doron Behar
10c5286181
Merge pull request #1840 from JamieMagee/raspberry-pi/dtb-fixup
raspberry-pi: fix DTB name mapping for U-Boot
2026-05-04 12:09:10 +00:00
Ratchanan Srirattanamet
e879889fe2 raspberry-pi/common/kernel: 6.12.47-stable_20250916 -> 6.12.75-1+rpt1
As mentioned in Nixpkgs PR [^1], Raspberry Pi folks stop tagging both
raspberrypi/linux and raspberrypi/firmware GitHub repo. So, I switched
my reference point to Raspberry Pi OS, which publishes their packaging
for Linux kernel in RPi-Distro/linux-packaging.

The version is set to Debian packaging's version, and the commit comes
from the changelog entry for that version.

The old code structure is somewhat kept in case Raspberry Pi ever tags
their raspberrypi/linux repo again.

[^1]: https://github.com/NixOS/nixpkgs/pull/493115
2026-05-04 15:50:53 +07:00
Jamie Magee
57fd23db81 raspberry-pi: fix DTB name mapping for U-Boot
- Gate on rpiVersion instead of architecture; skip for Pi 4+ where
  vendor and upstream DTB names already match
- Fix bcm2835-rpi-zero.dtb: was copied from bcm2708-rpi-b-plus (wrong
  board), now uses bcm2708-rpi-zero
- Drop bcm2711-rpi-4-b -> bcm2838-rpi-4-b copy; nothing uses bcm2838-*

Ref: https://github.com/u-boot/u-boot/blob/master/board/raspberrypi/rpi/rpi.c
2026-05-03 12:53:10 -07:00
Doron Behar
1a9b2d1633
Merge pull request #1773 from fkokosinski/rpi5
raspberry-pi/5: set generic-extlinux-compatible by default
2026-05-03 07:55:26 +00:00
Jamie Magee
d7514338e2 raspberry-pi: replace lib.overrideDerivation with .overrideAttrs
lib.overrideDerivation is deprecated and strips passthru attributes
(.configfile, .moduleBuildDependencies, etc.) from the kernel
derivation, which breaks downstream users expecting a standard
buildLinux output.

.overrideAttrs preserves passthru and matches every other custom
kernel in this repo.
2026-04-24 14:43:21 -07:00
Filip Kokosiński
8adb8e570b raspberry-pi/5: set generic-extlinux-compatible by default
This allows the generic ubootRaspberryPiAarch64 package from nixpkgs to
be used with Raspberry Pi 5.

Signed-off-by: Filip Kokosiński <filip.kokosinski@gmail.com>
2026-04-15 21:13:12 +02:00
koral
4593bb129d fix(raspberry-pi): Explicitly convert integers to strings 2026-04-01 20:47:00 +02:00
Jörg Thalheim
f4c4c2c0c9
Merge pull request #1768 from concatime/feature/add-missing-modules-of-rpi5
Add netboot support for Raspberry Pi 5
2026-03-31 05:04:29 +00:00
Jörg Thalheim
504b7c9083
Merge pull request #1783 from k0ral/koral/raspberry-poe-fan
feat(raspberry-pi): Temperature thresholds for fan speed of PoE HAT can now be configured
2026-03-31 04:52:00 +00:00
Jamie Magee
b4766ffecf config-txt: fix null removal, file option as types.path
null was not in the settings type, so mkForce null to remove a default
was a type error. Added nullOr to atom and filter nulls in recurse.

Changed file from types.str to types.path with pkgs.writeText — this
is how services.mysql.configFile and similar options work. Moved the
generated file into the option default (with defaultText) rather than
setting it in the config block.
2026-03-09 21:22:51 -07:00
Jamie Magee
a688dfcbb5 raspberry-pi: add config.txt generation module
Two new files in raspberry-pi/common/:

config-txt.nix lets you declare config.txt contents through
hardware.raspberry-pi.configtxt.settings (RFC 42 style — plain
values, null to remove, no enable/value wrappers).

config-txt-defaults.nix has the same defaults as Raspberry Pi OS:
vc4-kms-v3d, audio on, arm_boost, CM4 otg_mode, CM5 dwc2, etc.
All mkDefault so they are easy to override.

Not wired into board profiles yet — that comes with the RPi 5
sub-module work. Based on nvmd/nixos-raspberrypi.
2026-03-08 23:18:35 -07:00
koral
cbbc29c7f3 feat(raspberry-pi): Temperature thresholds for fan speed of PoE HAT can now be configured 2026-03-07 10:13:36 +01:00
Issam E. Maghni
34360c4c63 raspberry-pi/5: add macb module if netboot
This module is required to have Ethernet in initial RAM disk.
2026-02-28 14:01:28 -05:00
Issam E. Maghni
011660e3f7 raspberry-pi/5: add modules for RP1 controller 2026-02-28 14:01:28 -05:00
Issam E. Maghni
722ef6b5be raspberry-pi/5: add pcie-brcmstb module 2026-02-28 14:01:28 -05:00
Issam E. Maghni
d736553cca raspberry-pi/5: filter Device Tree blobs 2026-02-28 14:01:28 -05:00
Issam E. Maghni
076b2a5116 raspberry-pi: add vc4 to common modules
Raspberry Pi 2 and 3 will now have it too.
2026-02-28 14:01:28 -05:00
Issam E. Maghni
9ad075ca00 raspberry-pi: add usbhid to common modules
Raspberry Pi 2 will now have it too.
2026-02-28 14:01:28 -05:00
Issam E. Maghni
114dfa1989 raspberry-pi: add usb-storage to common modules
Raspberry Pi 2 will now have it too.
2026-02-28 14:01:28 -05:00
Issam E. Maghni
25b82e0755 chore: format raspberry-pi/ with nixfmt --strict 2026-02-28 14:01:28 -05:00
Cryolitia PukNgae
c8f766fd11 raspberry-pi: move kernel and firmware from nixpkgs
As part of the gradual phasing out of linux_rpi in nixpkgs

Link: https://github.com/NixOS/nixpkgs/pull/477665

Signed-off-by: Cryolitia PukNgae <Cryolitia@gmail.com>
2026-01-18 23:19:14 +08:00
Issam E. Maghni
fc4c7c6ec7 meta: rename module to pcie-brcmstb
https://github.com/torvalds/linux/blob/v6.17/drivers/pci/controller/Makefile#L37
2025-11-06 15:05:04 -05:00
Issam E. Maghni
744975050f meta: rename module to usb-storage
https://github.com/torvalds/linux/blob/v6.17/drivers/usb/storage/Kconfig#L23-L24
> To compile this driver as a module, choose M here: the
> module will be called usb-storage.
2025-11-06 15:05:04 -05:00
Jörg Thalheim
3e24540eb9
Merge pull request #1663 from concatime/feat/add-only-wireless-firmwares
raspberry-pi/4: add only wireless firmwares
2025-11-06 11:04:51 +00:00
Issam E. Maghni
ec135126c1 raspberry-pi/4: add genet module to initrd if netboot
This module is required to have Ethernet in initial RAM disk.

It solves the issue encountered in this thread:
https://discourse.nixos.org/t/netboot-into-nfs-root-instead-of-the-fat-netboot-ramdisk/8556/2
2025-11-05 19:31:43 -05:00
Issam E. Maghni
2a3a409ac5 raspberry-pi/4: add only wireless firmwares 2025-11-04 15:28:35 -05:00
Sandro
9ed85f8afe
Merge pull request #1633 from NixOS/pi4-rendering
raspberrypi/4: fix many option rendering
2025-10-10 14:30:35 +00:00
Sandro Jäckel
eb9e8e10ac
raspberrypi/4: fix many option rendering 2025-10-10 15:50:52 +02:00
Sandro Jäckel
d0955d227d
raspberry-pi/3: load usbhid and usb_storage 2025-10-07 22:08:20 +02:00
Jörg Thalheim
003318603f
Merge branch 'master' into tc358743-4-lane 2025-09-03 20:40:56 +02:00
Jörg Thalheim
ea1e368e75
Merge pull request #1559 from moduon/rpi-tmp-crb
fix(raspberry-pi-4): enable building kernel
2025-09-01 18:01:20 +00:00
Jörg Thalheim
6b7941884f
Merge pull request #1562 from hatch01/fix-tc358743
fix: tc358743 dt overlay
2025-09-01 18:00:28 +00:00
Jasper Chan
c4af46bb6a raspberry-pi/4: support enabling/disabling media-controller api on tc358743 2025-08-13 21:48:22 -07:00
Jairo Llopis
79649965c5
fix(raspberry-pi-4): enable building kernel
Fixes https://github.com/NixOS/nixos-hardware/issues/858
2025-08-11 08:12:40 +02:00
eymeric
680761f019
fix: tc358743 dt overlay 2025-08-08 22:41:18 +02:00
Jasper Chan
6015af43f3 raspberry-pi/4: support 4lane csi 2025-07-08 12:26:38 -07:00
Andre
51e51e6014 chore: format repo using treefmt-nix and nixfmt-rfc-style 2025-06-04 12:35:54 -04:00
Chris McDonough
50c1d00e9d add optional config that makes lgpio and pigpio work 2025-05-28 20:32:58 -04:00
Karolis Stasaitis
8f44cbb48c raspberry-pi-4: poe-hat: add PWM polarity value 2025-02-24 08:09:17 +00:00
Jörg Thalheim
75a920536c rpi2: switch to extlinux bootloader 2025-01-07 08:16:49 +00:00