mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Christoph Pleger <Christoph.Pleger@cs.uni-dortmund.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Size of kernel modules
Date: Wed, 6 Jun 2007 19:22:49 +0200	[thread overview]
Message-ID: <20070606172249.GB5918@uranus.ravnborg.org> (raw)
In-Reply-To: <20070606170534.67b5dea9.Christoph.Pleger@cs.uni-dortmund.de>

On Wed, Jun 06, 2007 at 05:05:34PM +0200, Christoph Pleger wrote:
> Hello,
> 
> I have a machine here which I installed with Ubuntu 7.04. Immediately
> after the installation had been finished, I installed the Ubuntu package
> which contains the Ubuntu-modified sources of the linux kernel. I
> extracted the resulting tar.bz2-file, copied the configuration of the
> currently running kernel to .config and created a file localversion-irb
> which contains the line "-irb" and then called "make menuconfig". In the
> menu, I changed the CPU type from 586 to Pentium Pro and entered "-686"
> as the localversion. Finally, I used the Ubuntu tool make-kpkg with
> option "--initrd" to create a new kernel. The option "--initrd" causes
> the installation scripts of the kernel package to automatically create
> an initial ramdisk for the kernel.
> 
> After the new kernel package had been created, I installed it. After
> that, I looked into the directory /boot and was very surprised: The
> initial ramdisk of the new kernel was much larger than the initrd of the
> old kernel. To find out the cause for this, I investigated how
> directories /lib/modules/$old and /lib/modules/$new differ. I found out
> that the filenames are the same, but the size of the files differs very
> much. I found a module file in the new directory that was almost five
> times as large as the file with the same name in the old directory.
> 
> So, my question is the follwing: Is it an expected feature that the file
> sizes of modules grow so much only because of a different cpu type and a
> different localversion, or is there probably a bug in my build tools?

My best guess is that the orignally installed modules are stripped.
If you define INSTALL_MOD_STRIP then you would achieve the same.
>From Documentation/kbuild/makefile.txt:

    INSTALL_MOD_STRIP

	If this variable is specified, will cause modules to be stripped
	after they are installed.  If INSTALL_MOD_STRIP is '1', then the
	default option --strip-debug will be used.  Otherwise,
	INSTALL_MOD_STRIP will used as the option(s) to the strip command.


So you could do something like this:
>$ INSTALL_MOD_STRIP=1 make modules_install

	Sam

  parent reply	other threads:[~2007-06-06 17:22 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-06 15:05 Christoph Pleger
2007-06-06 15:51 ` Jesper Juhl
2007-06-06 16:56   ` Jan Engelhardt
2007-06-06 17:17   ` Sam Ravnborg
2007-06-06 15:59 ` jimmy bahuleyan
2007-06-06 17:22 ` Sam Ravnborg [this message]
2007-06-06 18:40 ` Joseph Fannin
2007-06-08  3:44 ` Kyle McMartin
2007-06-08 12:40   ` Robert P. J. Day
2007-06-08 18:59     ` Chuck Ebbert
2007-06-09  7:55     ` Jan Engelhardt
2007-06-09 12:08       ` Jon Masters
2007-06-09 13:59         ` Jan Engelhardt
2007-06-09 16:14           ` Jon Masters
2007-06-09 18:56           ` Satyam Sharma
2007-06-10 13:13           ` Sergey Vlasov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070606172249.GB5918@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=Christoph.Pleger@cs.uni-dortmund.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®