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.

PROCESSOR-SDK-AM62X: [AM6231] ### ERROR ### Please RESET the board ###

Part Number: PROCESSOR-SDK-AM62X

Hi Ti Support,

I am working on AM6231 Customised board .

I made secure the Device  as HS-SE  using Ti Dummy keys.

After i converted into secure device its booted  but for negative testcase , i tried to load bootloader images signed with other custom keys after that board is not booting.

in my device , for booting perpose i am using only DFU-USB boot method .

I am getting below issue , Please find the logs .

SYSFW ABI: 3.1 (firmware rev 0x0009 '9.0.5--v09.00.05 (Kool Koala)')
SPL initial stack usage: 13376 bytes
Trying to boot from MMC1
mmc_load_image_raw_sector: mmc block read error
** Partition 1 not valid on device 0 **
spl_register_fat_device: fat register err - -1
spl_load_image_fat: error reading image tispl.bin, err - -1
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

How to resolve this issue ?

I could not able to flash anything becuase USB is not detecting now  after this logs .

Thanks,

Naresh

  • Hi Naresh,

    I see some inconsistency in the issue. The logs indicate that you are booting from eMMC. If you are using USB DFU, you shouldn't get the log "Trying to boot from MMC1". So, the question is: Are you booting from eMMC or USB DFU?

    Regards,

    Prashant

  • Hi Prashanth ,

    As per DFU-USB method. 

    I have to boot the DFU-USB bootloader images (tiboot3-*.bin , tispl.bin, u-boot.img) to board 

    Then it once come to uboot , then i flash the eMMC bootloader images (tiboot3-*.bin , tispl.bin, u-boot.img) ) to eMMC .

    For flashing /booting the images , we need USB support .

    Here, i am booting from eMMC only.

    On my board .

    Primary boot : eMMC 

    Backup boot : USB

    Kindly correct me if i am wrong .

    Thanks,

    Naresh

  • i flash the eMMC bootloader images (tiboot3-*.bin , tispl.bin, u-boot.img) ) to eMMC .

    Have you already flash these images to eMMC? If yes, the issue is the images are not booting after changing the bootmode to eMMC?

  • Hi Prashanth , 

    Yes , I flashed the bootloader images (which are signed with cutom keys ) to eMMC .then after on wards device is not booting .

    Here , i didnt touch the boot settings (primary : eMMC , Backup : USB).

    Note :As you know , eFUSE i blowed with TI-Dummy keys and with the same key i signed the bootloader images and flashed to eMMC . In that case device is booting .

    For negative testcase validation  , i generated custom key and copy to <uboot_src)/board/ti/keys  then i compiled the uboot . Then i flashed the images to eMMC. Then onwards device throwing mentioned logs and DFU-USB node is not showing in host machine to flash/boot the images.

    Thanks,

    Naresh

  • Hi Naresh,

    For negative testcase validation  , i generated custom key and copy to <uboot_src)/board/ti/keys  then i compiled the uboot . Then i flashed the images to eMMC

    If the images are not signed with the correct key then the ROM will not even boot the R5 SPL (tiboot3.bin). So, you should not even get those failure logs. I believe you have not correctly flashed the images signed with the incorrect key for negative test case.

    Can you share the flashing procedure you followed and the corresponding logs as well?

  • Hi Prashanth ,

    Please find below steps i followed for neatigve testcase validation (generating custom key)

    • Generated the custom key using below command.
      ~/ti/mcu_plus_sdk_am62x_09_00_00_19/source/security/sbl_keywriter/scripts/cert_gen/am62
      x$ ./gen_keywr_cert.sh -g
      # Generating random keys in keys/folder
      Generating RSA private key, 4096 bit long modulus (2 primes)
      ........................................................................................++++
      .................................++++
      e is 65537 (0x010001)
      Generating RSA private key, 4096 bit long modulus (2 primes)
      ..............................................++++
      ......................................................++++
      e is 65537 (0x010001)

    • Copied the custom key to u-boot
      ~/ti/mcu_plus_sdk_am62x_09_00_00_19/source/security/sbl_keywriter/scripts/cert_gen/am62
      x/key$ cp smpk.pem <UBOOT_SRC>/board/ti/keys/custMpk.pem

    • Then Build the u-boot in-order to sign the u-boot with custom key
    • For u-boot build compilation i used attached steps .

    uboot_compilation.sh.txt
    # compilaton steps
    
    #TOOL CHAIN PATH SETTINGS :
    #export PATH=<path>/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf/bin:$PATH
    #export PATH=<path>/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/bin:$PATH
    
    #UBOOT - R5::
    #working dir : go to uboot 
    #generate uboot-spl.bin for tiboot3.bin 
    
    cd ti-u-boot/
    
    make clean
    
    #eMMC defconfig
    make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- am62x_evm_r5_defconfig 
    
    #DFU-USB defconfig
    #make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- am62x_evm_r5_usbdfu_defconfig
    #make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- menuconfig (optional) 
    
    echo " "
    echo "--------------------------------"
    echo "R5 compilation for uboot-spl.bin"
    echo "--------------------------------"
    make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- -j32 
    
    #Generates tiboot3.bin 
    echo " "
    echo " ------------------------------"
    echo " R5 compilation for tiboot3.bin"
    echo " ------------------------------"
    #using r5 uboot.spl.bin  and sys FW(ti-fs-firmware-am62x-gp.bin) 
    #make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- soc=am62x SBL=spl/u-boot-spl.bin SYSFW_PATH=../../prebuilt-images/am62xx-evm/ti-sysfw/ti-fs-firmware-am62x-gp.bin -j32
    make -j 12 ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- BINMAN_INDIRS=../../prebuilt-images/am62xx-evm
    
    #UBOOT -A53 ::
    #go to Uboot ->
    #Generate  tispl.bin and uboot.img 
    echo " "
    echo "------------------------------------------- "
    echo "A53 compilation for uboot.img and tispl.bin "
    echo "------------------------------------------- "
    #make ARCH=arm CROSS_COMPILE=aarch64-none-linux-gnu- magik2_am62x_evm_a53_defconfig                                            
    make ARCH=arm CROSS_COMPILE=aarch64-none-linux-gnu- am62x_evm_a53_defconfig                                            
    make -j 12 ARCH=arm CROSS_COMPILE=aarch64-none-linux-gnu- BINMAN_INDIRS=../prebuilt-images/am62xx-evm BL31=../../prebuilt-images/am62xx-evm/bl31.bin TEE=../../prebuilt-images/am62xx-evm/bl32.bin
    
    #make ARCH=arm CROSS_COMPILE=aarch64-none-linux-gnu- ATF=../prebuilt-images/am62xx-evm/bl31.bin TEE=../prebuilt-images/am62xx-evm/bl32.bin DM=../prebuilt-images/am62xx-evm/ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f 
    
    #NOTE : All gnerated Required Images [tiboot3.bin ,tispl.bin ,u-boot.img]  for booting saved in bootloader/ti-u-boot
    

    • Then i flashed the images to eMMC .

    Note: 

    • Initially after flashed the bootloader images (which are signed with custom key for negative test case validation) to eMMC . i didnt observe no logs in minicom terminal .
    • again i power cycle the devce then i am getting mentioned error logs.

    If it detect USB node, then i can boot/flash the images again ? need help how to detect USB now ?

    Thanks,

    Naresh

  • Hi Naresh,

    I am not exactly sure about your setup here. Let me ask a question: What is your expectation from the negative testcase testing here?

  • Hi Prashanth ,

    I Just want to check if we signed bootloader images with other (cusotm) key instead of Ti-dummy keys ,device should not boot.

    from the Error logs , i came to know that its entering into u-boot and throwing eMMC error.

    In u-boot , DFU-USB  support /detect when if we issue below 2 commands,

    Uboot# setenv dfu_alt_info ${dfu_alt_info_emmc} => this is to enable DFU
    Uboot# dfu 0 mmc 0 => select eMMC 0

    But in my case after entering into u-boot, its throwing eMMC error . so i cant able to issue commands in-order to detect USB .

    Is there any way to make detect USB ?

    Thanks,

    Naresh

  • Thanks for the clarification.

    I flashed the bootloader images (which are signed with cutom keys ) to eMMC .then after on wards device is not booting .

    But as you said here the device does not boot after flashing the images signed with random keys. Then what is the exact issue here?

  • Hi Prashanth ,

    IF i want to flash /boot the images , DFU-USB should detect . so using USB only i can flash/boot. 

    Now i could not able to access USB node/port .

    Kindly help me how to enable USB port in order to boot/flash the images further .

    Thanks,

    Naresh

  • Kindly help me how to enable USB port in order to boot/flash the images further .

    You can change the primary bootmode to USB DFU and flash the images to eMMC.

  • Hi prashanth ,

    So currently my boot settings are 

    Primary boot : eMMC 

    Backup : USB

    • SO ,Should i change the boot settings ,

    Primary as USB and backup as eMMC ? 

    Thanks ,

    Naresh 

  • Primary as USB and backup as eMMC ? 

    You can set the primary bootmode to USB DFU. Once the flashing is done, you can again change the primary bootmode to eMMC.

    USB DFU primary bootmode => B0-B7: 11001010, B8-B15:00000000

    eMMC alternate primary bootmode => B0-B7: 11010010, B8-B15:00000000

  • Sure prashanth ,

    Thannks,

    i will be get back to you , once done.

    Thanks,

    Naresh.

  • hI Prashanth .

    One Query , in backup boot mode , there is no eMMC boot option .

    As you said , if i set primary boot mode as USB , where i can set eMMC boot mode ?

    suppose if i set USB as primary boot mode , without setting eMMC boot mode as backup mode .how flashing images goes to eMMC ?

    Please help me on this .

    NOte:

    below is the primary boot mode settings.

    Thanks,

    Naresh

  • Hi prashanth ,

    My issue was resolved .

    Thanks ,

    Naresh 

  • Hi Naresh,

    Thanks for the update.

    I will list the flashing and booting procedure for anyone coming here.

    - Power off the board.

    - Switch the bootmode pins for USB DFU flashing => B0-B7: 11001010, B8-B15: 00000000

    - Power on the board.

    - Perform the flashing procedure.

    - Power off the board.

    - Switch the bootmode pins for eMMC booting => B0-B7: 11010010, B8-B15: 00000000

    - Power on the board.

    Regards,

    Prashant