Chapter 7. Starting an Operating System Automatically

ABLE has a flexible system to automatically run a given user command at boot time. The command to be run is controlled by the boot.cmd non volatile variable. If the boot command is not set it defaults to the autoboot command.

The execution of the boot process may be prevented by setting the boot.auto variable to true. If the boot.auto variable is not set or set to false the boot command is run after a delay set by the boot.timeout variable. The delay is in seconds and allows the user to abort the boot process by pressing a key. The console input from which the keypress is accepted is described in detail in Chapter 5, ABLE Console.

The boot command is executed by the ABLE shell. Any shell script command may be placed in the boot.cmd seperated by semicolons. If more than a small number of commands need to be issued they should be placed in a shell script and the script executed.

Example 7.1. Displaying a logo during the automatic boot process

This example shows how the boot.cmd can be set to display a logo on the video console before continuing with an automated boot using the autoboot command.

>nvset boot.cmd "display -d s3c2410x-video (tftpboot)logo.bmp.Z ; autoboot"
>nvshow boot.cmd
boot.cmd  = display -d s3c2410x-video (tftpboot)logo.bmp.Z ; autoboot
>nvset boot.auto true
>nvshow boot.auto
boot.auto  = on
>nvset boot.timeout 1
>nvshow boot.timeout
boot.timeout  = 1
>nvset console.level 5
>nvsave
>reset
No Available Targets
>

Some of the examples presented in Section 5.5, “Practical use of the console system” make user of the automatic boot process and may be of interest.

Figure 7.1, “Initial boot operations” shows the logic of the initial start process. The operation is to loop for keyboard input for the time specified in boot.timeout. If no user input is received before the timeout the boot.cmd variable is inspected, if set the command is executed with the ABLE shell otherwise the autoboot command is executed by default.

Figure 7.1. Initial boot operations

Initial boot operations

Flowchart for the initial boot operations.