Uefi Shell Scripting; Startup Scripting; Create A Startup Script; Examples Of Startup Scripts - Kontron CP6007-SA User Manual

Table of Contents

Advertisement

FUNCTION
kReset
kSelectFlash
kWatchdog

7.4. uEFI Shell Scripting

7.4.1.

Startup Scripting

If the ESC key is not pressed and the timeout is run out, the uEFI Shell tries to execute some startup scripts
automatically. It searches for scripts and executes them in the following order:
1.
Kontron flash-stored startup script (see Kontron-Specific uEFI Shell Command kBootNsh)
If there is no Kontron flash-stored startup script present, the uEFI-specified startup.nsh script is
2.
used. This script must be located on the root of any of the attached FAT formatted disk drive.
3.
If none of the startup scripts is present or the startup script terminates, the default boot order is continued.
7.4.2.

Create a Startup Script

Startup scripts can be created using the uEFI Shell built-in editor edit or under any OS with a plain text editor of your
choice. To create a startup shell script, simply save the script on the root of any FAT-formatted drive attached to the
system. To copy the startup script to the flash use the
In case there is no mass storage device attached, the startup script can be generated in a RAM disk and stored in the
kMkRamdisk
SPI boot flash using the
7.4.3.

Examples of Startup Scripts

7.4.3.1. Execute Shell Script on Other Harddrive
This example (startup.nsh) executes the shell script named bootme.nsh located in the root of the first detected
disc drive (fs0).
fs0:
bootme.nsh
7.4.3.2. Enable Watchdog
To enable the watchdog within a script, use the following commands (kwatchdog -t 15 can also be used at uEFI shell
prompt directly):
echo -off
echo "Executing sample startup.nsh..."
kwatchdog -t 15
echo "Watchdog enabled"
www.kontron.com
DESCRIPTION
Controls the board's reset behavior
This command controls if the board shall react on a CompactPCI backplane reset if it
is used in a peripheral slot. It has no effect if the board is installed in the CompactPCI
system slot. The parameter of this command is volatile and set to off at the next
start.
This command is used to determine the current active boot flash.
It allows also temporary switching of the boot flash during uEFI BIOS update.
chapter 7.5.1, 'Updating the uEFI BIOS'
Refer to
updates. If ME is not set to recovery mode (Re-Flash enable) Firmware may
malfunction if SPI bank is switched during operation.
Configures the Kontron onboard watchdog
This command is used to enable the Kontron onboard watchdog with reset target
before OS boot. This can be used to detect if the OS fails to boot and react by reset.
kBootNsh
uEFI Shell command.
CP6007-SA, CP6007-RA – User Guide, Rev. 1.0
for flash bank handling and uEFI BIOS
uEFI Shell command.
// 82

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cp6007-ra

Table of Contents