4 uefi shell scripting, 1 startup scripting, 2 create a startup script – Kontron AM4024e User Manual

Page 71: Uefi shell scripting, Startup scripting, Create a startup script

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

71

www.kontron.com

User Guide

AM4024(E)

The uEFI Shell commands are not case-sensitive. Each uEFI Shell command is provided with a detailed
online help that can be invoked by entering “<cmd> <space> <-?>” in the command line. To display the
uEFI Shell command list, enter <help> or <?> in the command line.

9.4 uEFI Shell Scr ipting

9.4.1 Startup Scripting

If the ESC key is not pressed and the timeout is run out, the uEFI Shell tries to execute some startup
scripts automatically. It searches for scripts and executes them in the following order:

1.

Kontron flash-stored startup script

2.

If there is no Kontron flash-stored startup script present, the uEFI-specified startup.nsh
script is used. This script must be located on the root of any of the attached FAT formatted
disk drive.

3.

If none of the startup scripts is present or the startup script terminates, the default boot or-
der is continued.

9.4.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-for-
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.

kPassword

Controls uEFI Setup and Shell passwords
This command is used to determine the status of both passwords (set or not set) and to set or
clear the uEFI Shell and Setup passwords. Both user and superuser (Supervisor) passwords can
be controlled with this command.
Call without options to get current password status.
Entering an empty password clears the password.

kRamdisk

Creates and manages RAMdisks
This command is used to perform file operations when no real filesystem is connected to the
system.

kUpdate

Controls the Kontron common update tool
When using the

kUpdate command, the structure of the ZIP archive must not be altered. kUp-

date automatically starts the update procedure via kUpdate -u. If a certain image is intended
to be used, enter

kUpdate -s to select the respective image.

kWatchdog

Configures the Kontron onboard Watchdog
This command is used to enable the Kontron onboard Watchdog with reset target before OS
boot. This can be used to detect if the OS fails to boot and react by reset.

Table 50: Kontron-Specific uEFI Shell Commands

COMMAND

DESCRIPTION

Advertising
This manual is related to the following products: