AnsweredAssumed Answered

Boot from MLC NAND (kobs-nd dump segmentation fault)

Question asked by sanjay dwivedi on Sep 15, 2014
Latest reply on Sep 22, 2014 by igorpadykov

I am using imx6 solo processor and trying to boot from micron MLC nand. I tried to write u-boot.imx image from kobs-ng.

I am not sure weather u-boot image is properly written in nand or not.

 

Can anyone help in finding the way to verify weather boot image written in nand is proper or not.

 

Also I need help in getting u-boot commands to initiate boot from nand.

 

 

Commandkobs-ng init -v -x u-boot.imx

LOG Message :

 

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

u-boot.imx_solo: verifying using key '00000000000000000000000000000000'

u-boot.imx_solo: is a valid bootstream for key '00000000000000000000000000000000'

mtd: opening: "/dev/mtd0"

mtd: opened '/dev/mtd0' - '(null)'

mtd: max_boot_stream_size_in_bytes = 4194304

mtd: boot_stream_size_in_bytes = 425856

mtd: boot_stream_size_in_pages = 104

mtd: #1 0x00200000 - 0x00600000 (0x00267f80)

mtd: #2 0x00600000 - 0x00a00000 (0x00667f80)

FCB

  m_u32Checksum = 0

  m_u32FingerPrint = 541213510

  m_u32Version = 16777216

  m_NANDTiming.m_u8DataSetup = 80

  m_NANDTiming.m_u8DataHold = 60

  m_NANDTiming.m_u8AddressSetup = 25

  m_NANDTiming.m_u8DSAMPLE_TIME = 6

  m_u32PageDataSize = 4096

  m_u32TotalPageSize = 4320

  m_u32SectorsPerBlock = 256

  m_u32NumberOfNANDs = 0

  m_u32TotalInternalDie = 0

  m_u32CellType = 0

  m_u32EccBlockNEccType = 8

  m_u32EccBlock0Size = 512

  m_u32EccBlockNSize = 512

  m_u32EccBlock0EccType = 8

  m_u32MetadataBytes = 10

  m_u32NumEccBlocksPerPage = 7

  m_u32EccBlockNEccLevelSDK = 0

  m_u32EccBlock0SizeSDK = 0

  m_u32EccBlockNSizeSDK = 0

  m_u32EccBlock0EccLevelSDK = 0

  m_u32NumEccBlocksPerPageSDK = 0

  m_u32MetadataBytesSDK = 0

  m_u32EraseThreshold = 0

  m_u32Firmware1_startingPage = 512

  m_u32Firmware2_startingPage = 1536

  m_u32PagesInFirmware1 = 104

  m_u32PagesInFirmware2 = 104

  m_u32DBBTSearchAreaStartAddress = 256

  m_u32BadBlockMarkerByte = 3904

  m_u32BadBlockMarkerStartBit = 0

  m_u32BBMarkerPhysicalOffset = 4096

  m_u32BCHType = 0

  m_NANDTMTiming.m_u32TMTiming2_ReadLatency = 0

  m_NANDTMTiming.m_u32TMTiming2_PreambleDelay = 0

  m_NANDTMTiming.m_u32TMTiming2_CEDelay = 0

  m_NANDTMTiming.m_u32TMTiming2_PostambleDelay = 0

  m_NANDTMTiming.m_u32TMTiming2_CmdAddPause = 0

  m_NANDTMTiming.m_u32TMTiming2_DataPause = 0

  m_NANDTMTiming.m_u32TMSpeed = 0

  m_NANDTMTiming.m_u32TMTiming1_BusyTimeout = 0

  m_u32DISBBM = 0

DBBT

  m_u32Checksum = 0

  m_u32FingerPrint = 1413628484

  m_u32Version = 16777216

  m_u32DBBTNumOfPages = 0

Firmware: image #0 @ 0x200000 size 0x68000 - available 0x400000

Firmware: image #1 @ 0x600000 size 0x68000 - available 0x400000

-------------- Start to write the [ FCB ] -----

mtd: erasing @0:0x0-0x100000

mtd: Writing FCB0 [ @0:0x0 ] (10e0) *

mtd: Writing FCB1 [ @0:0x40000 ] (10e0) *

mtd: Writing FCB2 [ @0:0x80000 ] (10e0) *

mtd: Writing FCB3 [ @0:0xc0000 ] (10e0) *

mtd_commit_bcb(FCB): status 0

 

-------------- Start to write the [ DBBT ] -----

mtd: erasing @0:0x100000-0x200000

mtd: Writing DBBT0 [ @0:0x100000 ] (1000) *

mtd: Writing DBBT1 [ @0:0x140000 ] (1000) *

mtd: Writing DBBT2 [ @0:0x180000 ] (1000) *

mtd: Writing DBBT3 [ @0:0x1c0000 ] (1000) *

mtd_commit_bcb(DBBT): status 0

 

---------- Start to write the [ u-boot.imx_solo ]----

mtd: Writting u-boot.imx_solo: #0 @0: 0x00200000 - 0x00268000

mtd: erasing @0:0x200000-0x300000

mtd: The last page is not full : 3968

mtd: We write one page for save guard. *

mtd: Writting u-boot.imx_solo: #1 @0: 0x00600000 - 0x00668000

mtd: erasing @0:0x600000-0x700000

mtd: The last page is not full : 3968

mtd: We write one page for save guard. *

 

COMMAND : kobs-ng dump -v u-boot.imx_solo 

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

mtd: opening: "/dev/mtd0"

mtd: opened '/dev/mtd0' - '(null)'

mtd: partition #0

  type = 8

  flags = 1024

  size = 10485760

  erasesize = 1048576

  writesize = 4096

  oobsize = 224

  blocks = 10

Segmentation fault

 

U-boot command used :

 

                                                       mw.l 0x20d8040 0x1683

 

                                                       mw.l 0x20d8044 0x10000000

         

                                                        reset

 

But it is not getting booted.

 

Reference Used : Freescale Yocto i.MX6 U-Boot NAND Boot

                                  

 

Thanks in advance

Outcomes