Flashing Linux BSP using UUU

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Flashing Linux BSP using UUU

Flashing Linux BSP using UUU

Hello everyone, this document will explain on how to use the UUU (Universal Update Utility) tool to flash Linux to an i.MX device (i.MX 8MM).

 

Requirements:

 

 

UUU auto script

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

 

/***********************************************************************************/

uuu_version 1.2.39

 

# This command will be run when i.MX6/7 i.MX8MM, i.MX8MQ

SDP: boot -f imx-boot-imx8mmevk-sd.bin-flash_evk

 

# This command will be run when ROM support stream mode

# i.MX8QXP, i.MX8QM

SDPS: boot -f imx-boot-imx8mmevk-sd.bin-flash_evk

 

# These commands will be run when use SPL and will be skipped if no spl

# SDPU will be deprecated. please use SDPV instead of SDPU

# {

SDPU: delay 1000

SDPU: write -f imx-boot-imx8mmevk-sd.bin-flash_evk -offset 0x57c00

SDPU: jump

# }

 

# These commands will be run when use SPL and will be skipped if no spl

# if (SPL support SDPV)

# {

SDPV: delay 1000

SDPV: write -f imx-boot-imx8mmevk-sd.bin-flash_evk -skipspl

SDPV: jump

# }

 

FB: ucmd setenv fastboot_dev mmc

FB: ucmd setenv mmcdev ${emmc_dev}

FB: ucmd mmc dev ${emmc_dev}

FB: flash -raw2sparse all fsl-image-validation-imx-imx8mmevk.sdcard

FB: flash bootloader imx-boot-imx8mmevk-sd.bin-flash_evk

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

/***********************************************************************************/ 

 

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.

 

Windows

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

 

Linux

>$ 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.

 

 SD

Write bootloader only:

Windows:

> .\uuu.exe -b sd <bootloader>

Linux:

$ sudo ./uuu -b sd <bootloader>

 

Replace <bootloader> for your .imx/.bin file, example using the i.MX 8MM for Windows and Linux respectively below.

> .\uur.exe -b sd imx-boot-imx8mmevk-sd.bin-flash_evk

$ sudo ./uuu -b sd imx-boot-imx8mmevk-sd.bin-flash_evk 

 

Write whole Linux image

Windows:

> .\uuu.exe -b sd_all <bootloader> <rootfs>.sdcard

Linux:

$ sudo ./uuu -b sd_all <bootloader> <rootfs>.sdcard

 

Replace <bootloader> and <rootfs> for the name of your .imx/.bin and .sdcard files respectively, example using the i.MX 8MM below.

> .\uuu.exe -b sd_all  imx-boot-imx8mmevk-sd.bin-flash_evk fsl-image-validation-imx-imx8mmevk.sdcard

$ sudo ./uuu -b sd_all  imx-boot-imx8mmevk-sd.bin-flash_evk fsl-image-validation-imx-imx8mmevk.sdcard

 

eMMC

Write bootloader only

Windows:

> .\uuu.exe -b emmc <bootloader>

Linux:

$ sudo ./uuu -b emmc <bootloader>

 

Example using i.MX 8MM

> .\uuu.exe -b emmc imx-boot-imx8mmevk-sd.bin-flash_evk

$ sudo ./uuu -b emmc imx-boot-imx8mmevk-sd.bin-flash_evk

 

Write whole Linux image

Windows:

> .\uuu.exe -b emmc_all <bootloader> <rootfs>.sdcard

Linux:

$ sudo ./uuu -b emmc_all <bootloader> <rootfs>.sdcard

 

Example using i.MX 8MM

> .\uuu.exe -b emmc_all imx-boot-imx8mmevk-sd.bin-flash_evk fsl-image-validation-imx-imx8mmevk.sdcard

$ sudo ./uuu -b emmc_all imx-boot-imx8mmevk-sd.bin-flash_evk fsl-image-validation-imx-imx8mmevk.sdcard

 

Hope this will helpful for everyone who is starting to use this flashing tool.

Comments

I compiled uboot, image and rootfs with yocto source. He is not in .sdcard and .bin-flash_evk format. How do I do this?

Hi,

Do you know if the OP-TEE project is integrated in L4.14.98_2.0.0_ga_images_MX8MMEVK? TFA too?

No ratings
Version history
Last update:
‎10-10-2019 09:21 AM
Updated by: