File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed
pkgs/os-specific/linux/kernel Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 4747 # symbolic name and `patch' is the actual patch. The patch may
4848 # optionally be compressed with gzip or bzip2.
4949 kernelPatches ? [ ]
50- , ignoreConfigErrors ? stdenv . hostPlatform . linux-kernel . name != "pc"
50+ , ignoreConfigErrors ? stdenv . hostPlatform . linux-kernel . name or "" != "pc"
5151, extraMeta ? { }
5252
5353, isZen ? false
5454, isLibre ? false
5555, isHardened ? false
5656
5757# easy overrides to stdenv.hostPlatform.linux-kernel members
58- , autoModules ? stdenv . hostPlatform . linux-kernel . autoModules
58+ , autoModules ? stdenv . hostPlatform . linux-kernel . autoModules or true
5959, preferBuiltin ? stdenv . hostPlatform . linux-kernel . preferBuiltin or false
6060, kernelArch ? stdenv . hostPlatform . linuxArch
6161, kernelTests ? [ ]
@@ -128,11 +128,10 @@ let
128128 ++ lib . optionals ( lib . versionAtLeast version "4.16" ) [ bison flex ]
129129 ++ lib . optional ( lib . versionAtLeast version "5.2" ) pahole ;
130130
131- platformName = stdenv . hostPlatform . linux-kernel . name ;
132131 # e.g. "defconfig"
133- kernelBaseConfig = if defconfig != null then defconfig else stdenv . hostPlatform . linux-kernel . baseConfig ;
132+ kernelBaseConfig = if defconfig != null then defconfig else stdenv . hostPlatform . linux-kernel . baseConfig or "defconfig" ;
134133 # e.g. "bzImage"
135- kernelTarget = stdenv . hostPlatform . linux-kernel . target ;
134+ kernelTarget = stdenv . hostPlatform . linux-kernel . target or "vmlinux" ;
136135
137136 makeFlags = lib . optionals ( stdenv . hostPlatform . linux-kernel ? makeFlags ) stdenv . hostPlatform . linux-kernel . makeFlags
138137 ++ extraMakeFlags ;
Original file line number Diff line number Diff line change 8787
8888 isModular = config . isYes "MODULES" ;
8989
90- kernelConf = stdenv . hostPlatform . linux-kernel ;
90+ kernelConf = stdenv . hostPlatform . linux-kernel ;
91+ target = kernelConf . target or "vmlinux" ;
9192
9293 buildDTBs = kernelConf . DTB or false ;
9394in
@@ -101,7 +102,7 @@ stdenv.mkDerivation ({
101102
102103 depsBuildBuild = [ buildPackages . stdenv . cc ] ;
103104 nativeBuildInputs = [ perl bc nettools openssl rsync gmp libmpc mpfr zstd python3Minimal ]
104- ++ optional ( kernelConf . target == "uImage" ) buildPackages . ubootTools
105+ ++ optional ( target == "uImage" ) buildPackages . ubootTools
105106 ++ optional ( lib . versionOlder version "5.8" ) libelf
106107 ++ optionals ( lib . versionAtLeast version "4.16" ) [ bison flex ]
107108 ++ optionals ( lib . versionAtLeast version "5.2" ) [ cpio pahole zlib ]
@@ -297,8 +298,8 @@ stdenv.mkDerivation ({
297298 # Some image types need special install targets (e.g. uImage is installed with make uinstall)
298299 installTargets = [
299300 ( kernelConf . installTarget or (
300- /**/ if kernelConf . target == "uImage" then "uinstall"
301- else if kernelConf . target == "zImage" || kernelConf . target == "Image.gz" then "zinstall"
301+ /**/ if target == "uImage" then "uinstall"
302+ else if target == "zImage" || target == "Image.gz" then "zinstall"
302303 else "install" ) )
303304 ] ;
304305
You can’t perform that action at this time.
0 commit comments