This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SK-AM62B-P1: key writer - am62

Part Number: SK-AM62B-P1
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Hi Team,

Im trying to write keys to efuse and migrate  the device to HS-SE, what have done is attached below ,

>>>> use keys from keys_devl for testing purpose 

>>>> ./gen_keywr_cert.sh -t tifek/ti_fek_public.pem --msv 0xC0FFE -b keys_devel/bmpk.pem 
--bmek keys_devel/bmek.key -s keys_devel/smpk.pem --smek keys_devel/smek.key --keycnt 
2 --keyrev 1
>>>>mek.key -s keys_devel/smpk.pem --smek keys_devel/smek.key --keycnt 2 --keyrev 1
# Using MSV[19:0]: 0x000C0FFE
# Using Key Count: 0x00000003
# Using Key Rev: 0x00000001
Generating Dual signed certificate!!
GEN: AES256 key generated, since not provided
# encrypt aes256 key with tifek public part
The command rsautl was deprecated in version 3.0. Use 'pkeyutl' instead.
# encrypt SMPK-priv signed aes256 key(hash) with tifek public part
The command rsautl was deprecated in version 3.0. Use 'pkeyutl' instead.
The command rsautl was deprecated in version 3.0. Use 'pkeyutl' instead.
# encrypt smpk-pub hash using aes256 key
writing RSA key
# encrypt smek (sym key) using aes256 key
# encrypt BMPK-priv signed aes256 key(hash) with tifek public part
The command rsautl was deprecated in version 3.0. Use 'pkeyutl' instead.
The command rsautl was deprecated in version 3.0. Use 'pkeyutl' instead.
# encrypt bmpk-pub hash using aes256 key
writing RSA key
# encrypt bmek (sym key) using aes256 key
1701	secondary_cert.bin
5414	primary_cert.bin
7115	../../x509cert/final_certificate.bin
# SHA512 Hashes of keys are stored in verify_hash.csv for reference..

>> ~/ti/mcu_plus_sdk_am62x_09_02_01_06/source/security/sbl_keywriter/scripts/x509cert$ python3 ../../../../../tools/bin2c/bin2c.py final_certificate.bin keycert.h KEYCERT
Traceback (most recent call last):
  File "/ti/mcu_plus_sdk_am62x_09_02_01_06/source/security/sbl_keywriter/scripts/x509cert/../../../../../tools/bin2c/bin2c.py", line 13, in <module>
    *  Copyright (C) ''' + sys.argv[4] +''' Texas Instruments Incorporated
IndexError: list index out of range


>>~/ti/mcu_plus_sdk_am62x_09_02_01_06/source/security/sbl_keywriter/scripts/x509cert$ python3 ../../../../../tools/bin2c/bin2c.py final_certificate.bin keycert.h KEYCER 2022

>> then it genearted keycert.h in /scripts/x509cert path


>> then clean and build tiboot3 

>>:~/ti/mcu_plus_sdk_am62x_09_02_01_06/source/security/sbl_keywriter/am62x-sk/r5fss0-0_nortos/ti-arm-clang$ make -sj clean PROFILE=debug
Cleaning: am62x:r5fss0-0:nortos:ti-arm-clang sbl_keywriter.debug.out ...



>> ~/ti/mcu_plus_sdk_am62x_09_02_01_06/source/security/sbl_keywriter/am62x-sk/r5fss0-0_nortos/ti-arm-clang$ make -sj PROFILE=debug
Generating SysConfig files ...
Running script...
Validating...
Generating Code (example.syscfg)...
Writing /ti/mcu_plus_sdk_am62x_09_02_01_06/source/security/sbl_keywriter/am62x-sk/r5fss0-0_nortos/ti-arm-clang/generated/ti_dpl_config.c...
Writing /ti/mcu_plus_sdk_am62x_09_02_01_06/source/security/sbl_keywriter/am62x-sk/r5fss0-0_nortos/ti-arm-clang/generated/ti_dpl_config.h...
Writing /ti/mcu_plus_sdk_am62x_09_02_01_06/source/security/sbl_keywriter/am62x-sk/r5fss0-0_nortos/ti-arm-clang/generated/ti_drivers_config.c...
Writing /ti/mcu_plus_sdk_am62x_09_02_01_06/source/security/sbl_keywriter/am62x-sk/r5fss0-0_nortos/ti-arm-clang/generated/ti_drivers_config.h...
Writing /ti/mcu_plus_sdk_am62x_09_02_01_06/source/security/sbl_keywriter/am62x-sk/r5fss0-0_nortos/ti-arm-clang/generated/ti_drivers_open_close.c...
Writing /ti/mcu_plus_sdk_am62x_09_02_01_06/source/security/sbl_keywriter/am62x-sk/r5fss0-0_nortos/ti-arm-clang/generated/ti_drivers_open_close.h...
Writing /ti/mcu_plus_sdk_am62x_09_02_01_06/source/security/sbl_keywriter/am62x-sk/r5fss0-0_nortos/ti-arm-clang/generated/ti_pinmux_config.c...
Writing /ti/mcu_plus_sdk_am62x_09_02_01_06/source/security/sbl_keywriter/am62x-sk/r5fss0-0_nortos/ti-arm-clang/generated/ti_power_clock_config.c...
Writing /ti/mcu_plus_sdk_am62x_09_02_01_06/source/security/sbl_keywriter/am62x-sk/r5fss0-0_nortos/ti-arm-clang/generated/ti_board_config.c...
Writing /ti/mcu_plus_sdk_am62x_09_02_01_06/source/security/sbl_keywriter/am62x-sk/r5fss0-0_nortos/ti-arm-clang/generated/ti_board_config.h...
Writing /ti/mcu_plus_sdk_am62x_09_02_01_06/source/security/sbl_keywriter/am62x-sk/r5fss0-0_nortos/ti-arm-clang/generated/ti_board_open_close.c...
Writing /ti/mcu_plus_sdk_am62x_09_02_01_06/source/security/sbl_keywriter/am62x-sk/r5fss0-0_nortos/ti-arm-clang/generated/ti_board_open_close.h...
Compiling: am62x:r5fss0-0:nortos:ti-arm-clang sbl_keywriter.debug.out: ../main.c
Compiling: am62x:r5fss0-0:nortos:ti-arm-clang sbl_keywriter.debug.out: ../keywriter_utils.c
Compiling: am62x:r5fss0-0:nortos:ti-arm-clang sbl_keywriter.debug.out: ../board.c
Compiling: am62x:r5fss0-0:nortos:ti-arm-clang sbl_keywriter.debug.out: generated/ti_drivers_config.c
Compiling: am62x:r5fss0-0:nortos:ti-arm-clang sbl_keywriter.debug.out: generated/ti_drivers_open_close.c
Compiling: am62x:r5fss0-0:nortos:ti-arm-clang sbl_keywriter.debug.out: generated/ti_board_config.c
Compiling: am62x:r5fss0-0:nortos:ti-arm-clang sbl_keywriter.debug.out: generated/ti_board_open_close.c
Compiling: am62x:r5fss0-0:nortos:ti-arm-clang sbl_keywriter.debug.out: generated/ti_dpl_config.c
Compiling: am62x:r5fss0-0:nortos:ti-arm-clang sbl_keywriter.debug.out: generated/ti_pinmux_config.c
Compiling: am62x:r5fss0-0:nortos:ti-arm-clang sbl_keywriter.debug.out: generated/ti_power_clock_config.c
.
Linking: am62x:r5fss0-0:nortos:ti-arm-clang sbl_keywriter.debug.out ...
Linking: am62x:r5fss0-0:nortos:ti-arm-clang sbl_keywriter.debug.out Done !!!
.
Boot image: am62x:r5fss0-0:nortos:ti-arm-clang /ti/mcu_plus_sdk_am62x_09_02_01_06/source/security/sbl_keywriter/am62x-sk/r5fss0-0_nortos/ti-arm-clang/sbl_keywriter.debug.tiimage ...
Boot image: am62x:r5fss0-0:nortos:ti-arm-clang /ti/mcu_plus_sdk_am62x_09_02_01_06/source/security/sbl_keywriter/am62x-sk/r5fss0-0_nortos/ti-arm-clang/sbl_keywriter.debug.tiimage Done !!!




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

Q1. When i flashed the tiboot3 it doesn't seems to boot and log is not visible , when checked with document its seems that can only write 5400 bytes in shot, then how should i write bmpk smpk keys and pem.

Q2. Should i generate each tiboo3  and flash for every smpk , bmpk without exceeding 5400 bytes, how do it properly ?.

Q3. Is vpp 1.8  will enable at time for flashing tiboot3.? 

regards,

-RJ

  • Hello,

    1,2) The OTP Keywriter must be built the SDK & OpenSSL version as mentioned in the Keywriter User Guide. Please go through the user guide & use the correct SDK & tools version to overcome the failures.

    3) The VPP is enabled at run time using the `keywriter_setVpp` function.

    Regards,

    Prashant

  • Hello Prashant,

    1,2) The OTP Keywriter must be built the SDK & OpenSSL version as mentioned in the Keywriter User Guide. Please go through the user guide & use the correct SDK & tools version to overcome the failures.

    As stated in the document, I downgraded openSLL 1.1.1 on September 11, 2018, sysconfig to 1.20.0, and CCS to 12.7.0. I also ran the one-shot example from the documents, but no logs were detected

    Im trying to write keys to efuse and migrate  the device to HS-SE, what have done is attached below ,

    Q1.can you review this , is still i had miss anything  for creating one short certificate . 

    Should i generate each tiboo3  and flash for every smpk , bmpk without exceeding 5400 bytes, how do it properly ?.

    Q2. can you give a clarification for this question ?

    Regards,

    -RJ

  • Hello,

    I also ran the one-shot example from the documents, but no logs were detected

    How are you booting the keywriter `tiboot3.bin`?

    Can you also check the device type once with the following FAQ

    (+) [FAQ] [AM6XX]: How to check if device type is HS-SE, HS-FS or GP? - Processors forum - Processors - TI E2E support forums

    Q1.can you review this , is still i had miss anything  for creating one short certificate .

    It looks okay.

    Q2. can you give a clarification for this question ?

    It is not needed. If you are using the correct SDK & tools version, the one shot certificates generated will not be greater than 5400 bytes.

    Regards,

    Prashant