diff options
author | Adam Joseph <adam@westernsemico.com> | 2023-07-25 14:42:37 -0700 |
---|---|---|
committer | Adam Joseph <adam@westernsemico.com> | 2023-07-28 12:32:03 -0700 |
commit | 3aff6553615124198331f845ce3f07ddd731c2c5 (patch) | |
tree | 28a0fb414bc9a1ef20ed39f5d7e7c46376b8ff04 /pkgs/os-specific/linux | |
parent | 37eb25a4285919205f311d26952c752913e2cd1c (diff) | |
download | nixpkgs-3aff6553615124198331f845ce3f07ddd731c2c5.tar nixpkgs-3aff6553615124198331f845ce3f07ddd731c2c5.tar.gz nixpkgs-3aff6553615124198331f845ce3f07ddd731c2c5.tar.bz2 nixpkgs-3aff6553615124198331f845ce3f07ddd731c2c5.tar.lz nixpkgs-3aff6553615124198331f845ce3f07ddd731c2c5.tar.xz nixpkgs-3aff6553615124198331f845ce3f07ddd731c2c5.tar.zst nixpkgs-3aff6553615124198331f845ce3f07ddd731c2c5.zip |
Revert "linuxManualConfig: install GDB scripts"
This reverts commit d57568fcad7e3a9364850cb1c25d7a34693c02d5.
Diffstat (limited to 'pkgs/os-specific/linux')
-rw-r--r-- | pkgs/os-specific/linux/kernel/common-config.nix | 7 | ||||
-rw-r--r-- | pkgs/os-specific/linux/kernel/manual-config.nix | 18 |
2 files changed, 9 insertions, 16 deletions
diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index 688c13499b1..a95a0ac2ede 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -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 @@ -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 = { diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix index 46407eccf05..4005dda4374 100644 --- a/pkgs/os-specific/linux/kernel/manual-config.nix +++ b/pkgs/os-specific/linux/kernel/manual-config.nix @@ -278,6 +278,7 @@ let ]; postInstall = optionalString isModular '' + cp vmlinux $dev/ if [ -z "''${dontStrip-}" ]; then installFlagsArray+=("INSTALL_MOD_STRIP=1") fi @@ -297,16 +298,12 @@ let # from a `try-run` call from the Makefile rm -f $dev/lib/modules/${modDirVersion}/build/.[0-9]*.d - # Keep some extra files - for f in arch/powerpc/lib/crtsavres.o arch/arm64/kernel/ftrace-mod.o \ - scripts/gdb/linux vmlinux vmlinux-gdb.py - do - if [ -e "$buildRoot/$f" ]; then - mkdir -p "$(dirname "$dev/lib/modules/${modDirVersion}/build/$f")" - cp -HR $buildRoot/$f $dev/lib/modules/${modDirVersion}/build/$f + # Keep some extra files on some arches (powerpc, aarch64) + for f in arch/powerpc/lib/crtsavres.o arch/arm64/kernel/ftrace-mod.o; do + if [ -f "$buildRoot/$f" ]; then + cp $buildRoot/$f $dev/lib/modules/${modDirVersion}/build/$f fi done - ln -s $dev/lib/modules/${modDirVersion}/build/vmlinux $dev # !!! No documentation on how much of the source tree must be kept # If/when kernel builds fail due to missing files, you can add @@ -349,11 +346,6 @@ let sed -i Makefile -e 's|= ${buildPackages.kmod}/bin/depmod|= depmod|' ''; - preFixup = '' - # Don't strip $dev/lib/modules/*/vmlinux - stripDebugList="$(cd $dev && echo lib/modules/*/build/*/)" - ''; - requiredSystemFeatures = [ "big-parallel" ]; meta = { |