View previous topic :: View next topic |
Author |
Message |
digicosm Tux's lil' helper
Joined: 23 Sep 2002 Posts: 90
|
Posted: Mon Sep 01, 2003 9:41 pm Post subject: How important is 'make clean' for kernel compilation? |
|
|
Hey gang,
How important is 'make clean', anyway? The docs (and everyone I know) does this after 'make menuconfig':
Code: | make dep && make clean bzImage modules modules_install |
But if the kernel has previously been compiled, and I make only small changes to my config, why couldn't I do this?
Code: | make bzImage modules modules_install |
Will something break? Does everyone do the 'dep && clean" step after every change?
I ask because doing the 'make clean' step takes hideously long... |
|
Back to top |
|
|
digicosm Tux's lil' helper
Joined: 23 Sep 2002 Posts: 90
|
Posted: Mon Sep 01, 2003 9:42 pm Post subject: |
|
|
Sorry, I should rephrase that. 'make clean' takes no time at all. But recompiling everything from scratch does |
|
Back to top |
|
|
El_Presidente_Pufferfish Veteran
Joined: 11 Jul 2002 Posts: 1179 Location: Seattle
|
Posted: Mon Sep 01, 2003 9:43 pm Post subject: |
|
|
as far as i know clean just erases the modules you made before
i almost never used it when i was using 2.4.x
you dont ever need to do it in 2.6.x |
|
Back to top |
|
|
idl Retired Dev
Joined: 24 Dec 2002 Posts: 1728 Location: Nottingham, UK
|
Posted: Mon Sep 01, 2003 10:05 pm Post subject: |
|
|
make clean is sometimes needed before you make major changes to your config file, so the build afterward is as expected. Don't ask me why though |
|
Back to top |
|
|
digicosm Tux's lil' helper
Joined: 23 Sep 2002 Posts: 90
|
Posted: Tue Sep 02, 2003 5:40 am Post subject: |
|
|
Why? |
|
Back to top |
|
|
BitJam Advocate
Joined: 12 Aug 2003 Posts: 2513 Location: Silver City, NM
|
Posted: Tue Sep 02, 2003 5:58 am Post subject: |
|
|
If you change your config by moving a module to be compiled directly in the kernel or getting rid of a module altogether (i.e. any change that gets rid of an "m") then "make clean" is the step that actually gets rid of the module(s). |
|
Back to top |
|
|
digicosm Tux's lil' helper
Joined: 23 Sep 2002 Posts: 90
|
Posted: Tue Sep 02, 2003 6:10 am Post subject: |
|
|
I see. So, if everything is compiled into the kernel, there should be no need for 'make clean'? What about 'make dep'? |
|
Back to top |
|
|
idl Retired Dev
Joined: 24 Dec 2002 Posts: 1728 Location: Nottingham, UK
|
Posted: Tue Sep 02, 2003 12:16 pm Post subject: |
|
|
digicosm wrote: | I see. So, if everything is compiled into the kernel, there should be no need for 'make clean'? What about 'make dep'? |
make dep is needed for 2.4 but not 2.6. |
|
Back to top |
|
|
Gandalf_Grey_ Apprentice
Joined: 19 Apr 2003 Posts: 151
|
Posted: Tue Sep 02, 2003 12:32 pm Post subject: |
|
|
I only did make clean or make dep when I got a kernel compile error. If it compiled PLAY BALL!!! :p _________________ Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect.
-- Linus Torvalds |
|
Back to top |
|
|
Cossins Veteran
Joined: 21 Mar 2003 Posts: 1136 Location: Copenhagen, Denmark
|
Posted: Tue Sep 02, 2003 12:47 pm Post subject: |
|
|
You risk getting the dreaded "Unresolved Symbols", which basically means a module cannot be loaded because it was compiled for a differently configured kernel which doesn't "fit" the current one...
- Simon _________________ who cares |
|
Back to top |
|
|
digicosm Tux's lil' helper
Joined: 23 Sep 2002 Posts: 90
|
Posted: Tue Sep 02, 2003 6:44 pm Post subject: |
|
|
OK, so I guess the moral of the story is to use
Code: | make dep && make clean bzImage modules modules_install |
at all times... sigh |
|
Back to top |
|
|
BitJam Advocate
Joined: 12 Aug 2003 Posts: 2513 Location: Silver City, NM
|
Posted: Tue Sep 02, 2003 6:55 pm Post subject: |
|
|
Not always. When I modify my kernel it is usually because I want to add a feature, for example a USB printer. Very often this can be done just by adding one or more modules. In the case of just adding modules I just do: Code: | # make modules modules_install |
This is very fast because none of the existing modules need to be rebuilt. It just compiles the new modules. |
|
Back to top |
|
|
Cossins Veteran
Joined: 21 Mar 2003 Posts: 1136 Location: Copenhagen, Denmark
|
Posted: Tue Sep 02, 2003 6:57 pm Post subject: |
|
|
Yes, but some driver modules require in-kernel hooks, in which case you will have to make clean && make dep and recompile the whole kernel (or else you will get... unresolved symbols)
- Simon _________________ who cares |
|
Back to top |
|
|
BitJam Advocate
Joined: 12 Aug 2003 Posts: 2513 Location: Silver City, NM
|
Posted: Tue Sep 02, 2003 7:03 pm Post subject: |
|
|
Aha. Thanks. I didn't know that. |
|
Back to top |
|
|
fizz Guru
Joined: 31 Aug 2003 Posts: 309 Location: Florida
|
Posted: Tue Sep 02, 2003 7:29 pm Post subject: |
|
|
Cossins wrote: | You risk getting the dreaded "Unresolved Symbols", which basically means a module cannot be loaded because it was compiled for a differently configured kernel which doesn't "fit" the current one...
- Simon |
Woot! You da man, i know this has nothing to do with this thread but i was having this EXACT issue when i recompiled my kernel
via_rhine onboard lan adapter was giving me that.. Now i know
if i download 2.6.0-test4 i wouldnt have to do make clean since its a free untar of a new kernel correct? |
|
Back to top |
|
|
Cossins Veteran
Joined: 21 Mar 2003 Posts: 1136 Location: Copenhagen, Denmark
|
Posted: Tue Sep 02, 2003 7:57 pm Post subject: |
|
|
That's correct...
Though it wouldn't hurt, it would be over rather quickly as it would basically be looking for compiled modules, then realize that there is none and then exit...
I also think that all these issues have been resolved in the 2.6 series (I think it automatically recompiles everything that has to be recompiled in order for everything to work properly).
- Simon _________________ who cares |
|
Back to top |
|
|
|