13.6   Booting from the Serial Line

VxWorks can communicate with the host operating system over serial connections as well as over networks and backplanes. Over a serial line connection, you can boot VxWorks using either SLIP or PPP.

13.6.1   Booting VxWorks Using SLIP

If you have configured VxWorks to use SLIP, you can use the Serial Line Internet Protocol to boot VxWorks. The relevant configuration macro is INCLUDE_SLIP. SLIP supports IP layer software with point-to-point configurations such as RS-232 serial connections between machines or long-distance telephone lines. If either end of a SLIP connection has other network interfaces (such as Ethernet), it can forward packets to other machines.


*

NOTE: Both target and host must agree on the MTU size. On a VxWorks system, the default MTU size is 576.

Optionally, you can use compressed TCP/IP headers over SLIP. This variant of the protocol is known as CSLIP (compressed SLIP). Only the TCP/IP headers are compressed, not the data itself; this implies that CSLIP improves the responsiveness of interactive communications (such as remote shells), where the ratio of header size to data is large, but makes little difference for large data transfers (such as downloading object code). Because compression applies only to TCP/IP headers, not to other forms of IP, CSLIP has no impact on applications that use UDP rather than TCP (for example, CSLIP has no effect on NFS).1

When booting using SLIP (or its CSLIP variant), specify the boot device as follows:

boot device: sl    or   sl=device

Using the form sl=device allows you to specify the SLIP tty, overriding the configuration constant SLIP_TTY.

The following is a boot example for the configuration shown in Figure 13-2:

boot device             : sl=/tyCo/1 
processor number        : 0 
host name               : phobos 
file name               : /usr/wind/target/config/ads302/vxWorks 
inet on ethernet (e)    : 150.12.1.2 
host inet (h)           : 150.12.1.1 
user (u)                : jane 
target name (tn)        : vxJane 

Figure 13-2:  SLIP Configuration Example

When the boot device is SLIP, the SLIP interface is configured by usrSlipInit( ) in target/src/config/usrNetwork.c. This sets up the SLIP tty, and configures the point-to-point connection using the target and host IP addresses specified in the boot parameters. If a gateway address is specified, the SLIP driver adds a routing entry from the gateway address to the host address. If a gateway address is not specified, the SLIP driver assumes that the point-to-point peer address on the other end of the serial line is the gateway and enters the appropriate routing entry.

If you do not have a second serial port, then you must use the console port as the SLIP port. To do this:

  1. Set the console serial port (configuration constant CONSOLE_TTY) to NONE and define the SLIP channel identifier (configuration constant SLIP_TTY):

#define   CONSOLE_TTY   NONE 
#define   SLIP_TTY      0      /* use port number 0 for slip */

  1. Remake VxWorks and burn new boot ROMs before booting.

To access a UNIX file system, the Internet addresses specified in the target boot parameters must be consistent with those specified when the host connection is created.

13.6.2   Booting VxWorks Using PPP

To boot VxWorks using PPP, first configure PPP into the system (see PPP Configuration) and remake the VxWorks and boot ROM images. After a new boot ROM image has been built, burned into ROM, and installed in the target board, bootstrap the target board to the VxWorks boot ROM prompt.

When booting using PPP, specify the boot device with one of the following options:

boot device: ppp
If using boot device: ppp, the serial channel is set to PPP_TTY in the VxWorks configuration and the baud rate is set to the default baud rate of the channel.

When the boot device is ppp, the PPP interface is initialized by usrPPPInit( ). This configures the point-to-point connection using the serial device, target, and host IP addresses specified in the boot parameters. And it configures in the options defined at compile-time in the configuration (see the Tornado User's Guide: Projects for more information on configuring VxWorks). If a gateway address is specified, the PPP driver adds a routing entry from the gateway address to the host address. If a gateway address is not specified, the PPP software assumes that the point-to-point peer address is on the other end of the serial line and enters the appropriate routing entry.

ppp=device
Specifying ppp=device allows you to choose the PPP tty (serial channel), overriding the PPP_TTY constant.

ppp=device,baudrate
Specifying ppp=device,baudrate allows you to choose the PPP tty (serial channel) and the baud rate of the channel.

ppp,baudrate
The default baud rate used by the PPP tty (serial channel) can be configured into the system by defining the constant PPP_BAUDRATE (in config.h) as the required baud rate, and remaking VxWorks and the boot ROM images.

However, the baud rate supplied as a part of the boot device overrides any default settings. The following is a boot example for the configuration shown in Figure 13-3:

boot device            : ppp=/tyCo/2,38400 
processor number       : 0 
host name              : mars 
file name              : /usr/vw/config/mv167/vxWorks 
inet on ethernet (e)   : 90.0.0.10 
host inet (h)          : 90.0.0.1 
user (u)               : jane 
target name (tn)       : vxJane 

Figure 13-3:  PPP Configuration Example

If you want to boot VxWorks over a PPP link but do not have a console device, the following additional modifications must be made:

  1. Set the console serial port (configuration constant CONSOLE_TTY) to NONE and define the tty port number using the constant PPP_TTY in config.h:

#define   PPP_TTY      0      /* use port number 0 for PPP */

  1. Specify the default boot line (configuration constant DEFAULT_BOOT_LINE) before making your boot ROMs. Changing any of the default PPP settings requires new boot ROMs. An example of a default boot line is:

"ppp(0,0)mars:/usr/vw/config/mv167/vxWorks h=90.0.0.1 e=90.0.0.10 u=jane"

  1. If your system has nonvolatile RAM (NVRAM), edit sysLib.c and change sysNvRamGet( ) to return ERROR. This forces the use of the default boot line, instead of the value stored in NVRAM.

  1. Initialize PPP on the remote peer.

  1. Boot VxWorks with the new boot ROMs.


1:  If your host operating system does not include SLIP or CSLIP facilities, consider using a publicly available implementation. One popular implementation for SunOS 4.1.x, the Van Jacobson CSLIP 2.7 release, is provided in target/unsupported/cslip-2.7. This code is publicly available, and is not supported by Wind River Systems. It is included only as a convenience.