You are not logged in.

#1 2009-05-08 21:51:59

keratos
Member
Registered: 2008-04-27
Posts: 138

custom compile results in double size kernel, why?

downloaded the kernel source code arch package for 2.6.29.

zcat /proc/config > .config

then used the .config through "make oldmenuconfig" and set all new settings (about 15 of them) to either "n" or "m" (for module)

consequent to recompile I note that the kernel image (bzImage) is more than double the sizes (bytes) of the stock 2.6.29 kernel.

what is going on here? how is this so?

incidentally, my bechmarks suggest my compiled kernel is 15% slower than the default installation kernel.

cannot undertand this?

Offline

#2 2009-05-09 00:14:07

LeoSolaris
Member
From: South Carolina
Registered: 2008-03-30
Posts: 354

Re: custom compile results in double size kernel, why?

It's the modules. When you pull the modules out and make them modular rather than built in, it takes the kernel longer to find them and boot them.

There are a few micro kernel (all modular rather than compiled in) operating systems, like minix. The Linux kernel is meant to be a compiled in kernel, it runs faster that way. It's less stable though.

Edit:  Not sure why it would be bigger though. It still may be because of the modular drivers.

Last edited by LeoSolaris (2009-05-09 00:17:50)


I keep getting distracted from my webserver project...

huh? oooh...  shiny!

Offline

#3 2009-05-09 19:22:31

keratos
Member
Registered: 2008-04-27
Posts: 138

Re: custom compile results in double size kernel, why?

Its not the modules.

The stock kernel loads modules. I compiled the same kernel config. i.e. i did not modify the .config and used the same C##/make options. Yet the kernel is twice the size.

Offline

#4 2009-05-09 21:44:12

quetzyg
Member
From: /home/quetzyg
Registered: 2006-08-03
Posts: 129

Re: custom compile results in double size kernel, why?

Hi there,

When configuring the kernel, in the General Setup menu, almost at the end, there's an option called Optimize for size, enable it. This should save you ~200KB.

There are lots of stuff that you can compile as modules, rather than including it. I'm talking about every driver (except disk/filesystem related, unless you have ramdisk support), and other sub-systems.

I'm also assuming that you are only supporting your current hardware, and nothing else you don't own.

Regards,
Quetzy


ZzZz...

Offline

#5 2009-05-09 21:51:17

bangkok_manouel
Member
From: indicates a starting point
Registered: 2005-02-07
Posts: 1,556

Re: custom compile results in double size kernel, why?

ITT: I don't read the other posts.

Offline

#6 2009-05-11 09:43:40

keratos
Member
Registered: 2008-04-27
Posts: 138

Re: custom compile results in double size kernel, why?

Guys......... The .Config file IS THE SAME.

So the SAME options (including optimise for size) are set.

Offline

Board footer

Powered by FluxBB