View previous topic :: View next topic |
Author |
Message |
corcovado n00b
Joined: 26 Jul 2004 Posts: 6 Location: international airspace
|
Posted: Thu Sep 02, 2004 10:53 am Post subject: re compile kernel |
|
|
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 |
|
|
hds Advocate
Joined: 21 Aug 2004 Posts: 2629 Location: Sprockhoevel [GER]
|
Posted: Thu Sep 02, 2004 10:55 am Post subject: |
|
|
because not everything gets compiled again. if you just added a module perhaps, only this one is compiled. |
|
Back to top |
|
|
corcovado n00b
Joined: 26 Jul 2004 Posts: 6 Location: international airspace
|
Posted: Thu Sep 02, 2004 11:13 am Post subject: |
|
|
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 |
|
|
hds Advocate
Joined: 21 Aug 2004 Posts: 2629 Location: Sprockhoevel [GER]
|
Posted: Thu Sep 02, 2004 12:20 pm Post subject: |
|
|
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 |
|
|
cokey Advocate
Joined: 23 Apr 2004 Posts: 3355
|
Posted: Thu Sep 02, 2004 12:22 pm Post subject: |
|
|
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 |
|
|
coren2000 Tux's lil' helper
Joined: 19 Aug 2003 Posts: 75 Location: Toronto Canada
|
Posted: Thu Sep 02, 2004 6:10 pm Post subject: |
|
|
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 |
|
|
Deathwing00 Bodhisattva
Joined: 13 Jun 2003 Posts: 4087 Location: Dresden, Germany
|
Posted: Thu Sep 02, 2004 7:17 pm Post subject: |
|
|
Moved from Installing Gentoo. |
|
Back to top |
|
|
|