![Kontron SMARC-sAMX6i Скачать руководство пользователя страница 33](http://html1.mh-extra.com/html/kontron/smarc-samx6i/smarc-samx6i_user-manual_1996324033.webp)
SMARC-sAMX6i / Bootloader Operation
memory range and compared with the md5 message digest at <cksum-address>. If the digest is identical, the command
returns 0; if the digests do not match, a value other than zero is returned. When a comparison is made, nothing is printed
to the console since this usage of the command is meant to be used within scripts.
The md5 message digest at <cksum-address> may be specified in ASCII or binary format.
Usage
Calculate an md5 message digest: Check the md5 message digest of a file previously loaded to 100000 with a size of 80000
and its md5 message digest loaded to 10000 in a script
=> setenv check_crc “if md5sum 100000 80000 10000; then echo ‘md5 message
digest OK’; else echo ‘md5 message digest BAD’; fi”
=>run check_crc
md5 message digest OK
=>
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.
5.7
Working with U-Boot
5.7.1
General Operation
Most operations are carried out using the main memory as an intermediate step. It is not possible, for example, to boot a
kernel image directly from a tftp server. Instead, the kernel image is first loaded to memory and then booted from there
with another command.
The same is true when writing new contents to the SPI boot flashes.
This concept is very flexible since it separates the commands which handle the loading of data from the commands that
carry out actions like booting or programming flash devices.
5.7.2
Using the Network
U-Boot provides support for the onboard Ethernet interfaces for transferring files from a file server.
To be able to transfer files from a tftp server to a module, the module’s IP address (environment variable ‘ipaddr’) and the
IP address of the server must be set (environment variable ‘serverip’). Alternatively, it is possible to use the ‘dhcp’ or
‘bootp’ commands.
33