I am building custom linux kernel packages in a Ubuntu 13.10 amd64 environment usingapt-get source linux-image-$(uname -r)
the debian way make-kpkg clean;fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers
.
Linux headers is larger than image
The result are two .deb files where the file linux-headers-
is 8.2M in size and the resulting linux-image-
is only 6.1M. After having a look in what files the linux-image-
contains, I see that there are loads of headers for items which are disabled in the .config
file.
Linux-headers-... content
- unused file systems, like
/fs/reiserfs/
, - unused security modules, like
/security/selinux/
, - unused includes, like
/include/pcmcia/
or/include/sound/
, - unused architectures, like
/arch/powerpc/
,/arch/s390/
,/arch/parisc/
,/arch/blackfin/
,/arch/cris/
,/arch/xtensa/
,/arch/alpha/
,/arch/ia64/
,/arch/h8300/
,/arch/arm/
, etcetera, - unused drivers, like
/drivers/leds/
,/drivers/eisa/
,/drivers/isdn/
,/drivers/net/ppp/
,/drivers/net/wireless/
, etcetera, - unused networking like
/net/bluetooth/
,/net/wimax/
,/net/decnet/
, etcetera
What (and how) are the options for stripping the unused items out of the linux-headers-
package and/or otherwise reduce the file size?
linux-headers
package size? – जलजनक Mar 14 '14 at 09:40kernel_headers
fromfakeroot make-kpkg
. – Pro Backup Mar 14 '14 at 10:29