3 examples of startup scripts, 1 execute shell script on other harddrive, 2 enable watchdog – Kontron AM4024e User Manual

Page 72: Examples of startup scripts, Execute shell script on other harddrive, Enable watchdog, Handling the startup script in the spi boot flash

Advertising
background image

D R A F T — F O R I N

T E R N A L U S E O N L Y

72

www.kontron.com

User Guide

AM4024(E)

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:

9.4.3.3 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.

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

Shell> kramdisk -s 3 -c -m myramdisk

Shell> myramdisk:

myramdisk:\> edit boot.nsh

Advertising
This manual is related to the following products: