Op deze pagina vindt u een aantal problemen waarvoor Suares & Co oplossingen zocht.
Technology
On this page some solutions we found for some uncommon issues.
A box in a box in a box, part I: Compiling a Win4Lin enabled kernel (for the unsupported WTS 3.0)
23-05-2008
Please read all the parts of box in a box in a box before you start. It may save some time!
You need to set the server up properly, too, we will tackle that later in this series.
Compiling a Win4Lin-enabled kernel
To compile a Win4Lin-enabled kernel, you need the kernel source, the Win4Lin kernel patch, the mki-adapter kernel patch and a .configue file. Let's make a directory to gather all this stuff:
mkdir dsl-win4lin-kernel
cd dsl-win4lin-kernel
Download the kernel
We need a kernel with version number around 2.6.12. Kernels later than that will not work. This is the reason to set up the dsl-win4lin-kvm/qemu structure. If the Win4Lin patches and the mki_adpater would work on a newer kernel, then we wouldn't need a virtual machine.
Download the kernel from kernel.org and (b)unzip it:
The .config file
I made a kernel configuration file that is, I think, stripped down of all unnecessary drivers and modules. Since we are compiling for very specific hardware - the Qemu emulator - we know exactly what drivers we need. In fact, the only module we end up with, is the mki_adapter because it can not be built in to the kernel. All the other drivers are built into the kernel (bzImage size is about 1.5 Mb). You can download the file from my site and gunzip it:
Preparing the compiler, patch the kernel, compile the kernel.
To be able to compile, you need to install the build-essential package. To modify the kernel configuration, you might need curses:
apt-get install build-essential libncurses5-dev
There was an error when I tried to compile this kernel on Ubuntu 8.04 Hardy (32-bit). I switched to gcc3.3, same error. Then I tried to compile on Ubuntu 6.06 Dapper, same problem. The error was:
LD arch/i386/mki-adapter26/built-in.o
CC [M] arch/i386/mki-adapter26/mki-main.o
CC [M] arch/i386/mki-adapter26/mki26.o
{standard input}: Assembler messages:
{standard input}:609: Error: suffix or operands invalid for `mov'
{standard input}:610: Error: suffix or operands invalid for `mov'
{standard input}:611: Error: suffix or operands invalid for `mov'
{standard input}:612: Error: suffix or operands invalid for `mov'
make[1]: *** [arch/i386/mki-adapter26/mki26.o] Error 1
make: *** [arch/i386/mki-adapter26] Error 2
The problem is discussed to some detail here on kerneltrap. I switched to an even older version of Ubuntu (5.10 Breezy) and it compiled without a problem. The version of gcc on Breezy is 4.02... If you know of a better solution so it will compile under Hardy, please drop me a line!
Instructions for installing Ubuntu Breezy 5.10 as virtual machine are here.
If you have downloaded all the files, and chosen the correct compiler, the following commands will unpack and patch the kernel:
tar xvf linux-2.6.12.6.tar
cd linux-2.6.12.6
cp ../dsl-win4lin-kernel.config .config
patch -p1 < ../Kernel-Win4Lin3-2.6.12.6.patch
patch -p1 < ../mki-adapter26_1_3_13.patch
Check if the patches where aplied, and then compile the kernel:
make
make modules_install
rm /lib/modules/2.6.12.6-win4lin/build
rm /lib/modules/2.6.12.6-win4lin/source
Later, we need this files on our Damn Small Linux virtual machine. So we zip them all up in a bag:
mkdir ../dsl-win4lin-kernel
cp System.map ../dsl-win4lin-kernel
cp arch/i386/boot/bzImage ../dsl-win4lin-kernel
cp -r /lib/modules/2.6.12.6-win4lin ../dsl-win4lin-kernel
cd ..
tar zcvf dsl-win4lin-kernel.tgz dsl-win4lin-kernel
The resulting .tgz file can be downloaded here. (md5sum db813ed8cdb6608768f24c40b7a8b46d)