Skip to content

Commit

Permalink
Merge pull request #245449 from amjoseph-nixpkgs/pr/linux-kernel-mult…
Browse files Browse the repository at this point in the history
…iple-outputs

linuxManualConfig: revert #221707
  • Loading branch information
Adam Joseph authored Jul 28, 2023
2 parents bd4f325 + dbe0d20 commit b34c60c
Show file tree
Hide file tree
Showing 3 changed files with 314 additions and 349 deletions.
7 changes: 4 additions & 3 deletions pkgs/os-specific/linux/kernel/common-config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ let

debug = {
# Necessary for BTF
DEBUG_INFO = yes;
DEBUG_INFO = mkMerge [
(whenOlder "5.2" (if (features.debug or false) then yes else no))
(whenBetween "5.2" "5.18" yes)
];
DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT = whenAtLeast "5.18" yes;
# Reduced debug info conflict with BTF and have been enabled in
# aarch64 defconfig since 5.13
Expand All @@ -59,8 +62,6 @@ let
SUNRPC_DEBUG = yes;
# Provide access to tunables like sched_migration_cost_ns
SCHED_DEBUG = yes;

GDB_SCRIPTS = yes;
};

power-management = {
Expand Down
9 changes: 6 additions & 3 deletions pkgs/os-specific/linux/kernel/generic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@
# symbolic name and `patch' is the actual patch. The patch may
# optionally be compressed with gzip or bzip2.
kernelPatches ? []
, ignoreConfigErrors ? stdenv.hostPlatform.linux-kernel.name or "" != "pc"
, ignoreConfigErrors ? stdenv.hostPlatform.linux-kernel.name != "pc"
, extraMeta ? {}

, isZen ? false
, isLibre ? false
, isHardened ? false

# easy overrides to stdenv.hostPlatform.linux-kernel members
, autoModules ? stdenv.hostPlatform.linux-kernel.autoModules or true
, autoModules ? stdenv.hostPlatform.linux-kernel.autoModules
, preferBuiltin ? stdenv.hostPlatform.linux-kernel.preferBuiltin or false
, kernelArch ? stdenv.hostPlatform.linuxArch
, kernelTests ? []
Expand Down Expand Up @@ -128,8 +128,11 @@ let
++ lib.optionals (lib.versionAtLeast version "4.16") [ bison flex ]
++ lib.optional (lib.versionAtLeast version "5.2") pahole;

platformName = stdenv.hostPlatform.linux-kernel.name;
# e.g. "defconfig"
kernelBaseConfig = if defconfig != null then defconfig else stdenv.hostPlatform.linux-kernel.baseConfig or "defconfig";
kernelBaseConfig = if defconfig != null then defconfig else stdenv.hostPlatform.linux-kernel.baseConfig;
# e.g. "bzImage"
kernelTarget = stdenv.hostPlatform.linux-kernel.target;

makeFlags = lib.optionals (stdenv.hostPlatform.linux-kernel ? makeFlags) stdenv.hostPlatform.linux-kernel.makeFlags
++ extraMakeFlags;
Expand Down
Loading

0 comments on commit b34c60c

Please sign in to comment.