kernel/builder: Support newer kernel versions
Fixes menuconfig for 5.10 for chuwi hi10 pro
, dtc
, dtbTool
+, cpio
+, elfutils
, libelf
, utillinux
@@ -162,9 +164,12 @@ stdenv.mkDerivation (inputArgs // {
depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ perl bc nettools openssl rsync gmp libmpc mpfr ]
++ optional (platform.kernelTarget == "uImage") buildPackages.ubootTools
- ++ optional (stdenv.lib.versionAtLeast version "4.14") libelf
+ ++ optional (stdenv.lib.versionAtLeast version "4.14" && stdenv.lib.versionOlder version "5.8") libelf
++ optional (stdenv.lib.versionAtLeast version "4.15") utillinux
++ optionals (stdenv.lib.versionAtLeast version "4.16") [ bison flex ]
+ ++ 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
# Mobile NixOS inputs.
# While some kernels might not need those, most will.
++ [ dtc ]
