UUU - Universal Update Utility¶
The Universal Update Utility is used to program your board.
We actually can use uuu
to flash most of our products.
For i.MX6 based modules (TX6 and TXUL series) please continue to use MFGTool.
Note
Either a Linux PC or Linux on Windows with WSL is recommended
Getting uuu¶
Get the latest stable file uuu
(for Linux) or uuu.exe
(for Windows) from NXP’s official repository: https://github.com/NXPmicro/mfgtools/releases
udev Rules¶
There’s no need to call uuu
as sudo. Just update your udev rules as follows.
Running uuu -udev
will output a list of ‘udev’ rules that will
allow access to any logged in non-privileged user.
Put those rules into /etc/udev/rules.d/70-uuu.rules.
This can be achieved running the following two commands:
sudo sh -c "uuu -udev >> /etc/udev/rules.d/70-uuu.rules"
sudo udevadm control --reload
STM32 based Modules¶
Since STM32 based modules (QSMP/TXMP) appear with an unknown VID/PID, you have to add it to uuu’s udev rules manually.
Add this line to: /etc/udev/rules.d/70-uuu.rules
. Don’t forget to reload udev rules - mentioned above.
SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="0afb", MODE="0666" #STM32
Usage¶
UUU uses the android fastboot protocol. The usual way to flash our modules is to start the mfg-uboot, write the default u-boot into eMMC and then flash the Boot-partition and Rootfs as filesystem image.
Tip
You can use pre-compiled images and scripts from our Customer Area or your own Yocto built images.
Running uuu¶
On Windows 10 or Linux uuu will work fine. For Windows 7 see Running UUU on Windows 7.
Put the bootmode jumper in place (for Help see Enabling USB-Bootmode) and connect your module via OTG-programming port of the baseboard. Reset the board.
Get terminal access. If you need help for this see TTL Converter Terminal Connection.
Open a command line inside the folder where uuu is and run the following command. The script-file argument should point to the uuu.auto file generated during the build process and located within the images output folder.
uuu -v <script-file>
Tip
Inside your terminal you should now see progress and information while uuu is programming your module.
UUU with Custom Files¶
Creating Filesystems¶
For e.g. the /boot partition you can create your own filesystem image. The example below gives you an idea how this is done.
It also shows, how existing filesystem images can be mounted.
dd if=/dev/zero of=bootfs.fat bs=1M count=0 seek=32
mkfs -t vfat bootfs.fat
sudo mount -o loop bootfs.fat /mnt/temp/
sudo cp Image imx8mn-tx8m-nd00-mipi-mb.dtb /mnt/temp/
sudo umount /mnt/temp
Script Examples [1]¶
Hint
Some commands differ depending on the module you are using.
Module |
Loading bootloader command-set |
Comments |
---|---|---|
tx8m-1610 |
SDP: boot -f <mfg-uboot>
SDPV: write -f <mfg-boot> -skipspl
SDPV: jump
|
|
tx8m-1620 |
SDP: boot -f <mfg-uboot>
SDPV: write -f <mfg-boot> -skipspl
SDPV: jump
|
|
tx8m-nd00 |
SDPS: boot -f <mfg-uboot>
SDPV: write -f <mfg-boot> -skipspl
SDPV: jump
|
See Note below |
tx8p-ml81 |
SDPS: boot -f <mfg-uboot>
|
|
tx8p-ml82 |
SDPS: boot -f <mfg-uboot>
|
|
qsxp-ml81 |
SDPS: boot -f <mfg-uboot>
|
|
qsxm-mm60 |
SDP: boot -f <mfg-uboot>
SDPV: write -f <mfg-boot> -skipspl
SDPV: jump
|
|
qs8m-mq00 |
SDP: boot -f <mfg-uboot>
SDPV: write -f <mfg-boot> -skipspl
SDPV: jump
|
|
qs8m-nd00 |
SDPS: boot -f <mfg-uboot>
SDPV: write -f <mfg-boot> -skipspl
SDPV: jump
|
See Note below |
Note
UUU has a problem reconnecting to i.MX8MNano devices after the
first boot stage, resulting in a “libusb TIMEOUT” error. After this just run uuu
again and it will work.
You may also start uuu in Daemon mode (Option -d
) to get around this problem.
Flashing U-Boot to eMMC
1uuu_version 1.4.77
2
3#
4# author: Markus Bauer <mb@karo-electronics.de>
5# (c) 2019
6#
7# This file flashes default u-boot to your TX8M-ND00
8
9### boot uboot with fastboot support
10SDPS: boot -f imx-boot-karo-mfg
11SDPV: write -f imx-boot-karo-mfg -skipspl
12SDPV: jump
13
14### Writing default u-boot to emmc
15FB: ucmd setenv fastboot_dev mmc
16FB: ucmd mmc dev ${emmc_dev}
17FB: flash bootloader imx-boot-karo-default
18FB: ucmd mmc partconf ${emmc_dev} ${emmc_boot_ack} ${emmc_boot_part} 0
19
20FB: continue
21FB: done
Flashing filesystems
1uuu_version 1.4.77
2
3#
4# author: Markus Bauer <mb@karo-electronics.de>
5# (c) 2019
6#
7# This file flashes desktop release (QT from Yocto) and bootfs to your TX8M
8
9### Boot our uboot with fastboot support
10SDPS: boot -f imx-boot-karo-mfg
11SDPV: write -f imx-boot-karo-mfg -skipspl
12SDPV: jump
13
14### GPT partition layout
15#
16# 32M /boot
17# MAX /
18FB: ucmd setenv partitions 'uuid_disk=${uuid_gpt_disk};name=boot,size=32M,start=1MiB,uuid=${uuid_boot};name=rootfs,size=MAX,uuid=0cc66cc0-5458-384d-1610-726f6f746673;'
19FB: ucmd gpt write mmc 0 ${partitions}
20
21### force re-read partition table
22FB: ucmd setenv fastboot_dev sata
23FB: ucmd setenv fastboot_dev mmc
24
25### Flashing partitions
26FB: flash boot bootfs.fat
27FB: flash -raw2sparse rootfs fsl-image-qt5.rootfs.ext4
28
29FB: continue
30FB: done
Note
Run man fastboot
on your host to see which possibilities you have with FB:
command in uuu.
Importing environment
1uuu_version 1.0.1
2
3#
4# author: Markus Bauer <mb@karo-electronics.de>
5# (c) 2019
6#
7# This file imports u-boot environment file.
8# The entries into the file look like:
9#
10# append_bootargs=quiet
11# {variable}={value}
12# ...
13#
14# The file has to end with a ZERO byte.
15
16### Boot our uboot with fastboot support
17SDPS: boot -f imx-boot-karo-mfg
18SDPV: write -f imx-boot-karo-default -skipspl
19SDPV: jump
20
21### Importing u-boot environment
22FB: ucmd setenv fastboot_buffer ${loadaddr}
23FB: download -f emmc-boot.env
24# -t: text -r: support <CRLF> line delimiters -d: delete existing env
25FB: ucmd env import -trd ${loadaddr}
26FB: ucmd printenv
27FB: ucmd saveenv
28
29FB: done