3
0
Fork 0
forked from mirrors/nixpkgs
Commit graph

147 commits

Author SHA1 Message Date
Tim Steinbach ecb95c8bcb
linux: 5.4-rc1 -> 5.4-rc2 2019-10-08 13:18:51 -04:00
Dima bdccffa81c linux_5_2, linux_5_3: fixing nondeterminism
In 5.2 kernel a new mechanism was introduced which embeds the kernel
headers in the kernel image and exposes them in procfs for simplified
use by userland tools.

It was introduced in
43d8ce9d65
and later modified a bit in
f7b101d330

The archive containing the header files had nondeterminism through the
header files metadata - specifically `mtime`, but I also decided to
normalize some other aspects just in case.

In our default setup we currently compile this as a module, so to expose
the headers to test the functionality `kheaders` needs to be loaded.

See https://lkml.org/lkml/2019/10/4/1036 and
https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git/commit/?h=fixes&id=2cc99c9cdc8fde5e92e34f9655829449cebd3e00

I commented out the documentation part of the patch to make it cleanly apply to
5.2 and 5.3, see remark in the patch itself.
2019-10-05 09:34:35 +02:00
Tim Steinbach 6d6c3f66b0 linux: 5.2-rc7 -> 5.3-rc5 2019-09-09 14:25:31 -04: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
Austin Seipp c117aa3ec3
linux_testing (5.2.0-rc1): fix build, include 'cpio' in nativeBuildInputs
81d4e65891 automatically bumped
linux_testing to 5.2.0-rc1, but the 5.2 merge window included a new
feature adding compressed headers for compiled kernels into
/proc/kheaders.tar.xz

See 43d8ce9d65

This feature requires 'cpio' to now be included in nativeBuildInputs
since it's used to construct that archive.

This wasn't caught by Hydra since we turn off build of linuxPackages,
but ideally we should at least build the kernel in the future
(linux_testing itself.)

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2019-05-21 11:50:33 -05:00
Samuel Dionne-Riel e25f5c1e86 linux: Makes the -dev output reproducible 2019-05-04 17:51:44 +02:00
Pierre Bourdon a258015d3a
kernel: extend the RANDSTRUCT seed with a user-configurable section 2019-01-24 01:42:16 +01:00
Pierre Bourdon 1b9bf8fa75
kernel: make the RANDSTRUCT seed deterministic 2019-01-11 12:35:16 +01:00
Patrick Hilhorst ffd47d5b16
Revert "linux: inside nix-shell, allow make menuconfig" 2018-12-10 15:50:36 +01:00
Matthew Bauer 76c956be5c treewide: disable pie in more places
Some packages don’t work correctly with pie. Here I disable it for:

- busybox
- linux kernel
- kexectools

I also get rid of the Musl conditional for disabling pie in GCC and
Binutils. Some day we might want to enable PIE without Musl and it
will be useful to have the *just* work with our compiler and linkers.
2018-11-13 07:03:31 -06:00
Matthieu Coudron e80324c625 linux: inside nix-shell, allow make menuconfig
Use stdenv.lib.inNixShell to check for nix-shell and potentially bring pkgconfig/ncurses.
2018-10-05 18:00:15 +09:00
xeji 83fd9785f6
linux kernel: increase build timeout from 2 to 4 hrs (#47564)
We've recently seen a lot of kernel build timeouts on hydra,
so let's increase the timeout.
2018-10-01 17:40:29 +02:00
Wael M. Nasreddine 4f8a248b23 kernel: increase build timeout to two hours 2018-09-04 20:12:18 -04: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
CrystalGamma 72d161f548 [RFC] ppc64le enablement (#45340)
* ppc64le enablement

* gcc, glibc: properly handle __float128

* lib/systems, stdenv: syntax cleanup

* gcc7: remove ugly hack

* gcc: add/update __float128 flags

* stdenv: add another pair of quotes for consistency

* gcc: move __float128 flag for ppc64le-glibc into common/platform-flags.nix
2018-08-21 15:31:34 -04:00
Tuomas Tynkkynen 29b84841d2 kernel: Reduce peak disk usage during build
Since commit f620b1b693, the build directory is located inside the
source directory. Thus, the `cp -dpR` copies gigabytes worth of .o files
only to be deleted later on when we trim all non-essential files from
`$dev/lib/modules/${modDirVersion}/source/` thus causing a significant
amount of wasted I/O and peak disk usage.

As `cp` doesn't come with a `--exclude` flag, use rsync. And throw out
the Documentation folder while at it.
2018-07-24 23:36:06 +03:00
Tuomas Tynkkynen 4cec65482a kernel: Respect makeFlagsArray in more places
It's used two lines above, so be consistent.
2018-07-24 23:36:06 +03:00
Tuomas Tynkkynen c6ed851fe2 kernel: Remove dead code
It's set in the same phase
2018-07-24 23:36:06 +03:00
Tuomas Tynkkynen e0ce4bee57 kernel: Remove empty preUnpack 2018-07-24 23:36:05 +03:00
volth 52f53c69ce pkgs/*: remove unreferenced function arguments 2018-07-21 02:48:04 +00: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
Robert Hensing 7f25b26511 linuxPackages_custom: fix missing argument and add test
The required argument 'hostPlatform' was missing from linuxPackages_custom's
call to linuxManualConfig.

In order to prevent this in the future, this commit adds
linuxPackages_custom_tinyconfig_kernel so linuxPackages_custom gets tested.

This also adds linuxConfig, to derivate default linux configurations
via make defconfig, make tinyconfig, etc.

Closes #38034.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2018-04-07 16:40:25 -05:00
Shea Levy bd7d5b3657
linux: Don't try to install firmware on newer kernels.
This was disabled in torvalds/linux@5620a0d1aa
2018-02-19 17:08:24 -05:00
Shea Levy 7ce1f0b8ae
linuxManualConfig: Fix build on non-modular kernels 2018-02-19 15:16:29 -05:00
Tuomas Tynkkynen 64fa0d5b97 kernel: Add deps for building 4.16 2018-02-16 01:13:30 +02:00
Vladimír Čunát 3d24c5eecc linux: use absolute paths for compilers
HOSTCC was taking precedence before stdenv's normal CC,
at least in case of non-cross build.
2018-02-12 14:00:51 -05:00
Vladimír Čunát 169216fe14
linuxPackages: build by kernel's stdenv 2018-02-11 18:55:21 +01:00
Tuomas Tynkkynen 6d8c1fe01c linux: Use concatStringsSep 2018-02-11 00:17:47 +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 80f6b8e2ba kernel: revert seemingly incorrect change to extraMeta merging 2018-01-15 12:55:24 -05:00
Ben Gamari b4b04dd29f kernel: Fix cross-compilation 2018-01-15 11:55:23 -05:00
Ben Gamari 50e2bb12f6 kernel: Use build kmod 2018-01-15 11:55:23 -05:00
Ben Gamari 7a9b6ac39a kernel: Enable cross compiling 2018-01-15 11:55:06 -05:00
David Guibert 1e77d0b975 kernel 4.14 require libelf to compile modules.
[...]
make modules -C /nix/store/h1vzl6bq4wif3m8dd1bw2p3fv4shjg3n-linux-4.14.9-dev/lib/modules/4.14.9/build EXTRA_CFLAGS=-Werror-implicit-function-declaration M=/tmp/nix-build-spl-kernel-2017-11-16-4.14.9.drv-0/source/build
/nix/store/h1vzl6bq4wif3m8dd1bw2p3fv4shjg3n-linux-4.14.9-dev/lib/modules/4.14.9/source/Makefile:939: *** "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel". Stop.

This patch introduces kernel.moduleBuildDependencies to avoid the logic "stdenv.lib.optional (stdenv.lib.versionAtLeast kernel.version "4.14") libelf" in multiple places.

[dezgeg did some minor tweaks on top]
2017-12-29 23:08:17 +02:00
Andreas Rammhold 63e3eae02f
linux: 4.14.8 -> 4.14.9
Besides fixes for the recent BPF issues there is also a patch included
that fixes booting on aarch64 (e.g. RPi3) ;-)
2017-12-26 15:24:49 +01: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
Philipp Steinpass e8fcced76e linux-testing: 4.14-rc8 -> 4.15-rc1
Closes #32137
2017-11-28 15:19:23 +02:00
Matthieu Coudron 28f9262092
kernel: improve modDirVersion error message
Now prints the current modDirVersion.  Close #31887.
2017-11-21 20:42:41 +01:00
Tuomas Tynkkynen eb85761137 kernel: Fix out-of-tree modules on aarch64
https://hydra.nixos.org/build/62813493
2017-11-17 17:06:52 +02: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
Tuomas Tynkkynen b50693d16c kernel, initrd: Remove legacy ubootChooser 2017-11-05 15:11:12 +02:00
Vladimír Čunát 7c7c83e233
buildLinux: allow overriding stdenv on each call 2017-08-20 08:24:52 +02:00
mimadrid 09e0cc7cc7
Update homepage attributes: http -> https
Homepage link "http://.../" is a permanent redirect to "https://.../" and should be updated
https://repology.org/repository/nix_stable/problems
2017-08-03 11:56:15 +02:00
hsloan 1e3b45cfdb kernel manual-config: Don't use stdenv.cross 2017-06-28 20:23:09 -04:00
Joachim Fasting a04d8532c2
linux: support using gcc plugins
linux 4.8 onwards support gcc plugins.  This patch adds build inputs
required to make use of gcc plugins to the generic kernel build
environment.
2017-05-06 19:47:27 +02:00
Volth b78f16b337 kernel: do not remove .o files on installPhase 2017-04-01 16:05:17 +03:00
Tuomas Tynkkynen b2c96062ca kernel: Add a validity check for modDirVersion
Because if you get it wrong, you get a very confusing error message at
the end of the kernel build, which is quite painful as the build can
take a long time.
2017-03-13 18:47:21 +02:00
Nathan Zadoks fcc51d3256 linux: fix installTargets for AArch64
[dezgeg: note that we are currently using just 'Image' instead of
'Image.gz' as U-Boot doesn't support the latter yet. We might switch
once it does since the kernel images are quite big]
2017-01-25 00:01:54 +02:00
Tuomas Tynkkynen bdab6fe5a1 kernel: Use built-in dtbs_install target instead of rolling our own
In particular, on aarch64 all the .dtb files will be in subdirectories
and *.dtb won't match anything.
2016-12-10 20:24:08 +02:00