Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
re compile kernel
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
corcovado
n00b
n00b


Joined: 26 Jul 2004
Posts: 6
Location: international airspace

PostPosted: Thu Sep 02, 2004 10:53 am    Post subject: re compile kernel Reply with quote

OK, I'm installing a stage3 gentoo 2.6 on a laptop, and I'm recompiling the kernel, because the first attempt didn't boot properly.

I changed two settings on the .config file, and the compilation was almost instantaneous. Why's that?
Back to top
View user's profile Send private message
hds
Advocate
Advocate


Joined: 21 Aug 2004
Posts: 2629
Location: Sprockhoevel [GER]

PostPosted: Thu Sep 02, 2004 10:55 am    Post subject: Reply with quote

because not everything gets compiled again. if you just added a module perhaps, only this one is compiled.
Back to top
View user's profile Send private message
corcovado
n00b
n00b


Joined: 26 Jul 2004
Posts: 6
Location: international airspace

PostPosted: Thu Sep 02, 2004 11:13 am    Post subject: Reply with quote

I see, thanks.
I find that interesting.
I honestly thought even the smallest of changes would require the whole thing to be compiled again.
in the case of a small module change, *it* may be recompiled quickly, but how is it inserted into the compressed binary bzImage?

Unless of course, all kernel entities get precompiled separately and exist as binaries in the source tree. This would mean that a second phase compilation procedure take place, which compiles all these small binaries into a big one.

I suppose i really should google all this.
Back to top
View user's profile Send private message
hds
Advocate
Advocate


Joined: 21 Aug 2004
Posts: 2629
Location: Sprockhoevel [GER]

PostPosted: Thu Sep 02, 2004 12:20 pm    Post subject: Reply with quote

well, it depends.. if you compile as module <m>, it is externally as you guessed. actually it is written running "make modules" and copied over toi /lib/modules at "make modules_install".

if you compile the module Built_in <*> it goes into bzImage.

additionally, the kernel is plenty files (name.o) wich are put together. so even if you compile your module build_in, that does not mean the complete kernel has to be rebuild. just the single part (name.o) and afterwards the binary (bzImage) is put together again, wich doesnt take long.
Back to top
View user's profile Send private message
cokey
Advocate
Advocate


Joined: 23 Apr 2004
Posts: 3355

PostPosted: Thu Sep 02, 2004 12:22 pm    Post subject: Reply with quote

corcovado wrote:
in the case of a small module change, *it* may be recompiled quickly, but how is it inserted into the compressed binary bzImage?


It isn't. If you just compile a module the module is just added to
Code:
/lib/modules/<kernel-version>
and is loaded at a different time in the boot process. As long as its not needed to access the file system then it can be compiled as a module. For example, almost all drivers can be added as modules but if you add your IDE drivers as modules and you have an IDE HDD then you wont be able to boot
_________________
https://otw20.com/ OTW20 The new place for off the wall chat
Back to top
View user's profile Send private message
coren2000
Tux's lil' helper
Tux's lil' helper


Joined: 19 Aug 2003
Posts: 75
Location: Toronto Canada

PostPosted: Thu Sep 02, 2004 6:10 pm    Post subject: Reply with quote

make is a utility that allows programmers to not have to compile all their code when a small change has been made. since make doesn't know your not a programmer it gives you this special discount compile-time rate too:)

when you type make, make is looking to see just what source files (and I guess config files) have changed and builds the ones that have been changed, linking them to the ones that were compiled before and havn't had source changes.
Back to top
View user's profile Send private message
Deathwing00
Bodhisattva
Bodhisattva


Joined: 13 Jun 2003
Posts: 4087
Location: Dresden, Germany

PostPosted: Thu Sep 02, 2004 7:17 pm    Post subject: Reply with quote

Moved from Installing Gentoo.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum