Examples Of Startup Scripts; Execute Shell Script On Other Harddrive; Enable Watchdog; Handling The Startup Script In The Spi Boot Flash - Kontron AM4024 User Manual

Table of Contents

Advertisement

9.4.3 Examples of Star tup Scr ipts
9.4.3.1 Execute Shell Scr ipt on Other Harddr ive
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

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.
echo -off
echo "Executing sample startup.nsh..."
if %wdt_enable% == "on" then
kwatchdog -t 15
echo "Watchdog enabled"
endif
To create a 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
9.4.3.3 Handling the Star tup Scr ipt 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:
Shell> kramdisk -s 3 -c -m myramdisk
Shell> myramdisk:
3.
Enter the sample start-up script mentioned above in this section using the edit uEFI Shell
command.
myramdisk:\> edit boot.nsh
www.kontron.com
User Guide
AM4024(E)
72

Advertisement

Table of Contents
loading

This manual is also suitable for:

Am4024e

Table of Contents