package: kernel-package
version: 11.001
tags: patch
severity: wishlist
The following adds INSTALL_MOD_STRIP to the "make modules_install",
which requests the kernel makefile to strip the modules of debugging
information before installing it. The basic idea here is to keep the
space in /lib/modules/<kver> under control, since this could be on a
root partition with space restrictions.
The debuginfo should be stored separately, in /usr/lib/debug/lib/modules/<kver>
I didn't have enough make-kpkg foo to figure out how to make create a
separate linux-image-debug package, but here's the shell script I use to
package up the debug info; perhaps this will be useful for you.
#!/bin/sh
KERNELRELEASE=$(cat include/config/kernel.release 2> /dev/null)
MODDIR=/usr/lib/debug/lib/modules/$KERNELRELEASE
make INSTALL_MOD_PATH=/usr/lib/debug modules_install
du -s $MODDIR
find $MODDIR -type f -name \*.ko | xargs -n 1 objcopy --only-keep-debug
du -s $MODDIR
tar cjf ../debug-$KERNELRELEASE.tar.bz2 $MODDIR
Index: kernel-package/ruleset/targets/image.mk
===================================================================
--- kernel-package.orig/ruleset/targets/image.mk 2006-10-15
21:11:47.000000000 -0400
+++ kernel-package/ruleset/targets/image.mk 2006-10-15 21:12:30.000000000
-0400
@@ -110,7 +110,8 @@
mv System.map System.precious
endif
$(MAKE) $(EXTRAV_ARG) INSTALL_MOD_PATH=$(INSTALL_MOD_PATH) \
- $(CROSS_ARG) ARCH=$(KERNEL_ARCH) modules_install
+ INSTALL_MOD_STRIP=1 $(CROSS_ARG) ARCH=$(KERNEL_ARCH) \
+ modules_install
ifneq ($(strip $(KERNEL_CROSS)),)
mv System.precious System.map
endif
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]