U-Boot 2020.10 for i.MX platforms

Published on January 19, 2021

Boundary Devices is happy to release the latest U-Boot 2020.10 with support for all our Nitrogen Families of SBCs and SOMs.

 

For the impatient

Our build server automatically generates and uploads all the latest binaries to this address:

The README file contains the exact commit ID of this build images. The latest upgrade.scr U-Boot script is included so it can be copied alongside the U-Boot binary above to the root of your media storage (formatted in FAT or ext2/3/4). Then, once the media is inserted into the board, you can simply run the following command from U-Boot prompt:

=> run upgradeu
If unsure about this shorten procedure, please make sure to read the flashing procedure section.

What’s new?

i.MX 8M Plus support

The big news of this release is that it supports all our boards including the i.MX 8M Plus based Nitrogen8MP.

Fastboot bootloader flashing support

This unfortunately only applies to 8M* platforms as fastboot can only access eMMC at this point. So for any platform of the Nitrogen8 family, you can now update its bootloader with Fastboot! On the target, either press the Fastboot button if present or type this in U-Boot:

=> fastboot 0
On the Host PC you can then simply enter:
$ fastboot flash bootloader flash.bin
$ fastboot reboot

Display configuration support

Just like previous U-Boot version, this one supports display configuration for i.MX boards. As a reminder, you can list all the displays supported by your platform with a simple command:

=> fbpanel
Here is an example on how to set up the board to use our BD080MCC1 MIPI display in case it isn't recognized automatically:
=> setenv fb_mipi ltk080a60a004t
=> savee
=> reset

Driver improvements

Although we won't list all the changes between 2018.07 and 2020.10, we know many drivers have been improved. As mentioned in U-Boot 2020.10 release announcement, people can check the changelog:

$ git log --oneline --no-merges v2018.07..v2020.10

Build instructions

Getting the source code

First, clone our U-Boot git repository. This is the branch you'll need to compile and install to work with the new kernel.

~$ git clone https://github.com/boundarydevices/u-boot-imx6 \
    -b boundary-v2020.10
~$ cd u-boot-imx6
~$ sudo apt-get install device-tree-compiler

Choosing the proper defconfig

Here you'll need to find and make the relevant defconfig for your board. If you have the board running U-Boot already, you can type the following to see which defconfig you should build.

=> printenv uboot_defconfig
Otherwise, to see all the defconfigs, use this command and pick the one that is right for you.
~/u-boot-imx6$ find configs/ -name "nit*defconfig"
configs/nit6xlite_defconfig
configs/nitrogen6_max_defconfig
configs/nitrogen6q_defconfig
configs/nitrogen6q_som2_1g_defconfig
configs/nitrogen6sx_defconfig
configs/nitrogen6_vm_defconfig
configs/nitrogen7_defconfig
configs/nitrogen8m_defconfig
...

Building for i.MX6/7

Now compile that defconfig. For 32-bit platforms, we'll use nitrogen6q_defconfig as an example:

~/u-boot-imx6$ sudo apt-get install crossbuild-essential-armhf
~/u-boot-imx6$ export ARCH=arm
~/u-boot-imx6$ export CROSS_COMPILE=arm-linux-gnueabihf-
~/u-boot-imx6$ make nitrogen6q_defconfig
~/u-boot-imx6$ make -j2

Building for i.MX8

For 64-bit platforms, we'll use nitrogen8m_defconfig as an example:

~$ sudo apt-get install crossbuild-essential-arm64
~$ export ARCH=arm64
~$ export CROSS_COMPILE=aarch64-linux-gnu-
~$ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.10.bin
~$ chmod +x firmware-imx-8.10.bin
~$ ./firmware-imx-8.10.bin
~$ cp firmware-imx-8.10/firmware/hdmi/cadence/signed_*.bin u-boot-imx6/
~$ cp firmware-imx-8.10/firmware/ddr/synopsys/lpddr4*.bin u-boot-imx6/
~$ cd u-boot-imx6
~/u-boot-imx6$ make nitrogen8m_defconfig
~/u-boot-imx6$ make flash.bin -j4
At this point, you can rename the bootable image from flash.bin to u-boot.${uboot_defconfig}
~/u-boot-imx6$ cp flash.bin u-boot.nitrogen8m

Flashing procedure

For Nitrogen8 devices, you can use the fastboot procedure explained above. If you have built your own binary, you can use the copy_upgrade.sh script to copy the bootable binary and the upgrade script to the root folder of your media (SD Card / USB / SATA drive).

~/u-boot-imx6/$ ./copy_upgrade.sh <storage_mount_point>/
If you haven't built your own binary, you can copy upgrade.scr and the U-Boot binary matching your platform manually into your storage. However, if you are unsure about which file to copy, we've created an image for you that you simply need to flash onto either your SD-Card or USB drive:

Plug your media to the platform, power up the board and interrupt u-boot to run the commands below (via the serial terminal).

Hit any key to stop autoboot:  0
=> run upgradeu
This will run the upgrade.scr script and look for a file u-boot.${uboot_defconfig} and burn it. At this point it might be worth while to clear your environment variables after the first reboot. This will set you up with the default environment variables and no more.
Hit any key to stop autoboot:  0 
=> env default -a
=> savee
Then, as a final note, if you've bricked your board through this process and need help, please go through the recovery blog post.