[Nottingham] SUSE Self-compiled Kernel is huge

Mike Martin mike at redtux.org.uk
Thu Jun 7 09:25:39 UTC 2012


On 7 June 2012 08:02, Michael Quaintance <penfoldq at penfoldq.co.uk> wrote:
> A friend of mine is stuck with using SUSE for a work project, he needs to
> modify the stock kernel and so he followed the instructions from SUSE but
> the resulting kernel is, in his words, gargantuan.
>
> Anyone got any ideas on what he has done wrong? Specifically, are there any
> alternate make targets he should be using instead/as well?
>
> I've attached his own description of the problem below.
>
> Thanks in advance.
>
> -Michael
>
> -------------------------------------------------------
>
> I have an installation of SLES 11.2 on the x86_64 platform updated to the
> 3.0.26-0.7 kernel.
>
> As a part of a project, I need to tweak the kernel configuration and apply a
> minor patch to a few of the source files.
>
> I did the following (based mostly on the /usr/src/linux/README.SUSE file):
>
> Copy the source tree to my home directory:
>
> $mkdir -p ~/builds/kernel/linux-3.0.26-0.7/src
> $cd ~/builds/kernel/linux-3.0.26-0.7/src
> $cp -R /usr/src/linux-3.0.26-0.7/* .
>
> Clone the running system's configuration and then launch menuconfig to tweak
> that:
>
> $make cloneconfig
> $make menuconfig
>
> Make the following changes to the configuration:
> *Change the local version string
> *Enable the TCP MD5 option
> *Enable IPv6 multicast routing
> *Eanble IPv6 multicast multi-table support
> *Enable IPv6 PIM-SM
>
> Make my changes to the sources
> Build and install and make RPMs
>
> $make
> $make modules_install
> $make install
> $make rpm-pkg
>
>
> When I do this, the kernel I get is gargantuan compared to the binaries
> provided by SUSE, even though I am supposedly using the same configuration
> they used.
>
> For comparison:
>
> Their /lib/modules directory is about 91M, while mine is 1.8G
> Their /lib/modules/kernel/drivers directory is about 60M, while mine is 1.3G
> Their /lib/modules directory contains 2167 files while mine has 3772
> Individual module files are much larger. For example, their
> kernel/drivers/net/e1000/e1000.ko is 260K while mine is 2M.
> Their initrd file is 7.1M while mine is 14M
> Their vmlinuz...gz file is 4.3M while mine is 43M
> The RPMs generated don't match. SUSE provided kernel-default,
> kernel-default-base, kernel-devel, and linux-kernel-headers. I got only two
> (kernel- and kernel-headers)
> The sum total of the SUSE-provided kernel RPMs (kernel-default,
> kernel-default-base, kernel-devel and linux-kernel-headers) is about 38M.
> The sum of the two kernel RPMs I got is about 321M
>
>
> I assume that my build is packed full of debug info and theirs isn't. Are
> there alternate make targets I should be using?
>
> If there are no magic command line parameters to give make, then it would
> appear that the config file I extracted from /proc/config.gz is not the one
> SUSE used to compile their kernel. Or at least not for compiling all the
> modules.
>
> What should I change in the configuration to bring my build down to a
> reasonable size? There are many symbol/debug options, but I don't want to
> just go randomly flipping switches trying to find the magic combination SUSE
> used.
have a look at this

http://www.howtoforge.com/kernel_compilation_suse_p2

I would guess you should have a config file in /boot and you should
use that as a base



More information about the Nottingham mailing list