AnsweredAssumed Answered

i.MX6 Nand Boot not working

Question asked by Jagan Teki on Sep 28, 2016
Latest reply on Sep 28, 2016 by igorpadykov

Hi All,

 

I have refereed so many threads for this wrt my problem but none couldn't find any solution, request for help on.

 

Below are the details:

 

root@icorem6solo:~# cat /proc/version
Linux version 4.1.15-g83a0053-dirty (root@Mr) (gcc version 4.9.0 (GCC) ) #1 SMP Mon Sep 12 15:32:31 IST 2016

root@icorem6solo:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00200000 00040000 "spl"

root@icorem6solo:~# flash_erase /dev/mtd0 0 0

root@icorem6solo:~#  dd if=SPL of=SPL-new bs=512 seek=2

root@icorem6solo:~# kobs-ng init -x  SPL-new --search_exponent=1 -[   42.607069]
[   42.607069] Bus freq set to 24000000 start...
[   42.613311] Bus freq set to 24000000 done! cpu=0

MTD CONFIG:
  chip_0_device_path = "/dev/mtd0"
  chip_1_device_path = "(null)"
  search_exponent = 1
  data_setup_time = 80
  data_hold_time = 60
  address_setup_time = 25
  data_sample_time = 6
  row_addr[   44.153592]
[   44.153592] Bus freq set to 400000000 start...
ess_size = 3
  column_address_siz[   44.163296] Bus freq set to 400000000 done! cpu=0
e = 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: opening: "/dev/mtd0"
NFC geometry :
        ECC Strength       : 16
        Page Size in Bytes : 4320
        Metadata size      : 10
        ECC Chunk Size in byte : 512
        ECC Chunk count        : 8
        Block Mark Byte Offset : 3904
        Block Mark Bit Offset  : 0
====================================================
mtd: opened '/dev/mtd0' - '(null)'
mtd: max_boot_stream_size_in_bytes = 524288
mtd: boot_stream_size_in_bytes = 33792
mtd: boot_stream_size_in_pages = 9
mtd: #1 0x00100000 - 0x00180000 (0x00108400)
mtd: #2 0x00180000 - 0x00200000 (0x00188400)
FCB
  m_u32Checksum = 0x00000000
  m_u32FingerPrint = 0x20424346
  m_u32Version = 0x01000000
  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 = 64
  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 = 256
  m_u32Firmware2_startingPage = 384
  m_u32PagesInFirmware1 = 9
  m_u32PagesInFirmware2 = 9
  m_u32DBBTSearchAreaStartAddress = 128
  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 = 0x00000000
  m_u32FingerPrint = 0x54424244
  m_u32Version = 0x01000000
  m_u32DBBTNumOfPages = 0
Firmware: image #0 @ 0x100000 size 0x9000 - available 0x80000
Firmware: image #1 @ 0x180000 size 0x9000 - available 0x80000
-------------- Start to write the [ FCB ] -----
mtd: erasing @0:0x0-0x40000
mtd: Writing FCB0 [ @0:0x0 ] (10e0) *
mtd: erasing @0:0x40000-0x80000
mtd: Writing FCB1 [ @0:0x40000 ] (10e0) *
mtd_commit_bcb(FCB): status 0

-------------- Start to write the [ DBBT ] -----
mtd: erasing @0:0x80000-0xc0000
mtd: Writing DBBT0 [ @0:0x80000 ] (1000) *
mtd: erasing @0:0xc0000-0x100000
mtd: Writing DBBT1 [ @0:0xc0000 ] (1000) *
mtd_commit_bcb(DBBT): status 0

---------- Start to write the [ .tmp_kobs_ng ]----
mtd: Writting .tmp_kobs_ng: #0 @0: 0x00100000 - 0x00109000
mtd: erasing @0:0x100000-0x140000
mtd: The last page is not full : 1024
mtd: We write one page for save guard. *
mtd: Writting .tmp_kobs_ng: #1 @0: 0x00180000 - 0x00189000
mtd: erasing @0:0x180000-0x1c0000
mtd: The last page is not full : 1024
mtd: We write one page for save guard. *

root@icorem6solo:~# kobs-ng dump -v dump SPL-new
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_ad[   79.208118]
[   79.208118] Bus freq set to 400000000 start...
dress = 0
  boot_stream_2_address[   79.216246] Bus freq set to 400000000 done! cpu=0
 = 0
mtd: opening: "/dev/mtd0"
NFC geometry :
        ECC Strength       : 16
        Page Size in Bytes : 4320
        Metadata size      : 10
        ECC Chunk Size in byte : 512
        ECC Chunk count        : 8
        Block Mark Byte Offset : 3904
        Block Mark Bit Offset  : 0
====================================================
mtd: opened '/dev/mtd0' - '(null)'
mtd: partition #0
  type = 4
  flags = 1024
  size = 2097152
  erasesize = 262144
  writesize = 4096
  oobsize = 224
  blocks = 8
mtd: search areas too large
Unable to load boot structures

 

U-boot Verification:
------------------------

