Difference between revisions of "DESK-MX-L-AN-0008: How to use UUU update utility"

From DAVE Developer's Wiki
Jump to: navigation, search
(MVM USB device)
Line 28: Line 28:
 
The following instructions are used for building the <code>uuu</code> utility directly inside the {{pageoldid|DESK-MX8M-L|16134|DESK-MX8M-L-2.0.0-rc2}} Virtual Machine
 
The following instructions are used for building the <code>uuu</code> utility directly inside the {{pageoldid|DESK-MX8M-L|16134|DESK-MX8M-L-2.0.0-rc2}} Virtual Machine
  
As reported in github firstly the following Ubuntu packages have to be installed:
+
As reported in github README, the following Ubuntu packages have to be installed:
 
<pre>
 
<pre>
 
sudo apt-get install libusb-1.0-0-dev libbz2-dev libzstd-dev pkg-config cmake libssl-dev g++
 
sudo apt-get install libusb-1.0-0-dev libbz2-dev libzstd-dev pkg-config cmake libssl-dev g++
Line 79: Line 79:
 
1:1 MX8MM SDP: 0x1FC9 0x0134 0x0101
 
1:1 MX8MM SDP: 0x1FC9 0x0134 0x0101
  
 +
</pre>
 +
* binary download and programming
 +
<pre class="workstation-terminal">
 +
dvdk@vagrant:~/mfgtools$ sudo uuu -d flash.bin
 +
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.4.201-0-g005ff6f
  
 +
Success 22    Failure 0                                                                                                                                     
 +
                                                                                                                                                             
 +
                                                                                                                                                             
 +
1:1      2/ 2 [Done                                  ] SDP: done                                                                                             
 +
1:2      3/ 3 [Done                                  ] SDPV: done                                                                                             
  
dvdk@vagrant:~/mfgtools$
 
 
</pre>
 
</pre>
* binary download and programming
 
<pre class="workstation-terminal">
 
dvdk@vagrant:~/mfgtools$ uuu -d flash.bin
 
dvdk@vagrant:~/mfgtools$ </pre>
 
 
* once downloaded, the <code>flash.bin</code> boot image will be directly executed on the target and the serial console will show the u-boot messages:
 
* once downloaded, the <code>flash.bin</code> boot image will be directly executed on the target and the serial console will show the u-boot messages:
 
<pre class="workstation-terminal">
 
<pre class="workstation-terminal">
 +
U-Boot SPL 2020.04-desk-mx8m-l-2.0.0-rc2 (Oct 07 2022 - 14:57:02 +0000)
 +
WARNING: SOM ConfigID on block 0 is UNLOCKED
 +
SOM ConfigID#: 00000002
 +
DDRINFO: start DRAM init
 +
DDRINFO: DRAM rate 3000MTS
 +
DDRINFO:ddrphy calibration done
 +
DDRINFO: ddrmix config done
 +
Normal Boot
 +
Trying to boot from USB SDP
 +
SDP: initialize...
 +
SDP: handle requests...
 +
Downloading file of size 1099200 to 0x40400000... done
 +
Jumping to header at 0x40400000
 +
Header Tag is not an IMX image
 +
Found header at 0x404291a0
 +
WARNING: CB ConfigID on block 0 is UNLOCKED
 +
WARNING: CB ConfigID on block 0 is UNLOCKED
 +
WARNING: CB ConfigID on block 0 is UNLOCKED
 +
WARNING: CB ConfigID on block 0 is UNLOCKED
 +
NOTICE:  BL31: v2.2(release):rel_imx_5.4.70_2.3.2_rc1-4-ga72158b5e
 +
NOTICE:  BL31: Built : 15:54:43, Feb 17 2022
 +
 +
U-Boot 2020.04-desk-mx8m-l-2.0.0-rc2 (Oct 07 2022 - 14:57:02 +0000)
 +
 +
CPU:  i.MX8MMQ rev1.0 1600 MHz (running at 1200 MHz)
 +
CPU:  Industrial temperature grade (-40C to 105C) at 58C
 +
Reset cause: POR
 +
Model: DAVE i.MX8MM MITO8MMINI board on SBCX
 +
DRAM:  2 GiB
 +
WARNING: CB ConfigID on block 0 is UNLOCKED
 +
PMIC: PF8121 detected
 +
MMC:  FSL_SDHC: 0, FSL_SDHC: 1
 +
Loading Environment from MMC... Card did not respond to voltage select!
 +
*** Warning - No block device, using default environment
 +
 +
Fail to setup video link
 +
In:    serial
 +
Out:  serial
 +
Err:  serial
 +
 +
BuildInfo:
 +
  - ATF a72158b
 +
  - U-Boot 2020.04-desk-mx8m-l-2.0.0-rc2
 +
 +
WARNING: SOM ConfigID on block 0 is UNLOCKED
 +
SOM ConfigID#: 00000002
 +
SOM UniqueID#: dab429e1:09166209
 +
CB ConfigID#: 00001003
 +
CB UniqueID#: c6000035:c3701c2d
 +
WARNING: SOM ConfigID on block 0 is UNLOCKED
 +
SOM: MX8MM-Mito8MMini on SBCX
 +
Card did not respond to voltage select!
 +
Detect USB boot. Will enter fastboot mode!
 +
Net:
 +
Warning: ethernet@30be0000 (eth0) using random MAC address - 12:04:da:79:87:a3
 +
eth0: ethernet@30be0000
 +
Fastboot: Normal
 +
Boot from USB for mfgtools
 +
*** Warning - Use default environment for                                mfgtools
 +
, using default environment
 +
 +
Run bootcmd_mfg: run mfgtool_args;if iminfo ${initrd_addr}; then if test ${tee} = yes; then bootm ${tee_addr} ${initrd_addr} ${fdt_addr}; else booti ${loadaddr} ${initrd_addr} ${fdt_addr}; fi; else echo "Run fastboot ..."; fastboot 0; fi;
 +
Hit any key to stop autoboot:  0
  
 +
## Checking Image at 43800000 ...
 +
Unknown image format!
 +
Run fastboot ...
 +
No USB device found
 +
USB init failed: -19
 +
u-boot=>
 
</pre>
 
</pre>

Revision as of 16:41, 7 October 2022

Info Box
Warning-icon.png This application note was validated against specific versions of the kit only. It may not work with other versions. Supported versions are listed in the History section. Warning-icon.png

History[edit | edit source]

Version Date Development Kit version
1.0.0 07/10/2022 DESK-MX8M-L-2.0.0-rc2

Introduction[edit | edit source]

This application note details how to use the UUU NXP Universal Update Utility for the i.MX platforms typically via SDP protocol, i.e. over USB OTG connection.

UUU is the replacement for MfgTool Command-line driven (no GUI). It allows a single command image download and it is fully scriptable. It supports all flash types (eMMC, NAND, QSPI, SD…).

Full open-source code is on Github with full documentation.

Build the UUU[edit | edit source]

The following instructions are used for building the uuu utility directly inside the DESK-MX8M-L-2.0.0-rc2 Virtual Machine

As reported in github README, the following Ubuntu packages have to be installed:

sudo apt-get install libusb-1.0-0-dev libbz2-dev libzstd-dev pkg-config cmake libssl-dev g++

then the git repository will be cloned:

git clone https://github.com/NXPmicro/mfgtools.git

For some Ubuntu 16.04 libzstd incompatibility, it is required to checkout a previous release:

git checkout uuu_1.4.201

Invoking the cmake utility, the application can be built:

cd mfgtools
cmake . && make

and install the application in the system directory:

sudo make install

MVM USB device[edit | edit source]

The USB device - for both SPL and u-boot stages - has to be enabled inside the VM using the VirtualBox proper Device menu. Once both USB devices are detected by the VM, it is possible to add them to the USB filters in order to enable them once detected:

ORCA[edit | edit source]

DESK-MX6-L-uuu-ORCA-USB-Settings.png

MITO 8M Mini[edit | edit source]

DESK-MX6-L-uuu-USB-Settings.png

uuu examples[edit | edit source]

ORCA[edit | edit source]


