Commit Graph
117 Commits
Author SHA1 Message Date
Jörg Thalheim 6d1287860d Merge pull request #113225 from mroi/patch-linux
linux: improve cross compilation with clang
2021-05-11 09:46:01 +01:00
Michael Roitzsch 270ee17d41 linux: improve cross compilation with clang
set HOST* variables for host build tools
* do not assume the host compiler is gcc
* pass all build tools to make
2021-05-10 10:24:24 +02:00
Dmitry Kalinkin 219590673c Merge branch 'staging-next' into staging
Conflicts:
	pkgs/development/python-modules/panel/default.nix
	pkgs/os-specific/linux/kernel/generic.nix
	pkgs/servers/home-assistant/default.nix
2021-04-08 22:42:26 -04:00
Tim Steinbach d3d40b09fd kernel: Add test for RC kernels 2021-04-08 09:00:15 -04:00
Tim Steinbach bd7fed9a2f kernel: Add tests to passthru.tests 2021-04-08 09:00:15 -04:00
Alyssa Ross 52cd3538ff linux: remove remnants of grsecurity
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-06 09:48:56 +00:00
Alyssa Ross 25208eeaba linux: remove xen_dom0 feature entirely
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-04-05 09:25:39 +00:00
John Ericson 9c213398b3 lib: Clean up how linux and gcc config is specified
Second attempt of 8929989614589ee3acd070a6409b2b9700c92d65; see that
commit for details.

This reverts commit 0bc275e634.
2021-01-23 10:01:28 -05:00
Jonathan Ringer 0bc275e634 Revert "lib: Clean up how linux and gcc config is specified"
This is a stdenv-rebuild, and should not be merged
into master

