Driver testing and debugging

Testing during installation and initialization

Testing during installation and booting introduces special considerations because not all system services are available throughout this process. Customers who are implementing support for new platforms have the greatest need for this, but driver writers also need this, especially when testing and debugging drivers for devices such as Host Bus Adapters and network cards that may themselves be used during system installation and initialization.

Using the magic floppy and debugging kernel on SVR5

The SVR5 operating system release includes images for the ``magic floppy'' and ``debugging boot floppy'' that can be used to debug kernel code that is used during system initialization such as the driver for the hard disk that houses the / directory or filesystem code.

The magic floppy image contains a set of common shell commands such as editors and, on SVR5 systems, the truss command, that are not normally part of the installation system but are very useful when debugging kernel code.

The debugging boot floppy contains the installation kernel with the kdb debugger enabled. For SVR5, only kdb can be used for debugging during installation unless you create your own debugging boot floppy.

To use the magic floppy:

  1. Run the magic.floppy.make script to generate a magic floppy.

  2. Install the system following the normal procedures.

  3. When the installation process asks for the IHV HBA floppy, switch to VT-0 by typing <Alt><SysReq>h.

  4. Remove the boot floppy and insert the magic floppy you created in Step 1.

  5. Execute the magic command to load in the kdb driver.

  6. To enter the debugger, type <Ctrl><Alt>d.

  7. Unmount the magic floppy with the following command:
       umount /flpy2

  8. Insert the IHV HBA floppy that contains the new HBA driver.

  9. Type <Alt><SysReq><F1> to return to the installation menu.

  10. Continue with the normal installation.

The debugging boot floppies are only needed by platform developers and others who are building the entire operating system, including the boot floppies.

To create debugging boot floppies from the boot floppy image:

SCO OpenServer 5 installation debugging

On SCO OpenServer 5 systems, set the SCODB_MAINDB parameter to enable the scodb debugger during system initialization:

  1. Edit the /etc/conf/pack.d/scodb/tune.h file.

  2. Set the SCODB_MAINDB parameter to 1 (on).

  3. Relink the kernel and reboot the system.

  4. The scodb debugger will be active even before the kernel's main( ) routine is called.

© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005