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

Re: Best kernel-building procedure

David <dbree@duo-county.com> writes:

> I've been building kernel-images for a while..  since I'm on dialup, and
> it takes so long to download the complete source every time, I keep the
> kernel-source..orig file.. currently I have 2.4.21...
> I then download the current "kernel-source..diff" and apply the patch to
> an orig. directory structure..

If I were doing this, I'd start with your 2.4.20 .tar.gz file, unpack
it, apply the 2.4.21 diff, and create a 2.4.21 tarball.  Given this,
I'd then go through the normal make-kpkg sequence.  If you really only
want one copy of the source, running 'make-kpkg clean' as an
intermediate step might help you.

> On this, I run "debian/rules binary"

...and I always use make-kpkg, rather than invoking debian/rules
directly.  I'm not sure if it actually makes a difference, though.

> To simplify things, I tried installing the kernel-patch deb, unpacking a
> copy of the kernel-source..orig, and then doing
>   $ "PATCH_THE_KERNEL=YES fakeroot make-kpg...kernel_image"
> the theory being that I _should_ come up with an identical vmlinuz..

There's a kernel-patch-foo package?  I guess current unstable does,
but it's the set of patches that distinguish the Debian kernel of a
given version from the stock kernel of the same version, while the
.diff files you download from kernel.org are between the stock kernel
of some version and the stock kernel of the previous version.  "That
package isn't what you think it is."

> the one created under the sources patched with the diff.
> $ll /boot/vmlinuz-2.4.21-4.dlb
> -rw-r--r--    1 root     root       907325 Aug  6 20:48 /boot/vmlinuz-2.4.21-4.dlb
> the first deb created using kernel-patch
> $dpkg --contents kernel-image-2.4.21-4.dlb-first.deb
> -rw-r--r-- root/root    907234 2003-08-07 19:13:15
> ./boot/vmlinuz-2.4.21-4.dlb

The other thing to note is that ELF binaries include some information
like the date the binary was built, and that might wind up being
compressed at a slightly different size depending on what exactly the
bytes are.  (Compiling the same program twice will give you different
bytes in the file.)

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

Reply to: