From: Henry N. <Henry.Ne@Arcor.de> - 2004-09-23 08:10:57
|
Hello Mark! Mark Leddy wrote: > Trying to build colinux for linux > I read the /src/intro and the /doc/building files in the > colinux-20040910 snapshot. > > However, I am still uncertain of the steps, any out there that has > done this who can give me some help. I have same configuration as you. Yes, it's difficould. My first System is a dual boot with XP-Home and SuSE 9.0, colinux snapshoot 20040910. Colinux runs from XP host as guest SuSE 9.0. Under Linux SuSE 9.0, the colinux guest don't run. Many mismatch between compilers, kernelversion, libraries, module-init-tools and GCC version. I have break this. My other system with linux host FC2, runs the colinux guest from the debian image! The kernel 2.4.x don't work because colinux.ko as modul can only build for a 2.6.x kernel. (On kernel 2.4, the make hangs in an endless recursion loop for config.h) :-( The modultils don't work. You need module-init-tools (0.9.15-pre1) You need two separate trees of kernel source. One for real linux with an unpatched kernel. This should be configured for your standard linux system. The second kernel is patched and enabled for colinux (patch and configfile in colinux source). The modul colinux.ko _must_ be compile with same compiler as linux host kernel. The colinux module in /lib/modules/2.6.8.1-co-0.6.2-pre1 must compile with the same compiler as you use for vmlinux for colinux guest. I hope to remember my steps all. 1.) Edit bin/sample.user-build.cfg and save as bin/user-build.cfg, run the script ./build-kernel.sh in directory bin/, at end you have modules-2.6.8.1-co-0.6.2.tar.gz and vmlinux for colinux, this will find in direcory "$PREFIX/dist" (newer is $INSTALL_DIR, but not us always!). Install modules into your linux under /lib/modules. I do not know if this way is correct start. Perhaps you should better call ./build-all.sh in bin/, to compile. This is very nessesary, if you wandt to run same colinux kernel later in WinXP. 2.) Compile and install new binaries for module-init-tools in Linux. Be careful! You risk a non booting linux, if you do this on a live linux! Make and test a boot-disk before. So you can repair a error! Call "configure" with a different --prefix, with user-access (such ~/tmp). Do not call "make install" as root! Call it as normal user and copy all files step by step manualy. Rename all old files to *.old (insmod --> insmod.old), this is supported in module-init-tools. 3.) Rebuild and install your Host-Kernel Compile the kernel 2.6.8.1 for host, using last configuration (from kernel 2.4.20), save it as .config and call "make oldconfig". 4.) Booting your host kernel 2.6.8.1 5.) FLTK and XML Download FLTK and patch with fltk-1.1.4-linux-patch.diff, than configure, make and install. Download, make and install mxml-1.3.tar.gz (Downloads find also in in $SOURCE_DIR after bin/download-all.sh) 6.) Compiling your modul colinux.ko and executables. Set the three variables, go into src (of Colinux) and call "make clean" "make colinux" This bulid the "colinux-daemon", "colinux-console-fltk" and "colinux.ko". see build-linux-fc2.sh at end of Mail 7.) Run the Xserver with -ac Boot your System in text-console login as user Run X with follow command, to anable other applications/users to connect the Xserver: startx -- -ac 8.) Run the colinux copy all executabel in one directory or make a link to this all, need colinux-daemon, colinux-console-fltk, vmlinux, colinux.ko, default.colinux.xml. edit the XML file and setup your "root_fs". Run the colinux cd CoLinuxWorkingDir su export $PATH:. ; colinux-daemon -c default.colinux.xml exit That's all. More comments see below. > I have tried numerous things numerous times and believe my problem is > that I do not understand what is needed in the following paths... > > export COLINUX_TARGET_KERNEL_PATH=/path/to/your/patched/colinux/kernel/tree > export COLINUX_HOST_KERNEL_DIR=/path/to/your/host/kernel > export COLINUX_HOST_OS=linux ... and than run "cd ...colinux/src ; make colinux" > #1) > In the COLINUX_TARGET_KERNEL_PATH should I have already run 'make' or > 'make modules' No: It's better to run build-kernel.sh in directory bin. This will download, patch and configure your kernel. If you not start the download, put the file linux-2.6.8.1.tar.bz2 in $SOURCE_DIR (or a link to this file). $COLINUX_TARGET_KERNEL_PATH is equal $SOURCE_DIR/linux-2.6.8.1 in file bin/user-build.cfg Yes: You can patch and configure the kernel for colinux manualy. and call the "make vmlinux modules modules_install" But REMEMBER: Do not compile or install something as Root! > > #2) > Also in the COLINUX_HOST_KERNEL_DIR that should be my host kernel > extracted path as in > /usr/src/kernel-source-2.6.8 It's better to build the kernel as normal user in users home direcory. cd ~/src bunzip2 ... tar make menuconfig make vmlinux modules Than install via su: su -c "make install modules_install" This need a root password and install the kernel as /boot/vmlinux-2.6.8.1, the old file was saved as *.old, modules automaticly installed in /lib/modules. Update your boot-loader for /boot/vmlinux-2.6.8.1 and /boot/vmlinux-2.6.8.1.old, don't forgett to create a initrd with new verson o modules, if you need something (such scsi). Login as Root and save your boot directory as tar.gz before you install the new kernel, it helps for recovering at boot error! > I would like to use a host kernel of 2.6.8-1 and a colinux client/guest > kernel of 2.6.8-1. That's the best, this runs for me after many tries and errors. =:-) Colinux-kernel have a separate directory /lib/modules/2.6.8.1-co-0.6.2-pre1 > I have a dual boot laptop and wish to have a colinux guest that I can > use in both XP and Linux. Hope to understand you right? Host XP --> Guest colinux on a Image1 Host Linux2 --> Guest colinux on same Image1 Image1 can also a Partion, but not the "Host Linux" self! You can run also Host XP --> Guest colinux on Partion of Linux2 For this you need not compile HOST_OS=linux !!! It's standard colinux. good luck! >>> cat build-linux-fc2.sh >>> #!/bin/sh # Build Script for a linux host # CoLinux-Kernel export COLINUX_TARGET_KERNEL_PATH= \ "/home/$USER/src/colinux-devel/download/linux-2.6.8.1" # Check directory if [ ! -d $COLINUX_TARGET_KERNEL_PATH ] ; then echo "COLINUX_TARGET_KERNEL_PATH=$COLINUX_TARGET_KERNEL_PATH" echo " Missing directory" exit 10 fi # check patched kernel if [ ! -f $COLINUX_TARGET_KERNEL_PATH/include/linux/cooperative.h ] ; then echo "$COLINUX_TARGET_KERNEL_PATH" echo " Missing colinux patch /include/linux/cooperative.h" exit 12 fi # HOST-Kernel export COLINUX_HOST_KERNEL_DIR="/home/$USER/kernel/work/linux-2.6.8.1" if [ ! -d $COLINUX_HOST_KERNEL_DIR ] ; then echo "COLINUX_HOST_KERNEL_DIR=$COLINUX_HOST_KERNEL_DIR" echo " Missing directory" exit 20 fi # check unpatched kernel if [ -f $COLINUX_HOST_KERNEL_DIR/include/linux/cooperative.h ] ; then echo "$COLINUX_HOST_KERNEL_DIR" echo " Do not patch HOST kernel!" exit 22 fi # Build for linux as Host export COLINUX_HOST_OS=linux # clear and build daemons and modul cd ~/CoLinuxWorkingDir/snapshoot-20040910/src make clean make colinux <<< end build-linux-fc2.sh <<< -- Henry Nestler |