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

Re: Help with patching kernel??

Matthew Claridge <matt.claridge@ntlworld.com> writes:
> 1. There's no /usr/src/linux directory. But I think thats normal
> because I've got a /usr/src/kernel-source-2.4.18 directory with the
> kernel source tree underneath it....

Yup, this is fine.  If you want to put your source somewhere besides
/usr/src, that's fine too.  :-)

> 2. There's no .config file that I can find with my current kernel
> configuration - I don't want to do this from scratch  if I can help
> it....

The config file for your current kernel is probably in /boot/config-*;
you can copy it to .config in your kernel source tree and work from there.

> make xconfig

(Or 'make menuconfig', or even 'make config', any is fine though they
have different dependencies.)

> make -kpkg clean
> make -kpkg kernel_image modules_image

'make-kpkg', no space.  When you do 'make-kpkg kernel-image', you'll
probably need to run it with the 'fakeroot' command, and provide a
--revision, like so:

  make-kpkg clean
  fakeroot make-kpkg --revision=custom.1 kernel-image
  fakeroot make-kpkg modules-image

Also, 'make-kpkg modules-image' doesn't do anything unless you have
module source packages (e.g. lm-sensors, ALSA, openafs, ...) installed
under /usr/src/modules (or $MODULE_LOC).  It's safe to skip this step
if you don't need to run it; 'make-kpkg kernel-image' will build the
modules you've selected in the main kernel configuration.

> dpkg -i kernel_image modules_image
> to build and install the kernel???

Yup, sounds good.

> But like I said, I'm confused.......(and scared!!! lol) As a newbie to
> Debian, should I just use the standard patch method until I'm more
> comfortable with the new stuff, or is it quite easy to get into it and
> do it the 'right' way??

IMHO building kernels with make-kpkg is easier (and saner) than using
the instructions that come with the kernel.  One big advantage: if you
screw it up and really really want the new kernel off of the system,
you can just 'dpkg --remove' it.  (And similarly, if you're building
up a nice collection of a half-dozen old kernels you never use, it's
easy to get rid of them.)  If you do want to install kernel modules
distributed in other Debian packages, make-kpkg is the best-supported
way to do this.

David Maze         dmaze@debian.org      http://people.debian.org/~dmaze/
"Theoretical politics is interesting.  Politicking should be illegal."
	-- Abra Mitchell

Reply to: