NAND boot in IMX7D

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

NAND boot in IMX7D

2,002 Views
gopinathsriniva
Contributor III

Hi All,

On default i.MX7D sabreSD board, does not have NAND flash.  So we mounted MT29F32G08CBADB 4GB nand in the device footprint. After adding NAND support in linux kernel and u-boot, I am able to detect, read and write to the NAND flash. Now I want to boot from this NAND flash. For this I am trying to flash the u-boot to NAND flash using below command in kernel.

kobs-ng init -x -v /boot/u-boot.imx

But I am getting below error. 

root@imx7:~# kobs-ng init -x -v
MTD CONFIG:
chip_0_device_path = "/dev/mtd0"
chip_1_device_path = "(null)"
search_exponent = 2
data_setup_time = 80
data_hold_time = 60
address_setup_time = 25
data_sample_time = 6
row_address_size = 3
column_address_size = 2
read_command_code1 = 0
read_command_code2 = 48
boot_stream_major_version = 1
boot_stream_minor_version = 0
boot_stream_sub_version = 0
ncb_version = 3
boot_stream_1_address = 0
boot_stream_2_address = 0
unable to create a temporary file
root@esomimx7:~# kobs-ng init -x -v u-boot
u-boot-nand.imx u-boot.imx
root@esomimx7:~# kobs-ng init -x -v u-boot.imx
MTD CONFIG:
chip_0_device_path = "/dev/mtd0"
chip_1_device_path = "(null)"
search_exponent = 2
data_setup_time = 80
data_hold_time = 60
address_setup_time = 25
data_sample_time = 6
row_address_size = 3
column_address_size = 2
read_command_code1 = 0
read_command_code2 = 48
boot_stream_major_version = 1
boot_stream_minor_version = 0
boot_stream_sub_version = 0
ncb_version = 3
boot_stream_1_address = 0
boot_stream_2_address = 0
-- We add the 1k-padding to the uboot.
.tmp_kobs_ng: verifying using key '00000000000000000000000000000000'
.tmp_kobs_ng: is a valid bootstream for key '00000000000000000000000000000000'
mtd: use new bch layout raw access mode
mtd: opening: "/dev/mtd0"
NFC geometry :
ECC Strength : 40
Page Size in Bytes : 8762
Metadata size : 10
ECC Chunk Size in byte : 1024
ECC Chunk count : 8
Block Mark Byte Offset : 7692
Block Mark Bit Offset : 0
====================================================
mtd: opened '/dev/mtd0' - '(null)'
mtd: mtd size too small
mtd_init failed!

I referred  this  https://community.nxp.com/thread/430107  link with similar issue. But that solution was not help full for me. Can anyone help me on this issue? Also May I know how to flash to NAND using MFG tool? Is there any other support to be added for this too? Your suggestions are greatly appreciated.

Thanks,

Gopinath S 

Tags (2)
0 Kudos
3 Replies

1,196 Views
igorpadykov
NXP Employee
NXP Employee

Hi Gopinath

please use mfg tools for programming bootable nand image,

use mfgtool2-yocto-mx-sabresd-nand.vbs script.

http://www.nxp.com/webapp/Download?colCode=IMX6_L4-1-15_2-0-0_MFG-TOOL&appType=license&location=null... 

one can try with Demo Images

http://www.nxp.com/webapp/Download?colCode=L4.1.15_2.0.0_iMX7D&appType=license&location=null&Parent_... 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,196 Views
gopinathsriniva
Contributor III

Hi igor,

Thank You for your reply.  I can flash the demo images from that mfgtool2-yocto-mx-sabresd-nand.vbs script. I have other two questions.

1. After I flashed using MFG tools, how can I update u-boot or zimage or dtb alone from the u-boot itself ?  For example, In case of eMMC and SD I can copy the files to boot partition using ums command. I guess here need to use "nand write" command. But not sure about the offset details. Can you please give me the steps for this?

2. How can I build the mfg tool u-boot, kernel and dtb images by myself? Also is this MFG tool binaries vary for each boot device? 

Regards,

Gopinath

0 Kudos

1,196 Views
igorpadykov
NXP Employee
NXP Employee

Hi Gopinath

for uboot nand commands one can look at denx help: https://www.denx.de/wiki/DULG/UBootCmdGroupNand
or for example: http://variwiki.com/index.php?title=VAR-SOM-MX6_NAND_Flash_Burning_Jethro
for building mfg tool u-boot, kernel and dtb images one can follow attached Yocto Guide
sect.6.2 Manufacturing Tool, MFGTool

Best regards
igor

0 Kudos