Running U-Boot |
![]() |
As explained in Installing U-Boot to the NXP i.MX RT1050 EVK board, you have to install U-Boot to the SD Card of the NXP i.MX RT1050 EVK board in order to run Linux (uClinux) on the NXP i.MX RT1050 EVK board. U-Boot runs as the primary firmware from the SD Card on each power-on / reset. U-Boot is probably the most popular firmware monitor for Linux. It is developed and maintained by DENX Software Engineering (www.denx.de). If you need detailed information on any aspects of U‑Boot operation, DENX publishes extensive U‑Boot user documentation at their web site. On the i.MX RT1050 microcontrollers, U‑Boot is relocated to the internal i.MX ITCM memory from SD Card with the built-in i.MX ROM bootloader. Boot mode is specified with the states of the SRC_BOOT_MODExx pins, which are configured with the SW5, SW6, SW7 switches on the NXP i.MX RT1050 EVK board. When SRC_BOOT_MODExx pins select the SD Card as a source boot, then the i.MX RT1050 ROM bootloader searches for the *.imx image at 0x400 offset from the start of the SD Card device (see Expansion device structures layout in the i.MX RT1050 UM). The *.imx image must have the special format, and (beside the u‑boot.bin itself) should contain information necessary for the ROM bootloader to relocate and pass control to U‑Boot correctly. This information is called Device Configuration Data, DCD. The u-boot-dtb.imx file is generated automatically during U-Boot build process basing on the information from the board/freescale/mxrt105x-evk/imximage.cfg file, which includes command strings to be compiled into DTB (configuration which the ROM bootloader must apply before booting U-Boot binary). The CONFIG_SYS_TEXT_BASE option specifies the U-Boot entry point address. Initially, U-Boot starts from ITCM, initializes SDRAM, relocates itself to the end of SDRAM and continues to execute from there. As soon as the NXP i.MX RT1050 EVK board is powered on or reset, the i.MX RT1050 proceeds to boot the U‑Boot firmware from the SD Card printing the following output to the serial console: U-Boot 2017.09-rc1-gdf312544d6 (Oct 13 2017 - 23:16:48 +0300) If you hit any key on the serial console before the number of seconds defined by the U-Boot bootdelay variable has elapsed, you will enter the U-Boot interactive command monitor. From the command monitor you can run U‑Boot commands to examine memory, load an image from Ethernet, boot Linux from a loaded image or perform any other action supported by U-Boot. U-Boot makes use of the so-called environment variables to define various aspects of the target functionality. On the NXP i.MX RT1050 EVK board, the U-Boot environment is stored in the uboot.env file on the FAT partition of the SD Card, and is persistent across power or reset cycles. Parameters defined by the U-Boot environment variables include: target IP address, target MAC address, location in RAM where a Linux bootable image will be loaded, and many others. To manipulate the U-Boot environment the following commands are used:
=> printenv addip=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:eth0:off => setenv image my.rootfs.uImage => saveenv
|