scripts/image: use kernel toolchain to strip modules

Signed-off-by: Matthias Reichl <hias@horus.com>
This commit is contained in:
Matthias Reichl 2018-02-14 13:33:12 +01:00
parent ebaff257b9
commit a5f4761560

View File

@ -230,11 +230,8 @@ find $INSTALL/usr/lib/kernel-overlays/base/lib/modules/$MODVER/ -name *.ko | \
$TOOLCHAIN/bin/depmod -b $INSTALL/usr/lib/kernel-overlays/base -a -e -F "$BUILD/linux-$(kernel_version)/System.map" $MODVER
# strip kernel modules
if [ "$TARGET_KERNEL_ARCH" = "arm64" -a "$TARGET_ARCH" = "arm" ]; then
STRIP=$TOOLCHAIN/lib/gcc-linaro-aarch64-linux-gnu/bin/aarch64-linux-gnu-strip
fi
for MOD in `find $INSTALL/usr/lib/kernel-overlays/ -type f -name *.ko`; do
$STRIP --strip-debug $MOD
${TARGET_KERNEL_PREFIX}strip --strip-debug $MOD
done
# symlink overlayed modules to /usr/lib/modules