User's ManualProject Map
BCOS Boot Scripts
 

Contents

1                Overview
2                Boot Script Syntax
2.1                Variable Assignments
2.1.1                Boolean Variable Assignments
2.1.2                String Variable Assignments
2.1.3                File Name Variable Assignments
2.1.4                Integer Variable Assignments
2.2                Comments
3                Boot Variable Reference
3.1                !IgnoreEDID
3.2                *OverrideEDID
3.3                !UseCRTC
3.4                %PreferredXresolution
3.5                %PreferredYresolution
3.6                %PreferredDepth
3.7                %PreferredRefreshRate
3.7.1                Default Video Mode Preferences
3.8                %InteractiveTimeout


Listings

Listing 2.1      Boolean Variable Assignment Examples
Listing 2.2      String Variable Assignment Examples
Listing 2.3      File Name Variable Assignment Examples
Listing 2.4      Integer Variable Assignment Examples
Listing 2.5      Comment Examples



1   Overview

When the computer is first started there's several pieces of software that are used to get the operating system running. These pieces of software have no access to file systems or network because the operating system itself isn't ready yet. The Boot Script is stored along with these pieces of software, and provides these pieces of software with any settings that might be needed.

The Boot Script itself is a simple text file that assigns values to variables. The operating system can automatically modify the Boot Script and the administrator/s can edit the Boot Script, and then install it on the boot device so that changes take effect the next time the operating system is started.

Different pieces of software that are used when the computer is started are effected by different variables. If a variable isn't used, then it may be removed from the Boot Script by the operating system.


2   Boot Script Syntax

Each line in the Boot Script may contain white space (e.g. an empty line, or a line containing spaces and tabs), a comment, or a variable assignment. White space and comments have no effect.


2.1   Variable Assignments

A variable assignment is a line in the Boot Script that gives a variable a specific value, and consists of optional white space, a variable name, white space and a variable value.

Each variable has a type, which is determined by the first character in the variable name. Valid variable types are boolean, string, file name and integer.

If a variable has already been assigned a value, then the existing value can be overwritten by later variable assignments. In this case the operating system may delete the unused/overwritten variable assignment/s.


2.1.1   Boolean Variable Assignments

Variable names for boolean variables begin with an exclamation mark ('!'), and may be assigned a negative value or a positive value. Valid negative values are 0, No, False and Disabled. Valid positive values are 1, Yes, True and Enabled. The difference between different negative values and the difference between different positive values are purely cosmetic (all negative values mean the same thing, and all positive values mean the same thing).

!AllowSomething Yes
!AllowSomething No
!Something          Enabled
         !Something Disabled
Listing 2.1 - Boolean Variable Assignment Examples


2.1.2   String Variable Assignments

Variable names for string variables begin with a dollar sign ('$'), and may be assigned a string of characters that doesn't contain any white space, or a string of characters that are surrounded by double quote characters ('"') that does contain white space. Strings assigned to string variables are limited to 255 characters long.

$YourName Fred
$YourName "Fred Smith"
$AnotherString      Hello
     $AnotherString "Hello World"
Listing 2.2 - String Variable Assignment Examples


2.1.3   File Name Variable Assignments

Variable names for file name variables begin with an asterix ('*'), and may be assigned any valid file name (as long as the file name is not too long). File names assigned to file name variables are limited to 255 characters long.

*YourFile hello.txt
*YourFile foo/bar/goodbye.txt
*AnotherFile      foo/bar.jpg
     *AnotherFile first/second/third/fourth/fifth/sixth.txt
Listing 2.3 - File Name Variable Assignment Examples


2.1.4   Integer Variable Assignments

Variable names for integer variables begin with a percent sign ('%'), and may assigned any numerical value from 0 to 18446744073709551615. Numerical values are either expressed as normal decimal numbers, or as hexadecimal numbers using the "0x" prefix.

*DecimalNumber 1234
*HexadecimalNumber 0x1234
*AnotherNumber      0xFFFFFFFFFFFFFFFF
     *AnotherNumber 18446744073709551615
     *AnotherNumber 0
Listing 2.4 - Integer Variable Assignment Examples


2.2   Comments

Comments begin with a hash character ('#') or a semi-colon (';'), and may begin at the start of a line (after optional white space) or after any variable assignment. All characters between the start of the comment and the end of the line are ignored.

#This is a comment
;This is a comment too
     # Another comment
!EnableComments      True    ;This comment follows a boolean variable assignment
     %GoatsPerDozen  12      # This comment follows an integer variable assignment
Listing 2.5 - Comment Examples


3   Boot Variable Reference

The following information is a list of all defined Boot Script variables and the effect they have on the operating system.


3.1   !IgnoreEDID

This boolean variable controls whether or not boot code should attempt to get EDID (Extended Display Identification Data) from the primary monitor. If this variable is set to "Yes", and if boot code can't get information about the monitor's capabilities from another source, then boot code will assume the monitor is a standard VGA monitor. If this variable is set to "No", and if boot code can't get information about the monitor's capabilities from another source, then boot code will attempt to get EDID from the primary monitor and (if successfull) use this information to provide more accurate reliability ratings for the available video modes (where these reliability ratings are used to avoid video modes that are unlikely to work on the current monitor).

The default value for this variable is "!IgnoreEDID No".


3.2   *OverrideEDID

If this file name variable is present, then it contains the name of a file containing EDID to use for the primary monitor (instead of EDID obtained from the primary monitor). This allows faulty EDID from the primary monitor to be overridden, and also allows EDID to be used on computers where either the video card doesn't allow EDID to be obtained from the monitor or the monitor doesn't support EDID.

Where possible, this file name variable overrides the behaviour of the "!IgnoreEDID" variable (if present). If this file name variable isn't present, or if it refers to a file that can't be found in the Boot Image, or if the file is invalid for any reason (e.g. bad checksum) then the behaviour of the "!IgnoreEDID" variable is used.


3.3   !UseCRTC

This boolean variable controls whether or not boot code should use VBE CRTC control to modify the timing of default VBE video modes.

VBE is a software interface built into the video card's ROM, that is typically used by Boot Code to setup a default video mode during boot. VBE CRTC control is used to create variations on default video mode timing - to provide alternative refresh rates, and also to provide variations that are (almost) guaranteed to comply with timings that the monitor supports. Note: Without CRTC control it's impossible for Boot Code to determine if the default timing for a VBE video mode is supported by the monitor or not.

CRTC control can only be used on video cards that support VBE 3.0 or later. For older video cards (that don't support VBE 3.0 or later) the !UseCRTC variable is ignored.

Unfortunately a number of video cards that claim to support VBE 3.0 or later have buggy support for CRTC control. Either CRTC control is ignored, or the video card refuses to set the video mode. For video cards that aren't buggy the !UseCRTC variable should be set to "Yes" to improve the Boot Code's ability to offer more choice and to find video modes that are supported by the monitor. If Boot Code attempts to set a video mode using CRTC control and the video card refuses, then the !UseCRTC variable will be forced to "No". It is also intended that video drivers will set this variable according to the abilities of the video card's VBE implementation (e.g. set the variable to "Yes" if the video card is not buggy, and set the variable to "No" if the video card is buggy).

The default value for this variable is "!UseCRTC Yes".


3.4   %PreferredXresolution

This integer variable specifies the preferred horizontal resolution for the default video mode selected during boot. All values are valid. If this variable is set to zero or is not present, then there is no preference.

See Subsection 3.7.1: Default Video Mode Preferences for more information on how this boot variable is used.


3.5   %PreferredYresolution

This integer variable specifies the preferred vertical resolution for the default video mode selected during boot. All values are valid. If this variable is set to zero or is not present, then there is no preference.

See Subsection 3.7.1: Default Video Mode Preferences for more information on how this boot variable is used.


3.6   %PreferredDepth

This integer variable specifies the preferred colour depth for the default video mode selected during boot. Valid values are listed in Table 3.1: Values For Preferred Depth (where "bpp" means "bits of colour data per pixel").

ValuePreferred Colour Depth
  0
  4-bpp (16 colours)
  1
  8-bpp (256 colours)
  2
  15-bpp (32768 colours)
  3
  16-bpp (65536 colours)
  4
  24-bpp (16777216 colours)
  5
  32-bpp (16777216 colours)
Table 3.1 - Values For Preferred Depth

If this variable contains an invalid value or is not present, then there is no preference.

See Subsection 3.7.1: Default Video Mode Preferences for more information on how this boot variable is used.


3.7   %PreferredRefreshRate

This integer variable specifies the preferred refresh rate for the default video mode selected during boot. Valid values range from 40 to 255. If this variable contains an invalid value or is not present, then there is no preference.

See Subsection 3.7.1: Default Video Mode Preferences for more information on how this boot variable is used.


3.7.1   Default Video Mode Preferences

During boot the operating system builds a list of available video modes, and then gives each video mode a score. The video mode with the best score is selected as the most appropriate video mode to use for the default video mode. The %PreferredXresolution, %PreferredYresolution, %PreferredDepth and %PreferredRefreshRate boot variables effect the score given to each video mode, and therefore effect which video mode will be selected as the most appropriate video mode to use for the default video mode.

Normally the video driver for the video card that is connected to the primary monitor uses the %PreferredXresolution, %PreferredYresolution, %PreferredDepth and %PreferredRefreshRate boot variables to minimize the visible effects of video mode switching during boot (e.g. set these boot variables to match the video mode that the video driver itself will set).


3.8   %InteractiveTimeout

This integer variable specifies how long the boot loader should wait for the user to press a key to enter the interactive boot menu.

If this integer variable is not present then the interactive boot menu is disabled. If this variable is present then:

    
if the value is zero the boot loader will immediately start the interactive boot menu without waiting
if the value is between 1 and 3600 (inclusive) the boot loader will wait for the specified number of seconds for the user to press a key. When a key is pressed the interactive boot menu will be started, and if no key is pressed the interactive boot menu will be skipped.
if the value is above 3600 the boot loader will change the variable's value to 3600 and wait for an hour for the user to press a key.

Note: Not all boot loaders include an interactive boot menu. If the boot loader doesn't include an interactive boot menu then this variable will be ignored.


Generated on Sat Aug 1 16:05:47 2009