Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Speed up kernel compilation
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
jesnow
Guru
Guru


Joined: 26 Apr 2006
Posts: 468

PostPosted: Wed Jan 02, 2008 10:45 pm    Post subject: Speed up kernel compilation Reply with quote

When building the kernel, make doesn't pay any attention to the MAKEOPTS variable set in /etc/make.conf. You can see this easily if you're running (e.g.) xosview during a kernel compile, as the load switches back and forth between the two cpus, just like it did in portage compiles before I discovered the MAKEOPTS variable.

You need to set MAKEOPTS="-j 5" as a global environment variable to take advantage of both processors during kernel and other non-portage compiles. There are many ways to do this, but the most correct to me seems to be to edit /etc/env.d/05gcc-i686-pc-linux-gnu and add:

Code:

MAKEOPTS="-j 5"

Notice the space between the 'j' and '5', this is different than the MAKEOPTS variable in /etc/make.conf.

Then don't forget to
Code:

# env-update && source /etc/profile


And watch both processors screaming away full bore on your next kernel compile.

Jon.
Back to top
View user's profile Send private message
Januszzz
Guru
Guru


Joined: 04 Feb 2006
Posts: 367
Location: Opole, Poland

PostPosted: Wed Jan 02, 2008 11:46 pm    Post subject: Reply with quote

I simply use:

Code:
make -j12 bzImage && make -j12 modules && make modules_install


and genkernel also uses makeopts.

Anyway, nice post for those who frequently forget.

Janusz.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks 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