mx6sx kobs-ng

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

mx6sx kobs-ng

Jump to solution
2,532 Views
peterbärtsch
Contributor III

Hello

I try to program nand boot sector with kobs-ng. But it doesn't work.

# kobs-ng -v -x 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: 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 = 3670016

mtd: boot_stream_size_in_bytes = 352256

mtd: boot_stream_size_in_pages = 172

mtd: #1 0x00100000 - 0x00480000 (0x00156000)

mtd: #2 0x00480000 - 0x00800000 (0x004d6000)

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 = 2304

  m_u32PagesInFirmware1 = 172

  m_u32PagesInFirmware2 = 172

  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

  m_u32BBMarkerPhysicalOffsetInSpareData = 0

  m_u32OnfiSyncEnable = 0

  m_NANDONFITiming.m_u32ONFISpeed = 0

  m_NANDONFITiming.m_u32ONFITiming_ReadLatency = 0

  m_NANDONFITiming.m_u32ONFITiming_CEDelay = 0

  m_NANDONFITiming.m_u32ONFITiming_PreambleDelay = 0

  m_NANDONFITiming.m_u32ONFITiming_PostambleDelay = 0

  m_NANDONFITiming.m_u32ONFITiming_CmdAddPause = 0

  m_NANDONFITiming.m_u32ONFITiming_DataPause = 0

  m_NANDONFITiming.m_u32ONFITiming_BusyTimeout = 0

  m_u32DISBBSearch = 0

  m_u32RandomizerEnable = 0

  m_u32ReadRetryEnable = 0

  m_u32ReadRetrySeqLength = 0

DBBT

  m_u32Checksum = 0x00000000

  m_u32FingerPrint = 0x54424244

  m_u32Version = 0x01000000

  m_u32DBBTNumOfPages = 0

Firmware: image #0 @ 0x100000 size 0x56000 - available 0x380000

Firmware: image #1 @ 0x480000 size 0x56000 - available 0x380000

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

mtd: erasing @0:0x0-0x20000

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

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 0

-------------- 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 [ .tmp_kobs_ng ]----

mtd: Writting .tmp_kobs_ng: #0 @0: 0x00100000 - 0x00156000

mtd: erasing @0:0x100000-0x120000

mtd: erasing @0:0x120000-0x140000

mtd: erasing @0:0x140000-0x160000

mtd: We write one page for save guard. *

mtd: Writting .tmp_kobs_ng: #1 @0: 0x00480000 - 0x004d6000

mtd: erasing @0:0x480000-0x4a0000

mtd: erasing @0:0x4a0000-0x4c0000

mtd: erasing @0:0x4c0000-0x4e0000

mtd: We write one page for save guard. *

# kobs-ng dump -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

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 = 1024

  size = 8388608

  erasesize = 131072

  writesize = 2048

  oobsize = 64

  blocks = 64

mtd: fingerprints mismatch @0:0x0

mtd: fingerprints mismatch @0:0x20000

mtd: fingerprints mismatch @0:0x40000

mtd: fingerprints mismatch @0:0x60000

mtd: NCB0 not found

mtd: fingerprints mismatch @0:0x80000

mtd: fingerprints mismatch @0:0xa0000

mtd: fingerprints mismatch @0:0xc0000

mtd: fingerprints mismatch @0:0xe0000

mtd: NCB1 not found

mtd: neither NCB1 or NCB2 found ERROR

Unable to load boot structures

I check the nand with hexdump and DBBT looks good

# hexdump /dev/mtd0 -C -n 100 -s 0x80000

00080000  00 00 00 00 44 42 42 54  00 00 00 01 00 00 00 00  |....DBBT........|

00080010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

*

00080060

When I check the FCB I can't find any FCB fingerprint.

# hexdump /dev/mtd0 -C -n 100

00000000  d5 2a d3 2c ad 52 33 cc  34 cb aa 55 2d d2 4c b3  |.*.,.R3.4..U-.L.|

00000010  d2 2d b3 4c 35 ca c9 b0  ca 35 72 88 f0 6d 35 ca  |.-.L5....5r..m5.|

00000020  b2 4c fd 6e d2 32 ad 52  4b b4 52 a5 52 ad 12 a5  |.L.n.2.RK.R.R...|

00000030  4a b5 f2 4d 4d b2 32 cd  4a b5 b4 4b 4b b4 2c d3  |J..MM.2.J..KK.,.|

00000040  aa 55 51 aa 2a d5 2a d7  cc 33 33 ce d4 2b cf 34  |.UQ.*.*..33..+.4|

00000050  33 cc 46 b3 b4 4b ce 32  33 cc 54 ab 4a b5 cc 33  |3.F..K.23.T.J..3|

00000060  b3 4c 33 cc                                       |.L3.|

00000064

Version:

/# kobs-ng

kobs-ng version : [ 1.3 ] git hash (unknown)

ROM Version 5

usage: kobs-ng [COMMAND] [ARGS]

Where [COMMAND] is one of:

What's wrong? Has anybody a idea?

Peter

Labels (1)
0 Kudos
1 Solution
1,261 Views
peterbärtsch
Contributor III

It was a hw problem :smileyangry::smileyangry::smileyangry:  Now it works.

Peter

View solution in original post

0 Kudos
6 Replies
1,261 Views
peterbärtsch
Contributor III

Hi

I add only imx-kobs in my IMAGE_INSTALL_append config. Is that wrong? Need imx-kobs other packages to run correctly?

Kernel is linux-fslc-mx6_3.14-1.0. I have to fix this week :smileyshocked:

Can someone help me?

0 Kudos
1,261 Views
peterbärtsch
Contributor III

Hi

I try to program with mfg-tool. But with no difference...

UTP: received command 'send'

UTP: sending Success to kernel for command send.

UTP: received command '$ kobs-ng init -x -v $FILE'

UTP: executing "kobs-ng init -x -v $FILE"

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: 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 = 1572864

mtd: boot_stream_size_in_bytes = 364544

mtd: boot_stream_size_in_pages = 178

mtd: #1 0x00100000 - 0x00280000 (0x00159000)

mtd: #2 0x00280000 - 0x00400000 (0x002d9000)

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 = 1280

  m_u32PagesInFirmware1 = 178

  m_u32PagesInFirmware2 = 178

  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

  m_u32BBMarkerPhysicalOffsetInSpareData = 0

  m_u32OnfiSyncEnable = 0

  m_NANDONFITiming.m_u32ONFISpeed = 0

  m_NANDONFITiming.m_u32ONFITiming_ReadLatency = 0

  m_NANDONFITiming.m_u32ONFITiming_CEDelay = 0

  m_NANDONFITiming.m_u32ONFITiming_PreambleDelay = 0

  m_NANDONFITiming.m_u32ONFITiming_PostambleDelay = 0

  m_NANDONFITiming.m_u32ONFITiming_CmdAddPause = 0

  m_NANDONFITiming.m_u32ONFITiming_DataPause = 0

  m_NANDONFITiming.m_u32ONFITiming_BusyTimeout = 0

  m_u32DISBBSearch = 0

  m_u32RandomizerEnable = 0

  m_u32ReadRetryEnable = 0

  m_u32ReadRetrySeqLength = 0

DBBT

  m_u32Checksum = 0x00000000

  m_u32FingerPrint = 0x54424244

  m_u32Version = 0x01000000

  m_u32DBBTNumOfPages = 0

Firmware: image #0 @ 0x100000 size 0x59000 - available 0x180000

Firmware: image #1 @ 0x280000 size 0x59000 - available 0x180000

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

mtd: erasing @0:0x0-0x20000

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

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 0

-------------- 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 [ .tmp_kobs_ng ]----

mtd: Writting .tmp_kobs_ng: #0 @0: 0x00100000 - 0x00159000

mtd: erasing @0:0x100000-0x120000

mtd: erasing @0:0x120000-0x140000

mtd: erasing @0:0x140000-0x160000

mtd: We write one page for save guard. *

mtd: Writting .tmp_kobs_ng: #1 @0: 0x00280000 - 0x002d9000

mtd: erasing @0:0x280000-0x2a0000

mtd: erasing @0:0x2a0000-0x2c0000

mtd: erasing @0:0x2c0000-0x2e0000

mtd: We write one page for save guard. *

UTP: sending Success to kernel for command $ kobs-ng init -x -v $FILE.

utp_poll: pass returned.

UTP: received command '$ kobs-ng dump -v'

UTP: executing "kobs-ng dump -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

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 = 1024

  size = 4194304

  erasesize = 131072

  writesize = 2048

  oobsize = 64

  blocks = 32

mtd: fingerprints mismatch @0:0x0

mtd: fingerprints mismatch @0:0x20000

mtd: fingerprints mismatch @0:0x40000

mtd: fingerprints mismatch @0:0x60000

mtd: NCB0 not found

mtd: fingerprints mismatch @0:0x80000

mtd: fingerprints mismatch @0:0xa0000

mtd: fingerprints mismatch @0:0xc0000

mtd: fingerprints mismatch @0:0xe0000

mtd: NCB1 not found

mtd: neither NCB1 or NCB2 found ERROR

Unable to load boot structures

0 Kudos
1,262 Views
peterbärtsch
Contributor III

It was a hw problem :smileyangry::smileyangry::smileyangry:  Now it works.

Peter

0 Kudos
1,261 Views
hengyewlim
Contributor III

Peter,

I have the same problem.

Can you share what was the h/w issue, bad NAND chip, wrong pin muxing?

Regards,

HengYew

0 Kudos
1,261 Views
LuisCasado
NXP Employee
NXP Employee

Hello,

You should use version 5.4 from 'meta-fsl-bsp-release' instead of version 5.1 from 'meta-fsl-arm'  Just in case is the issue.

Luis

1,261 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

It is great news you found the problem. I wonder if you can share the solution?

That would be very appreciated.

/Alejandro

0 Kudos