For this example is used the L4.14.98_2.0.0_ga demo image for the i.MX 8MM, inside the demo image we will find the auto script, which by default flash the eMMC of the board, the structure of the script is as following
In short, when the board goes into serial downloader mode UUU downloads the bootloader to internal RAM, once done and uboot is running, through fastboot utility it will flash .sdcard file and uboot to the eMMC on the board.
More information about the protocol UUU use please refer to the UUU documentation (UUU.pdf) section 5 Supported protocol.
Running the tool
In order to run the tool the binary of uuu needs to be downloaded, the binary files can be downloaded from the link above, uuu.exe is for Windows and uuu is for Linux.
Once downloaded it can be placed inside the same file as the demo image, this so it is easy to run and cleaner on the shell commands.
In windows OS the tool should be run using the Windows PowerShell in administrator mode, once open we will run the next commands:
> .\uuu.exe uuu.auto
>$ sudo ./uuu uuu.auto
The tool will start running and should be waiting for any i.MX device to be detected by host pc
Preparing the board
For the board to be flashed it is needed to be in download mode, the switch configuration (i.MX 8MM EVK) is as following:
SW1101 - 1010XXXXXX
SW1102 - XXXXXXXXX0
Connect a USB cable from the host pc which will run the tool to the USB OTG/TYPE C port, usually specified as download, on the board.
Connect a USB cable from the host to the OTG-to-UART for console output, usually specified as debug, on the board.
Open terminal emulator program with the following settings:
Bits per second - 115200
Data bits - 8
Parity - None
Stop bits - 1
Flow control - None
Power on the board, the download will start and the serial prompt will show the progress in uboot, wait until the tool show success.
Finally power off the board and change the switch configuration to boot from the eMMC, power on the board again and it should boot successfully!
Built in scripts
One can use the built in scripts using the -b option to burn the bootloader and the rootfs to the target flash, just type the command accordingly to the target flash device.
Write bootloader only:
> .\uuu.exe -b sd <bootloader>
$ sudo ./uuu -b sd <bootloader>
Replace <bootloader> for your .imx/.bin file, example using the i.MX 8MM for Windows and Linux respectively below.