UUU (Universal Update Utility)
UUU (Universal Update Utility)
REVISION HISTORY
5589368 Fri Nov 9 14:26:13 point into win7 user guide nxpfrankli
2018 -0600
d30423f Wed Dec 5 15:24:21 Updated UUU default support protocol list nxpfrankli
2018 -0600 (asciidoc)
a9b70c5 Mon Dec 10 Updated UUU default support protocol list nxpfrankli
11:01:10 2018 -0600 (asciidoc)
bae1d6c Fri Jan 11 14:08:18 Updated UUU default support protocol list nxpfrankli
2019 -0600 (asciidoc)
UUU (Universal Update Utility) iii
REVISION HISTORY
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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
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. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.1.4 Burn Android Image to eMMC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.1.5 Burn yocto Image to eMMC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.2 Built-in script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.4.1 boot linux kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.4.2 write image to emmc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4 Sample scripts 7
5 Supported protocol 7
5.1 SDP: i.MX6/7 ROM download protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
5.1.1 Supported command: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
5.2 SDPU\SDPV: uboot implement simplified ROM SDP protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
5.3 SDPS: i.MX8QXP and i.MX8QM ROM download protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
5.4 FB: Android fastboot protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
5.4.1 Support command: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
5.5 FBK: Android fastboot protocol, implement at initramfs. See project imx-uuu . . . . . . . . . . . . . . . . . . . 9
5.5.1 Support command: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
5.6 Common command for all protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
UUU (Universal Update Utility) v
8 FAQ 13
9 Build Steps 15
9.1 windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
9.2 linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
12 Release Notes 17
12.1 1.2.TBD (Next) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
12.1.1 New features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
12.1.2 Bug fixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
12.2 1.2.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
12.2.1 New features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
12.2.2 Bug fixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
12.3 1.1.81 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
12.3.1 New features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
12.3.2 Bug fixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
12.4 1.1.41 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
12.4.1 New features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
12.4.2 Bug fixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
13 Known issue 19
UUU (Universal Update Utility) 1 / 19
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
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.
• Windows 10, 64bit, early version(below 1.2.0) need install vs2017 redistribute package
• Ubuntu 16.14 or above, 64bit
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
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
UUU (Universal Update Utility) 2 / 19
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.
(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.1 windows
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
---------------------------------------------------------------------
Command Format PROTOCOL COMMAND ARG
PROTOCOL
ALL protocol supported common command
done #last command for whole flow
delay <ms> # delay ms
sh\shell <any shell command> #Run shell command, such as ←-
wget to file from network
< <any shell command> #use shell command's output ←-
as uuu command
this command generally used for burn some sequen ←-
ce number, such ←-
production id, mac address
for example:
FB:< echo ucmd print
For example:
SDPS: boot -f <filename>
SDP: boot -f <filename>
CFG: SDP: -chip imx6ull -pid 0x1234 -vid 0x5678
3 Usage Example
3.1 Basic
uuu uboot.imx
uuu flash.bin
UUU (Universal Update Utility) 6 / 19
uuu L4.9.123_2.3.0_8mm-ga.zip
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 -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.
UUU (Universal Update Utility) 7 / 19
4 Sample scripts
5 Supported 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
getvar
ucmd <any uboot command>
acmd <any never returned uboot command, like booti, reboot>
**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>
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
5.5 FBK: Android fastboot protocol, implement at initramfs. See project imx-uuu
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
Command Description
Done last command for finish whole flow.
Delay Busy wait for millisecond
SH/SHELL run external command
< stdout as command, such as "< echo ucmd print", which
generally used for burn serial number
**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>
<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>
UUU (Universal Update Utility) 11 / 19
Win7 user may face some additional one time setup work because original win7 missed a updated .inf file
UUU (Universal Update Utility) 12 / 19
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.
• Download package
• unzip
Notes:
4.9.123 8MM GA and 4.14 beta release missed a patch. Please apply below patch in uboot
UUU (Universal Update Utility) 13 / 19
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.
8 FAQ
>/home/xxx
A.zip/uuu.auto
for example:
uuu A.zip/uuu.auto
for example
id = usb_string_id(c->cdev);
9 Build Steps
9.1 windows
9.2 linux
• cd mfgtools
• sudo apt-get install libusb-1.0.0-dev libzip-dev libbz2-dev
• cmake .
• make
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
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
• 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
• 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.2 1.2.0
12.3 1.1.81
12.4 1.1.41
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