D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Compiling a Kernel for troublesome hardware

 

On Fri, 2 Jul 2010, Simon Robert wrote:

On 02/07/10 13:15, Julian Hall wrote:
 On 02/07/2010 11:24, Rhia Knowles wrote:
Someone on the list mentioned they compiled their own Kernels,
possibly Gordon. I tried this once when I was just starting out with
Linux (I was trying to install Gentoo) and decided I needed more
guidance if I didnt want to go the Microsoft route and produce the
most bloated thing I could.

This laptop is looking like it's going to need a custom Kernel if I
want to keep it up to date, so I'm wondering if anyone has a guide to
the modules so I can read through and decide which bits I do and dont
need?

A friend of mine once built his own kernel from the ground up, and called the distro Phuqnose (apologies to those of a delicate disposition). When asked what he intended to call it, he replied..... yes well you can fill in the gaps :) It did not go well, but it *was* funny :)

Julian

Not being agressive or mocking or anything, just interested. What hardware have you got that needs you to make it a custom kernel? There are so many distros out there that seem to pick up even what seem (to me anyhow) to be obscure bits of hardware. And if your chosen distro doesn't support whatever is it not easier to install the module for whatever rather than build the entire kernel? I know if it was me doing it I might tick the box for the "obscure" hardware, but probably miss low level stuff that has to be there.

For me, these days, it's because I've always done it that way, (old and stuck in my ways!) and because I can. It's no big deal (for me) in the overall setup process I use when building a new machine.

Although it did help on my Acer Aspire One. The Debian Lenny kernel didn't have the Wi-Fi driver as I recall, but a later kernel off kernel.org did. I don't change distros - I've been using Debian for the past 15 years - call me old and boring if you like, but it works for me - and I've worked out how to make it work for me! Changing distros is like the tail wagging the dog. If you stick to one distro then you can learn how to use that distro to it's fullest advantage. I think it's quite sad when I hear of people trying 2 or 3 differrent distros just to get their laptop working. I've had Debian going on all the Laptops I've ever had - not saying it's always been perfect, but they've been usable for me as a work tool (more important for me than as a play thing)

And I'm an efficiency nut - I just don't like bloat. I also feel that if I compile a custom kernel, then I may have something that's more stable. It boots quicker too - no modules to load.

And it's not always hardware - Debian Lenny picked up all the hardware on my last set of server installs, but I still compiled by own - I wanted features rather than devices in a newer kernel that weren't in the stock Debian one, so it wasn't hard to DIY it with a stock kernel. (and I now have 6 servers over 3 different hardware platforms running the same kernel) What I miss-out on is distribution provided security fixes, but it's not too hard to keep up to date with security issues - if they're required - which IME haven't been neccessary since 2.6.18... (Not to say there haven't been security issues, but not any that would have affected me)

Also, for the most-part, I build servers and things that don't ever change. So I strip out all the USB, hotplug, udev stuff and so on. These boxes are designed for a purpose - they'll never use USB, never have a parallel printer or mouse plugged in, so why put the code into the kernel, or load-up the user-space with the drivers?

My desktop doesn't do any sort of hot plugging or automounting either. I plug my camera in, I type mount /camera in a terminal and that's it. (or I plug my phone into my laptop and I type wvdial n900 and I'm on the 'net via the phone)

Some thing do occasionally have modules though - it's almost unavoidable. ALSA sound seems to work better with modules - so my desktop and AAO has those as modules. Same for Wi-Fi on my old Acer Aspire, but not on the AAO, so it's all about finding the best fit, and I like to fiddle when I have the time.

lsmod on my workstation:

  Module                  Size  Used by
  snd_hda_intel          17484  0
  snd_hda_codec_realtek   189078  1
  snd_hda_codec          55904  2 snd_hda_intel,snd_hda_codec_realtek

lsmod on a PBX:

  Module                  Size  Used by
  zttranscode             6408  0
  wctdm                  32544  2
  zaptel                194360  8 zttranscode,wctdm
  oslec                   7640  1 zaptel

The hardware drivers for the telco cards and timing don't integrate into the kernel very well.


I also compile my own apache, php, MySQL, sendmail and 1 or 2 other minor things too, but that's another story... ;-)

Gordon

--
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html