From 0b331d2ab02df72ebac41921a474ab01f5eba219 Mon Sep 17 00:00:00 2001 From: Prasad Konnur Date: Mon, 7 Dec 2020 18:05:17 +0530 Subject: [PATCH 1/1] BugFix PDK-8840 Updated app image create script to support all cores of K3 devices Signed-off-by: Prasad Konnur --- packages/pdkAppImageCreate.bat | 58 +++++++++++++++++++++++++++++++--- packages/pdkAppImageCreate.sh | 47 +++++++++++++++++++++++---- 2 files changed, 95 insertions(+), 10 deletions(-) diff --git a/packages/pdkAppImageCreate.bat b/packages/pdkAppImageCreate.bat index 7bc4965bb..e27acf563 100755 --- a/packages/pdkAppImageCreate.bat +++ b/packages/pdkAppImageCreate.bat @@ -81,16 +81,66 @@ set PROCESSOR=%6 :SOC_K3 @REM Refer to SBL document for core ID value (0, or 4 bellow). + set CORE_ID="" if %PROCESSOR% == mpu ( - set BIN_PATH=%APP_PATH% - set TOOLS_PATH=%PDK_PATH%/ti/boot/sbl/tools - call %PDK_PATH%/ti/boot/sbl/tools/scripts/K3ImageGen.bat 0 %APP_PATH%/%APP_NAME%.out + set CORE_ID=0 ) if %PROCESSOR% == mcu ( + set CORE_ID=4 + ) + if %PROCESSOR% == mpu1_0 ( + set CORE_ID=0 + ) + if %PROCESSOR% == mpu1_1 ( + set CORE_ID=1 + ) + if %PROCESSOR% == mpu2_0 ( + set CORE_ID=2 + ) + if %PROCESSOR% == mpu2_1 ( + set CORE_ID=3 + ) + if %PROCESSOR% == mcu1_0 ( + set CORE_ID=4 + ) + if %PROCESSOR% == mcu1_1 ( + set CORE_ID=5 + ) + if %PROCESSOR% == mcu2_0 ( + set CORE_ID=6 + ) + if %PROCESSOR% == mcu2_1 ( + set CORE_ID=7 + ) + if %PROCESSOR% == mcu3_0 ( + set CORE_ID=8 + ) + if %PROCESSOR% == mcu3_1 ( + set CORE_ID=9 + ) + if %PROCESSOR% == c66xdsp_1 ( + set CORE_ID=10 + ) + if %PROCESSOR% == c66xdsp_2 ( + set CORE_ID=11 + ) + if %PROCESSOR% == c7x_1 ( + set CORE_ID=12 + ) + if %PROCESSOR% == c7x_2 ( + set CORE_ID=13 + ) + if %PROCESSOR% == m4f_0 ( + set CORE_ID=14 + ) + + if NOT %CORE_ID%=="" ( set BIN_PATH=%APP_PATH% set TOOLS_PATH=%PDK_PATH%/ti/boot/sbl/tools - call %PDK_PATH%/ti/boot/sbl/tools/scripts/K3ImageGen.bat 4 %APP_PATH%/%APP_NAME%.out + set PDK_INSTALL_PATH=%PDK_PATH% + call %PDK_PATH%/ti/boot/sbl/tools/scripts/K3ImageGen.bat %CORE_ID% %APP_PATH%/%APP_NAME% ) + goto ENDSCRIPT :SOC_K2G if %PROCESSOR% == arm ( diff --git a/packages/pdkAppImageCreate.sh b/packages/pdkAppImageCreate.sh index cf56c39cc..1d209f22b 100755 --- a/packages/pdkAppImageCreate.sh +++ b/packages/pdkAppImageCreate.sh @@ -100,16 +100,51 @@ fi if [ $SOC == am65xx ] || [ $SOC == j721e ] || [ $SOC == am64x ]; then + export CORE_ID="" #Refer to SBL document for core ID value (0, or 4 bellow). if [ "$PROCESSOR" == "mpu" ]; then - export BIN_PATH=$APP_PATH - export TOOLS_PATH=$PDK_PATH/ti/boot/sbl/tools - . $PDK_PATH/ti/boot/sbl/tools/scripts/K3ImageGen.sh 0 $APP_PATH/$APP_NAME.out + export CORE_ID=4 elif [ "$PROCESSOR" == "mcu" ]; then + export CORE_ID=0 + elif [ "$PROCESSOR" == "mpu1_0" ]; then + export CORE_ID=0 + elif [ "$PROCESSOR" == "mpu1_1" ]; then + export CORE_ID=1 + elif [ "$PROCESSOR" == "mpu2_0" ]; then + export CORE_ID=2 + elif [ "$PROCESSOR" == "mpu2_1" ]; then + export CORE_ID=3 + elif [ "$PROCESSOR" == "mcu1_0" ]; then + export CORE_ID=4 + elif [ "$PROCESSOR" == "mcu1_1" ]; then + export CORE_ID=5 + elif [ "$PROCESSOR" == "mcu2_0" ]; then + export CORE_ID=6 + elif [ "$PROCESSOR" == "mcu2_1" ]; then + export CORE_ID=7 + elif [ "$PROCESSOR" == "mcu3_0" ]; then + export CORE_ID=8 + elif [ "$PROCESSOR" == "mcu3_1" ]; then + export CORE_ID=9 + elif [ "$PROCESSOR" == "c66xdsp_1" ]; then + export CORE_ID=10 + elif [ "$PROCESSOR" == "c66xdsp_2" ]; then + export CORE_ID=11 + elif [ "$PROCESSOR" == "c7x_1" ]; then + export CORE_ID=12 + elif [ "$PROCESSOR" == "c7x_1" ]; then + export CORE_ID=13 + fi + elif [ "$PROCESSOR" == "m4f_0" ]; then + export CORE_ID=14 + fi + + if [ "$CORE_ID" == "" ]; then + echo Invalid Processor core + else export BIN_PATH=$APP_PATH export TOOLS_PATH=$PDK_PATH/ti/boot/sbl/tools - . $PDK_PATH/ti/boot/sbl/tools/scripts/K3ImageGen.sh 4 $APP_PATH/$APP_NAME.out - else - echo Invalid Processor core + export PDK_INSTALL_PATH=$PDK_PATH + . $PDK_PATH/ti/boot/sbl/tools/scripts/K3ImageGen.sh $CORE_ID $APP_PATH/$APP_NAME fi fi -- 2.26.2