Commit Graph

23 Commits

Author SHA1 Message Date
Weijia Wang
65cb7dee88 linux: raise minimum version for loongarch64 2026-08-14 15:49:56 +02:00
K900
a2a0bf4f45 linux: forward features into passthru (#535309) 2026-06-25 15:40:51 +00:00
Paul Grandperrin
2b428514e5 linux: forward features into passthru
build.nix accepted `features` as a parameter but discarded it, never
placing it into the derivation's passthru. The NixOS boot.kernelPackages
apply function calls kernel.override() on every evaluation, re-running
build.nix from scratch; any features added via overrideAttrs were
silently lost, causing assertions like hardware.graphics.enable32Bit
(which checks kernel.features.ia32Emulation) to always fail for
linuxManualConfig-based kernels.

Change `features ? null` to `features ? {}` and add it to passthru so
it survives override() call chains.
2026-06-25 17:24:49 +02:00
Will Fancher
226f8c7618 buildLinux: Forward buildDTBs and target arguments
Fixes #533937
2026-06-21 11:46:27 -04: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
Emily
efbf25d757 linux: drop uImage support
Now that ARMv5 no longer uses `uImage`, there’s no point in keeping
around support for this deprecated format that the rest of the NixOS
infrastructure doesn’t handle. Modern U‐Boot setups should not
be affected in any way by this.
2026-06-01 11:12:45 +10:00
Andrew Childs
db81e7567f linux: use correct strip program when stripping vmlinux
Otherwise may fail during cross complation with:

    [...]/strip: Unable to recognise the architecture of the input file: `/[...]/vmlinux`
2026-05-30 04:20:54 +09:00
zowoq
2879caafcf linux_hardened: remove
isn't maintained to the standards people expect of kernels in nixpkgs
2026-04-04 13:51:50 +10:00
nixpkgs-ci[bot]
ebff705c3e Merge master into staging-nixos 2026-03-21 12:09:14 +00:00
zowoq
abdbeb7205 linux: remove isXen
follow up from 25208eeaba
2026-03-21 14:44:46 +10:00
Florian RICHER
4a2c5cf2ec linuxKernel.kernels.*: Fix missing rust makefile 2026-03-20 13:33:20 +01:00
nixpkgs-ci[bot]
7d1a0856fb Merge master into staging-next 2026-03-19 06:22:26 +00:00
zowoq
94fc9597d5 linux_libre: remove cruft
follow up from 545a975d7e
2026-03-19 11:05:10 +10:00
nixpkgs-ci[bot]
23ee7d594c Merge master into staging-next 2026-03-14 00:21:49 +00:00
Alexander Bantyev
2839911e81 various: add security-review team as a maintainer
Adds the @NixOS/security-review team as a maintainer to multiple
packages deemed to be important security-wise.

For the motivation of the package list, see:
https://github.com/NixOS/nixpkgs/issues/494349#issuecomment-4005099033
2026-03-05 15:19:44 +01:00
Maximilian Bosch
3abd5422e4 linux: include generated constants.py in output (#489868) 2026-02-13 13:47:42 +00:00
Arnout Engelen
32fff51349 linux: include generated constants.py in output
for the 'dev' output, make sure the generated `constants.py` is actually
included in the output.

Follow-up on #432405
2026-02-13 09:24:39 +01:00
OPNA2608
99bf69cd04 linux: Strip vmlinux in out output when present
Because it isn't stripped by default, and is outside of the list of paths that we strip automatically.
dev output is expected to have an unstripped vmlinux, so stripping this one should be fine.
2026-01-22 15:41:28 +01:00
nixpkgs-ci[bot]
48bdc35e9e Merge staging-next into staging 2025-11-02 12:07:17 +00:00
Samuel Dionne-Riel
cd6eb54878 linux: Partially revert "linux: drop hacky passing around of positions"
This partially reverts commit 845e340ed9.

This re-introduces the `pos` juggling previous done.

The rationale used in the commit was:

> This is long obsolete since the versions are maintained in a JSON
> file now.

That is only accurate for `mainline`. Other in-tree kernels are
maintained in different ways. This led to a loss of information.

Before (cf3f5c4def):

```
nix-repl> linux_latest.meta.position
".../pkgs/os-specific/linux/kernel/mainline.nix:34"
nix-repl> linux_rpi0.meta.position
".../pkgs/os-specific/linux/kernel/linux-rpi.nix:20"

```

After (2fb006b87f):

```
nix-repl> linux_latest.meta.position
".../pkgs/os-specific/linux/kernel/build.nix:558"
nix-repl> linux_rpi0.meta.position
".../pkgs/os-specific/linux/kernel/build.nix:558"
```

This is also observable for out-of-tree kernels:

```
nix-repl> pkgs.linux_jovian.meta.position
".../Jovian-NixOS/pkgs/linux-jovian/default.nix:11"

nix-repl> :r # after updating the Nixpkgs input

nix-repl> pkgs.linux_jovian.meta.position
"/nix/store/xjjq52iwslhz6lbc621a31v0nfdhr5ks-source/pkgs/os-specific/linux/kernel/build.nix:558"
```

This also conveniently works around the root cause of an
`stdenv.mkDerivation`-based `pos` infrec regression when using the
kernel package version in a NixOS configuration to conditionally
apply kernel patches.
2025-11-01 18:21:35 -04:00
Robert Schütz
1d0624ac37 linux: remove pie from hardeningDisable 2025-10-26 15:33:58 -07:00
Maximilian Bosch
09e80b0b76 linux/build: re-expose config with its helper functions
In #448835 I renamed `config` to `configHelpers` to save a
`config_ = config;`, however `config` having the `is*` helpers is kinda
public API (as proven by NixOS modules failing to evaluate).

As a result, this commit adds the helpers back to `config` that is
exposed by the kernel derivation.

Apologies, I'm pretty sure I fixed that before locally and it just got
lost during a rebase :(
2025-10-26 13:35:20 +01:00
Maximilian Bosch
1965f3c77d linux: manual-config.nix -> build.nix
Since I started touching this subsystem, I found the name confusing
since this is the part where we actually compile the kernel and we have
a ready-to-use configuration.

The stated goal of the commit introducing it[1] is to provide a function
to

> make it possible to build a kernel with a user provided .config.

Considering that this is supposed to be a differentiation from other
build mechanisms and nowadays this is the only way to build kernels in
nixpkgs, I figured that `build.nix` is a better name.

`pkgs.linuxManualConfig` isn't renamed on purpose: Kloenk and I are
planning to do more involved work and it may become necessary to change
parts of the API. So asking users to do a migration now just to add
another one soon isn't worth it.

[1] bf7467cbb1
2025-10-24 18:06:29 +02:00