Re: Reducing kernel compilation time



On Sun, Sep 25, 2011 at 5:13 PM, Stan Hoeppner <stan@xxxxxxxxxxxxxxxxx> 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.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx
Archive: http://lists.debian.org/CAOdo=SwGgkctNhOFpfPHfYuOeOg1nSAjdrCkYeyemrEyoKxytA@xxxxxxxxxxxxxx



Relevant Pages

  • Re: Patch for MSP430 support on Neuros OSD2 board
    ... The reason I used "ifdef" instead of refactoring code is that I don't ... have dm355 board to check nor I'm familiar with this hardware and I was ... but kernel people told me to combine code with existent. ... then have different static definitions for every known firmware ...
    (Linux-Kernel)
  • kernel BUG at mm/slab.c:610
    ... I'm experimenting this kernel panic on 3 different ... I don't think this is related to buggy hardware ... Filesystem "hda1": Disabling barriers, not supported by the ... # ACPI Support ...
    (Linux-Kernel)
  • Re: [PATCH tip/core/rcu 0/21] v6 add lockdep-based diagnostics to rcu_dereference()
    ... RCU infrastructure in place, the next eight use this infrastructure in the ... some of the remaining will be triggered only by hardware I don't have ... access to and kernel features I am unfamiliar with. ... # AX.25 network device drivers ...
    (Linux-Kernel)
  • Re: PROBLEM: cannot get stable system since 2.6.28 kernel (amd64)
    ... Philippe> well, I don't really believe in hardware problem for two ... Philippe> older kernel, everything works like a charm, every time I ... Philippe> I haven't any "overclocking" settings, and every hardware ... # Device Drivers ...
    (Linux-Kernel)
  • BUG: soft lockup in 2.6.25.5
    ... hardware, ... Running CentOS 5.2 with a kernel.org kernel ... # PCI IDE chipsets support ... # Input Device Drivers ...
    (Linux-Kernel)