beautypg.com

5 u-boot access and startup, 6 environment, U-boot access and startup – Kontron SMARC-sAMX6i User Manual

Page 35: Environment

background image

SMARC-sAMX6i / Bootloader Operation

5.5

U-Boot Access and Startup

Communication with U-Boot is achieved via a serial console configured for 115200 baud, 8N1, no hardware handshake.
Initially, U-Boot executes the commands defined in the environment variable “preboot”. Then, if not otherwise
interrupted, U-Boot pauses for the time defined in the environment variable “bootdelay” and then executes the
statements stored in the environment variable “bootcmd”. To gain access to the U-Boot command prompt, type in any
single character during the boot delay time.
If required, the boot delay function can be configured in such a way that even when the boot delay is set to “0” to have
characters, which are sent over the serial interface prior to the boot wait time, be recognized to allow operator
intervention in the boot process.

5.6

Environment

The Environment is stored in the same flash as U-Boot, usually in the last sector. This provides the possibility to update U-
Boot without changing the Environment. The environment can be modified by the user with the typical commands of the
‘env’ command group: ‘setenv’, ‘editenv’, ‘printenv’ and ‘saveenv’.
Furthermore, if a larger number of boards require updating the environment can be updated by a script, loaded from the
SD card, USB or SATA device, or a network.
A typical user modification would be to set the variable ‘bootcmd’ so that the user’s OS will boot automatically.

35