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

Re: Best kernel-building procedure



On Sun, Aug 10, 2003 at 05:56:03PM -0400, David Z Maze wrote:
> 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.

Are you talking about the kernel.org packages here?  The diff'ing I'm
talking about is where you get say,
kernel-source-2.4.21-2.4.21-orig.tar.gz from Debian, and apply, say,
kernel-source-2.4.21-2.4.21-4.diff.tar.gz, from Debian..  This diff will
also work on a kernel.org source, too.. the only difference I see in the
kernel.org and Debian *orig* package is that a few files have been
removed in the Debian package.. I'd assume things that might not be in
line with their GPL rules??

Anyway, this diff I'm talking about patches an original kernel source to
that particular Debian release..

> 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.

With the sources I get with the above procedure, the patch inserts a
debian/rules which doesn't work for make-kpkg.. however, a thought just
occurred to me.. my kernel-package is stable, and, as you mentioned
below, 2.4.21 is for testing/unstable.. these have a later version
kernel-package.. this later version may be a bit different, and not
compatible with stable's..  But the kernel source tree I get when I
apply the kerenel-source-xx patch to kernel-source-orig is a package
that will produce all the kernel-tree debs, including
kernel-source-2.4.21-x.deb that, when installed, will work with
make-kpkg..  However, probably if I ran make-kpkg clean first, it might
get rid of the debian/rules and I'd have a straight kernel-source, I'm
not sure..

> > 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'm talking about, for example, kernel-patch-debian-2.4.21-4

> 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."

Right..  As you see above, I'm not talking about these..  I guess I
didn't make myself clear in my original post..

> > 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.)

OK.. that would probably explain a few bytes, but would that explain the
near 100 above?



Reply to: