Building and Self-Updating U-Boot on the NXP i.MX RT1060 EVK Board Print


Installing U-Boot to the NXP i.MX RT1060 EVK board explains how to install the U-Boot firmware to the board for the first time. Having installed U-Boot, U-Boot is immediately available on the i.MX RT1060 as a primary firmware monitor.

The default U-Boot configuration is a capable Linux bootloader so typically our customers do not require re-building and re-installing U-Boot. However, certain projects still do require customizations to the U-Boot firmware, which implies making changes to the U-Boot code, rebuilding the U-Boot binary and then updating it on the i.MX RT1060.

The full U-Boot source for the NXP i.MX RT1060 EVK board is included in the software distribution available from the Emcraft web site. Refer to the u-boot/ sub-directory in the software distribution tree.

The key board specific-configuration files for the NXP i.MX RT1060 EVK board are as follows:

  • u-boot/configs/mxrt106x-evk_defconfig - default U-Boot configuration;
  • u-boot/include/configs/mxrt106x-evk.h - configuration options;
  • u-boot/board/freescale/mxrt106x-evk/mxrt106x-evk.c - board-specific initialization code.

Run the following step-wise procedure in order to build U-Boot for the NXP i.MX RT1060 EVK board:

  • On the Linux development host, activate the cross-build environment as described in Installing and activating cross development environment:
  • $ . ./ACTIVATE.sh

  • Change to the U-Boot top directory:
  • $ cd u-boot

  • Configure U-Boot for the NXP i.MX RT1060 EVK board:
  • $ make distclean
    $ make mxrt106x-evk_defconfig

  • Build the U-Boot binary:
  • $ make -s

The resultant image will be u-boot-dtb.imx in the U-Boot top directory (i.e. the same directory where you have run the make command from).

The U-Boot command line interface provides a special command that can be used to self-upgrade the U-Boot image on the running target. Before you can run this command, you need to load an upgrade U-Boot binary to the target. Typically, you download images from a TFTP host (refer to Loading Linux images via Ethernet and TFTP), however in absence of an Ethernet link in your specific target configuraiton, you can also load images over serial UART (refer to Loading Linux Images over UART).

The following session is an illustration of the U-Boot self-upgrade procedure:

  • Run the U-Boot self-upgrade command mmc_update_uboot to download the upgrade U-Boot image to RAM, and then install the loaded upgrade image to the SD Card:
  • U-Boot 2017.09-imxrt-2.5.2 (Nov 22 2018 - 23:16:48 +0300) CPU: i.MX RT106x at 600MHz Model: NXP i.RT1060 EVK DRAM: 32 MiB MMC: FSL_SDHC: 0 reading uboot.env Video: 480x272x24 In: serial@40184000 Out: serial@40184000 Err: serial@40184000 Net: eth0: ethernet@402D8000 reading splash-rt1050-series_24.bmp reading mxrt106x-evk.ini Hit any key to stop autoboot: 0 => run mmc_update_uboot Using ethernet@402D8000 device TFTP from server 192.168.1.65; our IP address is 192.168.1.151 Filename 'imxrt106x/u-boot-dtb.imx'. Load address: 0x80007fc0 Loading: ################# 1.7 MiB/s done Bytes transferred = 244736 (3bc00 hex) MMC write: dev # 0, block # 2, count 479 ... 479 blocks written: OK => reset resetting ... U-Boot 2017.09-rc1-gdf312544d6-dirty (Nov 21 2018 - 10:14:22 +0300) CPU: i.MX RT106x at 600MHz Model: NXP i.RT1060 EVK DRAM: 32 MiB MMC: FSL_SDHC: 0 reading uboot.env Video: 480x272x24 In: serial@40184000 Out: serial@40184000 Err: serial@40184000 Net: eth0: ethernet@402D8000 reading splash-rt1050-series_24.bmp reading mxrt106x-evk.ini Hit any key to stop autoboot: 0 =>

Note that the self-upgrade sequence is a dangerous operation. You must be sure that you load and install a functional U-Boot image, which is always a tricky thing when you develop customisations to U-Boot. If something goes wrong, you can re-install the release U-Boot image as documented in Installing U-Boot to the NXP i.MX RT1060 EVK board. The latest U-Boot image is always available from NXP i.MX RT1060 EVK board Software Materials.