Bootloader File System Support; Ext4 File System Write Support; Bootloader Network Support - Kontron SMARC-sAMX8X User Manual

Table of Contents

Advertisement

7.9. Bootloader File System Support

U-Boot for the SMARC_sAMX8X provides support for FAT and EXT4 file systems. EXT4 support also includes EXT2
and EXT3 formatted file systems. There are file system specific commands available to list file system contents
(ext2ls, fatls) and load a given file into board memory (ext2load, fatload). However, U-Boot also provides generic
commands ("ls" and "load"), that will detect the file system on the device and use appropriate file system functions
automatically.
Example: Show/boot folder contents from SD card file system
=> ls mmc 0:1 /boot
<DIR>
4096 .
<DIR>
4096 ..
<SYM>
48 iMX8Xd-sAMX8X-ld101-m4.dtb
44034 devicetree-zImage-iMX8Xd-sAMX8X-ld101-m4.dtb
43986 devicetree-zImage-iMX8Xd-sAMX8X-ld101.dtb
<SYM>
33 zImage
<SYM>
45 iMX8Xd-sAMX8X-ld101.dtb
<SYM>
45 iMX8Xs-sAMX8X-ld101.dtb
6376512 zImage-4.1.29-fslc+g59b38c3
43998 devicetree-zImage-iMX8Xs-sAMX8X-ld101.dtb
=> load mmc 0:1 ${loadaddr} /boot/zImage
6376512 bytes read in 536 ms (11.3 MiB/s)

7.9.1. EXT4 File System Write Support

There is even support available to write a given memory area into ext4 formatted file systems. However, the
implementation is not bullet proof und should be used with care, as this could lead to file system corruption.
Writing to symbolic links in an ext4 filesystem does not work from u-boot!
Do not create new files in ext4 filesystem as this could cause problems.

7.10. Bootloader Network Support

U-Boot provides support for both onboard Ethernet interfaces. The current interface can be selected by setting
"ethact" environment variable to either "FEC0" or "FEC1".
Board specific MAC addresses are read from EEPROM during startup and environment variables are set
automatically. In case EEPROM contents is missing or corrupted, a "random" MAC address will be set to "ethaddr"
In case that the current network interface is attached to a network providing a DHCP server, an IP address can be
gathered using "bootp" ord "dhcp" commands.
After that, a file from a tftp server can be copied to memory using the "tftpboot" command.
Example:
=> bootp
=> tftpboot ${loadaddr} <filename>
www.kontron.com
SMARC-sAMX8X User Guide. Rev. 1.1
// 44

Advertisement

Table of Contents
loading

Table of Contents