Re: Kernel compilation - detecting hardware - in the box vs. out

From: slurper (slurper1234_at_hotmail.com)
Date: 04/13/04


Date: Tue, 13 Apr 2004 22:31:52 +0200

all distro's have hardware detecting programs to know which modules should
be loaded. maybe, they can help.
but anyway, at a certain point, you have to know what's inside the machine
your administering and then you can choose:compile a custom kernel without
modules or load the module of your distro. the kernel options might be
overwhelming, but that's linux' strength also.

Adam wrote:

> I was thinking about compiling your own Linux kernel and the choices
> it gives you between compiling a feature into the kernel and compiling
> it as a module which gets loaded by hotplugging. The way I would like
> it to work for my system is the following:
>
> 1) If a driver is for a device that's inside my computer, I want it to
> be compiled directly into the kernel.
> 2) If a driver is for a device that normally goes inside your
> computer, but is not inside my computer, don't compile it at all.
> 3) If a driver is for an external device (such as a USB device),
> compile it as a module, whether the device is currently connected to
> the computer or not. This way any time someone wants to use a
> Linux-supported external device on my computer, they can do so without
> any configuration.
>
> Now, I could do all this manually (and indeed I have kind of done so).
> But it would be very convenient if there was some kind of hardware
> detection program or script to do it for me. Now, I've never written
> a hardware detecting program, so maybe such a program wouldn't be able
> to tell the difference between an internal and external device. If
> not, I think it would still be possible - there would just have to be
> a "database" somewhere of each kernel symbol and whether it's a symbol
> for an internal device, external, or neither.
>
> I know many distributions automatically detect your hardware during
> the installation process, but Mandrake, and I suspect most of the
> major distributions, already have a compiled kernel containing
> virtually every device you could possibly want to use compiled as a
> module. Basically, I don't need the modules for every sound card in
> existence on my computer. I think it would be much better if the
> installation process compiled a custom kernel during installation
> based on my hardware.
>
> Of course, this means that whenever I open up my computer and change
> something I'll have to do some re-compilation. That doesn't really
> bother me, though, and if the process was automated it wouldn't be
> much of a problem at all (heck, I bet it could detect at start-up
> whether the hardware in your computer has changed).
>
> Does anyone know of a program or script that already does something
> like this, or a distribution that already compiles a custom kernel
> based on the hardware of the computer it's being installed on?



Relevant Pages

  • Re: sporadic "freezes" on amd64 (GA K8NF)
    ... >> deciding whether this is a software problem or a hardware problem. ... Although - compiling tends to be ... Compiling the kernel. ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: Why compiling.
    ... compiling kernel on debian. ... The kernel provided when you install Linux, Debian included, has to work ... I always compile a kernel with only the hardware I have in my computer. ...
    (Debian-User)
  • Re: Why compiling.
    ... compiling kernel on debian. ... compiling in this time window. ... I always compile a kernel with only the hardware I have in my computer. ...
    (Debian-User)
  • Kernel compilation - detecting hardware - in the box vs. out
    ... I was thinking about compiling your own Linux kernel and the choices ... But it would be very convenient if there was some kind of hardware ... the installation process, but Mandrake, and I suspect most of the ...
    (comp.os.linux)
  • 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)