about summary refs log tree commit diff
path: root/pkgs/os-specific/linux/kernel/generic.nix
AgeCommit message (Collapse)AuthorFilesLines
2024-03-22kernel/generic: fix overridesWim de With1-1/+5
2024-03-18linux/generic: make output of buildLinux overrideable againK9001-2/+2
Fixes #296448
2024-03-16linux: uncurse argumentsK9001-2/+3
Currently things like `buildLinux { inherit src version; }` fail because of `callPackage` auto-inserting `kernelPatches`, which is both a `buildLinux` argument and a `pkgs` toplevel attribute, with completely different semantics. Avoid that entirely by splitting the call into two - one for arguments we want from `callPackage`, and one for everything else.
2024-02-26Merge pull request #288154 from ShamrockLee/linux-kernel-passthruSilvan Mosberger1-5/+6
buildLinux: Fix result derivation overriding with `passthru` via `stdenv.mkDerivation` instead of `lib.extendDerivation`
2024-02-10buildLinux: passthru by <pkg>.overrideAttrs instead of lib.extendDerivationYueh-Shun Li1-5/+6
2024-02-05buildLinux: use lib.toFunctionYueh-Shun Li1-1/+1
Refactor expression trivially with `lib.toFunction`.
2024-01-22Merge master into staging-nextgithub-actions[bot]1-3/+1
2024-01-22linux: remove unused featuresJulian Stecklina1-3/+1
2024-01-12linux_latest: optionally build Linux 6.7 and onwards with rust supportYureka1-2/+11
With the current patching situation around enabling Linux to build with whatever rustc/bindgen version we have in nixpkgs, it feels like supporting a Rust-by-default build at this time is not fully justified. Co-authored-by: Julian Stecklina <julian.stecklina@cyberus-technology.de>
2023-11-03Merge master into staging-nextgithub-actions[bot]1-0/+6
2023-10-22linux: allow to omit the common-config.nixAdam Joseph1-0/+6
2023-09-30Merge pull request #245965 from amjoseph-nixpkgs/pr/linux/kernel/repick2Artturi1-2/+0
linux.configfile: remove unused kernelTarget attr
2023-08-09Merge staging-next into staginggithub-actions[bot]1-1/+1
2023-08-06kernel: fix passthru.testsAtemu1-1/+1
https://github.com/NixOS/nixpkgs/pull/191540 indirectly broke kernel passthru.tests; calling the testsForLinuxPackages and testsForKernel functions with some args intended for some other exposed test-internal function. Organise the passed-through functions under `passthru` to prevent this from happening.
2023-07-28linux.configfile: remove unused kernelTarget attrAlyssa Ross1-2/+0
As far as I can tell this is unused since f95d214cfdf. Fixes: f95d214cfdf ("Implement generic kernel build via manual-config") Fixes: https://github.com/NixOS/nixpkgs/issues/234084
2023-07-28Revert "linux: default stdenv.hostPlatform.linux-kernel"Adam Joseph1-4/+5
This reverts commit febe4776287fd81b9dc0fd88a8bcb686765c8a6b.
2023-07-28Revert "linux.configfile: remove unused kernelTarget attr"Adam Joseph1-0/+2
This reverts commit 01b36425890182d3a1898c27d479189a7c496646.
2023-06-04linux.configfile: remove unused kernelTarget attrAlyssa Ross1-2/+0
As far as I can tell this is unused since f95d214cfdf. Fixes: f95d214cfdf ("Implement generic kernel build via manual-config") Fixes: https://github.com/NixOS/nixpkgs/issues/234084
2023-05-22linux: default stdenv.hostPlatform.linux-kernelAlyssa Ross1-5/+4
With this change, we can do a reasonable default build of Linux for configurations that do not have a corresponding platforms.nix entry, and where the user has not explicitly specified the linux-kernel values. This allows us to do best effort builds for obscure architectures (I tested a build for s390x). The platformName binding has not been used since 70cb7050f5c ("Trying to make the linux kernels also cross-build."), so I removed it.
2023-05-19linuxManualConfig: don't ignore cross config errorsAlyssa Ross1-2/+1
All "pc" kernel configurations in lib.systems.examples build fine without errors when cross compiling.
2022-12-22nixos/doc: update custom kernel instructionsNaïm Favier1-0/+9
Document the `linux.override` way first, then `linuxManualConfig`. Add a `linux.configEnv` passthru attribute for quickly getting a `make nconfig`-ready shell.
2022-12-22linuxManualConfig: don't require lib and stdenv argumentsNaïm Favier1-2/+2
Reverts https://github.com/NixOS/nixpkgs/commit/7c7c83e2335c3aa6f26a4f9c905c49c430b5be09 which was only needed for the minimal-kernel.nix test module and clutters the call site. stdenv can still be overridden with `linuxManualConfig.override { stdenv = ...; }`.
2022-12-21linux: use `lib.versions.pad` for `modDirVersion`Naïm Favier1-4/+5
2022-10-14kernel: move prePatch to postPatch to not mess with patchesSandro Jäckel1-1/+1
2022-08-02linux: provide pahole when configuringK9001-1/+3
The kernel checks the version of pahole at configuration time to know if it supports features like split BTFs. If pahole doesn't exist, all of that gets disabled in the config file, so the kernel ends up built without split BTFs, despite having a working pahole for the actual build.
2021-11-22kernel/generic: remove redundant kernelOlder/kernelAtLeastAtemu1-2/+0
2021-11-01linux: make sure that `src`/`version` actually refer to the declaring fileMaximilian Bosch1-5/+18
With this change it's ensured that `builtins.unsafeGetAttrPos` actually points to `<nixpkgs/pkgs/os-specific/linux/kernel/linux-x.y.nix>` when retrieving the position of `src` or `version` of `linuxPackages.kernel`. This is relevant to make sure that ofborg pinging maintainers on kernel updates actually works[1]. While the underlying issue should be fixed in ofborg or Nix itself, this is IMHO a pragmatic change to ensure that all kernel maintainers are automatically notified on updates. [1] https://github.com/NixOS/nixpkgs/pull/143113#issuecomment-953319957
2021-08-23kernel/generic: add kernelTests automaticallyAtemu1-2/+12
Unfortunately, there seems to be no way of referencing an overridable version of the package you're in, so it had to be stubed to work at all. This isn't important for our current, very basic kernel nixosTests but might become important when we add more sophisticated ones.
2021-07-27Merge pull request #110742 from siraben/deprecate-foldBen Siraphob1-1/+1
2021-07-17buildLinux: pass buildPackages to linuxManualConfigBernardo Meurer1-1/+1
We should be using the _same_ buildPackages when we generate the configuration (which happens in buildLinux) as when we actually build the kernel (which happens in linuxManualConfig). This change enforces that when we callPackage `manual-config.nix` we pass on whatever `buildPackages` that `buildLinux` itself was called with.
2021-07-13buildLinux: preserve structuredExtraConfig and extraMakeFlags in passthruBernardo Meurer1-2/+1
This allows users to override custom kernel packages (e.g. linux_xanmod) that set their own structuredExtraConfig with ease.
2021-07-12buildLinux: take and propagate extraMakeFlagsBernardo Meurer1-4/+9
This is just for practicity, as it allows users of buildLinux to pass along extra flags they need in the kernel's make invocation. This makes, for example, supporting LLVM _much_ easier, and could enable us in the future to provide clang-built kernels.
2021-07-12buildLinux: apply hostPlatform.linux-kernel.makeFlags to generate-config.plBernardo Meurer1-2/+6
This enforces that the configuration generated will obey any/all flags set in the platform/stdenv configuration. This is crucial, for example, if you'd like to build a kernel using clang. Without this patch, anything you set in `stdenv.hostPlatform.linux-kernel.makeFlags` is wholly ignored during config generation, causing (for example) any changes in the desired toolchain (e.g. `LLVM`, `LLVM_IAS`) to not be reflected in the generated config, and for the subsequent build to fail.
2021-05-11Merge pull request #113225 from mroi/patch-linuxJörg Thalheim1-3/+7
linux: improve cross compilation with clang
2021-05-10linux: improve cross compilation with clangMichael Roitzsch1-3/+7
set HOST* variables for host build tools * do not assume the host compiler is gcc * pass all build tools to make
2021-04-08Merge branch 'staging-next' into stagingDmitry Kalinkin1-2/+3
Conflicts: pkgs/development/python-modules/panel/default.nix pkgs/os-specific/linux/kernel/generic.nix pkgs/servers/home-assistant/default.nix
2021-04-08kernel: Add test for RC kernelsTim Steinbach1-1/+1
2021-04-08kernel: Add tests to passthru.testsTim Steinbach1-1/+2
2021-04-06linux: remove remnants of grsecurityAlyssa Ross1-1/+0
Nixpkgs hasn't supported grsecurity kernels since 2017, so unless anybody is manually enabling the grsecurity feature to make these small kernel tweaks this is dead code. This means we don't actually support any "features" in the kernel common-config any more, but I've left the argument there because it's conceivable we could have some again in future.
2021-04-05linux: remove xen_dom0 feature entirelyAlyssa Ross1-3/+2
Xen is now enabled unconditionally on kernels that support it, so the xen_dom0 feature doesn't do anything. The isXen attribute will now produce a deprecation warning and unconditionally return true. Passing in a custom value for isXen is no longer supported.
2021-01-26treewide: fold -> foldrBen Siraphob1-1/+1
2021-01-23lib: Clean up how linux and gcc config is specifiedJohn Ericson1-9/+9
Second attempt of 8929989614589ee3acd070a6409b2b9700c92d65; see that commit for details. This reverts commit 0bc275e63423456d6deb650e146120c39c1e0723.
2021-01-22Revert "lib: Clean up how linux and gcc config is specified"Jonathan Ringer1-9/+9
This is a stdenv-rebuild, and should not be merged into master This reverts commit 8929989614589ee3acd070a6409b2b9700c92d65.
2021-01-21lib: Clean up how linux and gcc config is specifiedJohn Ericson1-9/+9
The `platform` field is pointless nesting: it's just stuff that happens to be defined together, and that should be an implementation detail. This instead makes `linux-kernel` and `gcc` top level fields in platform configs. They join `rustc` there [all are optional], which was put there and not in `platform` in anticipation of a change like this. `linux-kernel.arch` in particular also becomes `linuxArch`, to match the other `*Arch`es. The next step after is this to combine the *specific* machines from `lib.systems.platforms` with `lib.systems.examples`, keeping just the "multiplatform" ones for defaulting.
2021-01-17pkgs/os-specific: stdenv.lib -> libBen Siraphob1-6/+4
2020-10-30linux: add flavor metadataJonathan Ringer1-1/+8
2020-07-31treewide: add warning comment to “boot” packagesMatthew Bauer1-0/+5
This adds a warning to the top of each “boot” package that reads: Note: this package is used for bootstrapping fetchurl, and thus cannot use fetchpatch! All mutable patches (generated by GitHub or cgit) that are needed here should be included directly in Nixpkgs as files. This makes it clear to maintainer that they may need to treat this package a little differently than others. Importantly, we can’t use fetchpatch here due to using <nix/fetchurl.nix>. To avoid having stale hashes, we need to include patches that are subject to changing overtime (for instance, gitweb’s patches contain a version number at the bottom).
2020-04-01kernel: fix config generationMatthieu Coudron1-3/+0
Addresses https://github.com/NixOS/nixpkgs/issues/71803: Kernel options are not merged as described, especially the "optional" aspects. The error silences legitimate warnings.
2019-09-04linux: clearer origin for settings configurationMatthieu Coudron1-2/+2
adds _file so that nix may have a chance to display what file the conflictings settings come from.
2019-08-17treewide: name -> pnamevolth1-1/+2