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

Re: Reducing kernel compilation time



On Sun, 25 Sep 2011 16:13:58 -0500, Stan Hoeppner wrote:

> On 9/25/2011 11:02 AM, Camaleón wrote:

(...)

>>> Simply go through all the hardware and deselect anything that's not
>>> inside that netbook.  Of all the network interface cards you'll only
>>> need one (or two depending on whether that netbook has an RJ45 port in
>>> addition to the wireless NIC).  You'll only need one of the dozens of
>>> IDE/SATA drivers.  You won't need any of the SCSI/RAID or legacy block
>>> drivers, though you will need SCSI disk and SCSI CDROM, as libata
>>> needs those, as Stephen and I recently discussed.
>>
>> That's easy to say but hard to get and so much for a trial/error test.
> 
> It's definitely more difficult for non-hardwarefreaks.  

I'd say it is so for anyone that never has compiled his/her own kernel. 
First time is always hard, regardless the task you have in hands.

> But honestly, if one isn't a hardwarefreak s/he really has no business
> rolling his/her own kernel.  The entire concept of an operating system
> kernel is to abstract the hardware from user applications.  This
> concept is over 40 years old.  Some 90+% of the Linux kernel code deals
> with programming and communicating with the hardware.  So you really
> need to know a bit about hardware if you're going to roll your own
> kernels.

As I said earlier, I never had a deep reason to compile my own kernel 
until now, that my wifi card stopped from working since kernel >2.6.39, 
that is, since 3.0.0 branch and upwards. The involved "function" that has 
been added to the wifi driver has been detected and I was given a 
workaround but I still need to be able to test another things and that 
involves adding debug trace for the stating drivers, which involves a 
kernel compilation.

>>> Do an lspci and write down all the hardware you have in there.  The
>>> strip out all the drivers you don't have.  If you're unsure, ask.
>>
>> I'm using Sven's advice (in join with Stephen's one), I find it a very
>> good approach.
> 
> Pick your poison.  My point is simply that you need to know what
> hardware is in the machine so you can include the drivers you need and
> leave out those you don't.

Yes, I know that, but is not an easy task, even for not-so-newbie people.

>> Over the years, I've never had the need to compile a kernel and this is
>> my 4 kernel compilation in one month... but now I'm making these tests
>> "just for fun" because all these compilations were aimed to debug the
>> staging wifi drivers but the latest kernel (3.1-rc7, which I tried
>> yesterday) neither worked.
> 
> One of the biggest problems I see people having with both wired and
> wireless ethernet controllers is not getting the firmware loaded. 

(...)

Not related to this problem, I guess. I'm in talks with one of the driver 
devels that kindly is helping me to track this.

> The option to build firmware into the kernel is:
> 
> CONFIG_FIRMWARE_IN_KERNEL=y
> Description:  http://cateee.net/lkddb/web-lkddb/FIRMWARE_IN_KERNEL.html
> 
> The only downside is that this adds a few kilobytes to your kernel
> binary.  In my experience this is easier than the "recommended" way to
> include firmware, and it's foolproof as long as the firmware is in the
> source tree.  Most are.

Good to know. But that would still leave out the closed source drivers or 
proprietary blob, right?

Greetings,

-- 
Camaleón


Reply to: