DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Linking and testing SCO OpenServer 5 drivers

Creating bootable kernels for testing

If the target machine for testing a driver is the same as the development machine, rebuild the kernel including the new driver and reboot the machine to test the driver.


WARNING: Before installing your driver, it is essential that you carry out a full system backup and create boot and root floppies. In addition, you should have a copy of the old UNIX kernel. Although building the kernel causes a copy of the kernel (unix.old) to be saved, you should also make your own copy (for example, unix.clean). This is essential because the next build of the kernel will overwrite unix.old with the current kernel - the kernel that contains the first version of your driver.

If the target system has SCO OpenServer 5 Release 5 installed and was not upgraded from a previous release, the boot filesystem mounted on /stand will already contain two versions of the kernel that can be used when rebooting:


unix.install
This contains all drivers supplied with the operating system that might be needed for installation. It does not include any BTLD drivers that were installed after initial installation.

unix.safe
This is a copy of the first post-install kernel that was built. This includes any BTLD drivers that were installed after initial installation or an in-place upgrade.

If the target machine for testing a driver is not the same as the development system, it may be desirable to create a private version of the Link Kit to build new versions of the kernel that include the driver. Either of the following commands will make a copy of the Link Kit in /tmp/new_root:

find /etc/conf -follow -print | cpio -pLd /tmp/new_root

copy -r /etc/conf /tmp/new_root

To allow the Link Kit tools to use this version of the Link Kit, the environment variable ROOT must be set to the new path. For example, in the Bourne or Korn shells, enter the following commands to build a new kernel in /tmp/new_root/etc/conf/cf.d after you have set up the files for your driver in the /tmp/new_root/etc/conf hierarchy:

ROOT=/tmp/new_root
export ROOT
cd /tmp/new_root/etc/conf/cf.d
./link_unix


NOTE: Before linking your driver, ensure that the driver's object file is present in the $ROOT/etc/conf/pack.d directory, that ``Y'' is set in the second field of the $ROOT/etc/conf/sdevice.d/xnamex file entry for the driver, and that it has an entry in $ROOT/etc/conf/cf.d/mdevice.

You may also need to configure other drivers similarly for the target machine.


A newly-built kernel may then be copied to a mounted boot floppy for testing on the target system. In SCO OpenServer 5 Release 5, the kernel can be copied to the boot floppy in compressed form if it will not fit otherwise:

rm /mnt/unix
compress -Hc unix > /mnt/unix.Z


© 2005 The SCO Group, Inc. All rights reserved.