Go to project page or browse CVS tree.
The Kernel Laboratory is a tool for preparing various kernel packages in one place.
See example laboratory and try to do:
for f in pentiumiii pentiumiii+smp; do
for t in initrd source header; do
MKINITRD=squashfs FLAVOUR=$f ./kernellabo redhat 2.4.21 $t
done
done
...and get the RedHat enterprise kernel for Pentium III with and without SMP.
The package is almost original RedHat kernel with a little differences in config file and patches. The most important differences are:
Add the following line to your sources.list file:
deb http://kernellabo.alioth.debian.org/kernellabo/packages/redhat/ ./and install the package with
apt-get install kernel-image-2.4.22pre1-redhat-20.el-pentium4
kernellabo - Environment for preparing and building kernel packages
kernellabo profile version [target]
kernellabo profile version modules modulename [kernelrevision]
KernelLabo builds Debian package with kernel based on original archive and additional patches. Package version is ``2:${kernel_version}+${profile_name}+${current_date}''.
Environment variables can contain additional parameters for KernelLabo.
One of the features of KernelLabo is kernel flavours. This means that one configuration profile can be produced with a little changes, i.e. depends on CPU model (i386, pentium, pentiumiii-up, etc.). The additional changes are located at ./flavours subdirectory. To append the options from one of the flavours, set the FLAVOUR environment variable. You can use more than one flavour at once by using plus '+' character.
To produce the flavour file:
1. Call KernelLabo for menuconfig target:
$ kernellabo generic 2.4.18-redhat-18.8.0 menuconfig
2. Save the default kernel configuration:
Save Configuration to an Alternate File
Enter a filename to which this configuration should be saved as an alternate. Leave blank to abort. [../default ]
3. Change configuration options, i.e. CPU model:
Processor type and features --->
(Pentium-Pro/Celeron/Pentium-II) Processor family
4. Save new kernel configuraton:
Save Configuration to an Alternate File
Enter a filename to which this configuration should be saved as an alternate. Leave blank to abort. [../686 ]
5. Exit the configuration menu (with saving the profile) or break with Ctrl-C (without saving the profile):
^C
6. Find differences between two configuration files, get the new options and save into flavours directory:
diff -u tmp/default tmp/686 | grep ^+[^+] | sed 's/^+//' > flavours/686
7. Now you can use this flavour with KernelLabo:
FLAVOUR=686 kernellabo test 2.4.18 image
If you want to use more than one flavour, use plus '+' sign:
FLAVOUR=pentiumiii+preempt kernellabo test 2.4.18 image
The example session is following:
$ mkdir ~/.kernellabo $ cd ~/.kernellabo
$ mkdir configs kernels logs packages patches
$ cd kernels $ wget http://www.kernel.org/pub/linux/kernel/v2.4/linux-2.4.18.tar.gz $ cd ..
$ mkdir patches/pre $ cd patches/pre $ wget http://www.kernel.org/pub/linux/kernel/v2.4/testing/patch-2.4.19-pre10.gz $ gunzip pre/patch-2.4.19-pre10.gz $ cd ../..
$ mkdir configs/test $ touch configs/test/config-test-2.4.18 $ echo pre/patch-2.4.19-pre10 > configs/test/patches-test-2.4.18
$ kernellabo test 2.4.18 config
$ FLAVOUR=pentiumiii kernellabo test 2.4.18 initrd
$ sudo dpkg -i packages/test/2.4.18/kernel-image-2.4.19-pre10-test-pentiumiii_*.deb
$ FLAVOUR=pentiumiii kernellabo test 2.4.18 modules modules/pcmcia-cs.tar.gz
$ sudo dpkg -i packages/test/2.4.18/pcmcia-modules-2.4.19-pre10-test-pentiumiii_*.deb
$ kernellabo test 2.4.18 clean
The example script which builds the same kernel source for each architectures:
export CONCURRENCY_LEVEL=2
nice -n 10 script -f -c '
for f in pentiumiii pentiumiii+smp pentium4 pentium4+smp 686 386; do
for t in initrd header source; do
FLAVOUR=$f MKINITRD=squashfs kernellabo redhat 2.4.21 $t
done
done
' kernellabo.log
make-kpkg(1), kernel-pkg.conf(5), fakeroot(1)
(c) 2000-2004 Piotr Roszatycki <dexter@debian.org>
All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, the latest version.