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

Re: Reducing kernel compilation time



On Sun, Sep 25, 2011 at 5:13 PM, Stan Hoeppner <stan@hardwarefreak.com> wrote:
> On 9/25/2011 11:02 AM, Camaleón wrote:
>> On Sun, 25 Sep 2011 10:18:53 -0500, Stan Hoeppner 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.  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.

Whilst I agree that being a hardware freak might make choosing the
right kernel config settings, it's not a must. I've been compiling
kernels for a while and I'm definitely not a hardware freak; in fact,
one of the most satisfying aspects of my job for the last eight or
nine years is that I haven't seen a server room (unless I'm
moonlighting in an SME) and don't have to deal with hardware except
when I ask the hardware boys and girls to change a failing disk or ram
module or check the cabling or install/remove a box or ...


>> 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. Recall the big row
> on this list about the Realtek 8111/8168 etc?  Debian didn't included the
> firmware in the Debian kernel tree due to Realtek ambiguity on the source
> license.  Thus I recommend to anyone rolling a kernel to use a
> vanilla/pristine tarball which includes all the firmware blobs, and to build
> the blobs into your kernel.  Also, build fixed hardware drivers into the
> kernel, not as modules.  Fixed meaning non-removable, as in soldered to the
> system board, such as SATA, wireless ethernet, USB, etc in your netbook.
>
> 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.

+1

The catee site above is very useful to find out what various kernel
config settings are. But you can also get that info by choosing "help"
for an entry in menuconfig.


Reply to: