maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   How to reduce the time of kernel's re-compiling? (https://talk.maemo.org/showthread.php?t=69813)

justforfun 2011-02-14 02:27

How to reduce the time of kernel's re-compiling?
 
Hi, when I compile the kernel of N900(2.6.28-omap1) for the first time in scratchbox, the time is quite long, everyone knows that. And then I made some change of the kernel, recompile it, now the compile time becomes short.

But if I quit scratchbox and re-login it again, and re-compile the kernel, the time is as long as the first time I do it. Does anyone know why? And how to solve this problem?
Thanks!

teh 2011-02-14 10:03

Re: How to reduce the time of kernel's re-compiling?
 
Get a faster computer?

onion 2011-02-14 10:22

Re: How to reduce the time of kernel's re-compiling?
 
Maybe some timestamp won't match anymore after logout/login. Use verbose build to se what it's doing.
Maybe even try ccache if that might help recompiles.

lma 2011-02-14 10:56

Re: How to reduce the time of kernel's re-compiling?
 
Ccache is installed and used by default, that's why the second compilation is much faster. I've no idea why logging out of scratchbox makes it longer for the OP though.

dchky 2011-02-14 11:52

Re: How to reduce the time of kernel's re-compiling?
 
Do you have a bunch of spare cores in your CPU? I tend to increase the number of jobs to run in parallel based on the number of CPU's and cores I have. Eg.

make -j 4 bzImage

This should speed things along a tad assuming you have a quad core machine, though you can vary the number up or down depending.

Captwheeto 2011-02-14 13:40

Re: How to reduce the time of kernel's re-compiling?
 
If it's the same as Gentoo then it's -j total number of cores + 1

justforfun 2011-02-27 06:53

Re: How to reduce the time of kernel's re-compiling?
 
Quote:

Originally Posted by teh (Post 945913)
Get a faster computer?

Yes, that is a good way and I have done that.

justforfun 2011-02-27 06:57

Re: How to reduce the time of kernel's re-compiling?
 
Quote:

Originally Posted by dchky (Post 945994)
Do you have a bunch of spare cores in your CPU? I tend to increase the number of jobs to run in parallel based on the number of CPU's and cores I have. Eg.

make -j 4 bzImage

This should speed things along a tad assuming you have a quad core machine, though you can vary the number up or down depending.

This is a good suggestion, I will try it.

justforfun 2011-02-27 07:03

Re: How to reduce the time of kernel's re-compiling?
 
Quote:

Originally Posted by onion (Post 945927)
Maybe some timestamp won't match anymore after logout/login. Use verbose build to se what it's doing.
Maybe even try ccache if that might help recompiles.

I think your answer is most reasonable. Unfortunately I cannot repeat what I mentioned. Now whenever I recompile the kernel under scratchbox(in any case), the compile time is short. I don't know why.

dchky 2011-02-27 11:59

Re: How to reduce the time of kernel's re-compiling?
 
Quote:

Originally Posted by Captwheeto (Post 946087)
If it's the same as Gentoo then it's -j total number of cores + 1

No, it's just -j <Total Number of Cores> only. Not plus 1 :-) You wont see any improvement unfortunately. +2 or more above the number of cores and you're more likely to have compile times take (sometimes significantly) longer.


All times are GMT. The time now is 05:18.

vBulletin® Version 3.8.8