Generating flash.bin and flash_fw.bin for NXP iMX93 evk

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Generating flash.bin and flash_fw.bin for NXP iMX93 evk

3,056 次查看
AdityaShetty
Contributor I

Hello, I am trying to generate flash.bin and flash_fw.bin files through which i intend to flash SPI Nand and then boot the board up with it. However I seem to have been stuck in doing the same.

I have cloned the imx-mkimage repo. I'll also be attaching the logs for your reference. Any help would be appreciated.

farhan@farhan-To-be-filled-by-O-E-M:~/Downloads/imx-mkimage-lf-6.6.3_1.0.0$ ls
iMX8DXL iMX8M iMX8QM iMX8QX iMX8ULP iMX91 iMX93 iMX95 LICENSE Makefile README Readme.imx95 SCR-imx-mkimage.txt scripts src
farhan@farhan-To-be-filled-by-O-E-M:~/Downloads/imx-mkimage-lf-6.6.3_1.0.0$ ls iMX93
scripts signature.dts soc.mak
farhan@farhan-To-be-filled-by-O-E-M:~/Downloads/imx-mkimage-lf-6.6.3_1.0.0$ 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
farhan@farhan-To-be-filled-by-O-E-M:~/Downloads/imx-mkimage-lf-6.6.3_1.0.0$ make SOC=iMX93 REV=A1 flash_singleboot_spinand
Compiling mkimage_imx8
In file included from src/mkimage_imx8.c:29:
src/mkimage_imx8.c: In function ‘main’:
src/build_info.h:1:24: error: invalid suffix "x" on integer constant
1 | #define MKIMAGE_COMMIT 0x
| ^~
src/mkimage_imx8.c:978:59: note: in expansion of macro ‘MKIMAGE_COMMIT’
978 | fprintf(stdout, "%08x\n", MKIMAGE_COMMIT);
| ^~~~~~~~~~~~~~
make[1]: *** [Makefile:52: /home/farhan/Downloads/imx-mkimage-lf-6.6.3_1.0.0/mkimage_imx8] Error 1
make: *** [Makefile:25: flash_singleboot_spinand] Error 2

0 项奖励
回复
5 回复数

3,026 次查看
Zhiming_Liu
NXP TechSupport
NXP TechSupport

You can uset this directly.Don't need compile it.

0 项奖励
回复

3,022 次查看
AdityaShetty
Contributor I
Hello Liu, Thanks for this, but i did work my way around this but i seem to be stuck with the flashing of the files onto the Nand. I was hoping you could assist me with it
0 项奖励
回复

3,020 次查看
AdityaShetty
Contributor I
So, i've generated the flash.bin and flash_fw.bin which i'm trying to put into the NAND. I referred to the UUU document and tried running the following command: sudo uuu -v -b spi_nand flash_fw.bin u-boot.bin

I will also be attaching the logs for your reference.

farhan@farhan-To-be-filled-by-O-E-M:~/Downloads/imx-mkimage-lf-6.6.3_1.0.0/iMX93$ sudo uuu -v -b spi_nand flash_fw.bin u-boot.bin
uuu (Universal Update Utility) for nxp imx chips -- lib1.5.125

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

# @_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_fw.bin

# This command will be run when ROM support stream mode
# i.MX8QXP, i.MX8QM, skip QSPI header
SDPS: boot -f flash_fw.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_fw.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_fw.bin -skipspl -skipfhdr
SDPV: jump
# }

FB: ucmd setenv fastboot_buffer ${loadaddr}
FB: download -f u-boot.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...
New USB Device Attached at 3:2
3:2>Start Cmd:FB: ucmd setenv fastboot_buffer ${loadaddr}
3:2>Okay (0.004s)
3:2>Start Cmd:FB: download -f u-boot.bin
3:2>Okay (0.056s)
3:2>Start Cmd:FB: ucmd if test ! -n "$fastboot_bytes"; then setenv fastboot_bytes $filesize; else true; fi
3:2>Okay (0.004s)
3:2>Start Cmd:FB[-t 60000]: ucmd fspinand init spi-nand0 ${fastboot_buffer} ${fastboot_bytes}
3:2>Fail (0.004s)
0 项奖励
回复

2,929 次查看
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @AdityaShetty 

You can try below command

uuu -b spi_nand  xxx.bin imx-boot-imx93-11x11-lpddr4x-evk-sd.bin-flash_singleboot

0 项奖励
回复

2,915 次查看
AdityaShetty
Contributor I
Hello @Zhiming_Liu
I did try the above mentioned command but i'm still getting the same error. Attaching the logs for your reference.
farhan@farhan-To-be-filled-by-O-E-M:~/Downloads/imx-mkimage-lf-6.6.3_1.0.0/iMX93$ uuu -v -b spi_nand flash_fw.bin imx-boot-imx93-11x11-lpddr4x-evk-sd.bin-flash_singleboot
uuu (Universal Update Utility) for nxp imx chips -- lib1.5.125

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

# @_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_fw.bin

# This command will be run when ROM support stream mode
# i.MX8QXP, i.MX8QM, skip QSPI header
SDPS: boot -f flash_fw.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_fw.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_fw.bin -skipspl -skipfhdr
SDPV: jump
# }

FB: ucmd setenv fastboot_buffer ${loadaddr}
FB: download -f imx-boot-imx93-11x11-lpddr4x-evk-sd.bin-flash_singleboot

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...
New USB Device Attached at 3:2
3:2>Start Cmd:FB: ucmd setenv fastboot_buffer ${loadaddr}
3:2>Okay (0.004s)
3:2>Start Cmd:FB: download -f imx-boot-imx93-11x11-lpddr4x-evk-sd.bin-flash_singleboot
3:2>Okay (0.097s)
3:2>Start Cmd:FB: ucmd if test ! -n "$fastboot_bytes"; then setenv fastboot_bytes $filesize; else true; fi
3:2>Okay (0.005s)
3:2>Start Cmd:FB[-t 60000]: ucmd fspinand init spi-nand0 ${fastboot_buffer} ${fastboot_bytes}
3:2>Fail (0.003s)
0 项奖励
回复