Another kernel building note...

If you've been running an RPM-based distribution's kernel up until
now, and you want to build your own for the first time, you might want
to use the distribution's kernel as your starting point.  You can
simply copy /usr/src/linux to your workarea and use that, but
/usr/src/linux doesn't have the kernel's .config file.  The .config
file stores the answers to all those questions about modules, drivers,
options, settings, etc.

For some reason, Mandrake doesn't distribute their .config files as part
of the binary distribution.  You have to get the source distribution
to get the .config files.  Redhat is the same, AFAIK (but I haven't
built a kernel for a redhat system for about 10 months).

So, get the kernel-source source RPM from your favorite distribution
site.  Not the kernel-source RPM, but the kernel-source *source* RPM.
It ends in .src.rpm .

Like so:

  $ mkdir foo
  $ cd foo
  $ ncftpget 
ftp://ftp.sourceforge.net/pub/mirrors/mandrake/updates/7.1/SRPMS/kernel-2.2.16-9mdk.src.rpm

Now unpack all the files and find the config files.

  $ rpm2cpio kernel-2.2.16-9mdk.src.rpm | cpio -i
  $ ls *config*
  kernel-2.2.15-alpha-secure.config  kernel-2.2.15-sparc64-secure.config
  kernel-2.2.15-alpha-smp.config     kernel-2.2.15-sparc64-smp.config
  kernel-2.2.15-alpha.config         kernel-2.2.15-sparc64.config
  kernel-2.2.15-ppc-secure.config    kernel-2.2.16-i586-fb.config
  kernel-2.2.15-ppc-smp.config       kernel-2.2.16-i586-secure.config
  kernel-2.2.15-ppc.config           kernel-2.2.16-i586-smp.config
  kernel-2.2.15-sparc-secure.config  kernel-2.2.16-i586.config
  kernel-2.2.15-sparc-smp.config     linux-2.2.16-pcmcia-config.chmou.patch.bz2
  kernel-2.2.15-sparc.config

Figure out which .config file your kernel was built from.  Probably
kernel-*-i586-smp.config.  Copy that file to .config in your kernel
workarea. (Not /usr/src/linux, now that Seth has explained that
part to us. (-: )

The advantage of doing this is that Mandrake (or RedHat) put a lot of
effort into assembling all those patches and options so that we get a
kernel that runs on a lot more hardware than Linus' kernels do.
If you want to see the patches, look at the rest of the files that
you unpacked from the .src.rpm.

  $ ls *.patch* | wc
       64      64    2252

If anybody knows an easier way to get to the same place, please
let me know.  I can't believe it has to be this hard, but I haven't
found a better way yet...

-- 
                                        K<bob>
[EMAIL PROTECTED], http://www.jogger-egg.com/

Reply via email to