Commit Graph

744 Commits

Author SHA1 Message Date
Will Fancher
5e52a217ce Revert "linux: add MODULE_DECOMPRESS to common-config.nix" 2026-08-05 01:40:32 -04:00
Ben Siraphob
857a1c3a4f pkgs/os-specific: fix typos
Assisted-by: Claude Code (claude-opus-5)
2026-08-02 11:15:27 -07:00
K900
d67a1ddd7b linux: add MODULE_DECOMPRESS to common-config.nix (#546157) 2026-07-28 07:33:40 +00:00
Avery Terrel
92453f265c linux: enable BSD_DISKLABEL
This enables support for reading subpartitions created on BSD systems.
UFS read-only support is already enabled (=m) by default, so no changes
are necessary.
2026-07-27 21:41:18 -05:00
Jared Baur
8d721cd432 linux: add MODULE_DECOMPRESS to common-config.nix
Enabling `CONFIG_MODULE_DECOMPRESS` allows for the kernel to natively
support module decompression via the `MODULE_INIT_COMPRESSED_FILE` flag
to `finit_module()`. This makes it easier for kernel module loading
utilities such as kmod since they don't need to be shipped with the
userspace decompression libraries.
2026-07-26 20:39:31 -07:00
Leon Hubrich
bffac65843 linux/common-config: enable TCP_AO on >= 6.7
Enables TCP Authentication Option (RFC 5925) support in the kernel.
Gated to 6.7+ where the option was introduced.
2026-07-24 19:40:23 +02:00
Alyssa Ross
8c1c48baf8 linux/common-config: update for 7.2-rc1 2026-06-29 19:11:50 +02:00
K900
143dd2e587 linux/common-config: adjust preempt settings to avoid conflicts
The only difference on all vanilla kernels across {aarch64,x86_64}-linux
is that aarch64-linux 6.18 gets PREEMPT_LAZY consistently.
2026-06-14 14:20:40 +03:00
Alyssa Ross
2d18606282 lib/systems: move kernel configuration out of the platform structure (#530133) 2026-06-10 17:39:49 +00:00
Alyssa Ross
c47d498673 linux: Adjust config to allow booting of installer ISO on ppc64 (#486572) 2026-06-10 12:31:22 +00:00
Emily
31d1d80b3f lib/systems: move kernel configuration out of the platform structure
Currently, you need to override `stdenv.hostPlatform` to request a
compressed kernel on AArch64, and the kernel configuration is split
between the central structured configuration and string snippets in
platform definitions. This has consequently made the latter bitrot
terribly. Since the platform‐specific logic is now very limited after
cleaning up the detritus, we can move it into the kernel derivation
and expose the relevant configuration there for anyone who wants to
customize it further or needs to read it out.

Co-authored-by: zowoq <59103226+zowoq@users.noreply.github.com>
2026-06-10 11:17:38 +10:00
K900
fb79b0f3f1 linux/common-config: move USB_XHCI_TEGRA from lib/systems aarch64-multiplatform (#529436) 2026-06-08 09:15:12 +00:00
zowoq
9497b712f6 linux/common-config: move USB_XHCI_TEGRA from lib/systems aarch64-multiplatform
Co-authored-by: Emily <vcs@emily.moe>
2026-06-08 18:05:35 +10:00
K900
017b52a61a linux/common-config: Use LIST_HARDENED instead on >= 6.6 (#529025) 2026-06-07 07:28:12 +00:00
dramforever
4df979114f linux/common-config: Use LIST_HARDENED instead on >= 6.6
According to the message in the patch that introduced LIST_HARDENED [1],
DEBUG_LIST was not optimized for performance in production and presents
a significant performance hit in hot paths in some workloads. Use the
new LIST_HARDENED option instead on >= 6.6 for better performance.

[1]: https://git.kernel.org/torvalds/c/aebc7b0d8d91bbc69e976909963046bc48bca4fd
2026-06-07 13:36:43 +08:00
Pratham Patel
32861fa28b linux/common-config: enable ARM_SMMU_V3_SVA on aarch64
This makes CUDA compute work with the GB10 platform on my ASUS Ascent
GX10. This wasn't enabled by `autoModules` because it is a boolean.

Before:
```
$ llama-cli --list-devices
0.00.468.603 E ggml_cuda_init: failed to initialize CUDA: initialization error
Available devices:

$ zcat /proc/config.gz | grep CONFIG_ARM_SMMU_V3_SVA=

$ echo $?
1
```

After:
```
$ llama-cli --list-devices
Available devices:
  CUDA0: NVIDIA GB10 (124534 MiB, 44410 MiB free)

$ zcat /proc/config.gz | grep CONFIG_ARM_SMMU_V3_SVA=
CONFIG_ARM_SMMU_V3_SVA=y
```

Here is the information about the GPU on the GB10 platform:
```
$ sudo lspci -vvv -s 000f:01:00.0
000f:01:00.0 VGA compatible controller: NVIDIA Corporation GB20B [GB10] (rev a1) (prog-if 00 [VGA controller])
        Subsystem: NVIDIA Corporation Device 0000
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0
        Interrupts: pin B disabled, MSI(X) routed to IRQ 193-200
        IOMMU group: 20
        Region 0: Memory at 24000000 (64-bit, prefetchable) [size=64M]
        Capabilities: [40] Power Management version 3
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [48] MSI: Enable- Count=1/16 Maskable+ 64bit+
                Address: 0000000000000000  Data: 0000
                Masking: 00000000  Pending: 00000000
        Capabilities: [60] Express (v2) Endpoint, IntMsgNum 0
                DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
                        ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset+ SlotPowerLimit 0W TEE-IO-
                DevCtl: CorrErr+ NonFatalErr+ FatalErr+ UnsupReq+
                        RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+ FLReset-
                        MaxPayload 128 bytes, MaxReadReq 512 bytes
                DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend-
                LnkCap: Port #0, Speed 2.5GT/s, Width x16, ASPM L1, Exit Latency L1 <4us
                        ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp+
                LnkCtl: ASPM Disabled; RCB 128 bytes, LnkDisable- CommClk-
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt- FltModeDis-
                LnkSta: Speed 2.5GT/s, Width x1 (downgraded)
                        TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
                DevCap2: Completion Timeout: Range AB, TimeoutDis+ NROPrPrP- LTR+
                         10BitTagComp+ 10BitTagReq+ OBFF Via message, ExtFmt- EETLPPrefix+, MaxEETLPPrefixes 1
                         EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
                         FRS- TPHComp- ExtTPHComp-
                         AtomicOpsCap: 32bit- 64bit- 128bitCAS-
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-
                         AtomicOpsCtl: ReqEn+
                         IDOReq- IDOCompl- LTR+ EmergencyPowerReductionReq-
                         10BitTagReq- OBFF Disabled, EETLPPrefixBlk-
                LnkCap2: Supported Link Speeds: 2.5GT/s, Crosslink- Retimer+ 2Retimers+ DRS-
                LnkCtl2: Target Link Speed: 32GT/s, EnterCompliance- SpeedDis-
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance Preset/De-emphasis: -6dB de-emphasis, 0dB preshoot
                LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete- EqualizationPhase1-
                         EqualizationPhase2- EqualizationPhase3- LinkEqualizationRequest-
                         Retimer- 2Retimers- CrosslinkRes: unsupported, FltMode-
        Capabilities: [9c] Vendor Specific Information: Len=14 <?>
        Capabilities: [b0] MSI-X: Enable+ Count=9 Masked-
                Vector table: BAR=0 offset=00b90000
                PBA: BAR=0 offset=00ba0000
        Capabilities: [100 v1] Secondary PCI Express
                LnkCtl3: LnkEquIntrruptEn- PerformEqu-
                LaneErrStat: 0
        Capabilities: [12c v1] Latency Tolerance Reporting
                Max snoop latency: 0ns
                Max no snoop latency: 0ns
        Capabilities: [14c v1] Data Link Feature <?>
        Capabilities: [158 v1] Physical Layer 16.0 GT/s
                Phy16Sta: EquComplete- EquPhase1- EquPhase2- EquPhase3- LinkEquRequest-
        Capabilities: [188 v1] Physical Layer 32.0 GT/s
                Phy32Cap: EqualizationBypass+ NoEqualizationNeeded-
                          ModTsMode0+ ModTsMode1- ModTsMode2-
                Phy32Ctl: EqualizationBypassDis- NoEqualizationNeededDis-
                          Modified TS Usage Mode: PCI Express
                Phy32Sta: EquComplete- EquPhase1- EquPhase2- EquPhase3- LinkEquRequest-
                          Received Enhanced Link Behavior Control: Full Equalization required
                          ModTsRecv- TxPrecodeOn- TxPrecodeReq- NoEqualizationNeededRecv-
        Capabilities: [1b8 v2] Advanced Error Reporting
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP-
                        ECRC- UnsupReq- ACSViol- UncorrIntErr- BlockedTLP- AtomicOpBlocked- TLPBlockedErr-
                        PoisonTLPBlocked- DMWrReqBlocked- IDECheck- MisIDETLP- PCRC_CHECK- TLPXlatBlocked-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP-
                        ECRC- UnsupReq- ACSViol- UncorrIntErr+ BlockedTLP- AtomicOpBlocked- TLPBlockedErr-
                        PoisonTLPBlocked- DMWrReqBlocked- IDECheck- MisIDETLP- PCRC_CHECK- TLPXlatBlocked-
                UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+
                        ECRC- UnsupReq- ACSViol- UncorrIntErr+ BlockedTLP- AtomicOpBlocked- TLPBlockedErr-
                        PoisonTLPBlocked- DMWrReqBlocked- IDECheck- MisIDETLP- PCRC_CHECK- TLPXlatBlocked-
                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr- CorrIntErr- HeaderOF-
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+ CorrIntErr+ HeaderOF+
                AERCap: First Error Pointer: 00, ECRCGenCap- ECRCGenEn- ECRCChkCap- ECRCChkEn-
                        MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
                HeaderLog: 00000000 00000000 00000000 00000000
        Capabilities: [200 v1] Lane Margining at the Receiver
                PortCap: Uses Driver+
                PortSta: MargReady- MargSoftReady-
        Capabilities: [248 v1] Alternative Routing-ID Interpretation (ARI)
                ARICap: MFVC- ACS-, Next Function: 0
                ARICtl: MFVC- ACS-, Function Group: 0
        Capabilities: [290 v2] L1 PM Substates
                L1SubCap: PCI-PM_L1.2+ PCI-PM_L1.1+ ASPM_L1.2+ ASPM_L1.1+ L1_PM_Substates+
                          PortCommonModeRestoreTime=0us PortTPowerOnTime=10us
                L1SubCtl1: PCI-PM_L1.2- PCI-PM_L1.1- ASPM_L1.2- ASPM_L1.1-
                           T_CommonMode=0us LTR1.2_Threshold=0ns
                L1SubCtl2: T_PwrOn=10us
        Capabilities: [2a4 v1] Vendor Specific Information: ID=0001 Rev=1 Len=014 <?>
        Capabilities: [2c8 v1] Data Object Exchange
                DOECap: IntSup+
                        IntMsgNum 8
                DOECtl: IntEn-
                DOESta: Busy+ IntSta+ Error+ ObjectReady-
        Capabilities: [2e0 v1] Address Translation Service (ATS)
                ATSCap: Invalidate Queue Depth: 00
                ATSCtl: Enable+, Smallest Translation Unit: 00
        Capabilities: [2e8 v1] Process Address Space ID (PASID)
                PASIDCap: Exec- Priv-, Max PASID Width: 14
                PASIDCtl: Enable+ Exec- Priv-
        Capabilities: [2f0 v1] Device Serial Number 00-00-00-00-00-2d-b0-48
        Kernel driver in use: nvidia
        Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia
```
2026-06-04 10:47:39 +05:30
zowoq
ac21d7583b linux/common-config: drop X86_AMD_PSTATE_DYNAMIC_EPP
was removed in https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e4e9b7b38d5db2cc6a8770bc0596bb8b36b92b1f
2026-06-03 20:15:18 +10:00
OPNA2608
48d00af90d linux: Build-in IDE & MacIO support on POWER
The built-in graphical boot manager on PowerMacs usually doesn't acknowledge USBs. If one wants to boot an installer
without messing around in Open Firmware, then a disc must be used.

The disc drives in PowerMacs are connected via IDE, and will get stuck during early boot if IDE/ATA support is not
built into the kernel. The PATA_MACIO option is also needed to handle the particular controller used on Macs.
2026-06-01 16:15:58 +02:00
OPNA2608
e07ad9d065 linux: Build-in HFS+ support on POWER
To get an installer ISO recognised on some systems (Apple PowerMac G5 is what I'm working with), it must be made with
certain flags to xorriso that make the ISO9660 filesystem accessible as an HFS+ partition, to allow HFS+ blessing of the
boot files. Changes for that will be submitted at a later date.

When such an image is booted with the current kernel settings (DVD/USB, doesn't matter), GRUB works fine, but the kernel
gets stuck. There is no textual boot output on the machine at the point where it gets stuck, so I can't really debug. A
basic ISO9660 image (booted directly via firmware commands) goes all the way to the shell without issues, so the issue
is with the HFS+ partition format.

Building the HFS+ module into the kernel seems to fix this.

Some older machines are supposedly unable to read HFS+ and may instead need HFS. Such a disc setup might not be
producable with xorriso (haven't played around with that), and I don't have one of those machines to test anything on,
so I won't include HFS_FS for now.
2026-06-01 16:05:08 +02:00
Paul Meyer
68157d8886 linux/common-config: enable deflate/zstd for erofs
Signed-off-by: Paul Meyer <katexochen0@gmail.com>
2026-05-30 17:52:06 +02:00
Makuru
50f79c40fd linux-common-config: enable AER kernel feature flag 2026-05-15 01:02:13 +02:00
Alyssa Ross
933822f2a2 linux/common-config: leave FOU options to defaults
Since IPV6_FOU_TUNNEL was set, I get an unexpected ip6tnl device at
boot.  It was set to y to accomodate Linux 7.1 divergences between
aacrh64 and x86_64, but by just not setting NET_FOU or
IPV6_FOU_TUNNEL, I get everything built as modules on both platforms,
like we presumably want.

Fixes: be994ce8a8 ("linux/common-config: update for 7.1")
2026-05-04 16:59:31 +02:00
K900
fb49bc7d68 linux/common-config: Set PSTORE=y for EFI_VARS_PSTORE=y (#514720) 2026-04-29 13:23:15 +00:00
dramforever
7753119717 linux/common-config: Set PSTORE=y for EFI_VARS_PSTORE=y
Since EFI_VARS_PSTORE depends on PSTORE, also set PSTORE=y. Otherwise,
build of configfile fails on at least riscv64, where the defconfig does
not set CONFIG_PSTORE=y.

Note that this still doesn't fix isLoongArch64 [1], so the check is
still needed there.

[1]: https://github.com/NixOS/nixpkgs/pull/509871#issuecomment-4243527972
2026-04-29 20:06:09 +08:00
Luna Nova
d453d9fc61 linux/common-config: RANDOMIZE_KSTACK_OFFSET_DEFAULT=y
Harden against attacks that depend on kernel stack offset by randomizing
it on syscall entry by default

Conditional on 7.1 for AArch64 due to significant perf impact on earlier
versions
2026-04-28 13:14:08 -07:00
K900
be994ce8a8 linux/common-config: update for 7.1
Ham radio is gone, DMABUF_MOVE_NOTIFY is unconditional,
NET_FOU is m on x86_64-linux but y on aarch64-linux,
which throws off IPV6_FOU_TUNNEL now.
2026-04-27 18:36:39 +03:00
Weijia Wang
39c0de0d26 linux: fix loongarch64-linux build (#509871) 2026-04-23 09:26:36 +00:00
nixpkgs-ci[bot]
b6a280bc95 Merge master into staging-next 2026-04-15 00:32:57 +00:00
Tim Schumacher
4e37394a11 linux/common-config: Disable DAX on 32-bit hosts 2026-04-14 20:35:49 +02:00
Weijia Wang
c36bd48bc9 linux: fix loongarch64-linux build 2026-04-14 11:34:47 +02:00
nixpkgs-ci[bot]
49fa0e0243 Merge master into staging-next 2026-04-11 16:37:46 +00:00
Markus Theil
24941111e4 kernel: enable CONFIG_HW_RANDOM to be built-in
Starting with kernels around 6.18 and 6.19 I noticed,
that /dev/hwrng was no longer present and the TPM 2.0
usually found in modern computers did therefore not automatically
seed the kernel RNG with the hw random subsystem.

Enabling CONFIG_HW_RANDOM to yes fixes this. The subsystem
is rather small and should not increase the default kernel size
too much.

Signed-off-by: Markus Theil <theil.markus@gmail.com>
2026-04-10 20:15:10 +02:00
nixpkgs-ci[bot]
394d844d35 Merge staging-next into staging 2026-03-25 12:17:05 +00:00
Demi Marie Obenour
1337aaf441 linux/common-config: Add DAX support for filesystems
This allows mmap of a virtio-pmem device to map host page cache directly
into userspace.  Fedora already enables FS_DAX.

Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
2026-03-21 04:36:53 -04:00
K900
9c01a67159 linux/common-config: EFI_VARS_PSTORE=y (#499077) 2026-03-12 06:50:38 +00:00
K900
b215ccdf1c linux/common-config: update for 7.0, tweak preemption settings 2026-03-07 20:58:42 +03:00
Will Fancher
14ea6786cd linux/common-config: EFI_VARS_PSTORE=y
This enables the kernel to save crash logs much earlier, rather than
losing any log from before the efi_pstore module is loaded in stage 2.
2026-03-06 22:20:17 -05:00
nixpkgs-ci[bot]
55a7f48e1e Merge master into staging-nixos 2026-02-19 08:06:41 +00:00
Tim Schumacher
acc4cf70af linux/common-config: Make Nova depend on Rust support
Otherwise, when building for a platform without Rust support, then the
scripts for applying the kernel configuration will report that the
option was unused.
2026-02-18 19:40:19 +01:00
K900
70678c7b10 linux/common-config: enable LIVEUPDATE (#491195) 2026-02-17 07:20:25 +00:00
Jared Baur
83186cea72 linux/common-config: enable LIVEUPDATE
Live Update Orchestrator is a new feature in kernel 6.19 that builds on
top of kexec handover in order to preserve state across kernels.
2026-02-16 14:34:48 -08:00
Jared Baur
68496978be linux/common-config: enable IMA
This does not enable IMA appraisal or measurement without any IMA
policies written, it just enables the usage of IMA with the stock NixOS
kernels.
2026-02-16 14:31:52 -08:00
Ben Pye
68f6eca98b linux/common-config: enable DSI output for RK3588 SoCs 2026-02-06 21:02:29 -08:00
Gary Guo
4469240b41 linux/common-config: disable nova_core and drm_nova 2026-02-03 01:36:30 +00:00
Alyssa Ross
95c8d1ec1e lib/systems/platforms: Add ppc64; linux: Add 64-bit POWER settings, strip vmlinux kernels (#447752) 2026-02-02 12:10:28 +00:00
OPNA2608
34b0a86bb2 linux: Build-in i2c-powermac on ppc64 systems
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=713943
2026-02-02 12:52:32 +01:00
Alyssa Ross
dc6a9fdec0 linux_5_10: fix intermittent build failures
(Hopefully.)  No BTF is better than no kernel.
2026-01-27 17:23:52 +01:00
nixpkgs-ci[bot]
b74649e38b Merge master into staging-nixos 2026-01-23 00:20:45 +00:00
OPNA2608
0427dabcb1 linux/common-config: Add settings for 64-bit POWER 2026-01-22 15:40:36 +01:00
Alyssa Ross
5d4365c7a5 linux/common-config: remove obsolete hack
Tested that 6.18 and 6.19 now build without this.
2026-01-21 16:09:30 +01:00