BugFix PDK-8840
authorPrasad Konnur <prasadkonnur@ti.com>
Mon, 7 Dec 2020 12:35:17 +0000 (18:05 +0530)
committerSivaraj R <sivaraj@ti.com>
Mon, 7 Dec 2020 14:58:44 +0000 (08:58 -0600)
  Updated app image create script to support all cores of K3 devices

Signed-off-by: Prasad Konnur <prasadkonnur@ti.com>
packages/pdkAppImageCreate.bat
packages/pdkAppImageCreate.sh

index 7bc4965bbf9517a167c0acc9491e27903c50bb87..e27acf563ca29ba87412d89e337adfa67305766e 100755 (executable)
@@ -81,16 +81,66 @@ set PROCESSOR=%6
 \r
 :SOC_K3\r
     @REM Refer to SBL document for core ID value (0, or 4 bellow).\r
+    set CORE_ID=""\r
     if %PROCESSOR% == mpu (\r
-        set BIN_PATH=%APP_PATH%\r
-        set TOOLS_PATH=%PDK_PATH%/ti/boot/sbl/tools\r
-        call %PDK_PATH%/ti/boot/sbl/tools/scripts/K3ImageGen.bat 0 %APP_PATH%/%APP_NAME%.out\r
+        set CORE_ID=0\r
     )\r
     if %PROCESSOR% == mcu (\r
+        set CORE_ID=4\r
+    )\r
+    if %PROCESSOR% == mpu1_0 (\r
+        set CORE_ID=0\r
+    )\r
+    if %PROCESSOR% == mpu1_1 (\r
+        set CORE_ID=1\r
+    )\r
+    if %PROCESSOR% == mpu2_0 (\r
+        set CORE_ID=2\r
+    )\r
+    if %PROCESSOR% == mpu2_1 (\r
+        set CORE_ID=3\r
+    )\r
+    if %PROCESSOR% == mcu1_0 (\r
+        set CORE_ID=4\r
+    )\r
+    if %PROCESSOR% == mcu1_1 (\r
+        set CORE_ID=5\r
+    )\r
+    if %PROCESSOR% == mcu2_0 (\r
+        set CORE_ID=6\r
+    )\r
+    if %PROCESSOR% == mcu2_1 (\r
+        set CORE_ID=7\r
+    )\r
+    if %PROCESSOR% == mcu3_0 (\r
+        set CORE_ID=8\r
+    )\r
+    if %PROCESSOR% == mcu3_1 (\r
+        set CORE_ID=9\r
+    )\r
+    if %PROCESSOR% == c66xdsp_1 (\r
+        set CORE_ID=10\r
+    )\r
+    if %PROCESSOR% == c66xdsp_2 (\r
+        set CORE_ID=11\r
+    )\r
+    if %PROCESSOR% == c7x_1 (\r
+        set CORE_ID=12\r
+    )\r
+    if %PROCESSOR% == c7x_2 (\r
+        set CORE_ID=13\r
+    )\r
+    if %PROCESSOR% == m4f_0 (\r
+        set CORE_ID=14\r
+    )\r
+\r
+    if NOT %CORE_ID%=="" (\r
         set BIN_PATH=%APP_PATH%\r
         set TOOLS_PATH=%PDK_PATH%/ti/boot/sbl/tools\r
-        call %PDK_PATH%/ti/boot/sbl/tools/scripts/K3ImageGen.bat 4 %APP_PATH%/%APP_NAME%.out\r
+        set PDK_INSTALL_PATH=%PDK_PATH%\r
+        call %PDK_PATH%/ti/boot/sbl/tools/scripts/K3ImageGen.bat  %CORE_ID% %APP_PATH%/%APP_NAME%\r
     )\r
+\r
     goto ENDSCRIPT\r
 :SOC_K2G\r
     if %PROCESSOR% == arm (\r
index cf56c39ccbf1657b490335d4b980edc7d65a1d1c..1d209f22b2570d94fcc629a198e4a4f2f96f3bb9 100755 (executable)
@@ -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