VxWorks Boot Scripts (proposal)

New Version (02/08/99)

The original proposal has been modified as follows:

The original scheme of boot scripts and problems

Currently there is a very large number boot scripts. A scan of the official directories shows about 35, and there are many others stashed in peoples home directories. They are all of a monolithic style, with everything done in a single script file. With so many copies, errors are likely, making troubleshooting and maintenance difficult. It is extremely frustrating to both users and support people when there are problems that turn out to be due to an improper boot script, or the use of a prehistoric version of some product. And when a new version of a product is released (as there is now a new version of fision that lives in a different major directory tree), it is difficult to update all the scripts correctly. Soon there will be a lot of new cdfvme code that must be loaded. Furthermore, we are starting to use Power PC processors and don't want to double the number of scripts. We must be able to use 68k and Power PC processors interchangably.

Most startup scripts have a lot in common: they establish network routes, load fision, robin, and cdfvme_common. The differences are in what network routes are established (based on location), and what version of fision/robin etc. to load. This partly depends on the CPU architecture, and also there are sometimes reasons to load some version besides the default. Also, in the present organization there is a separate startup script directory for each board type and VxWorks version. This exacerbates the above problems.

New system

To remedy this, we have implemented a system where there are a very small number of main startup scripts, like a few. The main startup scripts will internally refer to separate scripts to load and start fision, robin, etc. These scripts will in turn internally refer to specific directories in fision, robin, etc. via environment variables. Thus for example a single startup script can load any version of fision etc., including the CPU architecture dependence, provided the correct environment variables have been set. These environment variables are set by the .bashrc for user vxworks, which is invoked on any file access that uses the network file driver. The scheme makes heavy use of ups II.

In the new scheme, the .bashrc will determine the target node via the REMOTEHOST environment variable. It will then do a setup command of the "vxboot" product with a qualifier based on the node name and CPU architecture. There could either be one qualifier option per board, or per block of similar boards. The "vxboot" product will contain table files for each possible qualifier. At the beginning of the file, is listed the appropriate VxWorks version, and the board type and CPU architecture. The table file then sets up the desired versions of fision, robin, cdfvme_common, etc. etc. These are then used by the fision etc. startup scripts.

Note that the above requires that there be an instance of the vxboot product declared to ups for each possible qualifier.

The last part of the global startup script invokes a custom script, giving one the opportunity to add things on a board specific basis. The default is to invoke a null script, if something else is desired then the environment variable CUSTOM_STARTUP should be set in the board table file. However, it is highly desirable that all products of a generally useful nature be put in the default startup script. Only when testing a new product that may cause serious problems when loaded should the CUSTOM_STARTUP option be used.

Implementation

The new system is described below, and is available for use by processors that boot from b0dau30. It is also available for nodes that boot from fndaub. It can easily be set up on remote systems, however it will not work when booting via ftp rather than rsh. Hence for this system to work on Windows NT, an NT rsh daemon must be installed. I will be happy to work with anyone to migrate their boot script to the new system.

Issues with the new scheme

Possible drawbacks include:

Steps to add a new processor/boot script


Last modified by patrick@fnal.gov