Running U-Boot |
As explained in Installing U-Boot to the NXP i.MX RT1060 EVK board, you have to install U-Boot to the SD Card of the NXP i.MX RT1060 EVK board in order to run Linux (uClinux) on the NXP i.MX RT1060 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 RT1060 microcontrollers, U-Boot is relocated to the internal i.MX OCRAM 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 SW7 switches on the NXP i.MX RT1060 EVK board. When SRC_BOOT_MODExx pins select the SD Card as a source boot, then the i.MX RT1060 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 RT1060 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 Firmware Configuration Block, FCB. The u-boot-dtb.imx file is generated automatically during U-Boot build process basing on the information from the board/freescale/mxrt106x-evk/imximage.cfg file. The CONFIG_SYS_TEXT_BASE option specifies the U-Boot entry point address. Initially, U-Boot starts from OCRAM, initializes SDRAM, relocates itself to the end of SDRAM and continues to execute from there. Volatile data (stack, variables, dynamic pool) are maintained in the external SDRAM memory as well. As soon as the NXP i.MX RT1060 EVK board is powered on or reset, the i.MX RT1060 proceeds to boot the U‑Boot firmware from the SD Card printing the following output to the serial console: U-Boot 2017.09-imxrt-2.5.2 (Nov 22 2018 - 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 RT1060 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 => setenv image my.rootfs.uImage => saveenv
|