MITO 8M Mini[edit | edit source]

  • device identification
dvdk@vagrant:~/mfgtools$ uuu -lsusb
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.4.201-0-g005ff6f

Connected Known USB Devices
	Path	 Chip	 Pro	 Vid	 Pid	 BcdVersion
	==================================================
	1:1	 MX8MM	 SDP:	 0x1FC9	0x0134	 0x0101

  • binary download and programming
dvdk@vagrant:~/mfgtools$ sudo uuu -d flash.bin 
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.4.201-0-g005ff6f

Success 22    Failure 0                                                                                                                                       
                                                                                                                                                               
                                                                                                                                                               
1:1      2/ 2 [Done                                  ] SDP: done                                                                                               
1:2      3/ 3 [Done                                  ] SDPV: done                                                                                              

  • once downloaded, the flash.bin boot image will be directly executed on the target and the serial console will show the u-boot messages:
U-Boot SPL 2020.04-desk-mx8m-l-2.0.0-rc2 (Oct 07 2022 - 14:57:02 +0000)
WARNING: SOM ConfigID on block 0 is UNLOCKED
SOM ConfigID#: 00000002
DDRINFO: start DRAM init
DDRINFO: DRAM rate 3000MTS
DDRINFO:ddrphy calibration done
DDRINFO: ddrmix config done
Normal Boot
Trying to boot from USB SDP
SDP: initialize...
SDP: handle requests...
Downloading file of size 1099200 to 0x40400000... done
Jumping to header at 0x40400000
Header Tag is not an IMX image
Found header at 0x404291a0
WARNING: CB ConfigID on block 0 is UNLOCKED
WARNING: CB ConfigID on block 0 is UNLOCKED
WARNING: CB ConfigID on block 0 is UNLOCKED
WARNING: CB ConfigID on block 0 is UNLOCKED
NOTICE:  BL31: v2.2(release):rel_imx_5.4.70_2.3.2_rc1-4-ga72158b5e
NOTICE:  BL31: Built : 15:54:43, Feb 17 2022

U-Boot 2020.04-desk-mx8m-l-2.0.0-rc2 (Oct 07 2022 - 14:57:02 +0000)

CPU:   i.MX8MMQ rev1.0 1600 MHz (running at 1200 MHz)
CPU:   Industrial temperature grade (-40C to 105C) at 58C
Reset cause: POR
Model: DAVE i.MX8MM MITO8MMINI board on SBCX
DRAM:  2 GiB
WARNING: CB ConfigID on block 0 is UNLOCKED
PMIC: PF8121 detected
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... Card did not respond to voltage select!
*** Warning - No block device, using default environment

Fail to setup video link
In:    serial
Out:   serial
Err:   serial

 BuildInfo:
  - ATF a72158b
  - U-Boot 2020.04-desk-mx8m-l-2.0.0-rc2

WARNING: SOM ConfigID on block 0 is UNLOCKED
SOM ConfigID#: 00000002
SOM UniqueID#: dab429e1:09166209
CB ConfigID#: 00001003
CB UniqueID#: c6000035:c3701c2d
WARNING: SOM ConfigID on block 0 is UNLOCKED
SOM: MX8MM-Mito8MMini on SBCX
Card did not respond to voltage select!
Detect USB boot. Will enter fastboot mode!
Net:
Warning: ethernet@30be0000 (eth0) using random MAC address - 12:04:da:79:87:a3
eth0: ethernet@30be0000
Fastboot: Normal
Boot from USB for mfgtools
*** Warning - Use default environment for                                mfgtools
, using default environment

Run bootcmd_mfg: run mfgtool_args;if iminfo ${initrd_addr}; then if test ${tee} = yes; then bootm ${tee_addr} ${initrd_addr} ${fdt_addr}; else booti ${loadaddr} ${initrd_addr} ${fdt_addr}; fi; else echo "Run fastboot ..."; fastboot 0; fi;
Hit any key to stop autoboot:  0

## Checking Image at 43800000 ...
Unknown image format!
Run fastboot ...
No USB device found
USB init failed: -19
u-boot=>