kobs-ng "bootstream too large" on iMX28

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

kobs-ng "bootstream too large" on iMX28

Jump to solution
2,756 Views
hongyuplim
Contributor I

Hello All,

 

I modified NAND mtd partition ion  on iMX28.

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

0x000000000000-0x000000100000 : "gpmi-nfc-u-boot"

0x000000100000-0x000000600000 : "gpmi-nfc-kernel"

0x000000600000-0x000006a00000 : "gpmi-nfc-general-use"

0x000007000000-0x000008000000 : "gpmi-nfc-user"

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

 

And I downloaded imx28_ivt_uboot.sb into NAND boot ( mtd0 ) with mfgtool.

"imx28_ivt_uboot.sb" size = 175KB

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

flash_eraseall /dev/mtd0

kobs-ng init -v imx28_ivt_uboot.sb

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

 

But kobs-ng is failed " mtd: bootstream too large  mtd_init failed!" like below log.

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

                                                :

LOAD m_address=0x4102e7d4 m_count=0x000004b4

FILL m_address=0x4102ec88 m_count=0x00005db0 m_data=0x00000000

LOAD m_address=0x00008000 m_count=0x00000020

CALL m_address=0x00008000 m_data=0x00000000

* read SHA1 = dbaa4c1a4cadcef73fd43c0aeb08593c51846e43

* calc SHA1 = dbaa4c1a4cadcef73fd43c0aeb08593c51846e43

/tmp/file.utp: is a valid bootstream for key '00000000000000000000000000000000'

mtd: opening: "/dev/mtd0"

NFC Geometry

  ECC Algorithm          : BCH

  ECC Strength           : 8

  Page Size in Bytes     : 2112

  Metadata Size in Bytes : 10

  ECC Chunk Size in Bytes: 512

  ECC Chunk Count        : 4

  Payload Size in Bytes  : 2048

  Auxiliary Size in Bytes: 16

  Auxiliary Status Offset: 12

  Block Mark Byte Offset : 1999

  Block Mark Bit Offset  : 0

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

mtd: max_boot_stream_size_in_bytes = 0

mtd: boot_stream_size_in_bytes = 178272

mtd: bootstream too large

mtd_init failed!

UTP: sending Non-success

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

 

But original partition is

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

0x000000000000-0x000001400000 : "gpmi-nfc-0-boot"

0x000001400000-0x000007000000 : "gpmi-nfc-general-use"

0x000007000000-0x000008000000 : "gpmi-nfc-user"

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

in case, kobs-ng is OK.

 

Please give me some advices...

 

Thanks,

Original Attachment has been moved to: kobs-ng_error.txt.zip

Original Attachment has been moved to: kobs-ng_ok.txt.zip

Tags (3)
0 Kudos
1 Solution
986 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

The boot area shall contain both search areas and two copies of the boot stream.

The minimum size should be the following fomula

:Boot_partition_minimum_size_in_bytes =  search_area_size_in_bytes * 2 + boot_stream_size * 2

search_area_size_in_bytes =  (1 << md->cfg.search_exponent) * stride_size_in_bytes;

where:        stride_size_in_bytes = PAGES_PER_STRIDE * mtd_writesize(md);     

  md->cfg.search_exponent = 2;

boot_stream_size = file_size_of(bootstream);

You have to consider that formula.

Best Regards,

Alejandro

View solution in original post

0 Kudos
1 Reply
987 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

The boot area shall contain both search areas and two copies of the boot stream.

The minimum size should be the following fomula

:Boot_partition_minimum_size_in_bytes =  search_area_size_in_bytes * 2 + boot_stream_size * 2

search_area_size_in_bytes =  (1 << md->cfg.search_exponent) * stride_size_in_bytes;

where:        stride_size_in_bytes = PAGES_PER_STRIDE * mtd_writesize(md);     

  md->cfg.search_exponent = 2;

boot_stream_size = file_size_of(bootstream);

You have to consider that formula.

Best Regards,

Alejandro

0 Kudos