I try to put the u-boot into nand using the kobs-ng tool. The version of the tool is kobs-ng version : [ 1.3 ] git hash (unknown)
Built by Yocto as imx-kobs-3.10.17-1.0.0
I write my u-boot.imx image with NAND support and the correct DCD data into NAND but it fails to boot. I do see some
activity on the scope on GPMI bus but no proper boot.
Reading imx6 SOLO manual indicates that the FingerPrint for FCB is 0x4E434220, and 0x44424254 DBBT.
However the kobs tool is using other values for imx6:
#define NCB_FINGERPRINT1 | 0x504d5453 | //!< 'STMP' |
#define NCB_FINGERPRINT2 | 0x2042434e | //!< 'NCB<space>' - NAND Control Block |
#define NCB_FINGERPRINT3 | 0x4e494252 | //!< 'RBIN' - ROM Boot Image Block - N |
#define FCB_FINGERPRINT | 0x20424346 | //!< 'FCB ' |
#define FCB_VERSION_1 | 0x01000000 |
#define LDLB_FINGERPRINT1 | 0x504d5453 | //!< 'STMP' |
#define LDLB_FINGERPRINT2 | 0x424c444c | //!< 'LDLB' - Logical Device Layout Block |
#define LDLB_FINGERPRINT3 | 0x4c494252 | //!< 'RBIL' - ROM Boot Image Block - L |
#define DBBT_FINGERPRINT1 | 0x504d5453 | //!< 'STMP' |
#define DBBT_FINGERPRINT2_V2 | 0x44424254 | //!< 'DBBT' - Discovered Bad Block Table. |
#define DBBT_FINGERPRINT2 | 0x54424244 | //!< 'DBBT' - Discovered Bad Block Table. |
#define DBBT_FINGERPRINT3 | 0x44494252 | //!< 'RBID' - ROM Boot Image Block - D |
#define DBBT_VERSION_1 | 0x01000000 |
#define LDLB_VERSION_MAJOR 0x0001
#define LDLB_VERSION_MINOR 0x0000
#define LDLB_VERSION_SUB | 0x0000 |
#define TYPICAL_NAND_READ_SIZE | 2048 |
When I write the u-boot I observe different Fingerprints:
root@imx6s:~# kobs-ng init -v -w u-boot.imx |
it is an IMX6 platform
MTD CONFIG:
chip_0_device_pnand_erase_nand: attempt to erase a bad block at page 0x00000000
ath = "/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: verifying using key '00000000000000000000000000000000'
u-boot.imx: is a valid bootstream for key '00000000000000000000000000000000'
mtd: opening: "/dev/mtd0"
NFC geometry :
ECC Strength | : 8 | |
Page Size in Bytes : 2112 | ||
Metadata size | : 10 | |
ECC Chunk Size in byte : 512 | ||
ECC Chunk count | : 4 | |
Block Mark Byte Offset : 1999 | ||
Block Mark Bit Offset : 0 |
====================================================
mtd: opened '/dev/mtd0' - '(null)'
mtd: max_boot_stream_size_in_bytes = 7864320
mtd: boot_stream_size_in_bytes = 510976
mtd: boot_stream_size_in_pages = 250
mtd: #1 0x00100000 - 0x00880000 (0x0017cc00)
mtd: #2 0x00880000 - 0x01000000 (0x008fcc00)
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 = 2048
m_u32TotalPageSize = 2112
m_u32SectorsPerBlock = 64
m_u32NumberOfNANDs = 0
m_u32TotalInternalDie = 0
m_u32CellType = 0
m_u32EccBlockNEccType = 4
m_u32EccBlock0Size = 512
m_u32EccBlockNSize = 512
m_u32EccBlock0EccType = 4
m_u32MetadataBytes = 10
m_u32NumEccBlocksPerPage = 3
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 = 4352
m_u32PagesInFirmware1 = 250
m_u32PagesInFirmware2 = 250
m_u32DBBTSearchAreaStartAddress = 256
m_u32BadBlockMarkerByte = 1999
m_u32BadBlockMarkerStartBit = 0
m_u32BBMarkerPhysicalOffset = 2048
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 0x7d000 - available 0x780000
Firmware: image #1 @ 0x880000 size 0x7d000 - available 0x780000
-------------- Start to write the [ FCB ] -----
mtd: erasing @0:0x0-0x20000
mtd: device 0 fails MEMERASE (0x0 - 0x20000)
mtd: Failed to erase block @0x0
mtd: erasing @0:0x20000-0x40000
mtd: Writing FCB1 [ @0:0x20000 ] (840) *
mtd: erasing @0:0x40000-0x60000
mtd: Writing FCB2 [ @0:0x40000 ] (840) *
mtd: erasing @0:0x60000-0x80000
mtd: Writing FCB3 [ @0:0x60000 ] (840) *
mtd_commit_bcb(FCB): status 1
-------------- Start to write the [ DBBT ] -----
mtd: erasing @0:0x80000-0xa0000
mtd: Writing DBBT0 [ @0:0x80000 ] (800) *
mtd: erasing @0:0xa0000-0xc0000
mtd: Writing DBBT1 [ @0:0xa0000 ] (800) *
mtd: erasing @0:0xc0000-0xe0000
mtd: Writing DBBT2 [ @0:0xc0000 ] (800) *
mtd: erasing @0:0xe0000-0x100000
mtd: Writing DBBT3 [ @0:0xe0000 ] (800) *
mtd_commit_bcb(DBBT): status 0
---------- Start to write the [ u-boot.imx ]----
mtd: Writting u-boot.imx: #0 @0: 0x00100000 - 0x0017d000
mtd: erasing @0:0x100000-0x120000
mtd: erasing @0:0x120000-0x140000
mtd: erasing @0:0x140000-0x160000
mtd: erasing @0:0x160000-0x180000
mtd: The last page is not full : 1024
mtd: We write one page for save guard. *
mtd: Writting u-boot.imx: #1 @0: 0x00880000 - 0x008fd000
mtd: erasing @0:0x880000-0x8a0000
mtd: erasing @0:0x8a0000-0x8c0000
mtd: erasing @0:0x8c0000-0x8e0000
mtd: erasing @0:0x8e0000-0x900000
mtd: The last page is not full : 1024
mtd: We write one page for save guard. *
The FCB and DBBT are:
FCB
m_u32Checksum = 0x00000000
m_u32FingerPrint = 0x20424346 ???????????
m_u32Version = 0x01000000
DBBT
m_u32Checksum = 0x00000000
m_u32FingerPrint = 0x54424244 ?????????
m_u32Version = 0x01000000
When I do a dump I get the following:
kobs-ng dump -v |
it is an IMX6 platform
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"
NFC geometry :
ECC Strength | : 8 | |
Page Size in Bytes : 2112 | ||
Metadata size | : 10 | |
ECC Chunk Size in byte : 512 | ||
ECC Chunk count | : 4 | |
Block Mark Byte Offset : 1999 | ||
Block Mark Bit Offset : 0 |
====================================================
mtd: opened '/dev/mtd0' - '(null)'
mtd: partition #0
type = 4
flags = 17408
size = 16777216
erasesize = 131072
writesize = 2048
oobsize = 64
blocks = 128
mtd: fingerprints mismatch @0:0x0
[0000] 20 28 01 83 38 40 82 04 58 68 83 87 90 a8 05 8c | (..8@..-Xh......
[0010] e8 10 89 13 78 b9 8e 9f 60 ca 17 b3 d8 83 a6 52 | ....x...-`......R
[0020] 38 4e be 05 10 d2 64 58 48 20 23 5e 58 f2 87 b6 | 8N....dX-H #^X...
[0030] a0 12 ab 14 f8 04 33 cb 98 17 de df 90 1c 11 ab | ......3.-........
[0040] 28 34 ef 8a b8 50 00 36 e0 84 ef c0 98 d5 ef f6 | (4...P.6-........
[0050] 78 5a df b7 10 30 cf ae 88 8a ae 66 98 ba 7d 15 | xZ...0..-...f..}.
[0060] 20 45 2c 7c b8 ff a9 91 d8 44 d6 0d 90 44 80 9f | E,|....-.D...D..
[0070] 68 89 56 ad f8 cd d6 4c 60 57 2d fa 58 25 04 47 | h.V....L-`W-.X%.G
[0080] b8 7c 31 41 10 a2 35 88 c8 1e 67 c9 d8 c0 9c 51 | .|1A..5.-..g....Q
mtd: fingerprints mismatch @0:0x20000
[0000] d9 fa ff ff 46 43 42 20 00 00 00 01 50 3c 19 06 | ....FCB -....P<..
[0010] 00 00 00 00 00 08 00 00 40 08 00 00 40 00 00 00 | ........-@...@...
[0020] 00 00 00 00 00 00 00 00 00 00 00 00 04 00 00 00 | ........-........
[0030] 00 02 00 00 00 02 00 00 04 00 00 00 0a 00 00 00 | ........-........
[0040] 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ........-........
[0050] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ........-........
[0060] 00 00 00 00 00 00 00 00 00 02 00 00 00 11 00 00 | ........-........
[0070] fa 00 00 00 fa 00 00 00 00 01 00 00 cf 07 00 00 | ........-........
[0080] 00 00 00 00 00 08 00 00 00 00 00 00 00 00 00 00 | ........-........
mtd: fingerprints mismatch @0:0x40000
[0000] d9 fa ff ff 46 43 42 20 00 00 00 01 50 3c 19 06 | ....FCB -....P<..
[0010] 00 00 00 00 00 08 00 00 40 08 00 00 40 00 00 00 | ........-@...@...
[0020] 00 00 00 00 00 00 00 00 00 00 00 00 04 00 00 00 | ........-........
[0030] 00 02 00 00 00 02 00 00 04 00 00 00 0a 00 00 00 | ........-........
[0040] 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ........-........
[0050] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ........-........
[0060] 00 00 00 00 00 00 00 00 00 02 00 00 00 11 00 00 | ........-........
[0070] fa 00 00 00 fa 00 00 00 00 01 00 00 cf 07 00 00 | ........-........
[0080] 00 00 00 00 00 08 00 00 00 00 00 00 00 00 00 00 | ........-........
mtd: fingerprints mismatch @0:0x60000
[0000] d9 fa ff ff 46 43 42 20 00 00 00 01 50 3c 19 06 | ....FCB -....P<..
[0010] 00 00 00 00 00 08 00 00 40 08 00 00 40 00 00 00 | ........-@...@...
[0020] 00 00 00 00 00 00 00 00 00 00 00 00 04 00 00 00 | ........-........
[0030] 00 02 00 00 00 02 00 00 04 00 00 00 0a 00 00 00 | ........-........
[0040] 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ........-........
[0050] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ........-........
[0060] 00 00 00 00 00 00 00 00 00 02 00 00 00 11 00 00 | ........-........
[0070] fa 00 00 00 fa 00 00 00 00 01 00 00 cf 07 00 00 | ........-........
[0080] 00 00 00 00 00 08 00 00 00 00 00 00 00 00 00 00 | ........-........
mtd: NCB0 not found
mtd: fingerprints mismatch @0:0x80000
[0000] 00 00 44 42 42 54 00 00 00 01 00 00 00 00 00 00 | ..DBBT..-........
[0010] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ........-........
[0020] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ........-........
[0030] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ........-........
[0040] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ........-........
[0050] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ........-........
[0060] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ........-........
[0070] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ........-........
[0080] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ........-........
mtd: fingerprints mismatch @0:0xa0000
[0000] 00 00 44 42 42 54 00 00 00 01 00 00 00 00 00 00 | ..DBBT..-........
[0010] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ........-........
[0020] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ........-........
[0030] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ........-........
[0040] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ........-........
[0050] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ........-........
[0060] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ........-........
[0070] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ........-........
[0080] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ........-........
mtd: fingerprints mismatch @0:0xc0000
[0000] 00 00 44 42 42 54 00 00 00 01 00 00 00 00 00 00 | ..DBBT..-........
[0010] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ........-........
[0020] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ........-........
[0030] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ........-........
[0040] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ........-........
[0050] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ........-........
[0060] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ........-........
[0070] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ........-........
[0080] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ........-........
mtd: fingerprints mismatch @0:0xe0000
[0000] 00 00 44 42 42 54 00 00 00 01 00 00 00 00 00 00 | ..DBBT..-........
[0010] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ........-........
[0020] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ........-........
[0030] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ........-........
[0040] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ........-........
[0050] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ........-........
[0060] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ........-........
[0070] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ........-........
[0080] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ........-........
mtd: NCB1 not found
mtd: neither NCB1 or NCB2 found ERROR
Unable to load boot structures
root@imx6s:~#
The first FCB stride is damaged because of the bad block at the start, but the
rest should be ok..
I have the feeling that kobs-ng might not be the right version, or something else has gone wrong ..
Does anyone used kobs-ng on IMX6 SOLO successfully ? Have you seen similar problems?
Thank you
Andreas
Hi,
The kobs values seem to be correct. Have you checked if the image .imx is with the 0x400 offsset?
Best Regards,
Alejandro
Hi,
I have not used kobs-ng for the imx6 SOLO.
I will check the differences in the code first. I will get back to you as soon as I find something.
Best Regards,
Alejandro