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 please visit https://github.com/NXPmicro/mfgtools
Note: All Variscite SOMs are shipped with U-Boot pre-programmed on the 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-get install libusb-1.0-0-dev libzip-dev libbz2-dev pkg-config cmake
cd ~
git clone https://github.com/NXPmicro/mfgtools.git
cd mfgtools
git checkout uuu_1.4.240
cmake .
make
Preparing UUU for Android flashing:
- Android build outputs the U-Boot using the defconfig for SD card/eMMC by default.
- Copy the uuu binary to the Android build output folder:
cp ~/mfgtools/uuu/uuu ~/var_imx-mx8mp-android-15.0.0_1.2.0/android_build/out/target/product/dart_mx8mp
Boot the board into serial download mode:
- Set the board boot mode to SD card, while not having an actual card inserted in its slot.
Alternatively, set the board boot mode to eMMC/NAND flash, when the eMMC/NAND flash does not contain a bootloader. Connect the board to your host PC via the USB OTG port, and power on the board. 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-mx8mp-android-15.0.0_1.2.0/android_build/device/variscite/scripts/uuu_scripts/* out/target/product/dart_mx8mp/
List available scripts and run uuu:
ls out/target/product/dart_mx8mp/emmc_burn_android*.lst
cd out/target/product/dart_mx8mp
sudo ./uuu <uuu script>.lst
You can see its output on the console via the debug port, as always.
After flashing is complete 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.