linuxHeaders: 4.19.16 -> 5.5
Linux has reworked its header install process in https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=59b2bd05f5f4dc62979c2e82ddd384f07e8f10bc It has introduced `make headers` that prepares the headers in ./usr/include, and made `make headers_install` copy the headers from there using rsync.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{ stdenvNoCC, lib, buildPackages
|
||||
, fetchurl, perl
|
||||
, fetchurl, perl, rsync
|
||||
, elf-header
|
||||
}:
|
||||
|
||||
@@ -16,7 +16,7 @@ let
|
||||
# We do this so we have a build->build, not build->host, C compiler.
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||
# `elf-header` is null when libc provides `elf.h`.
|
||||
nativeBuildInputs = [ perl elf-header ];
|
||||
nativeBuildInputs = [ perl rsync elf-header ];
|
||||
|
||||
extraIncludeDirs = lib.optional stdenvNoCC.hostPlatform.isPowerPC ["ppc"];
|
||||
|
||||
@@ -39,12 +39,8 @@ let
|
||||
# Skip clean on darwin, case-sensitivity issues.
|
||||
buildPhase = lib.optionalString (!stdenvNoCC.buildPlatform.isDarwin) ''
|
||||
make mrproper $makeFlags
|
||||
''
|
||||
# For some reason, doing `make install_headers` twice, first without
|
||||
# INSTALL_HDR_PATH=$out then with, is neccessary to get this to work
|
||||
# for darwin cross. @Ericson2314 has no idea why.
|
||||
+ ''
|
||||
make headers_install $makeFlags
|
||||
'' + ''
|
||||
make headers $makeFlags
|
||||
'';
|
||||
|
||||
checkPhase = ''
|
||||
@@ -55,13 +51,9 @@ let
|
||||
make headers_install INSTALL_HDR_PATH=$out $makeFlags
|
||||
''
|
||||
# Some builds (e.g. KVM) want a kernel.release.
|
||||
+ '' mkdir -p $out/include/config
|
||||
echo "${version}-default" > $out/include/config/kernel.release
|
||||
''
|
||||
# These oddly named file records the `SHELL` passed, which causes bootstrap
|
||||
# tools run-time dependency.
|
||||
+ ''
|
||||
find "$out" -name '..install.cmd' -print0 | xargs -0 rm
|
||||
mkdir -p $out/include/config
|
||||
echo "${version}-default" > $out/include/config/kernel.release
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
@@ -73,16 +65,15 @@ let
|
||||
in {
|
||||
inherit makeLinuxHeaders;
|
||||
|
||||
linuxHeaders = let version = "4.19.16"; in
|
||||
linuxHeaders = let version = "5.5"; in
|
||||
makeLinuxHeaders {
|
||||
inherit version;
|
||||
src = fetchurl {
|
||||
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
|
||||
sha256 = "1pqvn6dsh0xhdpawz4ag27vkw1abvb6sn3869i4fbrz33ww8i86q";
|
||||
url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz";
|
||||
sha256 = "0c131fi6s7vgvka1c0597vnvcmwn1pp968rci5kq64iwj3pd9yx6";
|
||||
};
|
||||
patches = [
|
||||
./no-relocs.patch # for building x86 kernel headers on non-ELF platforms
|
||||
./no-dynamic-cc-version-check.patch # so we can use `stdenvNoCC`, see `makeFlags` above
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user