This reverts commit 8929989614.
2021-01-22 14:07:06 -08:00
John Ericson 8929989614 lib: Clean up how linux and gcc config is specified
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-21 22:44:09 -05:00
Ben Siraphob 16d91ee628 pkgs/os-specific: stdenv.lib -> lib 2021-01-17 23:26:08 +07:00
Jonathan Ringer e6db435973 linux: add flavor metadata 2020-10-30 09:40:12 -07:00
Matthew Bauer d0677e6d45 treewide: add warning comment to “boot” packages
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-07-31 08:56:53 +02:00
Matthieu Coudron b9a4e6953d kernel: fix config generation
Addresses https://github.com/NixOS/nixpkgs/issues/71803:
Kernel options are not merged as described, especially the "optional"
aspects. The error silences legitimate warnings.
2020-04-01 22:25:57 +02:00
Matthieu Coudron 2207378c9e linux: clearer origin for settings configuration
adds _file so that nix may have a chance to display what file the conflictings settings come
from.
2019-09-04 17:04:16 +09:00
volth c814d72b51 treewide: name -> pname 2019-08-17 10:54:38 +00:00
volth f3282c8d1e treewide: remove unused variables (#63177)
* treewide: remove unused variables

* making ofborg happy
2019-06-16 19:59:05 +00:00
Joachim F d7da5e2af2 Merge pull request #53826 from delroth/randstruct-custom-seed
nixos: allow customizing the kernel RANDSTRUCT seed
2019-04-16 17:49:19 +00:00
Matthieu Coudron a5a796222b linux: (re)take into account extraConfig
PR #42838 wrongly started to ignore extraConfig. This fixes that.
2019-01-31 13:34:42 +09:00
Matthieu Coudron 3bb7b3f02e linux: ability to merge structured configs
This should make the composability of kernel configurations more straigthforward.

- now distinguish freeform options from tristate ones
- will look for a structured config in kernelPatches too
one can now access the structuredConfig from a kernel via linux_test.configfile.structuredConfig
in order to reinject it into another kernel, no need to rewrite the config from scratch

The following merge strategies are used in case of conflict:
-- freeform items must be equal or they conflict (mergeEqualOption)
-- for tristate (y/m/n) entries, I use the mergeAnswer strategy which takes the best available value, "best" being defined by the user (by default "y" > "m" > "n", e.g. if one entry is both marked "y" and "n", "y" wins)
-- if one item is both marked optional/mandatory, mandatory wins (mergeFalseByDefault)
2019-01-28 09:06:33 +09:00
Joachim F f6414428ed Merge pull request #53511 from joachifm/kernel-32bit-emu-feature-flag
linux: flag to indicate 32bit emulation support
2019-01-25 14:13:45 +00:00
Pierre Bourdon a258015d3a kernel: extend the RANDSTRUCT seed with a user-configurable section 2019-01-24 01:42:16 +01:00
Joachim Fasting 6eea9ac868 linux: add feature flag to indicate support for 32bit emulation
Motivated by the need to warn users trying to build configurations that depend
on being able to run 32bit apps on 64bit kernels.
2019-01-06 19:52:03 +01:00
Pierre Bourdon c789f642f0 kernel/generic.nix: provide required dependencies for GCC plugins builds 2019-01-04 22:24:50 +01:00
John Ericson 0828e2d8c3 treewide: Remove usage of remaining redundant platform compatability stuff
Want to get this out of here for 18.09, so it can be deprecated
thereafter.
2018-08-30 17:20:32 -04:00
Tuomas Tynkkynen e0ce4bee57 kernel: Remove empty preUnpack 2018-07-24 23:36:05 +03:00
volth dda95bae35 [bot] treewide: remove unused 'args@' in lambdas 2018-07-20 19:54:05 +00:00
Matthieu Coudron e4fe7b31be linux: fix features system 2018-06-30 16:01:41 +03:00
Dan Peebles ff9999ad1b linux: translate config to structured config
Instead of using a string to describe kernel config, use a nix
attribute set, then converted to a string.
- allows to override the config, aka convert 'yes' into 'modules' or
vice-versa
- while for now merging different configs is still crude (last spec wins),
at least there should be only one CONFIG_XYZ value compared to the current string
config where the first defined would be used and others ignored.

[initial idea by copumpkin in 2016, a major rebase to 2018 by teto]
2018-06-30 16:01:41 +03:00
Tuomas Tynkkynen 87a68c455e kernel: Allow kernel packages to specify a custom default defconfig 2018-05-31 18:06:09 +03:00
Dominique Martinet b64f407c45 linux kernel generic: use passAsFile for kernelConfig
Otherwise get the error 'Argument list too long' when running builder
with a very long kernelConfig
2018-04-09 18:23:52 +09:00
Matthieu Coudron 3ccc65a36c buildLinux: allow to override arch/modules/builtin
- Easy override of autoModules and preferBuiltin and kernelArch parameters (currently living in `hostSystem` set).
2018-03-08 12:47:06 +09:00
Matthieu Coudron 600e977898 buildLinux: removes unnecessary parameters
and passes parameters in a single set
2018-03-08 12:45:39 +09:00
Vladimír Čunát 7d19d7ee18 Revert "linux-*: build with gcc7, but allow overriding it"
This reverts commit ae040525d8.
gcc7 is the default now.
2018-02-17 16:30:26 +01:00
Tuomas Tynkkynen 64fa0d5b97 kernel: Add deps for building 4.16 2018-02-16 01:13:30 +02:00
Vladimír Čunát ae040525d8 linux-*: build with gcc7, but allow overriding it
I expect we will revert this after general upgrade to gcc7.
See https://github.com/NixOS/nixpkgs/issues/34383
2018-02-11 18:55:18 +01:00
Tuomas Tynkkynen 4c6c919a31 Merge remote-tracking branch 'upstream/master' into HEAD
Conflicts:
	pkgs/os-specific/linux/kernel/generic.nix
2018-02-07 03:41:24 +02:00
Tuomas Tynkkynen 685ceb999e kernel: Fix missing config options from platform
common-config.nix has:

${kernelPlatform.kernelExtraConfig or ""}

and indeed kernelExtraConfig is in hostPlatform.platform, and not in
hostPlatform. (Ugh.).
2018-02-06 22:13:57 +02:00
Matthieu Coudron f620b1b693 kernel: buildLinux replaces import ./generic.nix
- defined buildLinux as generic.nix instead of manual-config.nix. This
makes kernel derivations a tad more similar to your typical derivations.
- moved $buildRoot to within the source folder, this way it doesn't have to be created before the unpackPhase
and make it easier to work on kernel source without running the unpackPhase
2018-02-07 10:07:13 +09:00
Ben Wolsieffer 7bb3a044be kernel: fix dependencies 2018-01-15 22:28:45 -05:00
Ben Wolsieffer 285181a1db kernel: remove leftover remnants of old cross compiling system 2018-01-15 12:48:51 -05:00
Ben Wolsieffer a09709bf2a kernel: don't force ignoreConfigErrors when cross compiling, only set the
default
2018-01-15 12:39:45 -05:00
Ben Gamari 7a9b6ac39a kernel: Enable cross compiling 2018-01-15 11:55:06 -05:00
Jan Malakhovski 85cd22cf7d treewide: replace addPassthru 2018-01-14 19:53:57 +00:00
Jan Malakhovski 8606dd8556 lib: change the order of arguments of addPassthru 2018-01-14 13:24:30 +00:00
Vladimír Čunát 13797ff522 linux-4.13: mark as insecure (+required generic changes)
extraMeta was being fed as passthru without being processed by stdenv,
so without those changes, adding the security attribute would be useless.
2017-12-04 09:33:39 +01:00
Tuomas Tynkkynen 0d9f2f0bb4 platforms.nix: Clean up more 'uboot' legacy
For a while now, the only thing the 'uboot' attribute does is to tell
whether to add ubootTools to kernel/initrd builds. That can be
determined with platform.kernelTarget == "uImage" just as well.
2017-11-05 17:06:59 +02:00
Jan Malakhovski 8525b78d05 linuxPackages: properly propagate features and extraConfig
`kernel.override { features = ... }` didn't work before, now it works as
expected.
2017-09-17 16:33:47 +02:00
Vladimír Čunát 7c7c83e233 buildLinux: allow overriding stdenv on each call 2017-08-20 08:24:52 +02:00
hsloan 459d07d41c kernel generic: Don't use stdenv.cross 2017-06-28 20:22:59 -04:00