D R A F T — F O R I N
T E R N A L U S E O N L Y
77
www.kontron.com
User Guide
CP3010-SA
matted drive attached to the system. To copy the startup script to the flash, use the
kBootScript
uEFI
Shell command.
In case there is no mass storage device attached, the startup script can be generated in a RAM disk and
stored in the SPI boot flash using the
kRamdisk
uEFI Shell command.
9.4.3 Examples of Startup Scripts
9.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
).
9.4.3.2 Enable Watchdog
The uEFI Shell provides an environment variable used to control the execution flow. The following sam-
ple start-up script shows the uEFI Shell environment variable
wdt_enable
used to control the
Watchdog.
To create a uEFI Shell environment variable, use the
set
uEFI Shell command as shown below:
fs0:
bootme.nsh
echo -off
echo “Executing sample startup.nsh...”
if %wdt_enable% == “on” then
kwatchdog -t 15
echo “Watchdog enabled”
endif
Shell> set wdt_enable on
Shell> set
wdt_enable : on
Shell> reset