[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Reducing kernel compilation time



On Sat, Sep 24, 2011 at 12:01 PM, Stephen Powell <zlinuxman@wowway.com> wrote:
> On Sat, 24 Sep 2011 10:22:33 -0400 (EDT), Camaleón wrote:
>>
>> I had to compile the latest upstream kernel sources to make some
>> debugging with my wifi drivers (from staging) and discovered that
>> compilation took ~5 hours.
>>
>> That's much for testing purposes.
>>
>> Compilation takes place in a netbook governed by Intel's Atom N455 with 2
>> GiB of RAM and I would like to reduce the compilation time.
>>
>> I'm using the same ".config" file I have for the current Debian stock
>> kernel (to avoid missing some modules I may need) and just added
>> "CONFIG_MATOM=y" but it takes almost the same time.
>>
>> I don't need nothing special, just to be able to boot the system, test
>> the staging drivers and then remove/compile a new kernel again so wasting
>> the less time in the process would be great :-)
>
> I'm not familiar with the capabilities of your hardware, but if you have
> multiple CPUs ("cores") available, and you're using kernel-package, you
> can make use of the environment variable CONCURRENCY_LEVEL to set the
> number of simultaneous compile tasks.  For example,
>
>   CONCURRENCY_LEVEL=2 make-kpkg ...

CONCURRENCY_LEVEL=$(getconf _NPROCESSORS_ONLN)
although "getconf _NPROCESSORS_ONLN" on an atom's probably "1"; but
you never know...

You can also pass "INSTALL_MOD_STRIP=1" to make-kpkg so that the "make
modules_install" step strips out debugging information (if this isn't
done by default).


Reply to: