kobs-ng on i.mx6 (solo)

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

kobs-ng on i.mx6 (solo)

7,924 Views
JimMalone
Contributor III

Hi All,

Is there a version of kobs-ng (running 1.2) that supports the dump command on an i.mx6 part?  The current code is looking for NCB blocks instead of FCB which looks like it is for other i.mx parts.  I have found a few references to this topic for other i.mx processors but none relating to the i.mx6.

Labels (2)
Tags (3)
0 Kudos
8 Replies

1,844 Views
PeterChan
NXP Employee
NXP Employee

Hello Jim,

For i.mx6, you need the latest kobs-ng which version is 1.3 or above. I have attached the version 1.3 here. Please use this one to replace your version 1.2.

Regards,

Peter

1,843 Views
yangyechao
Contributor I

Hi Peter,

I tried the kobs-ng you attached on my mx6solo board. After kobs-ng init -v u-boot.bin, kobs-ng dump show fingerprints mismatch:

<<<<

> ./kobs-ng init -v u-boot.bin

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.bin: verifying using key '00000000000000000000000000000000'

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

mtd: opening: "/dev/mtd0"

mtd: '/dev/mtd0' bad block @ 0x1140000 (MTD)

mtd: '/dev/mtd0' bad block @ 0x2b00000 (MTD)

mtd: '/dev/mtd0' bad block @ 0x6380000 (MTD)

mtd: '/dev/mtd0' bad block @ 0x18000000 (MTD)

mtd: '/dev/mtd0' bad block @ 0x18040000 (MTD)

mtd: '/dev/mtd0' bad block @ 0x1ba00000 (MTD)

mtd: '/dev/mtd0' bad block @ 0x261c0000 (MTD)

mtd: '/dev/mtd0' bad block @ 0x26240000 (MTD)

mtd: '/dev/mtd0' bad block @ 0x38000000 (MTD)

mtd: '/dev/mtd0' bad block @ 0x38040000 (MTD)

mtd: '/dev/mtd0' bad block @ 0x3a580000 (MTD)

NFC geometry :

        ECC Strength       : 8

        Page Size in Bytes : 4224

        Metadata size      : 10

        ECC Chunk Size in byte : 512

        ECC Chunk count        : 8

        Block Mark Byte Offset : 3995

        Block Mark Bit Offset  : 0

====================================================

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

mtd: max_boot_stream_size_in_bytes = 535822336

mtd: boot_stream_size_in_bytes = 214788

mtd: boot_stream_size_in_pages = 53

mtd: #1 0x00200000 - 0x20100000 (0x00234704)

mtd: #2 0x20100000 - 0x40000000 (0x20134704)

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

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

  m_u32PagesInFirmware1 = 53

  m_u32PagesInFirmware2 = 53

  m_u32DBBTSearchAreaStartAddress = 256

  m_u32BadBlockMarkerByte = 3995

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

BBTN#0

  uNAND = 0

  uNumberBB = 11

  BADBLOCKS:

     0x45 0xac 0x18e 0x600 0x601 0x6e8 0x987 0x989 0xe00 0xe01 0xe96

Firmware: image #0 @ 0x200000 size 0x35000 - available 0x1ff00000

Firmware: image #1 @ 0x20100000 size 0x35000 - available 0x1ff00000

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

mtd: erasing @0:0x0-0x40000

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

mtd: erasing @0:0x40000-0x80000

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

mtd: erasing @0:0x80000-0xc0000

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

mtd: erasing @0:0xc0000-0x100000

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

mtd_commit_bcb(FCB): status 0

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

mtd: erasing @0:0x100000-0x140000

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

mtd: erasing @0:0x140000-0x180000

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

mtd: erasing @0:0x180000-0x1c0000

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

mtd: erasing @0:0x1c0000-0x200000

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

mtd_commit_bcb(DBBT): status 0

mtd: PUTTING down DBBT0 BBTN0 @0x104000 (0x1000)

mtd: PUTTING down DBBT1 BBTN0 @0x144000 (0x1000)

mtd: PUTTING down DBBT2 BBTN0 @0x184000 (0x1000)

mtd: PUTTING down DBBT3 BBTN0 @0x1c4000 (0x1000)

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

mtd: Writting u-boot.bin: #0 @0: 0x00200000 - 0x00235000

mtd: erasing @0:0x200000-0x240000

mtd: The last page is not full : 1796

mtd: We write one page for save guard. *

mtd: Writting u-boot.bin: #1 @0: 0x20100000 - 0x20135000

mtd: erasing @0:0x20100000-0x20140000

mtd: The last page is not full : 1796

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"

mtd: '/dev/mtd0' bad block @ 0x1140000 (MTD)

mtd: '/dev/mtd0' bad block @ 0x2b00000 (MTD)

mtd: '/dev/mtd0' bad block @ 0x6380000 (MTD)

mtd: '/dev/mtd0' bad block @ 0x18000000 (MTD)

mtd: '/dev/mtd0' bad block @ 0x18040000 (MTD)

mtd: '/dev/mtd0' bad block @ 0x1ba00000 (MTD)

mtd: '/dev/mtd0' bad block @ 0x261c0000 (MTD)

mtd: '/dev/mtd0' bad block @ 0x26240000 (MTD)

mtd: '/dev/mtd0' bad block @ 0x38000000 (MTD)

mtd: '/dev/mtd0' bad block @ 0x38040000 (MTD)

mtd: '/dev/mtd0' bad block @ 0x3a580000 (MTD)

NFC geometry :

        ECC Strength       : 8

        Page Size in Bytes : 4224

        Metadata size      : 10

        ECC Chunk Size in byte : 512

        ECC Chunk count        : 8

        Block Mark Byte Offset : 3995

        Block Mark Bit Offset  : 0

====================================================

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

mtd: partition #0

  type = 4

  flags = 17408

  size = 1073741824

  erasesize = 262144

  writesize = 4096

  oobsize = 128

  blocks = 4096

  BAD: 0x1140000 0x2b00000 0x6380000 0x18000000 0x18040000 0x1ba00000 0x261c0000 0x26240000 0x38000000 0x38040000 0x3a580000

mtd: fingerprints mismatch @0:0x0

mtd: fingerprints mismatch @0:0x40000

mtd: fingerprints mismatch @0:0x80000

mtd: fingerprints mismatch @0:0xc0000

mtd: NCB0 not found

mtd: fingerprints mismatch @0:0x100000

mtd: fingerprints mismatch @0:0x140000

mtd: fingerprints mismatch @0:0x180000

mtd: fingerprints mismatch @0:0x1c0000

mtd: NCB1 not found

mtd: neither NCB1 or NCB2 found ERROR

Unable to load boot structures

>>>>

Ma I know is there something wrong with my flash? Thanks!

0 Kudos

1,843 Views
JasonDavis
Contributor II

For clarification, is version 1.3 needed for the dump command on i.MX6 or is 1.3 needed for i.MX6 period?  Also, I would also like the source code for version 1.3 if possible.  Thanks.

0 Kudos

1,843 Views
PeterChan
NXP Employee
NXP Employee

kobs-ng version 1.3 is required for i.MX6.

I am sorry I can't release the kobs-ng source code here.

0 Kudos

1,843 Views
rp123
Contributor II

Can you please point me in the direction of how to use the kobs-ng tool provided? I am trying to boot from nand on an custom iMX6DQ board

Thanks

0 Kudos

1,844 Views
PeterChan
NXP Employee
NXP Employee

The source code of kobs-ng version 1.3 is now available in Linux BSP release L3.0.35_4.1.0_130816. After installing the LTIB, type command "litb -m prep -p kobs-ng" to get the source code.

The kobs-ng utility helps to program the u-boot to the NAND flash. It is usually run in the manufacturing tool and you can refer to the ucl2.xml in update profile in manufacturing tool for an example.

Both BSP and manufacturing tool can be downloaded at www.freescale.com.

0 Kudos

1,844 Views
JimMalone
Contributor III

Hi Peter,

Is there any chance I can get the source code for this version?  In the latest BSP release, the 1.2 version of kobs-ng is still the current version.

Thanks,

0 Kudos

1,844 Views
jonathanben-avr
Contributor II

How To Find LTIB L3.0.35_4.1.0_130816 with kobs-ng source code

The Freescale website does an excellent job of obfuscating this information. However, I found it by:

  1. i.MX 6 Series Software and Development Tool Resources
  2. Click on "Source Code for i.MX 6Quad/Dual"

After clicking through the license agreement, the LTIB L3.0.35_4.1.0_130816 download starts.

The direct link is in this post: i.MX 6 Q/D L3.0.35_1.1.0 GA release

Too bad the Freescale people on this site couldn't provide this information as a basic courtesy to their user commuity.

Best regards,

- yba