kernel configuration and installation

Ken Moffat ken at
Wed Oct 29 05:30:08 PDT 2008

On Tue, Oct 28, 2008 at 10:13:01PM -0700, Rob Thornton wrote:
> This is my second time through LFS. The first with LFS 6.3 and now 
> through LFS SVN. I have a couple questions on installing and configuring 
> the Linux kernel...
> 1) When enabling ALSA support, should the LFS book not recommend that 
> the card drivers be loaded as modules so when updated versions of the 
> ALSA source are installed the kernel can load them rather than remaking 
> a new kernel?
> 2) If, for example, the existing kernel only supports ALSA 1.0.13 (for 
> kernel in LFS6.3), but the current ALSA source version is 
> 1.0.17...Will the current kernel support modules for the latest ALSA 
> version or, does that leave me with upgrading the kernel? If so, why 
> even bother making these drivers modular with separate source? For minor 
> revisions only?
 You build alsa more often than you compile kernels ?  Each to his
own (I compile kernels often, but my desktop only gets updated for
new features I think will be useful, or for known vulnerabilities).

 Distros usually make everything modular so that they can support
most hardware, I don't know if upgrading userspace alsa requires a
newer kernel - I suppose it might do occasionally, but distros can
enforce that.

> 3a) If a new kernel should not be installed with previous version 
> headers (an upgrade from to or 2.6.26.x to 2.6.27.x, 
> for example), and the installed kernel headers should be the ones that 
> gcc and binutils were compiled I need to reinstall the 
> kernel and toolchain from scratch or the entire system a la LFS?
> 3b) To upgrade the it as simple as installing new kernel 
> headers, recompiling the toolchain against the new headers, then 
> installing a new kernel?
> 3c) How do other distributions get around this? Like Debian or Ubuntu, 
> which install new kernel images without updating the toolchain? Are they 
> just foolish or have I missed something completely?
> Rob Thornton

 Yes, I think you've missed the important thing ;)  The kernel
headers are what glibc was compiled against, and they should not be
changed unless you upgrade glibc [ and before anyone misconstrues
that, we *don't* support upgrading glibc - when the time comes,
build a new system ].

 To upgrade the kernel -

(i) Unpack the source.  If you are working from the original
tarball (e.g. from to 
 - *revert* the original 'stable' patch (patch- to get back
   to Linus's release
 - apply the patches for each of his releases (patch-2.6.2{3,4,5,6})
 - apply the current 'stable' patch (patch-

 I'm spelling this out because some people don't realise that stable
patches are always applied against Linus's release - in the same
way, when comes out you first revert patch-

 Of course, you can download the tarball for linux- if you

(ii) Configure it, commonly by 'zcat /proc/config.gz >.config ; make

(iii) make ;  make modules_install ; cp arch/x86/boot/bzImage
/boot/this-new-kernel [ or whatever, on other architectures ] ;
mae sure that the bootloader knows about it (edit menu.lst for

 - That's all.

das eine Mal als Tragödie, das andere Mal als Farce

More information about the lfs-support mailing list