Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How important is 'make clean' for kernel compilation?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
digicosm
Tux's lil' helper
Tux's lil' helper


Joined: 23 Sep 2002
Posts: 90

PostPosted: Mon Sep 01, 2003 9:41 pm    Post subject: How important is 'make clean' for kernel compilation? Reply with quote

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
View user's profile Send private message
digicosm
Tux's lil' helper
Tux's lil' helper


Joined: 23 Sep 2002
Posts: 90

PostPosted: Mon Sep 01, 2003 9:42 pm    Post subject: Reply with quote

Sorry, I should rephrase that. 'make clean' takes no time at all. But recompiling everything from scratch does ;)
Back to top
View user's profile Send private message
El_Presidente_Pufferfish
Veteran
Veteran


Joined: 11 Jul 2002
Posts: 1179
Location: Seattle

PostPosted: Mon Sep 01, 2003 9:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
idl
Retired Dev
Retired Dev


Joined: 24 Dec 2002
Posts: 1728
Location: Nottingham, UK

PostPosted: Mon Sep 01, 2003 10:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
digicosm
Tux's lil' helper
Tux's lil' helper


Joined: 23 Sep 2002
Posts: 90

PostPosted: Tue Sep 02, 2003 5:40 am    Post subject: Reply with quote

Why? :D
Back to top
View user's profile Send private message
BitJam
Advocate
Advocate


Joined: 12 Aug 2003
Posts: 2513
Location: Silver City, NM

PostPosted: Tue Sep 02, 2003 5:58 am    Post subject: Reply with quote

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
View user's profile Send private message
digicosm
Tux's lil' helper
Tux's lil' helper


Joined: 23 Sep 2002
Posts: 90

PostPosted: Tue Sep 02, 2003 6:10 am    Post subject: Reply with quote

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
View user's profile Send private message
idl
Retired Dev
Retired Dev


Joined: 24 Dec 2002
Posts: 1728
Location: Nottingham, UK

PostPosted: Tue Sep 02, 2003 12:16 pm    Post subject: Reply with quote

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
View user's profile Send private message
Gandalf_Grey_
Apprentice
Apprentice


Joined: 19 Apr 2003
Posts: 151

PostPosted: Tue Sep 02, 2003 12:32 pm    Post subject: Reply with quote

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
View user's profile Send private message
Cossins
Veteran
Veteran


Joined: 21 Mar 2003
Posts: 1136
Location: Copenhagen, Denmark

PostPosted: Tue Sep 02, 2003 12:47 pm    Post subject: Reply with quote

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
View user's profile Send private message
digicosm
Tux's lil' helper
Tux's lil' helper


Joined: 23 Sep 2002
Posts: 90

PostPosted: Tue Sep 02, 2003 6:44 pm    Post subject: Reply with quote

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
View user's profile Send private message
BitJam
Advocate
Advocate


Joined: 12 Aug 2003
Posts: 2513
Location: Silver City, NM

PostPosted: Tue Sep 02, 2003 6:55 pm    Post subject: Reply with quote

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
View user's profile Send private message
Cossins
Veteran
Veteran


Joined: 21 Mar 2003
Posts: 1136
Location: Copenhagen, Denmark

PostPosted: Tue Sep 02, 2003 6:57 pm    Post subject: Reply with quote

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
View user's profile Send private message
BitJam
Advocate
Advocate


Joined: 12 Aug 2003
Posts: 2513
Location: Silver City, NM

PostPosted: Tue Sep 02, 2003 7:03 pm    Post subject: Reply with quote

Aha. Thanks. I didn't know that.
Back to top
View user's profile Send private message
fizz
Guru
Guru


Joined: 31 Aug 2003
Posts: 309
Location: Florida

PostPosted: Tue Sep 02, 2003 7:29 pm    Post subject: Reply with quote

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 :P
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
View user's profile Send private message
Cossins
Veteran
Veteran


Joined: 21 Mar 2003
Posts: 1136
Location: Copenhagen, Denmark

PostPosted: Tue Sep 02, 2003 7:57 pm    Post subject: Reply with quote

That's correct... :D
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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat 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