About imx287 use hab question

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

About imx287 use hab question

1,411 Views
bruce_chen
Contributor I

1、Acording the AN4555.pdf document, compile and create digital signatured imx28_ivt_linux.sb and updater_ivt.sb files. copy these files to MfgTool 1.6.2.055 tool,but programming failed.the below is MfgTool 1.6.2.055 log:

  Friday, June 17, 2016 11:04:28

  1 - Panel A Start processing Singlechip NAND <LIST/>.

  Panel A Start <CMD/> type="boot" body="Recovery" file="updater_ivt.sb" timeout="10" onError="" text="Booting Update Firmware.".

  1 - Panel A Finished <CMD/> type="boot" body="Recovery" file="updater_ivt.sb" timeout="10" onError="" text="Booting Update Firmware." SUCCESS code=0x0.

  Panel A Start <CMD/> type="find" body="Updater" file="" timeout="180" onError="" text="".

  Panel A UtpUpdate Event: DeviceRemoval Msg: (null) DevState: Disconnected OpState: WAITING_FOR_DEVICE

  Panel A UtpUpdate Event: DeviceArrival Msg: (null) DevState: Recovery OpState: WAITING_FOR_DEVICE

  1 - Panel A Finished <CMD/> type="find" body="Updater" file="" timeout="180" onError="" text="" FAIL code=0xffff0002.

  Panel A: Wrong device found.,failed to run command: type="find" body="Updater" file="" timeout="180" onError="" text="" 

  2 - Panel A Finished processing Singlechip NAND <LIST/> : FAIL code=-65534.

  Panel A: Reason is unknown,

the below is MfgTool 1.6.2.055 of ucl.xml config

  <UCL>

   <CFG>

  <STATE name="Recovery" dev="IMX28"/>

  <STATE name="Updater"   dev="Updater" /> 

  <DEV name="IMX28" vid="15A2" pid="004F"/>

  <DEV name="Updater" vid="066F" pid="37FF" />

   </CFG>

   <LIST name="Singlechip NAND" desc="Install on singlechip NAND">

  <CMD type="boot" body="Recovery" file="updater_ivt.sb" if="HabEnable">Booting Update Firmware.</CMD>

  <CMD type="find" body="Updater" timeout="180"/>

  <CMD type="push" body="mknod class/mtd,mtd0,/dev/mtd0"/>

  <CMD type="push" body="mknod class/mtd,mtd1,/dev/mtd1"/>

  <CMD type="push" body="mknod class/misc,ubi_ctrl,/dev/ubi_ctrl"/>

  <!-- UBI image support

  * If the user has ubi image, he can use below command to program ubi image to certain mtd device.

  * <CMD type="push" body="pipe ubiformat /dev/mtdX -y -f - -S @FILESIZE" file="files/ubi.img">Sending and writting rootfs</CMD>

  *

  * If @FILESIZE is not supported at host tool, please replace it with real file size in byte.

  -->

  <CMD type="push" body="$ flash_eraseall /dev/mtd0">Erasing rootfs partition 0</CMD>

  <CMD type="push" body="$ flash_eraseall /dev/mtd1">Erasing rootfs partition 1</CMD>

  <CMD type="push" body="send" file="files/linux_ivt.sb" >Sending Firmware</CMD>

  <CMD type="push" body="$ kobs-ng init $FILE">Flashing firmware</CMD>

  <CMD type="push" body="$ ubiattach /dev/ubi_ctrl -m 1 -d 0">Attaching UBI partition</CMD>

  <CMD type="push" body="mknod class/ubi,ubi0,/dev/ubi0"/>

  <CMD type="push" body="$ ubimkvol /dev/ubi0 -n 0 -N rootfs0 -s 400MiB">Creating UBI volumes</CMD>

  <CMD type="push" body="$ ubimkvol /dev/ubi0 -n 1 -N data -m">Creating UBI volumes</CMD>

  <CMD type="push" body="$ mkdir -p /mnt/ubi0; mount -t ubifs ubi0_0 /mnt/ubi0" />

  <CMD type="push" body="pipe tar -jxv -C /mnt/ubi0" file="files/rootfs.tar.bz2">Transfer rootfs</CMD>

  <CMD type="push" body="frf">Finish Flashing NAND</CMD>

  <CMD type="push" body="$ umount /mnt/ubi0">Unmounting</CMD>

  <CMD type="push" body="$ echo Update Complete!">Done</CMD>

   </LIST>

2、MfgTool programming, The imx287 serial port output below info:

  HTLL0x80501001

        0x80501006

The ROM error code 0x80501001 DCP reported a status error and 0x80501006 Key dictionary lookup failed, I don't konw what meaning. about 0x80501006 error code,I am alreadied burner key to OTP use imx_otp_tools.

3、My operation sequence

  a、use otp_burner.py create OtpInit.sb file and burner to OTP use imx_otp_tools.

  b、Acorrding to AN4555.pdf document create digital signature imx_ivt_linux.sb and updater_ivt.sb files.

  c、Copy imx_ivt_linux.sb and updater_ivt.sb to MfgTool.

  d、Programming failed and imx28 serial port output ROM error code.

I don't konw how can do it, thanks.

Labels (1)
0 Kudos
4 Replies

811 Views
Yuri
NXP Employee
NXP Employee

Hello,

  Please refer to the following IMX23 Unencrypted Boot

Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

811 Views
bruce_chen
Contributor I

1、And I am check the OptInit.sb file use sbtool get below info

./sbtool -k customkey.txt OtpInit.sb

---- Boot image header ----

Signature 1:           STMP

Signature 2:           sgtl

Format version:        1.1

Flags:                 0x0000

Image blocks:          564

First boot tag block:  11

First boot section ID: 0x00000000

Key count:             2

Key dictionary block:  7

Header blocks:         6

Section count:         1

Section header size:   1

Timestamp:             519440808000000

Product version:       999.999.999

Component version:     999.999.999

Drive tag:             0x0000

SHA-1 digest of header:

    0x00000000: be 9a f1 bd c9 34 21 c9 fb 68 00 60 9b 1e e2 c4

    0x00000010: 24 a7 d7 68

Header digest is correct.

---- Section table ----

Section 0:

    Identifier: 0x0

    Offset:     12 blocks (192 bytes)

    Length:     550 blocks (8800 bytes)

    Flags:      0x00000001

                0x1 = ROM_SECTION_BOOTABLE

---- Key dictionary ----

Key customkey.txt was found in key dictionary.

Data encryption key:

    0x00000000: 1f 00 ee 0d 30 50 a7 cd db 63 f4 47 b3 8b 6e e7

---- SHA-1 digest of entire image ----

    0x00000000: 9d 82 b8 12 41 66 76 24 82 90 1f 65 3f 4d 31 b4

    0x00000010: b3 f1 14 06

Image digest is correct.

---- Boot tags ----

0000: @ block 000011 | id=0x00000000 | length=000550 | flags=0x00000001

        0x1 = ROM_SECTION_BOOTABLE

2、check imx_ivt_linux.sb get below info:

sbtool -k customkey.txt imx28_ivt_kone_linux.sb

---- Boot image header ----

Signature 1:           STMP

Signature 2:           sgtl

Format version:        1.1

Flags:                 0x0001

Image blocks:          176660

First boot tag block:  7

First boot section ID: 0x00000000

Key count:             0

Key dictionary block:  7

Header blocks:         6

Section count:         1

Section header size:   1

Timestamp:             519439694000000

Product version:       999.999.999

Component version:     999.999.999

Drive tag:             0x0000

SHA-1 digest of header:

    0x00000000: 11 7e 21 9a 8c 8e de 51 40 78 5d 5a eb ca 8c 27

    0x00000010: e0 b2 7e 5d

Header digest is correct.

---- Section table ----

Section 0:

    Identifier: 0x0

    Offset:     8 blocks (128 bytes)

    Length:     176650 blocks (2826400 bytes)

    Flags:      0x00000001

                0x1 = ROM_SECTION_BOOTABLE

---- SHA-1 digest of entire image ----

    0x00000000: 94 34 11 9f be 93 59 b2 a4 16 8e 6c 32 60 40 8d

    0x00000010: d0 d6 56 11

Image digest is correct.

---- Boot tags ----

0000: @ block 000007 | id=0x00000000 | length=176650 | flags=0x00000001

        0x1 = ROM_SECTION_BOOTABLE

I don't know these info has any question?

0 Kudos

811 Views
Yuri
NXP Employee
NXP Employee

Hello,

have You used the following HAB i.MX28 Invalid Certificate

Regards,

Yuri.

0 Kudos

811 Views
bruce_chen
Contributor I

Hello Yuri Muhin:

     thanks your reply!

     I am use elftosb tool already remove -z option and add -k option, the below are my command line:

      elftosb -k customkey.txt -f imx28 -c  ./linux_ivt_kone.bd -o imx28_ivt_kone_linux.sb

      elftosb -k customkey.txt -f imx28 -c ./updater_ivt_kone.bd -o updater_ivt_kone.sb

0 Kudos