Signed-off-by: Jacob Stiffler <[email protected]>
---
 setup-uboot-env-keystone.sh | 34 ++++++++++++++++++++--------------
 1 file changed, 20 insertions(+), 14 deletions(-)

diff --git a/setup-uboot-env-keystone.sh b/setup-uboot-env-keystone.sh
index da90629..0ec6e8e 100755
--- a/setup-uboot-env-keystone.sh
+++ b/setup-uboot-env-keystone.sh
@@ -170,6 +170,17 @@ copy_to_tftproot "$ubifsimages"
 echo 
"--------------------------------------------------------------------------------"
 prompt_feedback "Would you like to update U-boot on the board?" ubootupdate y 
y n
 
+prompt_feedback "Would you like to update the UBI filesystem on the board?" 
ubifsupdate y y n
+
+if [ "$ubifsupdate" = "y" ]; then
+    echo "Available ubi images in $tftproot:"
+    for file in $tftproot/*-${platform}.ubi; do
+       basefile=`basename $file`
+       echo "    $basefile"
+    done
+    echo
+    prompt_feedback "Which ubi image do you want to boot?" ubifsimage 
$ubifsimagedefault
+fi
 
 echo "Select secondary boot:"
 echo " 1: NFS"
@@ -187,14 +198,6 @@ if [ "$secondary_boot" -eq "1" ]; then
     echo
     prompt_feedback "Which kernel image do you want to boot from TFTP?" 
kernelimage $kernelimagedefault
 else
-    echo
-    echo "Available ubi images in $tftproot:"
-    for file in $tftproot/*-${platform}.ubi; do
-       basefile=`basename $file`
-       echo "    $basefile"
-    done
-    echo
-    prompt_feedback "Which ubi image do you want to boot?" ubifsimage 
$ubifsimagedefault
     kernelimage=zImage
 fi
 
@@ -296,14 +299,17 @@ do_expect "\"$prompt\"" "send \"setenv name_ubi 
$ubifsimage\"" $cwd/setupBoard.m
 do_expect "\"$prompt\"" "send \"setenv name_kern $kernelimage\"" 
$cwd/setupBoard.minicom
 do_expect "\"$prompt\"" "send \"saveenv\"" $cwd/setupBoard.minicom
 
+if [ "$ubifsupdate" = "y" ]; then
+    do_expect "\"$prompt\"" "send \"run get_ubi_net\"" $cwd/setupBoard.minicom
+    do_expect "\"$prompt\"" "send \"run burn_ubi\"" $cwd/setupBoard.minicom
+fi
+
 if [ "$secondary_boot" -eq "1" ]; then
-       #TFTP and NFS Boot
-       do_expect "\"$prompt\"" "send \"setenv boot net\"" 
$cwd/setupBoard.minicom
+    #TFTP and NFS Boot
+    do_expect "\"$prompt\"" "send \"setenv boot net\"" $cwd/setupBoard.minicom
 else
-       #SD and NFS Boot
-       do_expect "\"$prompt\"" "send \"run get_ubi_net\"" 
$cwd/setupBoard.minicom
-       do_expect "\"$prompt\"" "send \"run burn_ubi\"" $cwd/setupBoard.minicom
-       do_expect "\"$prompt\"" "send \"setenv boot ubi\"" 
$cwd/setupBoard.minicom
+    #UBI Boot
+    do_expect "\"$prompt\"" "send \"setenv boot ubi\"" $cwd/setupBoard.minicom
 fi
 
 do_expect "\"$prompt\"" "send \"saveenv\"" $cwd/setupBoard.minicom
-- 
1.9.1

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

Reply via email to