icorem6qdl> nand read ${loadaddr} 0x0 0x40000

NAND read: device 0 offset 0x0, size 0x40000
NAND read from offset 0 failed -74
 0 bytes read: ERROR
icorem6qdl> md ${loadaddr}
12000000: 00000000 00000000 00000000 fffffb8b    ................
12000010: 20424346 01000000 06193c50 00000000    FCB ....P<......
12000020: 00001000 000010e0 00000040 00000000    ........@.......
12000030: 00000000 00000000 00000008 00000200    ................
12000040: 00000200 00000008 0000000a 00000007    ................
12000050: 00000000 00000000 00000000 00000000    ................
12000060: 00000000 00000000 00000000 00000000    ................
12000070: 00000000 00000100 00000680 00000009    ................
12000080: 00000009 00000080 00000f40 00000000    ........@.......
12000090: 00001000 00000000 00000000 00000000    ................
120000a0: 00000000 00000000 00000000 00000000    ................
120000b0: 00000000 00000000 00000000 00000000    ................
120000c0: 00000000 00000000 00000000 00000000    ................
120000d0: 00000000 00000000 00000000 00000000    ................
120000e0: 00000000 00000000 00000000 00000000    ................
120000f0: 00000000 00000000 00000000 00000000    ................
icorem6qdl> nand read ${loadaddr} 0x40000 0x80000

NAND read: device 0 offset 0x40000, size 0x80000
NAND read from offset 40000 failed -74
 0 bytes read: ERROR
icorem6qdl> md ${loadaddr}
12000000: 00000000 00000000 00000000 fffffb8b    ................
12000010: 20424346 01000000 06193c50 00000000    FCB ....P<......
12000020: 00001000 000010e0 00000040 00000000    ........@.......
12000030: 00000000 00000000 00000008 00000200    ................
12000040: 00000200 00000008 0000000a 00000007    ................
12000050: 00000000 00000000 00000000 00000000    ................
12000060: 00000000 00000000 00000000 00000000    ................
12000070: 00000000 00000100 00000680 00000009    ................
12000080: 00000009 00000080 00000f40 00000000    ........@.......
12000090: 00001000 00000000 00000000 00000000    ................
120000a0: 00000000 00000000 00000000 00000000    ................
120000b0: 00000000 00000000 00000000 00000000    ................
120000c0: 00000000 00000000 00000000 00000000    ................
120000d0: 00000000 00000000 00000000 00000000    ................
120000e0: 00000000 00000000 00000000 00000000    ................
120000f0: 00000000 00000000 00000000 00000000    ................
icorem6qdl> nand read ${loadaddr} 0x80000 0xc0000

NAND read: device 0 offset 0x80000, size 0xc0000
NAND read from offset 80000 failed -74
 0 bytes read: ERROR
icorem6qdl> md ${loadaddr}
12000000: 00000000 54424244 01000000 00000000    ....DBBT........
12000010: 00000000 00000000 00000000 00000000    ................
12000020: 00000000 00000000 00000000 00000000    ................
12000030: 00000000 00000000 00000000 00000000    ................
12000040: 00000000 00000000 00000000 00000000    ................
12000050: 00000000 00000000 00000000 00000000    ................
12000060: 00000000 00000000 00000000 00000000    ................
12000070: 00000000 00000000 00000000 00000000    ................
12000080: 00000000 00000000 00000000 00000000    ................
12000090: 00000000 00000000 00000000 00000000    ................
120000a0: 00000000 00000000 00000000 00000000    ................
120000b0: 00000000 00000000 00000000 00000000    ................
120000c0: 00000000 00000000 00000000 00000000    ................
120000d0: 00000000 00000000 00000000 00000000    ................
120000e0: 00000000 00000000 00000000 00000000    ................
120000f0: 00000000 00000000 00000000 00000000    ................
icorem6qdl> nand read ${loadaddr} 0xc0000 0x100000

NAND read: device 0 offset 0xc0000, size 0x100000
NAND read from offset c0000 failed -74
 0 bytes read: ERROR
icorem6qdl> md ${loadaddr}
12000000: 00000000 54424244 01000000 00000000    ....DBBT........
12000010: 00000000 00000000 00000000 00000000    ................
12000020: 00000000 00000000 00000000 00000000    ................
12000030: 00000000 00000000 00000000 00000000    ................
12000040: 00000000 00000000 00000000 00000000    ................
12000050: 00000000 00000000 00000000 00000000    ................
12000060: 00000000 00000000 00000000 00000000    ................
12000070: 00000000 00000000 00000000 00000000    ................
12000080: 00000000 00000000 00000000 00000000    ................
12000090: 00000000 00000000 00000000 00000000    ................
120000a0: 00000000 00000000 00000000 00000000    ................
120000b0: 00000000 00000000 00000000 00000000    ................
120000c0: 00000000 00000000 00000000 00000000    ................
120000d0: 00000000 00000000 00000000 00000000    ................
120000e0: 00000000 00000000 00000000 00000000    ................
120000f0: 00000000 00000000 00000000 00000000    ................

Outcomes