D R A F T — F O R I N
T E R N A L U S E O N L Y
107
www.kontron.com
User Guide
CP3004-SA
The following sample start-up script shows two uEFI Shell environment variables,
wdt_enable
and
pxe_first
, used to control the boot process and the Watchdog.
To create uEFI Shell environment variables, use the
set
uEFI Shell command as shown below:
12.4.3.4 Handling the Startup Script in the SPI Boot Flash
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 following instructions:
1.
Press <ESC> during power-up to log into the uEFI Shell.
2.
Create a RAM disk and set the proper working directory as shown below:
3.
Enter the sample start-up script mentioned above in this section using the
edit
uEFI Shell
command.
4.
Save the start-up script to the SPI boot flash using the
kbootscript
uEFI Shell command.
5.
Reset the board to execute the newly installed script using the
reset
uEFI Shell command.
echo -off
echo “Executing sample startup.nsh...”
if %wdt_enable% == “on” then
kwdt -t 15
echo “Watchdog enabled”
endif
if %pxe_first% == “on” then
echo “forced booting from network”
kboot -t network
endif
Shell> set wdt_enable on
Shell> set pxe_first on
Shell> set
pxe_first : on
wdt_enable : on
Shell> reset
Shell> kramdisk -s 3 myramdisk
Shell> myramdisk:
myramdisk:\> edit boot.nsh
myramdisk:\> kbootscript -p boot.nsh
myramdisk:\> reset