Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion pkgs/os-specific/linux/kernel/generic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
# Additional make flags passed to kbuild
, extraMakeFlags ? []

, # List of packages needed to build this specific kernel extra, additionally
# the default tools
nativeBuildInputs ? []

, # kernel intermediate config overrides, as a set
structuredExtraConfig ? {}

Expand Down Expand Up @@ -112,6 +116,7 @@ let

depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ perl gmp libmpc mpfr ]
++ nativeBuildInputs
++ lib.optionals (lib.versionAtLeast version "4.16") [ bison flex ];

platformName = stdenv.hostPlatform.linux-kernel.name;
Expand Down Expand Up @@ -181,7 +186,7 @@ let
}; # end of configfile derivation

kernel = (callPackage ./manual-config.nix { inherit buildPackages; }) {
inherit version modDirVersion src kernelPatches randstructSeed lib stdenv extraMakeFlags extraMeta configfile;
inherit version modDirVersion src kernelPatches randstructSeed lib stdenv extraMakeFlags extraMeta configfile nativeBuildInputs;

config = { CONFIG_MODULES = "y"; CONFIG_FW_LOADER = "m"; };
};
Expand Down
4 changes: 4 additions & 0 deletions pkgs/os-specific/linux/kernel/manual-config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ in {
# Use defaultMeta // extraMeta
extraMeta ? {},

# Extra build tools
nativeBuildInputs ? [],

# for module compatibility
isZen ? false,
isLibre ? false,
Expand Down Expand Up @@ -313,6 +316,7 @@ stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.linux-kernel kernelPat

depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ perl bc nettools openssl rsync gmp libmpc mpfr gawk zstd python3Minimal ]
++ nativeBuildInputs
++ optional (stdenv.hostPlatform.linux-kernel.target == "uImage") buildPackages.ubootTools
++ optional (lib.versionAtLeast version "4.14" && lib.versionOlder version "5.8") libelf
# Removed util-linuxMinimal since it should not be a dependency.
Expand Down