Once you have correctly configured your host software and target hardware, establish a terminal connection from your host to the target, using the serial port that connects the two systems.1 For example, the following command starts a tip session for the second serial port at 9600 bps:
% tip /dev/ttyb -9600
See your BSP documentation for information about the bps rate (Help>Manuals contents>BSP Reference in the Tornado Launcher, or see the file wind/docs/BSP_Reference.html).
You are now ready to turn on the target system power and boot VxWorks.
When you boot VxWorks with the default boot program (from ROM, diskette, or other medium), you must use the VxWorks command line to provide the boot program with information that allows it to find the VxWorks image on the host and load it onto the target. The default boot program is designed for a networked target, and needs to have the correct host and target network addresses, the full path and name of the file to be booted, the user name, and so on.2
When you power on the target hardware (and each time you reset it), the target system executes the boot program from ROM; during the boot process, the target uses its serial port to communicate with your terminal or workstation. The boot program first displays a banner page, and then starts a seven-second countdown, visible on the screen as shown in Figure 2-6. Unless you press any key on the keyboard within that seven-second period, the boot loader will attempt to proceed with a default configuration, and will not be able to boot the target with VxWorks.
To interrupt the boot process and provide the correct boot parameters, first power on (or reset) the target; then stop the boot sequence by pressing any key during the seven-second countdown. The boot program displays the VxWorks boot prompt, as follows:
[VxWorks Boot]:
To display the current boot parameters, type p at the boot prompt, as follows:
[VxWorks Boot]: p
A display similar to the following appears; the meaning of each of these parameters is described in the next section. This example corresponds to the configuration shown in Figure 2-7. (The p command does not actually display blank fields, although this illustration shows them for completeness.)
boot device : ln processor number : 0 host name : mars file name : /usr/wind/target/config/bspname/vxWorks inet on ethernet (e) : 90.0.0.50 inet on backplane (b) : host inet (h) : 90.0.0.1 gateway inet (g) : user (u) : fred ftp password (pw)(blank=use rsh) : flags (f) : 0x0 target name (tn) : phobos startup script (s) : other (o) :
To change the boot parameters, type c at the boot prompt, as follows:
[VxWorks Boot]: c
In response, the boot program prompts you for each parameter. If a particular field has the correct value already, press RETURN. To clear a field, enter a period ( . ), then press RETURN. If you want to quit before completing all the parameters, type CTRL+D.
Network information must be entered to match your particular system configuration. The Internet addresses must match those in /etc/hosts on your UNIX host, as described in Establishing the VxWorks System Name and Address.
If your target has nonvolatile RAM (NVRAM), the boot parameters are stored there and retained even if power is turned off. For each subsequent power-on or system reset, the boot program uses these stored parameters for the automatic boot configuration.
The VxWorks boot program provides a limited set of commands. To see a list of available commands, type the help command (h or ?) followed by RETURN:
[VxWorks Boot]: ?
Table 2-3 lists and describes each of the VxWorks boot commands and their arguments.
|
|||||||||||||||||||
|
|||||||||||||||||||
|
|||||||||||||||||||
Each of the boot parameters is described below, with reference to the example in 2.6.2 Entering New Boot Parameters. The letters in parentheses after some parameters indicate how to specify the parameters in the command-line boot procedure described in 2.6.6 Alternate Booting Procedures.
Do not enable the system controller, even if the processor number is 0. (This option is board specific; refer to your target documentation.) |
|||||||||||||||||||
Once you have entered the boot parameters, initiate booting by typing the @ command at the boot prompt:
[VxWorks Boot]: @
Figure 2-8 shows a typical VxWorks boot display. The VxWorks boot program prints the boot parameters, and the downloading process begins. The following information is displayed during the boot process:
After that point, VxWorks is up and ready to attach to the Tornado tools, as discussed in 2.7 Connecting a Tornado Target Server.
The boot display may be useful for troubleshooting. The following hints refer to Figure 2-8. For more troubleshooting ideas, see 2.10 Troubleshooting.
If the initial "Attaching network interface" is displayed without the corresponding "done," verify that the system controller is configured properly and the Ethernet board is properly jumpered.
If "Loading..." is displayed without the size of the VxWorks image, this may indicate problems with the Ethernet cable or connection, or an error in the network configuration (for example, a bad host or gateway Internet address).
If the line "Starting at" is printed and there is no further indication of activity from VxWorks, this generally indicates there is a problem with the boot image.
If "Attaching network interface" is displayed without the "done," this may indicate there is a problem with the network driver in the newly loaded VxWorks image.
$ln(0,0)mars:/usr/wind/target/config/bspname/vxWorks e=90.0.0.50 h=90.0.0.1 u=fred
The order of the assigned fields (those containing equal signs) is not important. Omit any assigned fields that are irrelevant. The codes for the assigned fields correspond to the letter codes shown in parentheses by the p command. For a full description of the format, see the reference entry for bootStringToStruct( ) in bootLib.
This method can be useful if your workstation has programmable function keys. You can program a function key with a command line appropriate to your configuration.
As noted previously, if your target CPU has nonvolatile RAM (NVRAM), all the values you enter in the boot parameters are retained in the NVRAM. In this case, you can let the boot program auto-boot without having a terminal connected to the target system.
See 4.7 Configuring and Building a VxWorks Boot Program for instructions on creating a new boot program for your boot media, with parameters customized for your site. With this method, you no longer need to alter boot parameters before booting.
You can boot a target that is not on a network most easily over a serial line with the Target Server File System (TSFS). The TSFS provides the target with direct access to the host's file system. Using TSFS is simpler than configuring and using PPP or SLIP.
To boot a target using TSFS, you must first reconfigure and rebuild the boot program, and copy it to the boot medium for your target (for example, burn a new boot ROM or copy it to a diskette). See 4.7 Configuring and Building a VxWorks Boot Program.
Before you boot the target, configure a target server with the TSFS option and start it. See Target-Server Configuration Options.
The only boot parameters required to boot the target are boot device and file name (see 2.6.4 Description of Boot Parameters). The boot device parameter should be set to tsfs. The file name parameter should be set relative to the TSFS root directory that is defined when you configure the target server for the TSFS. You can configure the boot program with these parameters, or enter them at the VxWorks prompt at boot time.
When VxWorks is running, there are several way you can reboot VxWorks. Rebooting by any of these means restarts the attached target server on the host as well:
1: Commonly available terminal emulators are tip, cu, and kermit; consult your host reference documentation.
2: Unless your target CPU has nonvolatile RAM (NVRAM), you will eventually find it useful to build a new version of the boot loader that includes all parameters required for booting a VxWorks image (see 4.7 Configuring and Building a VxWorks Boot Program). In the course of your developing an application, you will also build bootable applications (see 4.4 Creating a Bootable Application).
3: If the same pathname is not suitable for both host and target--for example, if you boot from a disk attached only to the target--you can specify the host path separately to the target server, using the Core file field (-c option). See 3.5 Managing Target Servers.