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.

J721EXCPXEVM: How to boot custom app via ATF

Part Number: J721EXCPXEVM

Hi, TI Experts

I would like to boot my custom app (RTOS) on A72 core via ATF.

My custom app entry point expects that the EL state is Non-secure EL1.

What I did:

  1. make custom app( pdkAppImageCreate.sh ) 
  2. make SBL(  make sbl_mmcsd_img_hlos DISABLE_RECURSE_DEPS=no -sj ) 
  3. make combined-appimage(  make BOARD=j721e_evm )  < use el31.bin / el32.bin at PDK  for Linux >
  4. make SD-CARD( BOOT partition ) 
  5. copy tiboot3.bin, app, and tifs.bin into SD-CARD
  6. boot from SD-CARD

What I got:

<COM4 port on PC>

NOTICE:  BL31: v2.3():07.01.00.006-dirty
NOTICE:  BL31: Built : 03:49:38, Jan 25 2021

<COM9 port on PC> ( I customized SBL src for log output )

SBL Revision: 01.00.10.00 (Apr  9 2021 - 10:27:54)
TIFS  ver: 20.8.5--v2020.08b (Terrific Lla
Initlialzing PLLs ...done.
InitlialzingClocks ...done.
Initlialzing DDR ...done.
Initializing GTC ...Begin parsing user application
SBL_BootImage() called.
k3xx_evmEntry.CpuEntryPoint[0]: 70000000
k3xx_evmEntry.CpuEntryPoint[1]: 80000000
k3xx_evmEntry.CpuEntryPoint[2]: fffffffe
k3xx_evmEntry.CpuEntryPoint[3]: fffffffe
k3xx_evmEntry.CpuEntryPoint[4]: fffffffe
k3xx_evmEntry.CpuEntryPoint[5]: fffffffe
k3xx_evmEntry.CpuEntryPoint[6]: fffffffe
k3xx_evmEntry.CpuEntryPoint[7]: fffffffe
k3xx_evmEntry.CpuEntryPoint[8]: fffffffe
k3xx_evmEntry.CpuEntryPoint[9]: fffffffe
k3xx_evmEntry.CpuEntryPoint[10]: fffffffe
k3xx_evmEntry.CpuEntryPoint[11]: fffffffe
k3xx_evmEntry.CpuEntryPoint[12]: fffffffe
k3xx_evmEntry.CpuEntryPoint[13]: fffffffe
k3xx_evmEntry.CpuEntryPoint[14]: fffffffe
k3xx_evmEntry.CpuEntryPoint[15]: fffffffe
k3xx_evmEntry.CpuEntryPoint[16]: fffffffe
k3xx_evmEntry.CpuEntryPoint[17]: fffffffe
k3xx_evmEntry.CpuEntryPoint[19]: fffffffe
k3xx_evmEntry.CpuEntryPoint[20]: fffffffe
Board_releaseResource(BOARD_RESOURCE_MODULE_CLOCK) called.
SBL_SlaveCoreBoot() for HLOS called.
SBL_SlaveCoreBoot() for HLOS called.
SOC_J721E
k3xx_evmEntry.CpuEntryPoint[MCU1_CPU1_ID]: fffffffe
k3xx_evmEntry.CpuEntryPoint[MCU1_CPU0_ID]: fffffffe

What I want to know:

 It seems that ATF(bl31.bin) is executed but OP-TEE (bl32.bin) is not executed.

Any idea for this ?

Thanks in advance

Seiki Tatesawa

  • Hi Seiki Tatesawa,

    Apologies for a late response here.

    Can you please explain your use case here? Are you trying to use SBL to boot ATF, OPTEE and then an RTOS app on A72?

    Regards,

    Karan

  • Hi Karan Saxena

    Thank you for your reply.

    >Are you trying to use SBL to boot ATF, OPTEE and then an RTOS app on A72?

    Yes, I am trying to boot ATF,OPTEE, and then RTOS app on A72.

    Regards,

    Seiki

  • Hi Seiki,

    The combined_appimage using SBL is used to boot ATF -> OPTEE -> Linux on A72 and RTOS images on remote cores (R5Fs, C6x). I am not sure if you can use it to have ATF, OPTEE and then an RTOS image on A72 instead of an HLOS.

    Can you try booting your A72 RTOS app using SBL directly? There are apps in the SDK example udma_memcpy_testapp for CORE=mpu1_0 which we load and run using this method.

    Regards,

    Karan

  • Hi Karan,

    Can you try booting your A72 RTOS app using SBL directly? There are apps in the SDK example udma_memcpy_testapp for CORE=mpu1_0 which we load and run using this method.

    I could boot udma_memcpy_testapp using SBL directly.  Details are as follows.

    <sd-card>

    ・tiboot3.bin (SBL)
    ・tifs.bin (SYSFW)
    ・app (udma_memcpy_testapp_mpu1_0)

    <udma_memcpy_testapp_mpu1_0>

    https://e2e.ti.com/support/processors/f/processors-forum/971046/dra829v-ti-processor-sdk-rtos-j721e-evm-07_01_00_11-udma_memcpytest-application-timing-out-in-sciclient_waitthread/3592449?tisearch=e2e-sitesearch&keymatch=udma_memcpy_testapp#3592449

    <SBL log>

    SBL Revision: 01.00.10.00 (Jan 27 2021 - 12:23:08)
    TIFS  ver: 20.8.5--v2020.08b (Terrific Lla
    

    <app log>

    UDMA memcpy application started...
    [UDMA] [Error] SciClient Set proxy config failed!!!
    [Error] UDMA init failed!!
    [Error] UDMA App init failed!!
    [Error] UDMA channel disable failed!!
    [Error] UDMA event unregister failed!!
    

    Best Regards,

    Seiki Tatesawa

  • Hi Seiki Tatesawa,

    The app somehow is failing for you. Can you send the full path of SBL you are copying as tiboot3.bin?

    Regards,

    Karan

  • Hi Karan Saxena

    The full path of SBL I am copying is

    https://software-dl.ti.com/jacinto7/esd/processor-sdk-rtos-jacinto7/07_02_00_06/exports/ti-processor-sdk-rtos-j721e-evm-07_02_00_06.tar.gz
    
    pdk_jacinto_07_01_05_14\packages\ti\boot\sbl\binary\j721e_evm\mmcsd\bin\sbl_mmcsd_img_mcu1_0_release.tiimage
    
    

    And I have tried to boot using HLOS version  as below, and got same result( error ).

    pdk_jacinto_07_01_05_14\packages\ti\boot\sbl\binary\j721e_evm\mmcsd\bin\
    
    sbl_mmcsd_img_hlos_mcu1_0_release.tiimage

    Regards,

    Seiki Tatesawa

  • Hi Seiki Tatesawa,

    I tried with the images I built on my setup, can you give this a try with the images as attached?

    I see one issue with your SBL logs, there is not print about Sciserver, by default these should come. Are there any changes you made to the SDK?

    udma_app_BOOT.zip

    SBL Logs:

    SBL Revision: 01.00.10.00 (Apr 24 2021 - 11:20:49)
    TIFS ver: 20.8.5--v2020.08b (Terrific Lla
    Sciserver Built On: Nov 5 2020 22:36:32
    Starting Sciserver..... PASSED

    App Logs:

    UDMA memcpy application started...
    UDMA App memcpy test statistics:
    Completed packet count : 100
    Completed payload byte count : 102400
    Started byte count : 102400
    UDMA App memcpy test statistics:
    Completed packet count : 200
    Completed payload byte count : 204800
    Started byte count : 204800
    UDMA App memcpy test statistics:
    Completed packet count : 300
    Completed payload byte count : 307200
    Started byte count : 307200
    UDMA App memcpy test statistics:
    Completed packet count : 400
    Completed payload byte count : 409600
    Started byte count : 409600
    UDMA App memcpy test statistics:
    Completed packet count : 500
    Completed payload byte count : 512000
    Started byte count : 512000
    UDMA App memcpy test statistics:
    Completed packet count : 600
    Completed payload byte count : 614400
    Started byte count : 614400
    UDMA App memcpy test statistics:
    Completed packet count : 700
    Completed payload byte count : 716800
    Started byte count : 716800
    UDMA App memcpy test statistics:
    Completed packet count : 800
    Completed payload byte count : 819200
    Started byte count : 819200
    UDMA App memcpy test statistics:
    Completed packet count : 900
    Completed payload byte count : 921600
    Started byte count : 921600
    UDMA App memcpy test statistics:
    Completed packet count : 1000
    Completed payload byte count : 1024000
    Started byte count : 1024000
    UDMA memcpy using TR15 block copy Passed!!
    All tests have passed!!

    Regards,

    Karan

  • Hi Karan

    I see one issue with your SBL logs, there is not print about Sciserver, by default these should come. Are there any changes you made to the SDK?

    No, I do not change the SBL code.

    I tried with the images I built on my setup, can you give this a try with the images as attached?

    I got the same result as you indicated by using .udma_app_BOOT.zip.

    Regards,

    Seiki

  • Hi Seiki,

    I was able to use the same binaries and run it successfully as per my logs attached in previous post. Can you confirm the exact steps you followed with the binaries shared by me?

    Regards,

    Karan

  • Hi Karan

    Sorry for late response.

    I followed the steps to make binaries in sd-card like below

    <1> make sd-card
    $ cd /home/kumikomi/ti-processor-sdk-linux-j7-evm-07_02_00_07/bin
    $ sudo ./mksdboot.sh  --device /dev/sde --sdk /home/kumikomi/ti-processor-sdk-linux-j7-evm-07_02_00_07
    
    <2> remove all files in boot partition
    $ ls
    sysfw.itb    tispl.bin   uenv.txt       uenv.txt.disp_sharing  uenv.txt.jailhouse  version
    tiboot3.bin  u-boot.img  uenv.txt.base  uenv.txt.dra821a       uenv.txt.psdkra
    $ rm *
    
    <3> copy SBL/SYSFW files to sd-card
    $ cp /home/kumikomi/ti/ti-processor-sdk-rtos-j721e-evm-07_02_00_06/pdk_jacinto_07_01_05_14/packages/ti/boot/sbl/binary/j721e_evm/mmcsd/bin/sbl_mmcsd_img_mcu1_0_release.tiimage /media/kumikomi/boot/tiboot3.bin
    $ cp /home/kumikomi/ti/ti-processor-sdk-rtos-j721e-evm-07_02_00_06/pdk_jacinto_07_01_05_14/packages/ti/drv/sciclient/soc/V1/tifs.bin /media/kumikomi/boot
    
    <4> create appimage and copy it to sd-card
    $ cd /home/kumikomi/tatesawa
    $ cp /home/kumikomi/tatesawa/udma_memcpy_testapp_mpu1_0_release.xa72fg app.out
    $ cd /home/kumikomi/ti/ti-processor-sdk-rtos-j721e-evm-07_02_00_06/pdk_jacinto_07_01_05_14/packages
    $ source ./pdksetupenv.sh
    $ ./pdkAppImageCreate.sh /home/kumikomi/ti/ti-processor-sdk-rtos-j721e-evm-07_02_00_06/pdk_jacinto_07_01_05_14/packages 0 /home/kumikomi/tatesawa app j721e mpu yes
    $ cp /home/kumikomi/tatesawa/app.appimage /media/kumikomi/boot/app
    

    Best Regards,

    Seiki

  • Hi Seiki,

    Thanks for sharing the instructions you used to copy images you built.

    Can you please share how did you used the images I shared? It is surprising as the images I shared, I have validated on my side. Also please share the logs with the images I shared.

    Attaching them again here.

    5554.udma_app_BOOT.zip

    Regards,

    Karan

  • Hi Karan,

    I used 5554.udma_app_BOOT.zip as follows and attached the logs.

    <1> make sd-card
    $ cd /home/kumikomi/ti-processor-sdk-linux-j7-evm-07_02_00_07/bin
    $ sudo ./mksdboot.sh  --device /dev/sde --sdk /home/kumikomi/ti-processor-sdk-linux-j7-evm-07_02_00_07
    
    <2> remove all files in boot partition
    $ ls
    sysfw.itb    tispl.bin   uenv.txt       uenv.txt.disp_sharing  uenv.txt.jailhouse  version
    tiboot3.bin  u-boot.img  uenv.txt.base  uenv.txt.dra821a       uenv.txt.psdkra
    $ rm *
    
    <3> copy SBL/SYSFW/APP files to sd-card
    $ cp /home/kumikomi/tatesawa2/tiboot3.bin /media/kumikomi/boot
    $ cp /home/kumikomi/tatesawa2/tifs.bin /media/kumikomi/boot
    $ cp /home/kumikomi/tatesawa2/app /media/kumikomi/boot
    
    <COM9> log
    SBL Revision: 01.00.10.00 (Apr 24 2021 - 11:20:49)
    TIFS  ver: 20.8.5--v2020.08b (Terrific Lla
    Sciserver Built On: Nov  5 2020 22:36:32
    Starting Sciserver..... PASSED
    
    <COM4> log
    UDMA memcpy application started...
    UDMA App memcpy test statistics:
    Completed packet count       : 100
    Completed payload byte count : 102400
    Started byte count           : 102400
    UDMA App memcpy test statistics:
    Completed packet count       : 200
    Completed payload byte count : 204800
    Started byte count           : 204800
    UDMA App memcpy test statistics:
    Completed packet count       : 300
    Completed payload byte count : 307200
    Started byte count           : 307200
    UDMA App memcpy test statistics:
    Completed packet count       : 400
    Completed payload byte count : 409600
    Started byte count           : 409600
    UDMA App memcpy test statistics:
    Completed packet count       : 500
    Completed payload byte count : 512000
    Started byte count           : 512000
    UDMA App memcpy test statistics:
    Completed packet count       : 600
    Completed payload byte count : 614400
    Started byte count           : 614400
    UDMA App memcpy test statistics:
    Completed packet count       : 700
    Completed payload byte count : 716800
    Started byte count           : 716800
    UDMA App memcpy test statistics:
    Completed packet count       : 800
    Completed payload byte count : 819200
    Started byte count           : 819200
    UDMA App memcpy test statistics:
    Completed packet count       : 900
    Completed payload byte count : 921600
    Started byte count           : 921600
    UDMA App memcpy test statistics:
    Completed packet count       : 1000
    Completed payload byte count : 1024000
    Started byte count           : 1024000
    UDMA memcpy using TR15 block copy Passed!!
    All tests have passed!!
    

    Regards,

    Seiki

  • Hi Seiki,

    So this application is passing now, don't see any issue with your logs.

    Regards,

    Karan

  • Hi, Karan

    I have discussed about ATF with my customer for a long time.

    And it is decided that SBL boot HLOS without ATF. 

    Thank you very much for your support so far.

    Best Regards,

    Seiki Tatesawa

  • Thanks for the update Seiki.

    Regards,

    Karan