git.iko.soy/typeable/nixpkgs
on master help sign in
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.

commit7db1cba057d0184c2195f69b98b7fe124e409f98 authorTuomas Tynkkynen <tuomas.tynkkynen@iki.fi> dateSun 26 Jul 2015, 02:36 (11 years ago) parent61042a5
1 file changed+3−3
pkgs/os-specific/linux/kernel/manual-config.nix+3−3
pkgs/os-specific/linux/kernel/manual-config.nix+3−3
@@ -129,6 +129,9 @@ let
129129 mkdir -p $out/dtbs
130130 cp $buildRoot/arch/$karch/boot/dts/*.dtb $out/dtbs
131131 '' else "") + (if isModular then ''
132+ if [ -z "$dontStrip" ]; then
133+ installFlagsArray+=("INSTALL_MOD_STRIP=1")
134+ fi
132135 make modules_install $makeFlags "''${makeFlagsArray[@]}" \
133136 $installFlags "''${installFlagsArray[@]}"
134137 unlink $out/lib/modules/${modDirVersion}/build
@@ -190,9 +193,6 @@ let
190193 # !!! This leaves references to gcc in $dev
191194 # that we might be able to avoid
192195 postFixup = if isModular then ''
193− if [ -z "$dontStrip" ]; then
194− find $out -name "*.ko" -print0 | xargs -0 -r ''${crossConfig+$crossConfig-}strip -S
195− fi
196196 # !!! Should this be part of stdenv? Also patchELF should take an argument...
197197 prefix=$dev
198198 patchELF