[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Recognizing Kernel Update to 2.4.12



On Mon, Oct 29, 2001 at 12:11:58PM -0500, eDoc wrote:
> > you need to, as in the documentation, run make-kpkg from the top-level
> kernel
> > directory, which will depend on where you put your kernel source. This is
> typically
> > either /usr/src/linux or /usr/src/kernel-source-<kernelversion>
> > glen
> 
> kernel-source?  You mean "linux-2.4.12.tar.gz?
> 
> Or do you mean "linux-2.4.12.gz"?
> 
> "linux-2.4.12.tar.gz" is in /usr/src and I tried to run "make-kpkg" there.
> No go.

I'll take you through my complete set of steps for building kernel
packages from pristine kernel.org source.

 - Download whatever it is you're getting.  I tend to grab a tarball
   at one point and then grab the successive patches for a while until
   the point where I get tired of typing "patch -p1".  You might also
   want to verify the kernel sources with the signatures distributed
   from that site if you know how to use gpg.

 - cd /usr/src

 - Untar the source tarball from kernel.org.  It should get unpacked
   to a "linux" directory in /usr/src.

 - Apply any patches I need.

 - Move the kernel dir so the dir name contains a version, such as
   "linux-2.4.13".  (I'll assume I'm building 2.4.13 from here on
   out.)  So, something like "mv /usr/src/linux /usr/src/linux-2.4.13"
   should do the trick.  I do this so I can keep track of exactly what
   version of the kernel source I have handy.

 - Grab the source for any other modules you think you may need.
   Debian packages module source as packages that you can install;
   look for packages with names that end in "-source".  ("dpkg --list
   '*-source'" should give you a nice list.)  Once you have package
   names, just apt-get them.

 - The source packages unpack their source as tarballs in /usr/src.
   Unpack each one with:

     cd /usr/src
     (b)zcat foo.tar.(gz|bz2) | tar xvf -

   Something like this should unpack them all:

     cd /usr/src
     for file in *.tar.gz; do zcat $file | tar xvf -; done
     for file in *.tar.bz2; do bzcat $file | tar xvf -; done

   It's important to be in /usr/src when you unpack the tarball, as
   it's set up to unpack to just the right place for make-kpkg to find
   it.

 - cd /usr/src/linux-2.4.13

 - Configure the kernel.  This isn't Debian-specific.  Some people
   like "make menuconfig", others "make xconfig", others just plain
   "make config".  One handy tip: Debian kernel packages store their
   configs in /boot/config-X.Y.Z, so you can start with a good kernel
   config and go from there.  If you do that and just want to be asked
   the questions that are new since that kernel version, run "make
   oldconfig".

 - Pick a Debian package revision for your kernel stuff.  I generally
   pick something that describes the purpose of the kernel and a
   version, such as "laptop.1".

 - Run "make-kpkg clean".

 - Run "make-kpkg --revision=<revision> kernel_image".

 - If that succeeds, run "make-kpkg modules_image".

 - If you think you may need to compile other modules for this kernel
   after you've built other kernels with this source tree, run
   "make-kpkg kernel_headers".

 - cd /usr/src

 - ls -l *deb

You should now have a list of Debian packages on your screen,
corresponding to the kernel packages you just built (and maybe some
older ones, if you've been building kernels before).  Run a "dpkg -i"
on them, and you're all set.



Reply to: