What are the steps involved in running vision_apps in SBL boot flow with Bootapp image?
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.
What are the steps involved in running vision_apps in SBL boot flow with Bootapp image?
Boot App is a tertiary bootloader which is booted by the SBL.
It runs on mcu1_0, from mcu1_0 it boots other cores in different stages.
It can boot high level OS like Linux or QNX on A72 cores via MMCSD or OSPI
This FAQ focuses on J721s2 SDK 9.1 with MMCSD boot media
Binaries required in the BOOT partition of the SD Card
1. SBL Boot image (sbl_mmcsd_img_mcu1_0_release.tiimage renamed to tiboot3.bin)
2. TIFS image (tifs.bin)
3. Bootapp Image (sbl_boot_app_mmcsd_linux_j721s2_evm_mcu1_0_freertos_TestApp_release.appimage renamed as app)
4. lateapp1 and lateapp2 ( Generated based on vision_apps binaries for the remote cores)
5. Linux related images (atf_optee.appimage, tidtb_linux.appimage, tikernelimage_linux.appimage)
Steps to prepare the SD Card
1. Download the (RTOS + Linux) SDK and follow the below steps to build and create the SD Card for vision_apps images.
Vision Apps User Guide: Build and Run (ti.com)
2. Copy sbl_mmcsd_img_mcu1_0_release.tiimage as tiboot3.bin to the boot partition of SD card from ${PSDKRA}/pdk_j721s2_09_01_00_22/packages/ti/boot/sbl/binary/j721s2_evm/mmcsd/bin
3. Copy tifs.bin to the boot partition of SD card from ${PSDKRA}/pdk_j721s2_09_01_00_22/packages/ti/drv/sciclient/soc/V4
4. Build boot_app_mmcsd_linux by using the following command
cd ${PSDKRA}/pdk_j721s2_09_01_00_22/packages/ti/build/ make BOARD=j721s2_evm CORE=mcu1_0 boot_app_mmcsd_linux -sj
5. Copy sbl_boot_app_mmcsd_linux_j721s2_evm_mcu1_0_freertos_TestApp_release.appimage from ${PSDKRA}/pdk_j721s2_09_01_00_22/packages/ti/boot/sbl/example/boot_app/binary/j721s2_evm/mmcsd renamed as "app" to the boot partition of SD card.
Steps to generate lateapps in vision_apps
1. Currently the build script of vision_apps to generate lateapps are implemented for QNX. Use the below patches to make them access Linux images.
/cfs-file/__key/communityserver-discussions-components-files/791/lateapp_5F00_linux.patch
Apply the above patch to the path ${PSDKRA}/sdk_builder/
2. After applying the patch, execute the below command to generate the lateapp
cd ${PSDKRA}/sdk_builder make sbl_vision_apps_bootimage
3. The lateapp images are created in ${PSDKRA}/vision_apps/out/sbl_bootfiles/ folder.
4. Copy this lateapp1 and lateapp2 to the boot partition of SD card.
Steps to generate Linux related images
In the current SDK, the script to regenerate the modified Linux binaries is available in ${PSDKRA}/mcusw/mcuss_demos/boot_app_mcu_rtos/main_domain_apps/scripts/hlos/constructappimageshlos.sh
This internally uses the binaries present in the ${PSDKLA}/board-support/prebuilt-images/ to generate the output images.
Input binary ${PSDKLA}/board-support/prebuilt-images | Output binary ${PSDKRA}/mcusw/mcuss_demos/boot_app_mcu_rtos/main_domain_apps/binary/bin/j721s2_evm |
bl31.bin & bl32.bin |
atf_optee.appimage |
base-board.dtb | tidtb_linux.appimage |
Image | tikernelimage_linux.appimage |
As there is no u-boot present in this boot-flow, the contents of the vision_apps overlay (i.e. the reserved memory regions and disabling of various nodes) should be integrated into k3-j721s2-common-proc-board.dtb (to be renamed as base-board.dtb)
1. The below patch integrates the vision_apps related changes to the k3-j721s2-common-proc-board.dtb
Please apply this patch in ${PSDKLA}/board-support/ti-linux-kernel-6.1.46+gitAUTOINC+5892b80d6b-g5892b80d6b
2. After applying this patch, execute the below command to generate k3-j721s2-common-proc-board.dtb
cd ${PSDKLA}/
make linux-dtbs
3. Copy the generated k3-j721s2-common-proc-board.dtb to ${PSDKLA}/board-support/prebuilt-images and rename it as base-board.dtb
4. In the script constructappimageshlos.sh present in ${PSDKRA}/mcusw/mcuss_demos/boot_app_mcu_rtos/main_domain_apps/scripts/hlos/ set the OS=linux and LINUX_BUILD_DIR_PATH to your ${PSDKLA} path.
5. Execute the constructappimageshlos.sh in the ${PSDKRA}/mcusw/mcuss_demos/boot_app_mcu_rtos/main_domain_apps/scripts/hlos/ as shown below
cd ${PSDKRA}/mcusw/mcuss_demos/boot_app_mcu_rtos/main_domain_apps/scripts/hlos/
./constructappimageshlos.sh j721s2_evm
6. Copy the generated images (atf_optee.appimage, tidtb_linux.appimage, tikernelimage_linux.appimage) to the boot partition of the SD Card.
This completes your SD Card preparation.
Regards,
Nikhil
Note: The above description is for a tertiary bootloader to load the Linux and vision_apps firmwares.
Typically post this approach, user/customer would have their own tertiary bootloader (i.e. another OS that could act as a tertiary bootloader) .
For example, in case of AUTOSAR OS on MCU R5F, the user would have to integrate the same tertiary bootloader feature into autosar, so that it could load linux and vision_apps firmwares.
User could refer the below app note for Texas Instruments’ System Control Interface (TISCI) server integration in Vector AUTOSAR for the Jacinto 7 family of devices.
ti.com/lit/an/spracy6/spracy6.pdf?ts=1718708217870&ref_url=https%253A%252F%252Fwww.bing.com%252F