From 7db1cba057d0184c2195f69b98b7fe124e409f98 Mon Sep 17 00:00:00 2001 From: Tuomas Tynkkynen Date: Sun, 26 Jul 2015 02:36:19 +0300 Subject: [PATCH] kernel: Let the kernel build system strip modules Since commit 48f51f118506 we let the kernel build system compress the modules, which makes the original strip expression not work. Let the kernel build system strip them as well so they get stripped. --- pkgs/os-specific/linux/kernel/manual-config.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix index 2b1e55a880a0..238b7ecd242c 100644 --- a/pkgs/os-specific/linux/kernel/manual-config.nix +++ b/pkgs/os-specific/linux/kernel/manual-config.nix @@ -129,6 +129,9 @@ let mkdir -p $out/dtbs cp $buildRoot/arch/$karch/boot/dts/*.dtb $out/dtbs '' else "") + (if isModular then '' + if [ -z "$dontStrip" ]; then + installFlagsArray+=("INSTALL_MOD_STRIP=1") + fi make modules_install $makeFlags "''${makeFlagsArray[@]}" \ $installFlags "''${installFlagsArray[@]}" unlink $out/lib/modules/${modDirVersion}/build @@ -190,9 +193,6 @@ let # !!! This leaves references to gcc in $dev # that we might be able to avoid postFixup = if isModular then '' - if [ -z "$dontStrip" ]; then - find $out -name "*.ko" -print0 | xargs -0 -r ''${crossConfig+$crossConfig-}strip -S - fi # !!! Should this be part of stdenv? Also patchELF should take an argument... prefix=$dev patchELF