0% found this document useful (0 votes)
32 views40 pages

UUU (Universal Update Utility) : Frank Li

Uploaded by

nhavb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views40 pages

UUU (Universal Update Utility) : Frank Li

Uploaded by

nhavb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

UUU (Universal Update Utility)

Frank Li
UUU (Universal Update Utility) ii

REVISION HISTORY

NUMBER DATE DESCRIPTION NAME

1a66a0c Thu Feb 10 16:13:03 Updated UUU default support protocol list allenxh
2022 -0600 (asciidoc)

df6ea0b Tue Mar 29 13:32:14 Updated Release Notes (asciidoc) nxpfrankli


2022 -0500

698fdd0 Thu Jun 9 14:14:15 Updated UUU default support protocol list nxpfrankli
2022 -0500 (asciidoc)

d42cb9c Thu Jun 9 14:18:35 Updated UUU default support protocol list nxpfrankli
2022 -0500 (asciidoc)

6bfb126 Fri Jun 10 11:40:11 Updated UUU default support protocol list ChrisWu86459
2022 -0500 (asciidoc)

22268e9 Fri Jun 10 11:54:49 Updated UUU default support protocol list ChrisWu86459
2022 -0500 (asciidoc)

86c4f28 Tue Jun 21 10:24:46 Updated UUU default support protocol list nxpfrankli
2022 -0500 (asciidoc)

38065c0 Mon Jul 11 14:55:29 Updated UUU default support protocol list nxpfrankli
2022 -0500 (asciidoc)

a890d5a Mon Jul 11 14:56:00 Updated UUU default support protocol list nxpfrankli
2022 -0500 (asciidoc)

1be5ece Thu Sep 15 10:07:15 Updated Release Notes (asciidoc) nxpfrankli


2022 -0500

40133f4 Thu Sep 15 10:07:30 Updated Release Notes (asciidoc) nxpfrankli


2022 -0500

f9162c6 Mon Mar 6 10:10:21 Updated Release Notes (asciidoc) nxpfrankli


2023 -0600

2113d47 Thu Jun 1 23:39:42 Rename file to match UUU.asciidoc nxpfrankli


2023 -0500

380a2af Tue Jun 13 11:55:03 Updated Release Notes (asciidoc) nxpfrankli


2023 -0500

53bb58f Fri Jun 16 10:42:25 Updated _Sidebar (markdown) nxpfrankli


2023 -0500

6a7544d Fri Jun 16 10:44:35 Updated _Sidebar (markdown) nxpfrankli


2023 -0500

103136d Fri Jun 16 10:45:56 Updated _Sidebar (markdown) nxpfrankli


2023 -0500
UUU (Universal Update Utility) iii

REVISION HISTORY

NUMBER DATE DESCRIPTION NAME

02508ba Fri Jun 16 10:46:21 Updated _Sidebar (markdown) nxpfrankli


2023 -0500

cf1f381 Fri Jun 16 10:46:39 Updated _Sidebar (markdown) nxpfrankli


2023 -0500

1c16de1 Fri Jun 16 11:16:23 Updated _Sidebar (markdown) nxpfrankli


2023 -0500

79a9c81 Thu Jun 22 14:31:33 Updated Release Notes (asciidoc) nxpfrankli


2023 -0500

2d31142 Wed Aug 2 11:34:51 Updated Release Notes (asciidoc) nxpfrankli


2023 -0500

2d49b33 Wed Aug 30 Updated FAQ (asciidoc) nxpfrankli


09:29:07 2023 -0500

107eba5 Wed Jan 24 16:14:50 Updated Release Notes (asciidoc) nxpfrankli


2024 -0600

7208854 Wed Jan 24 16:15:03 Updated Release Notes (asciidoc) nxpfrankli


2024 -0600
UUU (Universal Update Utility) iv

Contents

1 Introduction 1
1.1 Running environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Typical Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.3 Typical Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.4 License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.5 What Firmware Need . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.6 Setup auto parameter complete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.6.1 windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.6.2 linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.7 L4.9.123_2.3.0_8MM GA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2 Syntactic 3

3 Usage Example 5
3.1 Basic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.1.1 Download boot loader for imx6\imx7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.1.2 Download boot loader for imx8qxp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.1.3 Download SPL and uboot, such as imx8mq. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.1.4 Burn Android Image to eMMC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.1.5 Burn yocto Image to eMMC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.2 Built-in script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.3 multi boards support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.3.1 For the same boards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.3.2 For the difference boards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.4 Talk with fastboot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.4.1 boot linux kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.4.2 write image to emmc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.5 Talk with linux kenrel, transfer file between board and pc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

4 Sample scripts 6

5 Supported protocol 12
5.1 SDP: i.MX6/7 ROM download protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
5.1.1 Supported command: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
5.2 HABv4 closed chip support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
5.3 SDPU\SDPV: uboot implement simplified ROM SDP protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.4 SDPS: i.MX8QXP and i.MX8QM ROM download protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.5 FB: Android fastboot protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.5.1 Support command: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.6 FBK: Android fastboot protocol, implement at initramfs. See project imx-uuc . . . . . . . . . . . . . . . . . . . 16
5.6.1 Support command: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.7 Common command for all protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
UUU (Universal Update Utility) v

6 Migration from mfgtool ucl2.xml 17

7 Win 7 User Guide 19


7.1 Back Ground . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
7.2 Install updated winusb inf file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
7.3 Use zadig to install winusb driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

8 FAQ 20

9 Build Steps 25
9.1 windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
9.2 linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

10 Uboot config requirement 25

11 kernel config requirement 26

12 Release Notes 27
12.1 1.5.163 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
12.1.1 New features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
12.1.2 Bug fixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
12.2 1.5.125 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
12.3 1.5.120 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
12.3.1 New features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
12.4 1.5.109 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
12.5 1.5.104 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
12.5.1 New fetaures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
12.5.2 Bug fixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
12.6 1.5.21 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
12.6.1 New features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
12.6.2 Bug fixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
12.7 1.4.243 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
12.7.1 New features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
12.7.2 Bug fixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
12.8 1.4.193 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
12.8.1 New features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
12.8.2 Bug fixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
12.9 1.4.165 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
12.9.1 New features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
12.9.2 Bug fixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
12.101.4.139 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
UUU (Universal Update Utility) vi

12.10.1 New features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29


12.10.2 Bug fixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
12.111.4.72 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
12.11.1 New features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
12.11.2 Bug fixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
12.121.4.43 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
12.12.1 New features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
12.12.2 Bug fixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
12.131.3.191 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
12.13.1 New features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
12.13.2 Bug fixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
12.141.3.154 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
12.14.1 New features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
12.14.2 Bug fixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
12.151.3.134 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
12.15.1 Bug fixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
12.161.3.130 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
12.16.1 New features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
12.16.2 Bug fixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
12.171.3.102 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
12.17.1 New features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
12.17.2 Bug fixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
12.181.3.82 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
12.18.1 New features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
12.18.2 Bug fixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
12.191.2.135 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
12.19.1 New features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
12.19.2 Bug fixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
12.201.2.91 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
12.20.1 New features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
12.20.2 Bug fixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
12.211.2.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
12.21.1 New features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
12.21.2 Bug fixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
12.221.1.81 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
12.22.1 New features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
12.22.2 Bug fixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
12.231.1.41 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
12.23.1 New features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
12.23.2 Bug fixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

13 Known issue 34
UUU (Universal Update Utility) 1 / 34

1 Introduction

Welcome to the UUU (Universal Update Utility). This is an evolution of MFGTools (aka MFGTools v3).
UUU is Freescale/NXP I.MX Chip image deploy tools.
With the time, the need for an update utility portable to Linux and Windows increased. UUU have the same usage on both
Windows and Linux. It means the same script works on both OS.
UUU is command line tools. look like
uuu (universal update utility) for nxp imx chips -- libuuu-1.0.1-gffd9837

Succues:0 Failure:3 Wait for Known USB Device Appear...

1:11 5/5 [ ] SDP: jump -f u-boot-dtb.imx - ←-


ivtinitramf....
2:1 1/5 [===> ] SDP: boot -f u-boot-imx7dsabresd_sd. ←-
imx ....

UUU design as common library and UI. So user can easily integrate into their tools with uuu library. UUU also easy run in any
scripts.
PDF of wiki content also is available at release page.

1.1 Running environment

• Windows 10, 64bit, early version(below 1.2.0) need install vs2017 redistribute package

• Ubuntu 16.14 or above, 64bit

Windows 7 user please read WIN7-User-Guide

1.2 Typical Usage

Set board boot pin to serial download mode. Generally iMX ROM will fail back to usb serial download mode if boot failure.
Download uboot
uuu bootloader

Burn uboot into emmc


uuu -b emmc bootloader

Burn bootimage into QSPI flash


uuu -b qspi qspi_bootloader

Burn rootfs image into emmc


uuu -b emmc_all bootloader rootfs.sdcard

Decompress rootfs image and burn into emmc (since 1.1.87)


uuu -b emmc_all bootloader rootfs.sdcard.bz2

Decompress rootfs image and burn into emmc without bootloader (since 1.4.146 and after 2021 Q4 yocto image)
UUU (Universal Update Utility) 2 / 34

uuu -b emmc_all rootfs.wic.bz2

Notes: bootloader means bootable image, which included ROM required header. for imx6/7, it should be uboot.imx
generally. for imx8qxp\imx8qm\imx8mm\im8mq, it is flash.bin.
Burn release image into emmc
uuu L4.9.123_2.3.0_8mm-ga.zip

Note: some release combine multi board into one zip package, you need use uuu release.zip/uuu.auto-<boardname>
More usage please refer Example

1.3 Typical Script

uuu’s script is plain text file


**first line must be
uuu_version 1.0.1

version number represent the minimum uuu version that uuu can parse this script.
Then flow uuu commands.
UUU command format as
PROTOCOL: CMD
The below is example to boot uboot for imx6 and imx7.
uuu_version 1.0.1
SDP: dcd -f u-boot.imx
SDP: write -f u-boot.imx -ivt 0
SDP: jump -f u-boot.imx -ivt 0

more sample scripts see Sample-script


The below table environment may be used when write uuu script

Table 1: Table Fastboot environment

Variable Description
fastboot_dev fastboot flash device, support mmc and sata
fastboot_buffer fastboot download buffer adddress
fastboot_bytes fastboot download file size
emmc_dev eMMC device number
sd_dev sd slot device number

1.4 License

uuu is licensed under the BSD license. See LICENSE. The BSD licensed prebuilt Windows binary version of uuu is statically
linked with the LGPL libusb library, which remains LGPL.

• bzip2 (BSD license) is from https://github.com/enthought/bzip2-1.0.6


• zlib (zlib license) is from https://github.com/madler/zlib.git
• libusb (LGPL-2.1) is from https://github.com/libusb/libusb.git
UUU (Universal Update Utility) 3 / 34

1.5 What Firmware Need

What you want Firmware Need


Download bootloader N/A
Burn Image to eMMC/SD uboot with fastboot enable
Burn Image to qspi\spi\nor uboot with fastboot enable
Burn Image into Nand flash uboot(1), linux kernel\initramfs\uboot\dtb
Need linux shell cmd such as fdisk uboot(1), linux kernel\initramfs\uboot\dtb
Boot linux kenrel with rootfs already in eMMC uboot with fastboot enable
Boot Linux kernel with nfs over USB uboot with fastboot enable, initramfs

(1) prefer enable fastboot. If ROM HID support write additional image to DDR place, you can write kernel\dtb\initramfs to ddr
before jump to uboot. Enable fastboot give more flexibility to change kernel command line.

1.6 Setup auto parameter complete

1.6.1 windows

Just power shell support customized auto complete


Powershell: Enjoy auto [tab] command complete by run below command or put into Documents\WindowsPowerShell\Microsoft.PowerSh
Register-ArgumentCompleter -CommandName uuu -ScriptBlock {param($commandName, ←-
$parameterName,$wordToComplete,$commandAst,$fakeBoundParameter); C:\Users\ ←-
nxa23210\uuu\uuu\x64\Release\lib\uuu.exe -autocomplete $parameterName }

1.6.2 linux

Enjoy auto [tab] command complete by put below script into /etc/bash_completion.d/uuu
_uuu_autocomplete()
{
COMPREPLY=($(/home/lizhi/source/mfgtools/uuu/uuu $1 $2 $3))
}
complete -o nospace -F _uuu_autocomplete uuu

1.7 L4.9.123_2.3.0_8MM GA

It is first official BSP release to support uuu For L4.9.123_2.3.0_8MM GA with i.MX8M Mini, see [?]

2 Syntactic

uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.3.191-1-g7010e4e

uuu [-d -m -v -V] <bootloader|cmdlists|cmd>

bootloader download bootloader to board by usb


cmdlist run all commands in cmdlist file
If it is path, search uuu.auto in dir
If it is zip, search uuu.auto in zip
cmd Run one command, use -H see detail
UUU (Universal Update Utility) 4 / 34

example: SDPS: boot -f flash.bin


-d Daemon mode, wait for forever.
-v -V verbose mode, -V enable libusb error\warning info
-dry Dry run mode, check if script or cmd correct
-m USBPATH Only monitor these paths.
-m 1:2 -m 1:3

-t Timeout second for wait known usb device appeared


-pp usb polling period in milliseconds
uuu -s Enter shell mode. uuu.inputlog record all input commands
you can use "uuu uuu.inputlog" next time to run all commands

uuu -udev linux: show udev rule to avoid sudo each time
uuu -lsusb List connected know devices
uuu -h -H show help, -H means detail helps

uuu [-d -m -v] -b[run] <emmc|emmc_all|fat_write|nand|qspi|sd|sd_all|spl> arg...


Run Built-in scripts
emmc burn boot loader to eMMC boot partition
arg0: _flash.bin bootloader
arg1: _image[Optional] image burn to emmc, default is the same as ←-
bootloader
emmc_all burn whole image to eMMC
arg0: _flash.bin
arg1: _rootfs.sdcard
fat_write update one file in fat partition, require uboot fastboot ←-
running in board
arg0: _image image, which cp to fat partition
arg1: _device storage device, mmc\sata
arg2: _filename[Optional] file name in target fat partition, only ←-
support rootdir now
arg3: _partition
nand burn boot loader to NAND flash
arg0: _flash.bin bootloader
arg1: _image[Optional] image burn to nand, default is the same as ←-
bootloader
qspi burn boot loader to qspi nor flash
arg0: _flexspi.bin bootloader
arg1: _image[Optional] image burn to flexspi, default is the same ←-
as bootloader
sd burn boot loader to sd card
arg0: _flash.bin bootloader
arg1: _image[Optional] image burn to emmc, default is the same as ←-
bootloader
sd_all burn whole image to sd card
arg0: _flash.bin
arg1: _rootfs.sdcard
spl boot spl and uboot
arg0: _flash.bin

uuu -bshow <emmc|emmc_all|fat_write|nand|qspi|sd|sd_all|spl>


Show built-in script

Notes: Some board supports super speed (USB3.0). USB 3.0 port path is difference USB 2.0. If use -m to filter port, you need
add USB 3.0 port number otherwise fastboot will not be detected.
UUU (Universal Update Utility) 5 / 34

3 Usage Example

3.1 Basic

3.1.1 Download boot loader for imx6\imx7

uuu uboot.imx

3.1.2 Download boot loader for imx8qxp

uuu flash.bin

3.1.3 Download SPL and uboot, such as imx8mq.

uuu sdp: boot -f flash.bin


uuu sdpu: delay 1000
uuu sdpu: write -f flash.bin -offset 0x57c00
uuu sdpu: jump

3.1.4 Burn Android Image to eMMC

uuu android.zip (not implement default yet)

3.1.5 Burn yocto Image to eMMC

uuu L4.9.123_2.3.0_8mm-ga.zip

3.2 Built-in script

uuu -b emmc bootloader Write bootloader to emmc


uuu -b emmc_all bootloader rootfs.sdcard Write rootfs to emmc
uuu -b emmc_all bootloader rootfs.sdcard.bz2/* Decompress rootfs and write ←-
rootfs to emmc
uuu -b sd bootloader Write bootloader to sd card
uuu -b sd_all bootloader rootfs.sdcard Write rootfs to sd card
uuu -b sd_all bootloader rootfs.sdcard.bz2/* Decompress rootfs and write ←-
rootfs to sd card
uuu -b qspi qspi_bootloader write bootloader to qspi
uuu -b qspi qspi_bootloader m4image write m4image to qpsi
uuu -b spl bootloader Download SPL and uboot

Notes:
Some boards have many sd slot. built-in script only work uboot environment ${ ←-
sd_dev} point to slot
Some boards have not emmc chip, emmc build in script does not work for such boards
UUU (Universal Update Utility) 6 / 34

3.3 multi boards support

3.3.1 For the same boards

uuu -d uuu.auto The same boards connected

3.3.2 For the difference boards

uuu -d -m 1:1 -m 2:1 boardA_uuu.auto monitor port 1:1 and 2:1 for ←-
boardsA.
uuu -d -m 1:3 -m 4:1 boardB_uuu.auto monitor port 1:3 and 4:1 for ←-
boardsB.

Note: please avoid monitor the same port by difference uuu instance, which cause unexpected result.

3.4 Talk with fastboot

3.4.1 boot linux kernel

uuu FB: ucmd setenv fastboot_buffer ${loadaddr}


uuu FB: download -f Image
uuu FB: ucmd setenv fastboot_buffer ${fdt_addr}
uuu FB: download -f imx8qxp_mek.dtb
uuu FB: acmd booti ${loadaddr} - ${fdt_addr}

Notes: Linux/Mac user need add \ before $ to avoid shell replace environment variable.
Extended environment for fastboot
fastboot_buffer Image download address
fastboot_bytes reflect previous download image byte size

3.4.2 write image to emmc

uuu FB: flash -raw2sparse all <image file>

3.5 Talk with linux kenrel, transfer file between board and pc

on board, run \linuxrc&


on pc, uuu fbk:ucp file t:\file

4 Sample scripts

This pages list some examples on scripts to help UUU to make some tasks automatically.
Copy the source code to the file uuu.auto and execute the application executable file.
# Download spl and uboot for imx8mm and imx8mq
UUU (Universal Update Utility) 7 / 34

uuu_version 1.2.39

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


SDP: boot -f _flash.bin

# This command will be run when ROM support stream mode


# i.MX8QXP, i.MX8QM
SDPS: boot -f _flash.bin

# 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 _flash.bin -offset 0x57c00
SDPU: jump
SDPU: done
# }

# 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 _flash.bin -skipspl
SDPV: jump
SDPV: done
# }

# Burn bootloader to eMMC boot partition


uuu_version 1.2.39

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


SDP: boot -f _flash.bin

# This command will be run when ROM support stream mode


# i.MX8QXP, i.MX8QM
SDPS: boot -f _flash.bin

# 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 _flash.bin -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 _flash.bin -skipspl
SDPV: jump
# }

FB: ucmd setenv fastboot_dev mmc


FB: ucmd setenv mmcdev ${emmc_dev}
FB: ucmd mmc dev ${emmc_dev}
UUU (Universal Update Utility) 8 / 34

FB: flash bootloader _flash.bin


FB: ucmd mmc partconf ${emmc_dev} 0 1 0
FB: Done

## Burn android to eMMC


uuu_version 1.2.39

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


SDP: boot -f _flash.bin

# This command will be run when ROM support stream mode


# i.MX8QXP, i.MX8QM
SDPS: boot -f _flash.bin

# 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 _flash.bin -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 _flash.bin -skipspl
SDPV: jump
# }

FB: ucmd setenv fastboot_dev mmc


FB: ucmd setenv mmcdev ${emmc_dev}
FB: ucmd mmc dev ${emmc_dev}
FB: flash gpt partition-table.img
FB: flash boot_a boot-imx8qxp.img
FB: flash system_a system.img
FB: flash vendor_a vendor.img
FB: flash vbmeta_a vbmeta-imx8qxp.img
#FB: ucmd setenv fastboot_buffer ${loadaddr}
#FB: download -f u-boot-imx8qxp.imx
#FB: ucmd setexpr fastboot_blk ${fastboot_bytes}
#FB: ucmd setexpr fastboot_blk ${fastboot_blk} + 0x1FF
#FB: ucmd setexpr fastboot_blk ${fastboot_blk} / 0x200
#FB: ucmd mmc partconf ${emmc_dev} 1 1 1
#FB: ucmd echo ${fastboot_buffer}
#FB: ucmd echo ${fastboot_blk}
#FB: ucmd mmc write ${fastboot_buffer} 0x40 ${fastboot_blk}
FB: flash bootloader u-boot-imx8qxp.imx
FB: ucmd mmc partconf ${emmc_dev} 0 1 0
FB: Done

## Burn yocto image to eMMC by linux kernel


uuu_version 1.2.39

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


UUU (Universal Update Utility) 9 / 34

SDP: boot -f _flash.bin

# This command will be run when ROM support stream mode


# i.MX8QXP, i.MX8QM
SDPS: boot -f _flash.bin

# 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 _flash.bin -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 _flash.bin -skipspl
SDPV: jump
# }

FB: ucmd setenv fastboot_buffer ${loadaddr}


FB: download -f _Image
FB: ucmd setenv fastboot_buffer ${fdt_addr}
FB: download -f _board.dtb
FB: ucmd setenv fastboot_buffer ${initrd_addr}
FB: download -f _initramfs.cpio.gz.uboot
FB: ucmd setenv mfgtool_args ${mfgtool_args} mfg_mmcdev=${emmc_dev}
FB: ucmd run mfgtool_args
FB: acmd booti ${loadaddr} ${initrd_addr} ${fdt_addr}

# get mmc dev number from kernel command line


FBK: ucmd cmdline= `cat /proc/cmdline`;cmdline=${cmdline#*mfg_mmcdev=};cmds=( ←-
$cmdline);echo ${cmds[0]}>/tmp/mmcdev
# Wait for mmc
FBK: ucmd mmc= `cat /tmp/mmcdev`; while [ ! -e /dev/mmcblk${mmc} ]; do sleep 1; ←-
echo "wait for /dev/mmcblk${mmc} appear"; done;
# create partition
FBK: ucmd mmc= `cat /tmp/mmcdev`; PARTSTR=$'10M,500M,0c\n600M,,83\n'; echo " ←-
$PARTSTR" | sfdisk --force /dev/mmcblk${mmc}

FBK: ucmd mmc= `cat /tmp/mmcdev`; dd if=/dev/zero of=/dev/mmcblk${mmc} bs=1k seek ←-


=4096 count=1
FBK: ucmd sync
FBK: ucmd mmc= `cat /tmp/mmcdev`; echo 0 > /sys/block/mmcblk${mmc}boot0/force_ro
FBK: ucp _flash.bin t:/tmp
FBK: ucmd mmc= `cat /tmp/mmcdev`; dd if=/tmp/_flash.bin of=/dev/mmc${mmc}boot0 bs=1 ←-
K seek=32
FBK: ucmd mmc= `cat /tmp/mmcdev`; echo 1 > /sys/block/mmcblk${mmc}boot0/force_ro
FBK: ucmd mmc= `cat /tmp/mmcdev`; while [ ! -e /dev/mmcblk${mmc}p1 ]; do sleep 1; ←-
done
FBK: ucmd mmc= `cat /tmp/mmcdev`; mkfs.vfat /dev/mmcblk${mmc}p1
FBK: ucmd mmc= `cat /tmp/mmcdev`; mkdir -p /mnt/fat
FBK: ucmd mmc= `cat /tmp/mmcdev`; mount -t vfat /dev/mmcblk${mmc}p1 /mnt/fat
FBK: ucp _Image t:/mnt/fat
FBK: ucp _board.dtb t:/mnt/fat
UUU (Universal Update Utility) 10 / 34

FBK: ucmd umount /mnt/fat


FBK: ucmd mmc= `cat /tmp/mmcdev`; mkfs.ext3 -F -E nodiscard /dev/mmcblk${mmc}p2
FBK: ucmd mkdir -p /mnt/ext3
FBK: ucmd mmc= `cat /tmp/mmcdev`; mount /dev/mmcblk${mmc}p2 /mnt/ext3
FBK: acmd export EXTRACT_UNSAFE_SYMLINKS=1; tar -jx -C /mnt/ext3
FBK: ucp _rootfs.tar.bz2 t:-
FBK: Sync
FBK: ucmd umount /mnt/ext3
FBK: DONE

## Burn NAND flash by linux kernel


uuu_version 1.2.39

# Please replace below item with actual name


# @_flash_fw.bin | boot loader firmware, for i.MX8QM/QX, it's ←-
different from _flash.bin, for all other platforms, it's same as _flash.bin
# @_flash.bin | boot loader file burn to NAND
# @_Image | linux kernel image, zImage for arm32, Image for ←-
arm64
# @_board.dtb | board dtb file
# @_initramfs.cpio.gz.uboot | initramfs
# @_tee | optee image
# @_rootfs.tar.bz2 | rootfs

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


SDP: boot -f _flash_fw.bin

# This command will be run when ROM support stream mode


# i.MX8QXP, i.MX8QM
SDPS: boot -f _flash_fw.bin

# 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 _flash_fw.bin -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 _flash_fw.bin -skipspl
SDPV: jump
# }

FB: ucmd setenv fastboot_buffer ${loadaddr}


FB: download -f _Image
FB: ucmd setenv fastboot_buffer ${fdt_addr}
FB: download -f _board.dtb
FB: ucmd setenv fastboot_buffer ${initrd_addr}
FB: download -f _initramfs.cpio.gz.uboot
FB: ucmd setenv bootargs ${bootargs} ${mtdparts}
#FB: ucmd setenv bootargs console=ttymxc3,115200 ${mtdparts}
UUU (Universal Update Utility) 11 / 34

FB: acmd ${kboot} ${loadaddr} ${initrd_addr} ${fdt_addr}

FBK: ucmd cat /proc/mtd


FBK: ucmd cat /proc/mtd | while read dev size erase name; do mtd=${dev:3}; mtd=${ ←-
mtd%:}; name=${name%\"}; name=${name#\"}; echo export $name=$mtd >> /tmp/mtd.sh ←-
; done;

FBK: ucmd chmod 777 /tmp/mtd.sh


FBK: ucmd mount -t debugfs debugfs /sys/kernel/debug

# write boot loader


FBK: ucmd source /tmp/mtd.sh; flash_erase /dev/mtd${nandboot} 0 0
FBK: ucp _flash.bin t:/tmp/boot
FBK: ucmd source /tmp/mtd.sh; cd /tmp; if ! [[ `cat /sys/devices/soc0/soc_id ` = *" ←-
MX8Q"* ]]; then pad="-x"; fi; kobs-ng init $pad -v --chip_0_device_path=/dev/ ←-
mtd${nandboot} /tmp/boot

# burn FIT
FBK: ucmd if [[ `cat /tmp/mtd.sh ` = *"nandfit"* ]]; then source /tmp/mtd.sh; ←-
flash_erase /dev/mtd${nandfit} 0 0; dd if=/tmp/boot of=/tmp/fit; nandwrite -p / ←-
dev/mtd${nandfit} -p /tmp/fit; fi

# burn kernel
FBK: ucmd source /tmp/mtd.sh; flash_erase /dev/mtd${nandkernel} 0 0
FBK: ucp _Image t:/tmp/img
FBK: ucmd source /tmp/mtd.sh; nandwrite -p /dev/mtd${nandkernel} -p /tmp/img

# burn dtb
FBK: ucmd source /tmp/mtd.sh; flash_erase /dev/mtd${nanddtb} 0 0
FBK: ucp _board.dtb t:/tmp/dtb
FBK: ucmd source /tmp/mtd.sh; nandwrite -p /dev/mtd${nanddtb} -p /tmp/dtb

# burn uTee
FBK: ucmd source /tmp/mtd.sh; flash_erase /dev/mtd${nandtee} 0 0
FBK: ucp _tee t:/tmp/tee
FBK: ucmd source /tmp/mtd.sh; nandwrite -p /dev/mtd${nandtee} -p /tmp/tee

# burn rootfs
FBK: ucmd source /tmp/mtd.sh; flash_erase /dev/mtd${nandrootfs} 0 0
FBK: ucmd source /tmp/mtd.sh; ubiattach /dev/ubi_ctrl -m ${nandrootfs}
FBK: ucmd source /tmp/mtd.sh; ubimkvol /dev/ubi0 -Nnandrootfs -m
FBK: ucmd source /tmp/mtd.sh; mkdir -p /mnt/mtd
FBK: ucmd source /tmp/mtd.sh; mount -t ubifs ubi0:nandrootfs /mnt/mtd
FBK: acmd export EXTRACT_UNSAFE_SYMLINKS=1; tar -jx -C /mnt/mtd
FBK: ucp _rootfs.tar.bz2 t:-
FBK: sync
FBK: ucmd umount /mnt/mtd

FBK: done

## Download kernel and mount nfs by usb ncm


uuu_version 1.2.39

# Please replace below item with actual name


# @_flash.bin | boot loader
# @_Image | linux kernel image, zImage for arm32, Image for ←-
UUU (Universal Update Utility) 12 / 34

arm64
# @_board.dtb | board dtb file
# @_initramfs.cpio.gz.uboot | initramfs
# @_nfspath | rootfs path without ip address, ip address will ←-
auto detect

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


SDP: boot -f _flash.bin

# This command will be run when ROM support stream mode


# i.MX8QXP, i.MX8QM
SDPS: boot -f _flash.bin

# 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 _flash.bin -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 _flash.bin -skipspl
SDPV: jump
# }

FB: ucmd setenv fastboot_buffer ${loadaddr}


FB: download -f _Image
FB: ucmd setenv fastboot_buffer ${fdt_addr}
FB: download -f _board.dtb
FB: ucmd setenv fastboot_buffer ${initrd_addr}
FB: download -f _initramfs.cpio.gz.uboot
FB: ucmd setenv nfsroot _nfspath
FB: ucmd setenv bootargs console=${console},${baudrate} nfsroot=${nfsroot} init=/ ←-
linuxrc root=/dev/nfs
#uncomment below line to stop at initramfs
#FB: ucmd setenv bootargs console=${console},${baudrate} nfsroot=${nfsroot}
FB: acmd ${kboot} ${loadaddr} ${initrd_addr} ${fdt_addr}
FB: done

5 Supported protocol

UUU is scripted base multi protocol system.


Built in config:
Pctl Chip Vid Pid BcdVersion
==================================================
SDPS: MX8QXP 0x1fc9 0x012f [0x0002..0xffff]
SDPS: MX8QM 0x1fc9 0x0129 [0x0002..0xffff]
SDPS: MX8DXL 0x1fc9 0x0147
SDPS: MX28 0x15a2 0x004f
UUU (Universal Update Utility) 13 / 34

SDPS: MX815 0x1fc9 0x013e


SDPS: MX865 0x1fc9 0x0146
SDPS: MX8ULP 0x1fc9 0x014a
SDPS: MX8ULP 0x1fc9 0x014b
SDPS: MX93 0x1fc9 0x014e
SDP: MX7D 0x15a2 0x0076
SDP: MX6Q 0x15a2 0x0054
SDP: MX6D 0x15a2 0x0061
SDP: MX6SL 0x15a2 0x0063
SDP: MX6SX 0x15a2 0x0071
SDP: MX6UL 0x15a2 0x007d
SDP: MX6ULL 0x15a2 0x0080
SDP: MX6SLL 0x1fc9 0x0128
SDP: MX7ULP 0x1fc9 0x0126
SDP: MXRT106X 0x1fc9 0x0135
SDP: MX8MM 0x1fc9 0x0134
SDP: MX8MQ 0x1fc9 0x012b
SDPU: SPL 0x0525 0xb4a4 [0x0000..0x04ff]
SDPV: SPL1 0x0525 0xb4a4 [0x0500..0x9998]
SDPV: SPL1 0x1fc9 0x0151 [0x0500..0x9998]
SDPU: SPL 0x0525 0xb4a4 [0x9999..0x9999]
SDPU: SPL 0x3016 0x1001 [0x0000..0x04ff]
SDPV: SPL1 0x3016 0x1001 [0x0500..0x9998]
FBK: 0x066f 0x9afe
FBK: 0x066f 0x9bff
FBK: 0x1fc9 0x0153
FB: 0x0525 0xa4a5
FB: 0x18d1 0x0d02
FB: 0x3016 0x0001
FB: 0x1fc9 0x0152

Table 2: Table UUU Protocol to USB lower level Map

UUU Protocol USB Low level transfer


SDP HID i.MX6/7, i.MX8 MM, i.MX8M
SDPU\SDPV HID uboot implement of SDP, SPL download uboot
SDPS HID i.MX8QXP i.MX8QM
FB winusb (windows), raw transfer by libusb
FBK winusb (windows), raw transfer by libusb

5.1 SDP: i.MX6/7 ROM download protocol

5.1.1 Supported command:

Run DCD from image with ivt header


dcd -f <filename>

write image to address.


write -f <filename> [-addr 0x000000] [-ivt 0]

ivt 0 means write to the address, which ivt pointer


jump to image with ivt header
UUU (Universal Update Utility) 14 / 34

jump -f <filename> [-ivt 0]

boot image, include (dcd, write and jump three commands)


boot -f <filename> [-nojump]

5.2 HABv4 closed chip support

For boot images not including a DCD table the same image used for SDCard/eMMC boot can be used with UUU tool.
For boot images including a DCD table, the DCD is loaded in OCRAM and must be properly signed.
Since U-Boot v2017.01 a build log containing the U-Boot and DCD addresses and lengths is available just after building U-Boot:
$ cat u-boot-dtb.imx.log
Image Type: Freescale IMX Boot Image
Image Ver: 2 (i.MX53/6/7 compatible)
Mode: DCD
Data Size: 602112 Bytes = 588.00 KiB = 0.57 MiB
Load Address: 877ff420
Entry Point: 87800000
HAB Blocks: 877ff400 00000000 0008ec00
DCD Blocks: 00910000 0000002c 000001c4

Users can copy the information above to create their CSF Authenticate Data command:
Block = 0x877ff400 0x00000000 0x0006DC00 "u-boot-dtb.imx", \
0x00910000 0x0000002c 0x000001c4 "u-boot-dtb.imx"

Alternatively users can also extract the DCD length from the DCD table header:
$ od -x -j 0x2c -N 4 --endian=big u-boot-dtb.imx
0000054 d201 c440
0000060
DCD Header: 0xd2, DCD Length: 0x01c4, DCD Version: 0x40

For the i.MX devices not supporting the skip DCD command (i.MX6Dual/Quad and i.MX6Sololite) the pointer to the DCD table
is cleared in the IVT in order to prevent the HAB library from processing the DCD table again during the authentication process.
There is no need to re-initialize memory when it already contains valid data.
Since the IVT is modified when downloading to the target the binary must be signed with a cleared DCD pointer. However, the
binary must be provided with a valid DCD pointer to allow the UUU tool to locate the DCD table.
The following script can be used to used to handle the DCD pointer:
#!/bin/bash
# DCD address must be cleared for signature, as UUU will clear it.
if [ "$1" == "clear_dcd_addr" ]; then
# store the DCD address
dd if=$2 of=dcd_addr.bin bs=1 count=4 skip=12
# generate a NULL address for the DCD
dd if=/dev/zero of=zero.bin bs=1 count=4
# replace the DCD address with the NULL address
dd if=zero.bin of=$2 seek=12 bs=1 conv=notrunc
fi
# DCD address must be set for mfgtool to localize the DCD table.
if [ "$1" == "set_dcd_addr" ]; then
# restore the DCD address with the original address dd
UUU (Universal Update Utility) 15 / 34

if=dcd_addr.bin of=$2 seek=12 bs=1 conv=notrunc


rm zero.bin
fi

The steps below can be used as an example:


$ ./mod_4_mfgtool.sh clear_dcd_addr u-boot-dtb.imx
$ ./cst --i u-boot-csf.txt --o u-boot-csf.bin
$ ./mod_4_mfgtool.sh set_dcd_addr u-boot-dtb.imx

For the i.MX devices supporting the skip DCD command (i.MX7D, i.MX6UL/ULL, i.MX8MQ and i.MX7ULP), there is no
need to do any modification, UUU tool can download the binary directly.
NOTICE: For i.MX7D only, due to an erratum, the UUU download DCD address (0x00911000) is not aligned with the DCD
address in u-boot (0x00910000), there are two options:

• use the command to specify the DCD address, uuu boot -f u-boot-signed.imx -dcdaddr 0x00911000
• change the csf DCD address when signing the u-boot: Blocks = 0x00911000 0x0000002c 0x000001c4 "u-boot-dtb.imx

5.3 SDPU\SDPV: uboot implement simplified ROM SDP protocol

Uboot implemented i.MX 6/7 ROM SDP protocol. The support command the same as SDP.
SDPV is upgrade version of SDPU, which support -skipspl option for write command
See below for uboot requirement uboot-config-requirement

5.4 SDPS: i.MX8QXP and i.MX8QM ROM download protocol

send image by sdp command.


boot -f <filename> [-offset 0x0000]

5.5 FB: Android fastboot protocol

refer fast boot protocol


See below for uboot requirement

5.5.1 Support command:

getvar
ucmd <any uboot command>
acmd <any never returned uboot command, like booti, reboot>

# partition "all" means whole device.


flash [-raw2sparse] <partition> <filename>
download -f <filename>
crc -f <filename> [-format "mmc read $loadaddr"]
[-blksz 512][ -crcblock 0x4000000]
[-seek 0] [-skip 0] [-nostop]
seek skip block number from storage
skip skips byte from -f
nostop continue check even if found mismatch
UUU (Universal Update Utility) 16 / 34

**Some Uboot command need long time to finish. Default FB timeout is 2s. You can use below method to change timeout value
# time out set to 10000ms
FB[-t 10000]: ucmd <any uboot command>

Table 3: Table Fastboot environment

Variable Description
fastboot_dev fastboot flash device, support mmc and sata
fastboot_buffer fastboot download buffer adddress
fastboot_bytes\filesize fastboot download file size, new uboot provide filesize
environment
emmc_dev eMMC device number
sd_dev sd slot device number

5.6 FBK: Android fastboot protocol, implement at initramfs. See project imx-uuc

5.6.1 Support command:

ucmd <any kernel command> and wait for command finish


acmd <any kernel command> don't wait for command finish
sync wait for acmlid processs finish.
ucp <soure> <destinate> copy file from/to target
T:<filename> means target board file.
T:- means copy data to target's stdio pipe.
copy image T:/root/image ;download image to path /root/ ←-
image
copy T:/root/image image ;upload /root/image to file ←-
image......

Example for transfer big file


acmd tar - ; run tar background and get data from stdio
ucp rootfs.tar.gz T:- ; send to target stdio pipe
sync ; wait for tar process exit.

Linux environment:
Each command in separate process so environment can not be affect next command. Use below method to workaround this
problem.
FBK: ucmd source /tmp/mtd.sh; flash_erase /dev/mtd${nandrootfs} 0 0

5.7 Common command for all protocol

Table 4: Table Common command for all protocol

Command Description
Done last command for finish whole flow.
Delay Busy wait for millisecond
SH/SHELL run external command
UUU (Universal Update Utility) 17 / 34

Table 4: (continued)

< stdout as command, such as "< echo ucmd print", which


generally used for burn serial number
@ using environment variable, such as "FBK:@ ucmd echo
@MSG@" MSG will be replace by OS’s environment
variable.
error show error message and exit
if basic logic check, such as SDPS: if @chip@ == mx8qm
then boot -f flash.bin. Only support == and !=. only
support one logic check

6 Migration from mfgtool ucl2.xml

**Most case user can use uboot fastboot protocol to finish image program work.
In case you have to load kernel to burn whole image.
The below simple map ucl2.xml to uuu script.

ucl2.xml uuu
<CMD state="BootStrap" type="boot" body="BootStrap" SDPS: boot -f flash.bin
file ="firmware/flash.bin" ifdev="MX8QXPB0">Loading
boot image</CMD>
<CMD state="BootStrap" type="boot" body="BootStrap" SDPS: boot -f flash.bin
file ="firmware/flash.bin" ifdev="MX8QXPB0">Loading
boot image</CMD>
<CMD state="BootStrap" type="boot" body="BootStrap" SDP: boot -f flash.bin SDP: boot -f flash.bin
file ="firmware/flash.bin" ifdev="MX8MM">Loading SDPU: write -f flash.bin -offset 0x57c00
U-boot</CMD> SDPU: jump
<CMD state="BootStrap" type="load" FB: ucmd download -f Image
file="firmware/Image" address="0x80280000"
loadSection="OTH" setSection="OTH"
HasFlashHeader="FALSE" ifdev="MX8QXP
MX8QM">Loading Kernel.</CMD>
<CMD state="BootStrap" type="load" FB: ucmd download -f initramfs.cpio.gz.uboot
file="firmware/initramfs.cpio.gz.uboot"
address="0x83800000" loadSection="OTH"
setSection="OTH" HasFlashHeader="FALSE"
ifdev="MX8QM MX8QXP">Loading Initramfs.</CMD>
<CMD state="BootStrap" type="load" FB: ucmd download -f fsl-imx8qxp.dtb
file="firmware/fsl-imx8qxp.dtb" address="0x83000000"
loadSection="OTH" setSection="OTH"
HasFlashHeader="FALSE" ifdev="MX8QXP">Loading
device tree.</CMD>
<CMD state="BootStrap" type="jump" > Jumping to OS
image. </CMD>
<!-- create partition -→ <CMD state="Updater" FBK: ucp mksdcard.sh.tar t:/tmp
type="push" body="send" file="mksdcard.sh.tar">Sending
partition shell</CMD>
<CMD state="Updater" type="push" body="$ tar xf $FILE FBK: ucmd tar xf /tmp/mksdcard.sh.tar -d /tmp
"> Partitioning. . . </CMD>
UUU (Universal Update Utility) 18 / 34

<CMD state="Updater" type="push" body="$ sh FBK: ucmd mksdcard.sh /dev/mmcblk0mmc


mksdcard.sh /dev/mmcblk%mmc%">
Partitioning. . . </CMD>
<!-- burn uboot -→ <CMD state="Updater" type="push" FBK: ucp imx-boot-imx8qxp-sd.bin t:/tmp
body="send" file="files/imx-boot-imx8qxp-sd.bin"
ifdev="MX8QXPB0">Sending u-boot.bin</CMD>
<CMD state="Updater" type="push" body="$ dd FBK: ucmd dd if=/dev/zero of=/dev/mmcblk0 bs=1k
if=/dev/zero of=/dev/mmcblk0 bs=1k seek=4096 seek=4096 conv=fsync count=8
conv=fsync count=8">clear u-boot arg</CMD>
<CMD state="Updater" type="push" body="$ dd if=$FILE FBK: ucmd dd if=/tmp/imx-boot-imx8qxp-sd.bin
of=/dev/mmcblk0 bs=1k seek=33 conv=fsync" of=/dev/mmcblk0 bs=1k seek=33 conv=fsync
ifdev="MX8QM MX8QXP MX8MQ">write u-boot.bin to
sd card</CMD>
<CMD state="Updater" type="push" body="$ while [ ! -e FBK: ucmd while [ ! -e /dev/mmcblk%mmc%p1 ]; do
/dev/mmcblk0p1 ]; do sleep 1; echo waiting. . . ; done sleep 1; echo waiting. . . ; done
">Waiting for the partition ready</CMD>
<CMD state="Updater" type="push" body="$ mkfs.vfat FBK: ucmd mkfs.vfat /dev/mmcblk0p1
/dev/mmcblk0p1">Formatting rootfs partition</CMD>
<CMD state="Updater" type="push" body="$ mkdir -p FBK: ucmd mkdir -p /mnt/mmcblk0p1
/mnt/mmcblk0p1"/>
<CMD state="Updater" type="push" body="$ mount -t FBK: ucmd vfat /dev/mmcblk0p1 /mnt/mmcblk0p1
vfat /dev/mmcblk0p1 /mnt/mmcblk0p1"/>
<!-- burn zImage -→ <CMD state="Updater" type="push" FBK: ucp Image t:/tmp
body="send" file="files/Image">Sending kernel</CMD>
<CMD state="Updater" type="push" body="$ cp $FILE FBK: ucmd /tmp/Image /mnt/mmcblk0p1/Image
/mnt/mmcblk0p1/Image">write kernel image to sd
card</CMD>
<!-- burn dtb -→ <CMD state="Updater" type="push" FBK: ucp fsl-imx8qxp.dtb /tmp
body="send" file="files/fsl-imx8qxp.dtb"
ifdev="MX8QXP MX8QXPB0">Sending Device Tree
file</CMD>
<CMD state="Updater" type="push" body="$ cp $FILE FBK: ucmd cp /tmp/fsl-imx8qxp.dtb /mnt/mmcblk0p1/
/mnt/mmcblk0p1/fsl-imx8qm.dtb" ifdev="MX8QM">write
device tree to sd card</CMD>
<CMD state="Updater" type="push" body="$ umount FBK: ucmd umount /mnt/mmcblk0p1
/mnt/mmcblk0p1">Unmounting vfat partition</CMD>
<!-- burn rootfs -→ <CMD state="Updater" type="push" FBK: ucmd mkfs.ext3 -F -j /dev/mmcblk0p2
body="$ mkfs.ext3 -F -j /dev/mmcblk0p2">Formatting
rootfs partition</CMD>
<!-- burn rootfs -→ <CMD state="Updater" type="push" FBK: ucmd mkfs.ext3 -F -j /dev/mmcblk0p2
body="$ mkfs.ext3 -F -j /dev/mmcblk0p2">Formatting
rootfs partition</CMD>
<CMD state="Updater" type="push" body="$ mkdir -p FBK: ucmd mkdir -p /mnt/mmcblk0p2
/mnt/mmcblk0p2"/>
<CMD state="Updater" type="push" body="$ mount -t FBK: ucmd mount -t ext3 /dev/mmcblk0p2
ext3 /dev/mmcblk0p2 /mnt/mmcblk0p2"/> /mnt/mmcblk0p2
<CMD state="Updater" type="push" body="pipe tar -jxv FBK: acmd tar -jxv -C /mnt/mmcblk0p2
-C /mnt/mmcblk0p2" file="files/rootfs.tar.bz2">Sending FBK: ucp rootfs.tar.bz2 t:-
and writting rootfs</CMD>
<CMD state="Updater" type="push" body="frf">Finishing FBK: sync
rootfs write</CMD>
<CMD state="Updater" type="push" body="$ umount FBK: ucmd umount /mnt/mmcblk0p2
/mnt/mmcblk0p2">Unmounting rootfs partition</CMD>
<CMD state="Updater" type="push" body="$ echo Update done
Complete!">Done</CMD>
UUU (Universal Update Utility) 19 / 34

7 Win 7 User Guide

Win7 user may face some additional one time setup work because original win7 missed a updated .inf file

7.1 Back Ground

Win7 ships with correct winusb.sys file. but is missing an updated .inf that associates with "usb\ms_comp_winusb" devices.
Normally if the USB device supports Microsoft OS descriptors, then it will allow Windows to automatically install the WinUSB
driver. This mechanism is supported "in-box" for Win8 and newer. For Win7 the mechanism is supported through Windows
update. Depending on the update policy for the Win7 machine, the appropriate driver may or may not be already available on the
machine. If it is not already on the machine, user can use the following manual procedure to install the driver if necessary. (copy
from https://www.silabs.com/community/interface/knowledge-base.entry.html/2017/02/06/manually_installwin-A2Jj")
Some windows update also included updated .inf file. You can try run uuu to see what happen. If windows report "can’t install
driver", that means your system missed such update file.

7.2 Install updated winusb inf file

• Download package
• unzip
• run install.bat as administrator permission.

• The below screen show install success


UUU (Universal Update Utility) 20 / 34

Notes:
4.9.123 8MM GA and 4.14 beta release missed a patch. Please apply below patch in uboot

7.3 Use zadig to install winusb driver

Please make sure you success download uboot and uboot auto launch fastboot command. windows find Usb download device,
NOT SE Blank
If still fail install winusb driver you can try below method. you can try download zadig from https://zadig.akeo.ie/
Choose USB download device and click install.

If you already apply patch and still see WCID is red "x", please submit issue.
Notes:
"SE Blank xx" is ROM HID device. PLEASE DON’T CHOOSE IT TO WINUSB. libusb can work well with HID device. Only
"Usb download device" need check

8 FAQ

• Win7 can’t found driver

– Need install winusb driver, you can use https://zadig.akeo.ie/ to install winusb driver
– see page WIN7-User-Guide
• Linux: Open device failure
sudo uuu xxx

• Some iMX8mm(845) chip failure write at linux system


Need apply ROM patch, contact FAE to get it.

• How to use absolute path in scripts


UUU (Universal Update Utility) 21 / 34

Default all paths in script is related uuu scripts. if you want to use absolute ←-
path in scripts

Add ">" in path like

>/home/xxx

• uuu exit silence or report missed dll


Please upgrade to 1.2.x

• How to avoid sudo in linux


Put below context into /etc/udev/rules.d/99-uuu.rules (need sudo)

SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="012f", MODE="0666"


SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0129", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="0076", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="0054", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="0061", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="0063", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="0071", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="007d", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="0080", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0128", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0126", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0135", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0134", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="012b", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0525", ATTRS{idProduct}=="b4a4", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0525", ATTRS{idProduct}=="a4a5", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="066F", ATTRS{idProduct}=="9BFF", MODE="0666"

run sudo udevadm control --reload-rules


uuu -udev can show above help.

• How to get file in zip without decompress


Assume there are file name uuu.auto in A.zip file.

A.zip/uuu.auto

for example:

uuu A.zip/uuu.auto

• How to send out uncompress bz2


Added /* after bz2 file

for example
UUU (Universal Update Utility) 22 / 34

uuu -b emmc_all <bootloader> sdcard.bz2/*

• Boot fail after burn > 4G Image


uboot need below patch

diff --git a/common/image-sparse.c b/common/image-sparse.c


index ddf5772..86ff5a0 100644
--- a/common/image-sparse.c
+++ b/common/image-sparse.c
@@ -59,7 +59,7 @@ void write_sparse_image(
uint32_t bytes_written = 0;
unsigned int chunk;
unsigned int offset;
- unsigned int chunk_data_sz;
+ uint64_t chunk_data_sz;
uint32_t *fill_buf = NULL;
uint32_t fill_val;
sparse_header_t *sparse_header;
@@ -130,7 +130,7 @@ void write_sparse_image(
sizeof(chunk_header_t));
}

- chunk_data_sz = sparse_header->blk_sz * chunk_header-> ←-


chunk_sz;
+ chunk_data_sz = (uint64_t)sparse_header->blk_sz * (uint64_t) ←-
chunk_header->chunk_sz;
blkcnt = chunk_data_sz / info->blksz;
switch (chunk_header->chunk_type) {
case CHUNK_TYPE_RAW:

• WCID failure load

Apply below uboot patch


diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
index ae8fe80..cd46ca4 100644
--- a/drivers/usb/gadget/f_fastboot.c
+++ b/drivers/usb/gadget/f_fastboot.c
@@ -2543,10 +2543,10 @@ static int fastboot_bind(struct usb_configuration *c, ←-
struct usb_function *f)
f->os_desc_table->if_id = id;
INIT_LIST_HEAD(&fb_os_desc.ext_prop);
fb_ext_prop.name_len = strlen(fb_ext_prop.name) * 2 + 2;
- fb_os_desc.ext_prop_len = 14 + fb_ext_prop.name_len;
+ fb_os_desc.ext_prop_len = 10 + fb_ext_prop.name_len;
fb_os_desc.ext_prop_count = 1;
- fb_ext_prop.data_len = strlen(fb_ext_prop.data);
- fb_os_desc.ext_prop_len += fb_ext_prop.data_len;
+ fb_ext_prop.data_len = strlen(fb_ext_prop.data) * 2 + 2;
+ fb_os_desc.ext_prop_len += fb_ext_prop.data_len + 4;
list_add_tail(&fb_ext_prop.entry, &fb_os_desc.ext_prop);

id = usb_string_id(c->cdev);
UUU (Universal Update Utility) 23 / 34

• out of memory at 64bit system

If use bz2 or zip file, it is possible out of memory. Please increase swap partition size in linux. increase virtual memory size in
windows.

• How to write emmc to second boot partition

FB: ucmd setenv fastboot_dev mmc


FB: ucmd setenv mmcdev $emmc_dev

FB: ucmd echo flashing first parttion

FB: ucmd setenv fastboot_buffer $loadaddr


FB: download -f imx-boot.bin
FB: ucmd setexpr fastboot_blk $fastboot_bytes
FB: ucmd setexpr fastboot_blk $fastboot_blk + 0x1FF
FB: ucmd setexpr fastboot_blk $fastboot_blk / 0x200
FB: ucmd mmc dev $emmc_dev 1
FB: ucmd echo fastboot_buffer: $fastboot_buffer
FB: ucmd echo fastboot_blk: $fastboot_blk
FB: ucmd mmc write $fastboot_buffer 0 $fastboot_blk

FB: ucmd echo flashing second parttion

FB: download -f imx-boot-ALTERNATE.bin


FB: ucmd setexpr fastboot_blk $fastboot_bytes
FB: ucmd setexpr fastboot_blk $fastboot_blk + 0x1FF
FB: ucmd setexpr fastboot_blk $fastboot_blk / 0x200
FB: ucmd mmc dev $emmc_dev 2
FB: ucmd mmc write $fastboot_buffer 0 $fastboot_blk

FB: ucmd mmc partconf $emmc_dev 1 1 0

FB: Done

• How to use uuu in docker

libusb need udev event to get new devices appeared.


Added option
docker run --net=host -v /run/udev/control:/run/udev/control
https://stackoverflow.com/questions/49687378/how-to-get-hosts-udev-events-from-a-docker-container

• How to use uuu in virtual machine

– Map HID device into virtual machine


UUU (Universal Update Utility) 24 / 34

• Map fastboot device into virtual machine after uboot boot

• You can use uuu burn image in virtual machine


UUU (Universal Update Utility) 25 / 34

9 Build Steps

9.1 windows

• download visual studio 2017 community version (free)


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

• cd mfgtools
• git submodule init
• git submodule update
• open msvs/uuu.sln by vs2017

• click build

9.2 linux

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


• cd mfgtools
• sudo apt-get install libusb-1.0.0-dev libzip-dev libbz2-dev

• cmake .
• make

10 Uboot config requirement

To talk with uuu, uboot need enable fastboot. fastboot need auto run when detect boot from USB.
CONFIG_CMD_FASTBOOT=y
CONFIG_USB_FUNCTION_FASTBOOT=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_DOWNLOAD=y
CONFIG_USB_GADGET_MANUFACTURER="FSL"
CONFIG_USB_GADGET_VENDOR_NUM=0x0525
CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
CONFIG_CI_UDC=y # UDC need change according system, ←-
some system use CONFIG_USB_DWC3, some use CONFIG_USB_CDNS3
CONFIG_FSL_FASTBOOT=y
CONFIG_FASTBOOT=y
CONFIG_FASTBOOT_BUF_ADDR=0x83800000 # Address need change according ←-
system, generally it can be the same as ${LOADADDR}
CONFIG_FASTBOOT_BUF_SIZE=0x40000000
CONFIG_FASTBOOT_FLASH=y
CONFIG_FASTBOOT_FLASH_MMC_DEV=1
CONFIG_EFI_PARTITION=y
CONFIG_ANDROID_BOOT_IMAGE=y

If use SPL, SDP need be enabled.


UUU (Universal Update Utility) 26 / 34

CONFIG_SPL_USB_HOST_SUPPORT=y
CONFIG_SPL_USB_GADGET_SUPPORT=y
CONFIG_SPL_USB_SDP_SUPPORT=y
CONFIG_SDP_LOADADDR=0x40400000 # Address need change according ←-
system, choose free memory

uuu related patches.


https://source.codeaurora.org/external/imx/uboot-imx/log/?h=imx_v2017.03_4.9.123_imx8mm_ga
About Fastboot enable:
719651a MLK-18257-1 Enable fastboot support in qxp mek board
d5226a3 MLK-18257-2: fix fastboot build warning
219c989 MLK-18257-3 run fastboot if initramfs is in validate
09b1876 MLK-18257-4 use another method check if need run bootcmd_mfg
3b1fa9d MLK-18257-5 enhence fastboot uboot cmd
ca96e0b MLK-18406 fastboot support all partition

About uboot SDP enable:


192a26d MLK-18707-1: SDP: use CONFIG_SDP_LOADADDR as default load address
9764fb2 MLK-18707-2 iMX8M enable fastboot as default
db9a634 MLK-18862 imx8mm uuu can write emmc by fastboot

Additional environment need be define

Table 5: Table uuu environment

Variable Usage Description


emmc_dev emmc burn eMMC device number
sd_dev burn sd sd slot device number
kboot boot kernel\burn nand kernel boot command, it is booti for
arm64, bootz for arm32
weim_uboot burn weim nor uboot burn to position of weim nor
weim_base burn weim nor weim base address
mtdparts burn nand NAND flash partition configuration,
such as
"mtdparts=8000000.nor:1m(boot),-
(rootfs)\\;gpmi-
nand:64m(nandboot),16m(nandkernel),16m(nand
(nandrootfs) "
spi_bus burn spi (not qspi\fspi) spi nor flash bus number
spi_uboot burn spi (not qspi\fspi) spi nor flash uboot offset

11 kernel config requirement

Some kernel config required

• USB CONFIG FS need be built-in


• One of UDC driver and PHY need be built-in

• Function FS need be enabled


UUU (Universal Update Utility) 27 / 34

Device Drivers
USB support
USB gadget support (very last entry)
USB Gadget Drivers (...)
USB functions configurable through configfs
Mass storage
Function filesystem (functionFS)

12 Release Notes

12.1 1.5.163

12.1.1 New features

• Support yocto bmap file to skip unused block


• Support i.MX95

12.1.2 Bug fixes

• Fixed usb pipe error when download image with FCB

12.2 1.5.125

This is fixes up for 1.5.120

• force use old libusb to run at ubuntu 18.04

12.3 1.5.120

12.3.1 New features

• Add built spinand command support


• parser [-t timeout] for all protocol

12.4 1.5.109

This is fixes up for 1.5.104

• static link c++ library in prebuild linux image


• provide armlinux version image

12.5 1.5.104

12.5.1 New fetaures

• Using github working flow action to do release.


• Expand upload command, like uploading the value of a specific variable.
UUU (Universal Update Utility) 28 / 34

12.5.2 Bug fixes

• Fix segfault when boot data is zero in SDP.


• Fix issues when m_skip is not zero in fastboot.
• Fix issues when file size isn’t divisible by block size in fastboot.
• Fix read uploaded data for FB.

12.6 1.5.21

12.6.1 New features

• Reduce memory usage when burn single board with compressed Image.
• Http(s) prompt request username and passwords when require autherization.

12.6.2 Bug fixes

• fixed android super.img loop download 52byte after some block.


• fix memory leak cause by getaddrinfo.
• fix support of empty environment variables in Windows OS.
• fix crash when environment variable is last word in script

12.7 1.4.243

12.7.1 New features

• Add zstd support


• Add iMX93 support

12.7.2 Bug fixes

• Fixed random crash when download bz2 from http


• Fix crash when download speed slower than decompress speed and need resize buffer

12.8 1.4.193

12.8.1 New features

• Add NXP FB/FBK/SDPV device PID

12.8.2 Bug fixes

• Fixed 314 Corrupt image with larger transfer sizes at sdp(s)


• Fixed missed true at else branch at built-in fat_write script and nand_burn_loader
• Fixed invalid progress percentage in verbose mode
• Fixed QSPI flashing script
• Fix #297 print error when run quit cmd in shell mode
• Fix #180 support check getval return value
UUU (Universal Update Utility) 29 / 34

12.9 1.4.165

12.9.1 New features

• Burn wic file(after 2021 Q4 yocto image) directly. uuu -b emmc_all wic
• Add upload fastboot command support
• Support uboot that use plugin initialize ddr

• Support simple logical check in uuu script

12.9.2 Bug fixes

• fix buildin script bz2 have not replaced with bz2\* if path included space
• fixed #284: deadloop when using built-in script with filename include _

• Fix a potential crash if open usb device 400ms after detect attached
• fix uuu return success even ucp failure

12.10 1.4.139

12.10.1 New features

• Add help option -IgSerNum to set windows registry to ignore serial number above too much entry in register when burn many
boards.
• Add snap support
• Add 8ulp support
• Deploy mac image

12.10.2 Bug fixes

• Fixed missed last chunk when meet specific android sparse file
• return out of memory when allocate failure
• -bshow don’t show uuu version information and recover cursor ESC

12.11 1.4.72

12.11.1 New features

• http\https add port support at url


• improve progress show when burn android sparse image

12.11.2 Bug fixes

• Fix the dead loop when flash specific android super.img. There are bug when split big super.img into small sparse file running
time. The bug trigger if split point at whole sparse chuck.
UUU (Universal Update Utility) 30 / 34

12.12 1.4.43

12.12.1 New features

• add environment variable support command


• Added support for FB:reboot and FASTBOOT:reboot
• allow to pass sparse limit from command line
• Update version number support build number > 255
• Mac OS (Catalina) support

12.12.2 Bug fixes

• fix #193 fb:< echo ucmd print failure


• fix fat_write partition parser error

12.13 1.3.191

12.13.1 New features

• Added Boundary Devices fastboot IDs

12.13.2 Bug fixes

• Workaround problem: some data pattern cause timeout at dell docker hub.
• update 7D free memory address, errata e11166 https://www.nxp.com/docs/en/errata/IMX7DS_3N09P.pdf
• Fix can’t build from source tarball.

12.14 1.3.154

12.14.1 New features

• ffu image basic support


• add boundary device VID/PID
• Added basic fastboot logical partition support

12.14.2 Bug fixes

• fastboot: fix oem command separator


• Fix crash when download bz2 file

12.15 1.3.134

12.15.1 Bug fixes

• fix qm\qxp download failure if use spl image


UUU (Universal Update Utility) 31 / 34

12.16 1.3.130

12.16.1 New features

• Add android fastboot continue command


• Add i.MX8DXL support
• Add i.MX865 support

• build in script sd, support burn difference uboot


• Add option -pp to set pool time
• sdp: bootcmd: add support for --dcdaddr
• change the default nandbcb command from update to init

12.16.2 Bug fixes

• fix one line miss when exit uuu


• fix show 99% when use bz2 file
• fix miss ucmd at nand built-in script

• fix show time wrong, use system time instead of tick as timesample

12.17 1.3.102

12.17.1 New features

• Support simple https. (experimental).


• -b option support script file

• support >=4G zip file

12.17.2 Bug fixes

• fixed #136 fix decompress failure if use uncompressed method in zip file.

• fixed something wait forever when download bz2 from http


• fix http request failure at some host (use \r\n at http request)

12.18 1.3.82

12.18.1 New features

• add dry-run option to check if all files exist at script

• Start download before scan whole Bz2 file. Progress only show how many data burned instead of percentage before finish scan.
• Add NAND built in script to burn boot loader into nand flash, which need uboot support nandbcb command
• Add --skipfhdr option to skip flexspi header
• Can use SD card uboot for flexspi, which need uboot support qspihdr command
UUU (Universal Update Utility) 32 / 34

• Add timestamp info for each command. (-v show how many time is consumed for each command).
• Add tar.bz2 support.(experimental).
• Add tar.gz support. (experimental).
• Add http download. (experimental).
• Auto append /* for bz2 file when use built-in script.
• Add -lsusb option to list all connected known devices to help find usb path when do multi boards support

12.18.2 Bug fixes

• Fix SPL download uboot failure if uboot size > 2M


• Upgrade libusb to 1.0.23-rc3 to resolve some windows compatibility problem. such as exit if not usb port under virtual root
hub.
• Fix bz2 decompress problem if bz2 created by bzip2 instead of pbzip2.
• Fix missed last chunk data for android sparse image
• fixed #123: implement timeout for wait known usb device appear

12.19 1.2.135

12.19.1 New features

• Support i.MX28
• Add Read\write a memory address for i.MX6/i.MX7
• built-in script emmc support burn difference files
• Support i.MX815

12.19.2 Bug fixes

• fix crash when console width between 47 to 54


• fix crash when use ssh <host> uuu
• fix wrong data by decompress sdcard.bz2/* if enable -O2 build option

12.20 1.2.91

12.20.1 New features

• Auto parameter complete support


• Add option -udev to help create udev rule to avoid use sudo
• Remove VT color at win7
• Fail back to verbose mode at win7
• Enable uboot shell mode
• Just print help when run uuu and doesn’t scan auto.uuu in current directory.
UUU (Universal Update Utility) 33 / 34

• Added blog command to fetch message from uboot boot log


• Support file path include space. need add "" at file path
• Windows version built-in libusb
• New SDPV support to support -skipsql for uboot, which support auto scan uboot position.

12.20.2 Bug fixes

• Fixed uuu "fb[-t 1000]:" ucmd wait forever problem


• Fixed missed sdpu: done at spl built in script
• Fixed show nothing when wait for usb connection
• Fixed random claim interface failure at windows platform
• Fixed random crash when multi-device download at windows platform
• Fixed memory leak.
• Fixed #79 file all zero when ucp from target to host
• Fixed crash when done is not last cmd

12.21 1.2.0

12.21.1 New features

• Support decompress bz2 file, sdcard.bz2/* means decompress it.


• Support enter shell after run script

12.21.2 Bug fixes

• Fix mx6 boot failure when enable security


• Fix windows version dependent on vs redistribute package

12.22 1.1.81

12.22.1 New features

• Support shell command


• Support shell command generate dynamic uuu command to burn sequence id, like MAC address
• Reduce cpu usage rate at windows platform by increase each bulk transfer size
• Added q(quit) to exit shell at -s mode

12.22.2 Bug fixes

• fixed some typo


• fixed build script qspi burn failure if file size > 1M
• fixed file locked by uuu to prevent user update it.
• fixed crash at special uboot size
UUU (Universal Update Utility) 34 / 34

12.23 1.1.41

12.23.1 New features

• Support SDP protocol (i.MX6x, i.MX7, i.MX8M, i.MX8MM)


• Support SDPS protocol (i.MX8QXP B0, i.MX8QM B0)
• Support SDPU protocol (uboot\SPL implemented SDP protocol)

• Support FB protocol (fastboot with uboot)


• Support FBK protocol (fastboot in kernel, daemon implement at imx-uuc)
• Support multi-device download
• Support built-in script

12.23.2 Bug fixes

• Fix sometime open usb device failure at windows platform.


• Fix protocol case sensitive problem in script
• Fix open zip file failure

13 Known issue

• Some old i.MX8MM board HID can’t work in linux system. Need apply ROM patch to fix. Please contact FAE.
• QXP/QM NAND image can’t download by UUU because alignment requirement is difference
• Bz2 file only support one that is generated by pbbz2. there are problem if use bzip2 generate bz2.

• i.MX815 only support 3 boards at the same time.


• Some typeC dell dock USB hub cause transfer timeout if meet some magic data pattern, see branch magic_pattern. Try use
differece hub or direct connect to PC usb port if this happen.

You might also like