About Imx28 Hab Mfgtool Error

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

About Imx28 Hab Mfgtool Error

827 Views
bruce_chen
Contributor I

Acordding AN4555 Pdf file, I am create updater_ivt.sb and imx28_linux_ivt.sb files. use Mfgtool programming get like below error info:

Erasing 128 Kibyte @ 1ebe0000 -- 100 % complete

UTP: sending Success

UTP: received command 'send'

UTP: sending Success

g_file_storage gadget: high speed config #1

g_file_storage gadget: high speed config #1

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

UTP: sending Busy

UTP: executing "kobs-ng init $FILE"

Unable to find a matching key dictionary

ERROR: bootstream '/tmp/file.utp' is invalid

ROM Version 1

usage: kobs-ng [COMMAND] [ARGS]

Where [COMMAND] is one of:

  dump [-v] [KOBS] ........................ Verify/dump boot structures

    -v .................................... Verbose mode

  imgverify [-v] [KEY] <file> ............. Verify image validity

    -v .................................... Verbose mode

  init [-v] [KEY] [KOBS] <file> ........... Initialize boot structure &

                                            install bootstreams

    -v .................................... Verbose mode

    -n .................................... Dry run (don't commit to flash)

    -w .................................... Commit to flash

  update [-v] [KEY] [KOBS] [-0|1] <file> .. Update a single bootstream

    -v .................................... Verbose mode

    -0|1 .................................. Update specified bootstream #

  extract [-v] [KEY] [KOBS] [-0|1] <file> . Extract a bootstream from flash

    -v .................................... Verbose mode

    -0|1 .................................. Extract specified bootstream #

  [KOBS] boot structures config options

    --chip_0_device_path=<path> .......... Device of boot (default /dev/mtd0)

    --chip_1_device_path=<path> .......... The second chip in case of multichip NAND

    --search_exponent=<value> ............ NCB field (default 2)

    --data_setup_time=<value> ............ NCB field (default 80)

    --data_hold_time=<value> ............. NCB field (default 60)

    --address_setup_time=<value> ......... NCB field (default 25)

    --data_sample_time=<value> ........... NCB field (default 6)

    --row_address_size=<value> ........... NCB field (default 3)

    --column_address_size=<value> ........ NCB field (default 2)

    --read_command_code1=<value> ......... NCB field (default 0x00)

    --read_command_code2=<value> ......... NCB field (default 0x30)

    --boot_stream_major_version=<value> .. NCB field (default 1)

    --boot_stream_minor_version=<value> .. NCB field (default 0)

    --boot_stream_sub_version=<value> .... NCB field (default 0)

    --ncb_version=<value> ................ NCB field (default 3)

   [KEY] key management related options

        -d ............................... Use device key (OTP) (not yet supported)

        -z ............................... Use key of all zeroes (default)

        -k<hexadecimalkey> ............... Use hex key of 16 bytes

UTP: sending Non-success

utp_poll: exit with status 1280

The meaning the kobs-ng command error,  because the imx28_ivt_linux.sb file use like below command create it:

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

so I am modify the Mfgtool UCL.xml file of kobs-ng command link below:

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

    

     add -k option for kobs-ng, re-programming and get like below error info:

UTP: executing "kobs-ng init -k A8CFA04D9FAD6972B2E74C371701EED7 $FILE"

Illegal key ''

UTP: sending Non-success

I am check the kobs-ng source code need a 16 byte of key, but I don't know where is to find the key?

thnaks.

Labels (1)
0 Kudos
Reply
2 Replies

638 Views
igorpadykov
NXP Employee
NXP Employee

Hi bruce

please refer to AN4555 sect.6.3.3 KEYGEN and KEYGEN.EXE

Keygen is used to create random encryption keys called as input OTP keys..

On Windows (Keygen.exe), cryptographically secure RNG APIs in the OS are

used to generate the random key.

On Linux (Keygen), /dev/random is used to generate the random key.

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

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

-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

638 Views
bruce_chen
Contributor I

Hi igor:

     Yeah, I know use Keygen to create keys, the command

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

      The customkey.txt file is use keygen tool create it, and use otp_burner.py create OtpInit.sb file, use  BitInit.exe burn the OtpInit.sb

      The A8CFA04D9FAD6972B2E74C371701EED7  same is customkey.txt file key. but why the kobs-ng return Illegal key?

0 Kudos
Reply