View previous topic :: View next topic |
Author |
Message |
jesnow l33t
Joined: 26 Apr 2006 Posts: 856
|
Posted: Wed Jan 02, 2008 10:45 pm Post subject: Speed up kernel compilation |
|
|
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:
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 |
|
|
Januszzz Guru
Joined: 04 Feb 2006 Posts: 367 Location: Opole, Poland
|
Posted: Wed Jan 02, 2008 11:46 pm Post subject: |
|
|
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 |
|
|
|
|
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
|
|