NXP uuu mfgtools - how to use

Hi there~

Can I use “uuu” to update eMMC in Apalis board? Just the following is the status of USB OTG connection in UUU’s awareness. Is it enough to cover up SMPS: section and FB: section together in uuu.auto file?

nfot@yjr:~/work/tree/boards/imx8qm/iso/boot/fw$ sudo uuu -lsusb
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.4.107-15-gd1c466c

Connected Known USB Devices
	Path	 Chip	 Pro	 Vid	 Pid	 BcdVersion
	==================================================
	1:1	 MX8QM	 SDPS:	 0x1FC9	0x0129	 0x0002



infot@yjr:~/work/tree/boards/imx8qm/iso/boot/fw$ sudo uuu -s
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.4.107-15-gd1c466c

Build 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
	SDPS:	 MX815		 0x1fc9	 0x013e
	SDPS:	 MX865		 0x1fc9	 0x0146
	SDPS:	 MX8ULP		 0x1fc9	 0x014a
	SDPS:	 MX8ULP		 0x1fc9	 0x014b
	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]
	SDPU:	 SPL		 0x0525	 0xb4a4	 [0x9999..0x9999]
	SDPU:	 SPL		 0x3016	 0x1001	 [0x0000..0x04ff]
	SDPV:	 SPL1		 0x3016	 0x1001	 [0x0500..0x9998]
	FBK:	 		 0x066f	 0x9afe
	FBK:	 		 0x066f	 0x9bff
	FB:	 		 0x0525	 0xa4a5
	FB:	 		 0x18d1	 0x0d02
	FB:	 		 0x3016	 0x0001

Please input command: 
U>

Currenty, I see the following error…

infot@yjr:~/work/tree/boards/imx8qm/iso/boot/fw$ sudo uuu -V -b emmc flash.bin
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.4.107-15-gd1c466c

Build 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
	SDPS:	 MX815		 0x1fc9	 0x013e
	SDPS:	 MX865		 0x1fc9	 0x0146
	SDPS:	 MX8ULP		 0x1fc9	 0x014a
	SDPS:	 MX8ULP		 0x1fc9	 0x014b
	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]
	SDPU:	 SPL		 0x0525	 0xb4a4	 [0x9999..0x9999]
	SDPU:	 SPL		 0x3016	 0x1001	 [0x0000..0x04ff]
	SDPV:	 SPL1		 0x3016	 0x1001	 [0x0500..0x9998]
	FBK:	 		 0x066f	 0x9afe
	FBK:	 		 0x066f	 0x9bff
	FB:	 		 0x0525	 0xa4a5
	FB:	 		 0x18d1	 0x0d02
	FB:	 		 0x3016	 0x0001

Run built-in script:
 
uuu_version 1.2.39

# @flash.bin            | bootloader
# @flash.bin   [flash.bin] | image burn to emmc, default is the same as bootloader

# 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 bootloader flash.bin
FB: ucmd if env exists emmc_ack; then ; else setenv emmc_ack 0; fi;
FB: ucmd mmc partconf ${emmc_dev} ${emmc_ack} 1 0
FB: Done


Wait for Known USB Device Appear...
New USB Device Attached at 1:1
1:1>Start Cmd:SDPS: boot -f flash.bin
100%1:1>Okay (0.911s)
libusb: error [udev_hotplug_event] ignoring udev action bind

“FB:” commands doesn’t work. The following is the U-boot image output .

U-Boot 2020.04 (Mar 21 2021 - 19:44:38 -0700)

CPU:   NXP i.MX8QM RevB A53 at 1200 MHz

DRAM:  4 GiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from MMC... OK
In:    serial
Out:   serial
Err:   serial
Model: Toradex Apalis iMX8 QuadMax 4GB Wi-Fi / BT IT V1.0B, Serial# 06540899

 BuildInfo: 
  - SCFW 0d54291f, SECO-FW d63fdb21, IMX-MKIMAGE 0, ATF 
  - U-Boot 2020.04 

switch to partitions #0, OK
mmc0(part 0) is current device
Detect USB boot. Will enter fastboot mode!
Net:   eth0: ethernet@5b040000
Fastboot: Normal
Boot from USB for mfgtools
*** Warning - Use default environment for                                mfgtools
, using default environment

Run bootcmd_mfg: fastboot 0
Hit any key to stop autoboot:  0 
We are in is_imx8
Getting phy ctrl

For module’s eMMC flashing we provide and support a Toradex Easy Installer. All modules shipped with Toradex Easy Installer pre-flashed so you can do a production programming from local media or network without using recovery mode and serial downloader. What problem are you trying to solve by using UUU instead?

Dear Alex.

Thanks for your comment. Got it. Actually in person, I am very happy with Toradex Easy Installer, but if many S/W guys are now going with Apalis iMX8 board and finally somebody without the knowledge of embedded system might involve in factory production line; “toradex easy installer” with excellent graphical multi-dimensional interface wouldn’t be good choice. Thus I am looking for more simplified approaches for this case.

Would you let me ask one more question please? Now I am understand that the reason of failure of UUU.auto file with toradex board seems to the sudden close-down of USB OTG link after completing the initialization of USB interface of Apalis module when it takes to run flash.bin image created by the combination of u-boot; system controller f/w, arm-trusted firmware, etcs… Well~ it might seems to be usually granted due to the first connection between host machine and Apalis board has gone through H/W assisted connection driven from NXP core driven I understood. However, u-boot does lot of stuffs; USB, ethernet, etcs… Then, I wonder the USB OTG link established at the first stage could persist even though U-boot s/w image might intercept the control of the iMX8 by simply manipulating DTB files, or something… ^^

The Toradex Easy Installer is using uuu to load U_Boot and stripped version of Linux with an Installer app to modules RAM. You can download it and take look to its boot.scr

Did you ever find a solution to this because I am also looking for an answer.

Hi EvoFrank,

Why Toradex Easy Installer or OTA do not work for your case? What kind of problem you are going to solve by using UUU?

So I was looking for a way to flash the bootloader to the board as I am developing on the M4 cores and don’t want to go to all the faff of booting into recovery and then compiling and installing a complete distro.

So answering my own question, the following uuu.auto script allows one to flash a bootloader (imx-boot) to the toradex. The trick is to include the CFG lines to the SDPS section. (Some custom configuration for USB):

uuu_version 1.2.39

# This command will be run when i.MX6/7 i.MX8MM, i.MX8MQ
SDP: boot -f imx-boot

# This command will be run when ROM support stream mode
# i.MX8QXP, i.MX8QM
SDPS: boot -f imx-boot
CFG: FB: -vid 0x0525 -pid 0x4000
CFG: FB: -vid 0x0525 -pid 0x4025
CFG: FB: -vid 0x0525 -pid 0x402F
CFG: FB: -vid 0x0525 -pid 0x4030
CFG: FB: -vid 0x0525 -pid 0x4031

# These commands will be run when use SPL and will be skipped if no spl
# SDPU will be deprecated. please use SDPV instead of SDPU
# {
SDPU: delay 1000
SDPU: write -f imx-boot -offset 0x57c00
SDPU: jump
# }

# These commands will be run when use SPL and will be skipped if no spl
# if (SPL support SDPV)
# {
SDPV: delay 1000
SDPV: write -f imx-boot -skipspl
SDPV: jump
# }

FB: ucmd setenv fastboot_dev mmc
FB: ucmd setenv mmcdev 0
FB: ucmd mmc dev 0
FB: flash bootloader imx-boot
FB: ucmd if env exists emmc_ack; then ; else setenv emmc_ack 0; fi;
FB: ucmd mmc partconf 0 ${emmc_ack} 1 0
FB: Done
1 Like

I still don’t understand - why do you need to flash a bootloader? M4 binary can be loaded from SD card or USB drive using U_Boot commands. You don’t need to install “a complete distro.”

I think flashing requires fewer manual steps.