FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 09-24-2011, 02:43 PM
Camaleón
 
Default Reducing kernel compilation time

On Sat, 24 Sep 2011 16:26:34 +0200, Mathieu Malaterre wrote:

> On Sat, Sep 24, 2011 at 4:22 PM, Camaleón <noelamac@gmail.com> wrote:

(...)

>> 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 :-)
>>
>> Any trick?

> I would build only the relevant kernel *module*, I want to play with (or
> imported from linux-next):
>
> http://wiki.debian.org/HowToRebuildAnOfficialDebianKernelPackage

I'll give it a whirl, but reducing kernel compilation time is still
something I would like to have.

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: pan.2011.09.24.14.43.59@gmail.com">http://lists.debian.org/pan.2011.09.24.14.43.59@gmail.com
 
Old 09-24-2011, 03:18 PM
Sven Joachim
 
Default Reducing kernel compilation time

On 2011-09-24 16:22 +0200, 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 :-)
>
> Any trick?

Plug in any hardware that you intend to use with your netbook and then
run "make localmodconfig". This works from Linux 2.6.32 onwards¹.

Sven


¹ http://kernelnewbies.org/Linux_2_6_32#head-11f54cdac41ad6150ef817fd68597554d9d05a5f


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 874o02hsun.fsf@turtle.gmx.de">http://lists.debian.org/874o02hsun.fsf@turtle.gmx.de
 
Old 09-24-2011, 04:01 PM
Stephen Powell
 
Default Reducing kernel compilation time

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 :-)
>
> Any trick?

Hello, Camaleón.

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 ...

if you have a dual-core processor. You seem to have enough RAM to support
that. Note that there is a patch you will need for kernel-package if
you're using a version 3 kernel. See my kernel-building web page for
details.

http://users.wowway.com/~zlinuxman/Kernel.htm

If you have a quad-core machine, you can set CONCURRENCY_LEVEL to 4.

--
.'`. Stephen Powell
: :' :
`. `'`
`-


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 109735586.2090397.1316880067341.JavaMail.root@md01 .wow.synacor.com">http://lists.debian.org/109735586.2090397.1316880067341.JavaMail.root@md01 .wow.synacor.com
 
Old 09-24-2011, 04:04 PM
Camaleón
 
Default Reducing kernel compilation time

On Sat, 24 Sep 2011 17:18:08 +0200, Sven Joachim wrote:

> On 2011-09-24 16:22 +0200, Camaleón wrote:

(...)

>> 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 :-)
>>
>> Any trick?
>
> Plug in any hardware that you intend to use with your netbook and then
> run "make localmodconfig". This works from Linux 2.6.32 onwards¹.
>
>
>
> ¹ http://kernelnewbies.org/Linux_2_6_32#head-11f54cdac41ad6150ef817fd68597554d9d05a5f

I'll test that, it sounds very good :-)

(I guess that "CONFIG_MATOM=y" still needs to be manually added, right?)

I hope that by "cherry picking" kernel modules compilation time is
reduced significantly. I'll report back how it went, thanks.

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: pan.2011.09.24.16.04.22@gmail.com">http://lists.debian.org/pan.2011.09.24.16.04.22@gmail.com
 
Old 09-24-2011, 04:18 PM
Camaleón
 
Default Reducing kernel compilation time

On Sat, 24 Sep 2011 12:01:07 -0400, Stephen Powell wrote:

> On Sat, 24 Sep 2011 10:22:33 -0400 (EDT), Camaleón wrote:

(...)

>> 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 :-)
>>
>> Any trick?
>
> Hello, Camaleón.
>
> 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.

What do you mean by "kernel-package"? Debian's vanilla kernel? No,
sources have to be from upstream. I already have compiled and installed a
vanilla kernel from Debian sources but wifi driver fails at the same
point than Debian's stock kernel. I need to try "the greatest and latest"
kernel source (3.1-rc7).

> For example,
>
> CONCURRENCY_LEVEL=2 make-kpkg ...
>
> if you have a dual-core processor. You seem to have enough RAM to
> support that. Note that there is a patch you will need for
> kernel-package if you're using a version 3 kernel. See my
> kernel-building web page for details.
>
> http://users.wowway.com/~zlinuxman/Kernel.htm
>
> If you have a quad-core machine, you can set CONCURRENCY_LEVEL to 4.

Yes... I've already¹ "walked" through that link, and it's fantastic for
Debian starters, very well explained with detailed steps (have you
considered adding it into Debian's wiki, or at least -if not the full
article- a link to it?)

¹I noticed you pointed to it in another thread where someone asked for
something similar ;-)

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: pan.2011.09.24.16.18.47@gmail.com">http://lists.debian.org/pan.2011.09.24.16.18.47@gmail.com
 
Old 09-24-2011, 04:19 PM
Sven Joachim
 
Default Reducing kernel compilation time

On 2011-09-24 18:04 +0200, Camaleón wrote:

> On Sat, 24 Sep 2011 17:18:08 +0200, Sven Joachim wrote:
>
>> Plug in any hardware that you intend to use with your netbook and then
>> run "make localmodconfig". This works from Linux 2.6.32 onwards¹.
>
> I'll test that, it sounds very good :-)
>
> (I guess that "CONFIG_MATOM=y" still needs to be manually added, right?)

If the currently running kernel does not have it (i.e. you still run a
Debian kernel), then yes.

Sven


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 87ty81hq09.fsf@turtle.gmx.de">http://lists.debian.org/87ty81hq09.fsf@turtle.gmx.de
 
Old 09-24-2011, 05:56 PM
Tom H
 
Default 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).


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: CAOdo=Szv0Ff9N=FsyfCiY+-erVY5pPLf_irmFTg4poSWpLc24w@mail.gmail.com">http://lists.debian.org/CAOdo=Szv0Ff9N=FsyfCiY+-erVY5pPLf_irmFTg4poSWpLc24w@mail.gmail.com
 
Old 09-24-2011, 06:13 PM
Stephen Powell
 
Default Reducing kernel compilation time

On Sat, 24 Sep 2011 12:18:47 -0400 (EDT), Camaleón wrote:
>
> What do you mean by "kernel-package"? Debian's vanilla kernel?

"kernel-package" is the name of a Debian package, as in

aptitude install kernel-package

It is not a kernel. It is a collection of scripts, configuration
files, etc. that are intended to aid in the process of compiling
a kernel and building a Debian binary kernel package. The make-kpkg
command is one of the scripts in the kernel-package package.
>
> No, sources have to be from upstream.

kernel-package can be used with official Debian kernel source packages
or with pristine kernel sources acquired directly from upstream.
When using upstream kernel sources directly, one cannot use the
Debian package version in the "--revision" option, since there is
no Debian package version. You have to make one up. Other than
that, it works just fine for upstream kernel sources. I've done it
before, and for similar reasons as you.
>
> Yes... I've already¹ "walked" through that link, and it's fantastic for
> Debian starters, very well explained with detailed steps (have you
> considered adding it into Debian's wiki, or at least -if not the full
> article- a link to it?)
>
> ¹I noticed you pointed to it in another thread where someone asked for
> something similar ;-)

The Debian kernel team seems to think that kernel-package should be
considered deprecated. (Although, as far as I know, the author of
kernel-package does not share that opinion.) Therefore, I'm not sure
that my kernel-building stuff would be welcome in the official wiki.
The kernel team encourages the use of "make deb-pkg". But I personally
don't like "make deb-pkg" because of its "one size fits all" build
philosophy. For example, it always produces a headers package, and I
often don't need a headers package. With kernel-package, I only get
the packages that I ask for. And since your goal is to reduce kernel
compilation time, I would think that you would not want extra packages
produced that you don't need. That takes additional time.

If you decide to try kernel-package, make sure that you apply the
patch file listed in the web page. It won't work properly with a
version 3 kernel unless you do.

--
.'`. Stephen Powell
: :' :
`. `'`
`-


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 1610419885.2091849.1316888037313.JavaMail.root@md0 1.wow.synacor.com">http://lists.debian.org/1610419885.2091849.1316888037313.JavaMail.root@md0 1.wow.synacor.com
 
Old 09-24-2011, 06:20 PM
Stephen Powell
 
Default Reducing kernel compilation time

On Sat, 24 Sep 2011 13:56:35 -0400 (EDT), Tom H wrote:
>
> 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).

Thanks for the tips, Tom! I believe I'll incorporate one or both of
those tips during the next revision of my kernel-building web page.

--
.'`. Stephen Powell
: :' :
`. `'`
`-


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 1203183261.2091906.1316888418264.JavaMail.root@md0 1.wow.synacor.com">http://lists.debian.org/1203183261.2091906.1316888418264.JavaMail.root@md0 1.wow.synacor.com
 
Old 09-24-2011, 08:44 PM
Ralf Mardorf
 
Default Reducing kernel compilation time

On Sat, 2011-09-24 at 20:20 +0000,
debian-user-digest-request@lists.debian.org wrote:
> CONCURRENCY_LEVEL=2

I didn't read the thread, just one mail.

For my 2.1 GHz dual-core Athlon CONCURRENCY_LEVEL does minimal reduce
compiling time. I suspect that consequently reducing unneeded stuff
would be much more time reducing, unfortunately it takes a lot of time
to edit such a basic config. I never did and still suffer when compiling
a kernel and regarding to my audio needs I need to build kernels very
often.

Fortunately I'm able to use my computer, while building a kernel,
unfortunately it might take an hour, before I know, that something fishy
does stop building the kernel and this could happen 3 or 4 times again,
before a kernel will be build.

Yep, it's a PITA, OTOH, for other OSs there's no possibility to build a
kernel that fits to personal needs.

Live is a PITA


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 1316897087.4933.65.camel@debian">http://lists.debian.org/1316897087.4933.65.camel@debian
 

Thread Tools




All times are GMT. The time now is 09:52 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org