Skip to content

Booting from USB using UUU (Universal Update Utility)

Introduction

UUU (Universal Update Utility) is an open source utility by NXP that allows downloading and executing code on i.MX SoCs through the Serial Download Protocol (SDP). It is the next generation of NXP's MFGTOOL used to load SPL and U-Boot via the USB OTG port and optionally program the internal storage of the SoM. For more details, visit https://github.com/NXPmicro/mfgtools

Note: All Variscite SoMs ship with U-Boot pre-programmed in internal storage. In addition, all Variscite carrier boards have an SD card slot, and even in the unlikely event of the U-Boot being erased from the internal storage, the SoM can always be booted from an SD card (like our recovery SD card, for example). This utility is generally not needed, but provides another way to boot and optionally program Variscite SoMs.

Step-by-step usage instructions

Prepare the host machine

Download and build uuu:

sudo apt install libusb-1.0-0-dev libbz2-dev libzstd-dev zlib1g-dev pkg-config cmake libssl-dev g++ libtinyxml2-dev
cd ~
git clone https://github.com/NXPmicro/mfgtools.git
cd mfgtools
git checkout uuu_1.5.233
cmake .
make

Note: emmc_burn_all.lst configures the eMMC to use the boot partition instead of the user partition. Apply the following patch to use the user partition instead:

diff --git a/uuu/emmc_burn_all.lst b/uuu/emmc_burn_all.lst
index d868d05..521b3c0 100644
--- a/uuu/emmc_burn_all.lst
+++ b/uuu/emmc_burn_all.lst
@@ -32,7 +32,4 @@ FB: ucmd setenv fastboot_dev mmc
 FB: ucmd setenv mmcdev ${emmc_dev}
 FB: ucmd mmc dev ${emmc_dev}
 FB: flash -raw2sparse all _image
-FB: flash -scanterm -scanlimited 0x800000 bootloader _flash.bin
-FB: ucmd if env exists emmc_ack; then ; else setenv emmc_ack 0; fi;
-FB: ucmd mmc partconf ${emmc_dev} ${emmc_ack} 1 0
 FB: done

Bootloader

Choose one of the following options to build U-Boot. After copying the U-Boot image to the uuu directory, continue with the serial download steps below.

Option A: Build U-Boot from Source

Follow the Build U-Boot from source code instructions, using the defconfig for SD card/eMMC.

Copy the U-Boot image to the uuu directory:

cp -v imx-boot-sd.bin ~/mfgtools/uuu/_flash.bin

Option B: Build U-Boot from Yocto

Build the imx-boot recipe:

bitbake -c deploy imx-boot

Copy the U-Boot image to the uuu directory:

cp -v ./tmp/deploy/images/imx91-var-som/imx-boot ~/mfgtools/uuu/_flash.bin

Load U-Boot into RAM

Boot the board into serial download mode:

Alternatively, set the boot mode to eMMC/NAND flash if it does not contain a bootloader. Connect the board to your host PC via the USB OTG port and power it on. The board should be recognized on the host as a "NXP Semiconductors SE Blank M850" (or something similar).

Note: If your board only has a regular USB Type-A connector and doesn't have a USB Micro-AB or Type-C receptacle, you can use a "male USB Type-A to male USB type-A" cable.

Run uuu to load U-Boot into RAM:

cd ~/mfgtools/uuu
sudo ./uuu ./spl_boot.lst

The board will load and execute U-Boot directly in RAM. You can monitor U-Boot logs via the serial debug console.

Note: The default boot command when booting from USB is bootcmd_mfg - it is defined by default in include/env/nxp/imx_env.h in the U-Boot source code, as part of the board's default environment. You can redefine it or leave it empty.

Image

Build an image and copy it to the uuu directory. For example:

unzstd fsl-image-gui-imx91-var-som.wic.zst # Example with .wic.zst image extension
gzip -dk fsl-image-gui-imx91-var-som.wic.gz # Example with wic.gz image extension
cp -v fsl-image-gui-imx91-var-som.wic ~/mfgtools/uuu/_image # Example image

Run uuu to flash the image to the on-SoM eMMC:

cd ~/mfgtools/uuu
sudo ./uuu ./emmc_burn_all.lst
  • Set the boot selection switch to the eMMC position.

The system should now boot from eMMC, and you can view the output on the console via the debug port as usual.