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

Re: manual kernel recompile vs make-kpkg



On Tue, Oct 26, 1999 at 05:48:51PM -0500, Charles Lewis wrote:

> Install debian kernel source using dselect (not sure how to do patches)

To do a patch:

# cd /usr/src/kernel-source-2.2.12
# zcat ~/patch-2.2.13.tar.gz | patch -sp1

That'll do the trick. Removing a patch is exactly the same, except you
give patch the -R option as well... Something to watch out for is that
some patches are incremental (e.g. 2.2.12 -> 2.2.13 -> 2.2.14) whereas
others need to be removed and patched with a newer version (the ac
patches are an example of this).

> cd /usr/src
> tar zxpvf kernel-source-2.2.12.tar.gz
> cd kernel-source-2.2.12

You might want to link your current kernel source tree to
/usr/src/linux:

# cd /usr/src
# ln -sf kernel-source-2.2.12 linux

> make menuconfig (or xconfig)
> make dep (make clean??)
> make bzImage
> make modules
> make modules_install
> cp /usr/src/kernel-source-2.2.12/arch/i386/boot/bzImage /boot/vmlinuz-2.2.12
> rm /vmlinuz
> ln -s /boot/vmlinuz-2.2.12 /vmlinuz
> (I learned the hard way that when I copied bzImage directly to /vmlinuz, I
> was overwriting the previous kernel in /boot)

You'll want to copy the System.map to /boot as well.
# cp /usr/src/kernel-source-2.2.12/System.map /boot/System.map-2.2.12

> Now, my question is, is what I do above pretty much what everyone else does?
> And what would be the equivalent steps for doing the same thing using
> make-kpkg? After reading the man pages, I'm not sure what options I should
> use or what the resulting deb would be. This is what I've been able to glean
> so far:
> 
> make menuconfig
> make-kpkg clean??
> make-kpkg --revision 1.0 --bzimage kernel_image

You might want to use something like --revision custom.1.0 or something,
since you run the risk of apt overwriting your kernel package with a
newer official Debian one (when one becomes available), which is
probably not what you want.

Unless you're doing this as root (bad), you'll need something like
fakeroot to finish the kernel package making process, since you need
root access to build a package. What I normally do is what you've done,
and then when it fails with an error about not having root access:

# fakeroot make-kpkg kernel_image

And it'll build up the package for you.

> dpkg -i ???

This looks right, although you don't need the --bzimage, since that's
the default anyway. The .deb you install is left just outside of your
kernel tree, (in your case, it would be in /usr/src).

kernel-image-*.deb will be the name of it...

> Another question is what exactly is the difference between bzimage and
> zimage, and which one should I be using?

bzImage is "big" zImage, and is able to load larger kernels (>1MB),
whereas zImage is limited to something smaller (600kB?). You want to use
bzImage all the time, unless your machine doesn't like booting such
images (e.g. some laptops will only boot zImage kernels).

-- 
[ Matthew Gregan ]      [ GPG ID: B63A1E95 ]      [ kinetik@ihug.co.nz ]
[ GPG fingerprint:  FB83 2911 F170 B31C 9E4A  E382 CA8A A2F6 B63A 1E95 ]

Attachment: pgpBPl2IkLcu1.pgp
Description: PGP signature


Reply to: