Booting from USB and Flashing Android 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).
Step-by-step usage instructions¶
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
Preparing UUU for Android flashing:
- The Android build uses the SD card/eMMC defconfig for U-Boot by default.
- Copy the uuu binary to the Android build output folder:
cp ~/mfgtools/uuu/uuu ~/var_imx-mx8x-android-15.0.0_1.2.0/android_build/out/target/product/som_mx8qx
Boot the board into serial download mode:
- Set the board boot mode to SD card with no card inserted in the slot.
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.
Use UUU to program Android to the eMMC:
Copy Variscite's uuu scripts to the Android build output folder:
cp ~/var_imx-mx8x-android-15.0.0_1.2.0/android_build/device/variscite/scripts/uuu_scripts/* out/target/product/som_mx8q/
List available scripts and run uuu:
ls out/target/product/som_mx8q/emmc_burn_android*.lst
cd out/target/product/som_mx8q
sudo ./uuu <uuu script>.lst
You can monitor the output on the serial debug console.
After flashing completes without errors, set the DIP switch back to eMMC and power-cycle the board.
Notes:
- For m7/m4 dtbs change the postfix with -m4/-m7 respectively in the .lst files.
- If Trusty is enabled in your build, use a matching
*_trusty.lstscript when available.