On (29/04/06 18:17), Digby Tarvin wrote: > I am nearly ready to start customizing my 2.6 kernel for my hardware, but > before I do that I would like to confirm my kernel build procedure by > first reproducing what was left by the installer... > > I have searched the web and several books, and all of the instructions > say to obtain the kernel with an 'apt-get install kernel-tree', and I > am sure that 2-3 months ago with Sarge I used > apt-get install kernel-tree-2.6.8 > but on Etch this package does not seem to exit. However I did find that > there is a 'linux-tree-2.6.15'. > > Is there an up-to-date 'howto' that gives a step by step summary of how > the installed kernel was built from the current Etch repository? > > I have managed to build (and am running) a new kernel, but I am sure there > must be a better way than trial and error to work out the procedure. > > Here is what I ended up doing: > apt-get install kernel-package > apt-get instal linux-tree-2.6.15 > cd ~digbyt/kernel;tar xfj /usr/src/linux-source-2.6.15.tar.bz2 > cd linux-source-2.6.15; cp /boot/config-2.6.15-1-686 .config > make-kpkg --rootcmd fakeroot --initrd \ > --append-to-version -drst --revision 1 kernel-image > dpkg -i ../linux-image-2.6.15-drst_1_i386.deb
Looks pretty good to me. I always compile kernel-headers as well for compiling against later, and modules-image for my extra modules, but you don't have to. > Does this look reasonable? Why the 'i386' suffix when config was '686'? In the config menu there is an option to specify the processor family, check what value this has. This 386 doesn't specify what the kernel was built for though. This is a Debian thing for specifying which arch this .deb belongs to (i.e. 386 rather than amd64, ppc etc.) > The newly compiled kernel exhibits one change in behaviour over the > original. My sata CDROM, which I never managed to make work with the > original kernel, is now recognised! > scsi1 : ata_piix > Vendor: MATSHITA Model: DVD-RAM UJ-832S Rev: 1.01 > Type: CD-ROM ANSI SCSI revision: 05 > > This was one of the reasons for getting ready to reconfigure the kernel, > but I wasn't expecting a recompile with no changes to do the trick??? Maybe it was making the initrd again that did the trick, the drivers might be included now, hence the larger size. > One thing I am not sure of is how to make sure that I apply the same > set of patches as was done with the original kernel. I have seen mention > of an 'applied_patches' files in the top level directory of the kernel > source tree, but no such file seems to exist. The Debian stock kernels have a bunch of patches applied to them from the kernel.org versions. The linux-tree package contains these I think, there is a package (kernel-patch-debian or similar) that contains them if you want to look. If you want to apply more patches then make-kpkg does this very nicely. Packaged patches (e.g. grsecurity2) create a kernel-patches dir next to the kernel tree where they are stored. Then make-kpkg can be made to apply all the patches, allow you to configure the kernel, then build it and unpatch the source, meaning you don't have to remember to patch the tree everytime you get a new one. Hope this helps, James -- James Westby [EMAIL PROTECTED] http://jameswestby.net/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]