Create a startup script, Examples of startup scripts – Kontron KBox C-101 User Manual
Page 55

15. uEFI BIOS
KBox C-101 – User’s Guide (Version 2.00)
15.2.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
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.
15.2.3. Examples of Startup Scripts
15.2.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).
15.2.3.2.
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
15.2.3.3.
Enable Watchdog
The uEFI Shell provides environment variables used to control the execution flow.
The following sample start-up script shows the uEFI Shell environment wdt_enable, used to control the Watchdog.
echo -off
echo “Executing sample startup.nsh...”
if %wdt_enable% == “on” then
kwatchdog -t 15
echo “Watchdog enabled”
endif
To create uEFI Shell environment variable, use the set uEFI Shell command as shown below:
Shell> set wdt_enable on
Shell> set
wdt_enable : on
Shell> reset
www.kontron.com
53