aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/os-specific/linux/kernel/manual-config.nix
diff options
context:
space:
mode:
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/os-specific/linux/kernel/manual-config.nix')
-rw-r--r--infra/libkookie/nixpkgs/pkgs/os-specific/linux/kernel/manual-config.nix18
1 files changed, 14 insertions, 4 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/os-specific/linux/kernel/manual-config.nix b/infra/libkookie/nixpkgs/pkgs/os-specific/linux/kernel/manual-config.nix
index 92dc334135ad..3bdb8c4f2973 100644
--- a/infra/libkookie/nixpkgs/pkgs/os-specific/linux/kernel/manual-config.nix
+++ b/infra/libkookie/nixpkgs/pkgs/os-specific/linux/kernel/manual-config.nix
@@ -34,6 +34,13 @@ in {
randstructSeed ? "",
# Use defaultMeta // extraMeta
extraMeta ? {},
+
+ # for module compatibility
+ isXen ? features.xen_dom0 or false,
+ isZen ? false,
+ isLibre ? false,
+ isHardened ? false,
+
# Whether to utilize the controversial import-from-derivation feature to parse the config
allowImportFromDerivation ? false,
# ignored
@@ -86,6 +93,9 @@ let
passthru = {
inherit version modDirVersion config kernelPatches configfile
moduleBuildDependencies stdenv;
+ inherit isXen isZen isHardened isLibre;
+ kernelOlder = stdenv.lib.versionOlder version;
+ kernelAtLeast = stdenv.lib.versionAtLeast version;
};
inherit src;
@@ -233,10 +243,10 @@ let
rm -fR drivers
# Keep all headers
- find . -type f -name '*.h' -print0 | xargs -0 chmod u-w
+ find . -type f -name '*.h' -print0 | xargs -0 -r chmod u-w
# Keep linker scripts (they are required for out-of-tree modules on aarch64)
- find . -type f -name '*.lds' -print0 | xargs -0 chmod u-w
+ find . -type f -name '*.lds' -print0 | xargs -0 -r chmod u-w
# Keep root and arch-specific Makefiles
chmod u-w Makefile
@@ -246,7 +256,7 @@ let
chmod u-w -R scripts
# Delete everything not kept
- find . -type f -perm -u=w -print0 | xargs -0 rm
+ find . -type f -perm -u=w -print0 | xargs -0 -r rm
# Delete empty directories
find -empty -type d -delete
@@ -292,7 +302,7 @@ stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.platform kernelPatches
nativeBuildInputs = [ perl bc nettools openssl rsync gmp libmpc mpfr ]
++ optional (stdenv.hostPlatform.platform.kernelTarget == "uImage") buildPackages.ubootTools
++ optional (stdenv.lib.versionAtLeast version "4.14" && stdenv.lib.versionOlder version "5.8") libelf
- # Removed utillinuxMinimal since it should not be a dependency.
+ # Removed util-linuxMinimal since it should not be a dependency.
++ optionals (stdenv.lib.versionAtLeast version "4.16") [ bison flex ]
++ optional (stdenv.lib.versionAtLeast version "5.2") cpio
++ optional (stdenv.lib.versionAtLeast version "5.8") elfutils