Flashing custom iMX6ULL NAND flash using UUU tool

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Flashing custom iMX6ULL NAND flash using UUU tool

1,648件の閲覧回数
asurti9
Contributor III

Hello NXP team,

I have built the default YOCTO build for iMX6ULL, using build command as follows:

DISTRO=fsl-imx-wayland MACHINE=imx6ull14x14evk source imx-setup-release.sh -b build/

I have built all the images for core-image-minimal and I have a custom board adapted from iMX6ULL EVK and I need to check above images by downloading it to the NAND flash.

I found out there is UUU tool which can be used, however I am very new to the tool, can you please help me in getting step-by-step procedure to flash the device using NAND?

Thanks!

0 件の賞賛
返信
9 返答(返信)

1,597件の閲覧回数
Harvey021
NXP TechSupport
NXP TechSupport

Hi, 

You can refer to uuu.pdf and using uuu tool to flash images. Release Release uuu_1.5.141 · nxp-imx/mfgtools · GitHub in which you will find examples for uuu for flashing nand device.

However, if you're intended to flash all images, might need to use the examples from samples/example_kernel_nand.uuu

try to download the prebuild image from the link: https://www.nxp.com/webapp/Download?colCode=L6.1.55_2.2.0_MX6UL7D&appType=license

then you will see the example_kernel_nand.uuu script for reference.

And yes, you can have a try the article (for legacy) that from our website.

Regards

Harvey

0 件の賞賛
返信

1,574件の閲覧回数
asurti9
Contributor III

Hello Harvey,

I tried the suggested script "example_kernel_nand.uuu", but by running that script I am facing this error:

 

U>SDP: boot -f u-boot.imx-nand
>Start Cmd:SDP: boot -f u-boot.imx-nand
New USB Device Attached at 1:13
1:13>Fail HID(W):LIBUSB_ERROR_TIMEOUT(1.005s)
HID(W):LIBUSB_ERROR_TIMEOUT

 

I tried with the prebuilt u-boot (u-boot-imx6ull14x14evk_nand.imx) as well as the one which I built with my YOCTO package.

Can you please help me with this one?

EDIT:

Actually it does work at the first time, but the second command (no matter what), I fire, it is throwing the error:

Please input command: 
U>SDP: boot -f u-boot.imx
>Start Cmd:SDP: boot -f u-boot.imx
New USB Device Attached at 1:13
100%1:13>Okay (0.286s)
Okay
U>SDP: boot -f u-boot.imx
1:13>Start Cmd:SDP: boot -f u-boot.imx
New USB Device Attached at 1:13
100%1:13>Fail HID(R):LIBUSB_ERROR_TIMEOUT(1.003s)
HID(R):LIBUSB_ERROR_TIMEOUT
U>SDPV: write -f u-boot.imx -skipspl
1:13>Start Cmd:SDPV: write -f u-boot.imx -skipspl
Wait for Known USB |

Thanks!

0 件の賞賛
返信

1,566件の閲覧回数
Harvey021
NXP TechSupport
NXP TechSupport

Have you tried uuu -b nand <your u-boot>? if you just flash U-Boot.

 

Regards

Harvey

0 件の賞賛
返信

1,519件の閲覧回数
asurti9
Contributor III

Hello,

When I try this command, then also I am getting following error:

$ sudo uuu -b nand u-boot-nand-2023.04-r0.imx
[sudo] password for user: 
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.5.21-0-g1f42172

Success 0    Failure 1                                                                                                                                                                                    
                                                                                                                                                                                                           
                                                                                                                                                                                                           
1:13     1/ 1 [HID(R):LIBUSB_ERROR_TIMEOUT           ] SDP: boot -f u-boot-nand-2023.04-r0.imx  
0 件の賞賛
返信

1,513件の閲覧回数
Harvey021
NXP TechSupport
NXP TechSupport

Please also share the uart log and add parameter -v before -b then share log.

0 件の賞賛
返信

1,370件の閲覧回数
asurti9
Contributor III

Please find the attached logs:

 

aliasgar@aliasgar:~/aliasgar/imx6ull/flash$ sudo uuu -v -b nand u-boot-nand-2023.04-r0.imx 
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.5.21-0-g1f42172

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
	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
	FB:	 		 0x0483	 0x0afb

Run built-in script:
 
uuu_version 1.2.39

# @_flash.bin            | bootloader
# @_image   [_flash.bin] | image burn to nand, default is the same as bootloader

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

# This command will be run when ROM support stream mode
# i.MX8QXP, i.MX8QM
SDPS: boot -f u-boot-nand-2023.04-r0.imx

# 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 u-boot-nand-2023.04-r0.imx -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 u-boot-nand-2023.04-r0.imx -skipspl
SDPV: jump
# }

FB: ucmd setenv fastboot_buffer ${loadaddr}
FB: download -f u-boot-nand-2023.04-r0.imx
FB: ucmd if test ! -n "$fastboot_bytes"; then setenv fastboot_bytes $filesize; else true; fi
# Burn image to nandfit partition if needed
FB: ucmd if env exists nandfit_part; then nand erase.part nandfit; nand write ${fastboot_buffer} nandfit ${fastboot_bytes}; else true; fi;
FB: ucmd nandbcb init ${fastboot_buffer} nandboot ${fastboot_bytes}
FB: Done


Wait for Known USB Device Appear...
New USB Device Attached at 1:13
1:13>Start Cmd:SDP: boot -f u-boot-nand-2023.04-r0.imx
100%1:13>Okay (0.282s)
New USB Device Attached at 1:13
1:13>Start Cmd:SDP: boot -f u-boot-nand-2023.04-r0.imx
100%1:13>Fail HID(R):LIBUSB_ERROR_TIMEOUT(1.004s)

 

I have connected UART to the computer, but there are no logs there.

EDIT:

Can you please share the list of changes that need to be made under u-boot and kernel for booting from NAND? I have just added the below flag in `local.conf`

`UBOOT_CONFIG = "nand"`

Are there any further changes that need to be made?

Thanks!

0 件の賞賛
返信

1,352件の閲覧回数
asurti9
Contributor III

Hello @Harvey021 ,

Any update on this one?

EDIT:

I tried below command:

sudo uuu -v -V -pp 1 -b nand u-boot-nand-2023.04-r0.imx

I got below error:

aliasgar@aliasgar:~/aliasgar/imx6ull/flash$ sudo uuu -v -V -pp 1 -b nand u-boot-nand-2023.04-r0.imx 
[sudo] password for aliasgar:
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.5.21-0-g1f42172

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
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
FB: 0x0483 0x0afb

Run built-in script:

uuu_version 1.2.39

# @_flash.bin | bootloader
# @_image [_flash.bin] | image burn to nand, default is the same as bootloader

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

# This command will be run when ROM support stream mode
# i.MX8QXP, i.MX8QM
SDPS: boot -f u-boot-nand-2023.04-r0.imx

# 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 u-boot-nand-2023.04-r0.imx -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 u-boot-nand-2023.04-r0.imx -skipspl
SDPV: jump
# }

FB: ucmd setenv fastboot_buffer ${loadaddr}
FB: download -f u-boot-nand-2023.04-r0.imx
FB: ucmd if test ! -n "$fastboot_bytes"; then setenv fastboot_bytes $filesize; else true; fi
# Burn image to nandfit partition if needed
FB: ucmd if env exists nandfit_part; then nand erase.part nandfit; nand write ${fastboot_buffer} nandfit ${fastboot_bytes}; else true; fi;
FB: ucmd nandbcb init ${fastboot_buffer} nandboot ${fastboot_bytes}
FB: Done


Wait for Known USB Device Appear...
New USB Device Attached at 1:13
1:13>Start Cmd:SDP: boot -f u-boot-nand-2023.04-r0.imx
100%1:13>Okay (0.297s)
New USB Device Attached at 1:13
1:13>Start Cmd:SDP: boot -f u-boot-nand-2023.04-r0.imx
100%libusb: error [udev_hotplug_event] ignoring udev action bind
1:13>Fail HID(R):LIBUSB_ERROR_TIMEOUT(1.003s)

I tried with the prebuilt nand u-boot as well, which you provided the link above. The result is the same.

Thanks!

0 件の賞賛
返信

1,618件の閲覧回数
asurti9
Contributor III

More info into it:

  • I have added `UBOOT_CONFIG = "nand"` in local.conf
  • We are using MT29F4G08ABAFAWP micron NAND, which I guess is supported by NXP
  • I have not done any kernel side changes
0 件の賞賛
返信

1,646件の閲覧回数
asurti9
Contributor III

I have found this article - https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/How-To-use-NAND-boot-on-i-MX6UL-EVK-boar...

But it is for iMX6UL, will it be same for iMX6ULL?

0 件の賞賛
返信