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 <[email protected]>
---
 create-sdcard.sh | 38 +++++++++++++++++++++++---------------
 1 file changed, 23 insertions(+), 15 deletions(-)

diff --git a/create-sdcard.sh b/create-sdcard.sh
index 078e258..d7f2c83 100644
--- a/create-sdcard.sh
+++ b/create-sdcard.sh
@@ -1010,40 +1010,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

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

Reply via email to