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

Re:Hint needed: howto compile same kernel version



> What you need to do to build the kernel identical to the official one 
> (well, almost identical, it is not going to be byte-by-byte identical due 
> to timestamps and stuff like this):
> 
> # Get the source package
> apt-get source kernel-image-2.4.27-sparc
> # Get the dependencies
> apt-get build-dep kernel-image-2.4.27-sparc
> # Start the build
> cd kernel-image-2.4.27-sparc-2.4.27
> fakeroot debian/rules binary
> 
> If this procedure fails, then it's definitely a bug. Note that you have to 
> do your build on a sarge system. This will build the binary kernel 
> packages for all supported sparc flavours (sparc32, sparc64, sparc64-smp), 
> which takes a long time. If you only want to build the sparc64 kernel 
> image, you can do it by setting the flavours variable:
> 
> fakeroot debian/rules flavours=sparc64 binary
> 
> I remember this used to work before, but it has been a while since I've 
> fiddled with 2.4.x kernels, so YMMV.
> 
> Best regards,
> 
> Jurij Smakov                                        jurij@wooyd.org
> Key: http://www.wooyd.org/pgpkey/                   KeyID: C99E03CC

Aha! I would like to thank you for this tip, Jurij!

1) Compiling kernel source+config(from boot):1288120 2005-12-18 21:06 vmlinuz-2.4.27
2) Using apt-get source+build+ debian/rules: 1111090 2005-12-19 15:15 vmlinuz-2.4.27-2-sparc64
3) Fresh system:                             1111087 2005-08-23 01:34 vmlinuz-2.4.27-2-sparc64

It worked indeed, 3 bytes difference, so I’m in favor if your hint. It also gave the same .deb filename, so I’m convinced. Although there was another small difference: the original kernel was removed from the /boot directory when doing dpkg -i, as opposed to the first method, where the kernel and initrd.img file were given the extension .old. 

Anyway, what is now described in the installation manual is probably outdated. I will discuss this, at least because the -–initrd option is not mentioned (causing a kernel panic), but also because of this other way of compiling a kernel. 

It still keeps me wondering a bit. Is there an explanation for the differences? And are these differences harmful (a source for worries as well then)? And if so: how can it be prevented? THX 

Maarten

PS This is exactly what I did first time (and is what is described in the installation manual):
used dselect to install:
   kernel-package (and bzip2)
   libncursus5-dev
   kernel-source-2.4.27-10sarge1 (apt-cache showsrc showed this is the source used)
cd /usr/src/
tar xjf /usr/src/kernel-source-2.4.27.tar.bz2 
cd /usr/src/kernel-source-2.4.27
make menuconfig with /boot/config-2.4.27-2-sparc64
make-kpkg clean
make-kpkg --revision=std.1 --initrd kernel_image (--initrd is not described in the manual)
dpkg –i ../kernel-image……



Reply to: