Does iMX93EVK support serial NAND boot?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Does iMX93EVK support serial NAND boot?

450 Views
jekim
Contributor III

Hello,

 

From the MCIMX93EVKUM document, I saw the board supports Serial NAND boot via FlexSPI. Unfortunately, I haven't found any instructions on how to build a Serial Nand Flash image nor how to burn the image to flash. Is there any other documentation or example for this? 

 

Thanks.

 

0 Kudos
7 Replies

394 Views
jekim
Contributor III

Hi Harvey,

 

Thank you. I downloaded imx-mkimage branch lf-6.6.3_1.0.0 for github. However, the compilation shows an error due to ahab-container as below. Please help me to solve this issue. The untracked files are copied from the old imx-mkimage/iMX9 folder.

 

Thanks.

 

 
ubuntu@ubuntu:~/imx-yocto-bsp/GitHub_Make/imx-mkimage$ ls
iMX8DXL  iMX8QM  iMX8ULP  iMX93  LICENSE   mkimage_imx8  Readme.imx95         scripts
iMX8M    iMX8QX  iMX91    iMX95  Makefile  README        SCR-imx-mkimage.txt  src
ubuntu@ubuntu:~/imx-yocto-bsp/GitHub_Make/imx-mkimage$ ls iMX93
bl31.bin                lpddr4_dmem_1d_v202201.bin  mx93a0-ahab-container.img  tee.bin                   u-boot-spl.bin
boot-spl-container.img  lpddr4_dmem_2d_v202201.bin  scripts                    u-boot-atf-container.img  u-boot-spl-ddr.bin
flash.bin               lpddr4_imem_1d_v202201.bin  signature.dts              u-boot.bin
iMX93_3200Mbps.bin      lpddr4_imem_2d_v202201.bin  soc.mak                    u-boot-hash.bin
ubuntu@ubuntu:~/imx-yocto-bsp/GitHub_Make/imx-mkimage$ grep spinand iMX93/soc.mak 
u-boot-atf-container-spinand.img: bl31.bin u-boot-hash.bin
   -out u-boot-atf-container-spinand.img; \
   -out u-boot-atf-container-spinand.img; \
   -out u-boot-atf-container-spinand.img; \
flash_singleboot_spinand: $(MKIMG) $(AHAB_IMG) $(SPL_A55_IMG) u-boot-atf-container-spinand.img flash_fw.bin
$(call append_container,u-boot-atf-container-spinand.img,4)
flash_singleboot_spinand_fw: flash_fw.bin
ubuntu@ubuntu:~/imx-yocto-bsp/GitHub_Make/imx-mkimage$ make SOC=iMX93 flash_singleboot_spinand
include autobuild.mak
make[1]: *** No rule to make target 'mx93a1-ahab-container.img', needed by 'flash_singleboot_spinand'.  Stop.
make: *** [Makefile:26: flash_singleboot_spinand] Error 2
ubuntu@ubuntu:~/imx-yocto-bsp/GitHub_Make/imx-mkimage$ git status
On branch lf-6.6.3_1.0.0
Your branch is up to date with 'origin/lf-6.6.3_1.0.0'.
 
Untracked files:
  (use "git add <file>..." to include in what will be committed)
iMX93/bl31.bin
iMX93/boot-spl-container.img
iMX93/flash.bin
iMX93/iMX93_3200Mbps.bin
iMX93/lpddr4_dmem_1d_v202201.bin
iMX93/lpddr4_dmem_2d_v202201.bin
iMX93/lpddr4_imem_1d_v202201.bin
iMX93/lpddr4_imem_2d_v202201.bin
iMX93/mx93a0-ahab-container.img
iMX93/tee.bin
iMX93/u-boot-atf-container.img
iMX93/u-boot-hash.bin
iMX93/u-boot-spl-ddr.bin
iMX93/u-boot-spl.bin
iMX93/u-boot.bin
mkimage_imx8
src/build_info.h
 
nothing added to commit but untracked files present (use "git add" to track)

 

0 Kudos

388 Views
Harvey021
NXP TechSupport
NXP TechSupport

From the error, to build the target requires A1 version - mx93a1-ahab-container.img, the one that you provide is mx93a0-ahab-container.img

 

Regards

Harvey

0 Kudos

316 Views
jekim
Contributor III

Thank you. The flash.bin file is built well with "make SOC=iMX93 flash_singleboot_spinand". However, the UUU is failing with the below errors. The iMX93EVK is set to serial downloader mode. What could make the error on UUU?

 

.\uuu.exe -v -b nand .\flash.bin
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.5.179-0-g02da3bf

Build in config:
Pctl Chip Vid Pid BcdVersion Serial_No
==================================================
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
SDPS: MX93 0x1fc9 0x0159
SDPS: MX95 0x1fc9 0x015d
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 .\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 .\flash.bin
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:7-F4CFE4D499984ED9
1:7-F4CFE4D499984ED9>Start Cmd:SDPS: boot -f .\flash.bin
3%1:7-F4CFE4D499984ED9>Fail HID(W) : LIBUSB_ERROR_PIPE (-9)(0.026s)

0 Kudos

288 Views
Harvey021
NXP TechSupport
NXP TechSupport

Change the nand to spi_nand

 

Regards

Harvey

 

0 Kudos

127 Views
jekim
Contributor III

Harvey, I tried the spi_nand for uuu but it permanently waits known USB. What else I can do?

.\uuu.exe -v -b spi_nand .\flash.bin
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.5.179-0-g02da3bf

Build in config:
Pctl Chip Vid Pid BcdVersion Serial_No
==================================================
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
SDPS: MX93 0x1fc9 0x0159
SDPS: MX95 0x1fc9 0x015d
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

# @_flexspi.bin | bootloader
# @_image [_flexspi.bin] | image burn to fspinand, 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, skip QSPI header
SDPS: boot -f .\flash.bin -skipfhdr

# 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 0x10000 -skipfhdr
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 -skipfhdr
SDPV: jump
# }

FB: ucmd setenv fastboot_buffer ${loadaddr}
FB: download -f .\flash.bin

FB: ucmd if test ! -n "$fastboot_bytes"; then setenv fastboot_bytes $filesize; else true; fi

FB[-t 60000]: ucmd fspinand init spi-nand0 ${fastboot_buffer} ${fastboot_bytes}

FB: done


Wait for Known USB Device Appear...

0 Kudos

112 Views
Harvey021
NXP TechSupport
NXP TechSupport

Have you tried to flash the one with sd.bin from prebuild image? and please check what shows from debug port.

L6.6.3_1.0.0_MX93 

 

Regards

Harvey

0 Kudos

413 Views
Harvey021
NXP TechSupport
NXP TechSupport

Hi, 

There is a support to build nand flash image from soc.mak in  imx-mkimage 

And please refer to the guide (uuu_1.5.179 ) for burning it.

 

Regards

Harvey

0 Kudos