4.7   Configuring and Building a VxWorks Boot Program

The default boot image included with Tornado for your BSP is configured for a networked development environment. The boot image consists of a minimal VxWorks configuration and a boot loader mechanism. You need to configure and build a new boot program (and install it on your boot medium) if you:


*

WARNING: Configuration of boot programs is handled independently of the project facility. However, any changes you make to config.h may be absorbed by your projects unless they are masked by project facility selections (see page 92).

Configuring Boot Parameters

To customize a boot program for your development environment, you must edit $WIND_BASE/target/config/bspname/config.h (the configuration file for your BSP). The file contains the definition of DEFAULT_BOOT_LINE, which includes parameters identifying the boot device, IP addresses of host and target, the path and name of the VxWorks image to be loaded, and so on. For information about the boot line parameters defined by DEFAULT_BOOT_LINE, see 2.6.4 Description of Boot Parameters and Help>Manuals contents>VxWorks Reference Manual>Libraries>bootLib.

Building a Boot Image

To build the new boot program, select Build>Build Boot ROM from the Workspace window. Select the BSP for which you want to build the boot program and the type of boot image in the Build Boot ROM dialog box (Figure 4-48). Then click OK.

The three main options for a boot images are:

bootrom
A compressed boot image.

bootrom_uncmp
An uncompressed boot image.

bootrom_res
A ROM-resident boot image.

The .hex options are variants of the main options, with Motorola S-Record output.

TSFS Boot Configuration

The simplest way to boot a target that is not on a network is over the TSFS (which does not involve configuring SLIP or PPP). The TSFS can be used to boot a target connected to the host by one or two serial lines, or a NetROM connection.


*

WARNING: The TSFS boot facility is not compatible with WDB agent network configurations. See 4.6 Configuring the Target-Host Communication Interface.

To configure a boot program for TSFS, edit the boot line parameters defined by DEFAULT_BOOT_LINE in config.h (or change the boot parameters at the boot prompt). The "boot device" parameter must be tsfs, and the file path and name must be relative to the root of the host file system defined for the target server (see Configuring Boot Parameters and Target-Server Configuration Options).

Regardless of how you specify the boot line parameters, you must reconfigure (as described below) and rebuild the boot image.

If two serial lines connect the host and target (one for the target console and one for WDB communications), config.h must include the lines:

#undef CONSOLE_TTY 
#define CONSOLE_TTY         0 
#undef WDB_TTY_CHANNEL 
#define WDB_TTY_CHANNEL     1 
#undef WDB_COMM_TYPE 
#define WDB_COMM_TYPE WDB_COMM_SERIAL 
#define INCLUDE_TSFS_BOOT

If one serial line connects the host and target, config.h must include the lines:

#undef CONSOLE_TTY 
#define CONSOLE_TTY         NONE 
#undef WDB_TTY_CHANNEL 
#define WDB_TTY_CHANNEL     0 
#undef WDB_COMM_TYPE 
#define WDB_COMM_TYPE WDB_COMM_SERIAL 
#define INCLUDE_TSFS_BOOT

For a NetROM connection, config.h must include the lines:

#undef WDB_COMM_TYPE 
#define WDB_COMM_TYPE WDB_COMM_NETROM 
#define INCLUDE_TSFS_BOOT

With any of these TSFS configurations, you can also use the target server console to set the boot parameters by defining the INCLUDE_TSFS_BOOT_VIO_CONSOLE macro in config.h. This disables the auto-boot mechanism, which might otherwise boot the target before the target server could to start its virtual I/O mechanism. (The auto-boot mechanism is similarly disabled when CONSOLE_TTY is set to NONE, or when CONSOLE_TTY is set to WDB_TTY_CHANNEL.) Using the target server console is particularly useful for a single serial connection, as it provides an otherwise unavailable means of changing boot parameters from the command line.

When you build the boot image, select bootrom.hex for the image type (Building a Boot Image).

See the VxWorks Programmer's Guide: Local File Systems for more information about the TSFS.