7 working with u-boot, 1 general operation, 2 using the network – Kontron SMARC-sAMX6i User Manual
Page 36: 3 using sd cards and onboard emmc device, 8 bootloader update, 1 downloading the bootloader, 2 updating via tftp server, Working with u-boot, General operation, Using the network

SMARC-sAMX6i / Bootloader Operation
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.
They can be set using the ‘setenv’ command. Please note, that these settings are lost after a reset. To retain the
environment permanently, use the command ‘saveenv’, which saves the complete environment to flash.
To transfer a file from a tftp server to memory, the ‘tftpboot’ command is used, for example:
> tftpboot 10800000 filename
5.7.3
Using SD Cards and onboard eMMC device
SD Cards are supported (read only) with the ‘ext2’ or ‘fat’ file system.
In both cases, the card must be rescanned first.
> mmc rescan 0
After that, the contents can be verified with:
> ext2ls mmc 0
in case of the ext2 file system, or
> fatls mmc 0
in case of the fat file system.
To load a file into memory the commands ‘ext2load’ or ‘fatload’ can be used, for example:
> ext2load mmc 0 10800000 kernel.bin
which loads the file ‘kernel.bin’ from the SD card to memory address 0x10800000.
5.8
Bootloader Update
Updating the bootloader of SMARC-sAMX6i can be done by using the already implemented update script.
5.8.1
Downloading the bootloader
Please download the regarding bootloader from
5.8.2
Updating via TFTP Server
If you have a development setup with TFT Server please unpack the downloaded archive to your server's folder. There
should be a folder named “update_smx6”.
36