Jacob Stiffler
2018-09-26 13:23:11 UTC
Carry fix from common script (24aeb6d4dce7236d0f40556d611b704493833e1e).
Instead of printing an error if a certain boot image is not found,
determine which set of boot images are to be used (MLO or tiboot3.bin
and tispl.bin), and only print an error if an incomplete set is found.
While this is not perfect, it allows for a common script that can be
used independent of the SDK.
Signed-off-by: Jacob Stiffler <j-***@ti.com>
---
k3/create-sdcard.sh | 38 +++++++++++++++++++++++---------------
1 file changed, 23 insertions(+), 15 deletions(-)
diff --git a/k3/create-sdcard.sh b/k3/create-sdcard.sh
index 44b84b6..3bb6e17 100644
--- a/k3/create-sdcard.sh
+++ b/k3/create-sdcard.sh
@@ -1048,40 +1048,48 @@ if [ $BOOTPATHOPTION -eq 1 ] ; then
echo ""
#copy boot files out of board support
- if [ "$MLO" != "" ] ; then
- cp $BOOTFILEPATH/$MLO $PATH_TO_SDBOOT/MLO
- echo "MLO copied"
- else
- echo "MLO file not found"
+ if [ "$MLO" == "" ] && ( [ "$SPL_R5" == "" ] || [ "$SPL_A53" == "" ] ); then
+ if [ "$SPL_R5" != "" ]; then
+ echo "tispl.bin file not found"
+ elif [ "$SPL_A53" != "" ]; then
+ echo "tiboot3.bin file not found"
+ else
+ echo "Boot image not found"
+ fi
fi
echo ""
echo ""
+ if [ "$MLO" != "" ] ; then
+ cp $BOOTFILEPATH/$MLO $PATH_TO_SDBOOT/MLO
+ echo "MLO copied"
+
+ echo ""
+
+ echo ""
+ fi
+
#copy boot files out of board support
if [ "$SPL_A53" != "" ] ; then
cp $BOOTFILEPATH/$SPL_A53 $PATH_TO_SDBOOT/tispl.bin
echo "tispl.bin copied"
- else
- echo "tispl.bin file not found"
- fi
- echo ""
+ echo ""
- echo ""
+ echo ""
+ fi
#copy boot files out of board support
if [ "$SPL_R5" != "" ] ; then
cp $BOOTFILEPATH/$SPL_R5 $PATH_TO_SDBOOT/tiboot3.bin
echo "tiboot3.bin copied"
- else
- echo "tiboot3.bin file not found"
- fi
- echo ""
+ echo ""
- echo ""
+ echo ""
+ fi
if [ "$BOOTIMG" != "" ] ; then
cp $BOOTFILEPATH/$BOOTIMG $PATH_TO_SDBOOT/u-boot.img
Instead of printing an error if a certain boot image is not found,
determine which set of boot images are to be used (MLO or tiboot3.bin
and tispl.bin), and only print an error if an incomplete set is found.
While this is not perfect, it allows for a common script that can be
used independent of the SDK.
Signed-off-by: Jacob Stiffler <j-***@ti.com>
---
k3/create-sdcard.sh | 38 +++++++++++++++++++++++---------------
1 file changed, 23 insertions(+), 15 deletions(-)
diff --git a/k3/create-sdcard.sh b/k3/create-sdcard.sh
index 44b84b6..3bb6e17 100644
--- a/k3/create-sdcard.sh
+++ b/k3/create-sdcard.sh
@@ -1048,40 +1048,48 @@ if [ $BOOTPATHOPTION -eq 1 ] ; then
echo ""
#copy boot files out of board support
- if [ "$MLO" != "" ] ; then
- cp $BOOTFILEPATH/$MLO $PATH_TO_SDBOOT/MLO
- echo "MLO copied"
- else
- echo "MLO file not found"
+ if [ "$MLO" == "" ] && ( [ "$SPL_R5" == "" ] || [ "$SPL_A53" == "" ] ); then
+ if [ "$SPL_R5" != "" ]; then
+ echo "tispl.bin file not found"
+ elif [ "$SPL_A53" != "" ]; then
+ echo "tiboot3.bin file not found"
+ else
+ echo "Boot image not found"
+ fi
fi
echo ""
echo ""
+ if [ "$MLO" != "" ] ; then
+ cp $BOOTFILEPATH/$MLO $PATH_TO_SDBOOT/MLO
+ echo "MLO copied"
+
+ echo ""
+
+ echo ""
+ fi
+
#copy boot files out of board support
if [ "$SPL_A53" != "" ] ; then
cp $BOOTFILEPATH/$SPL_A53 $PATH_TO_SDBOOT/tispl.bin
echo "tispl.bin copied"
- else
- echo "tispl.bin file not found"
- fi
- echo ""
+ echo ""
- echo ""
+ echo ""
+ fi
#copy boot files out of board support
if [ "$SPL_R5" != "" ] ; then
cp $BOOTFILEPATH/$SPL_R5 $PATH_TO_SDBOOT/tiboot3.bin
echo "tiboot3.bin copied"
- else
- echo "tiboot3.bin file not found"
- fi
- echo ""
+ echo ""
- echo ""
+ echo ""
+ fi
if [ "$BOOTIMG" != "" ] ; then
cp $BOOTFILEPATH/$BOOTIMG $PATH_TO_SDBOOT/u-boot.img
--
1.9.1
1.9.1