All of lore.kernel.org
 help / color / mirror / Atom feed
* [tisdk-setup-scripts][PATCH v2] setup-uboot: Reset to default environment.
@ 2015-04-10 10:55 Jacob Stiffler
  0 siblings, 0 replies; only message in thread
From: Jacob Stiffler @ 2015-04-10 10:55 UTC (permalink / raw)
  To: meta-arago

* Prevent any previous settings from corrupting the setup.

Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
---
v2: 
* Reset CPU after setting default env.
  - This is needed since default environment does not set the correct
    "board_name" variable which is needed to find the correct device
    tree file.
  - u-boot will auto-detect the board upon booting and set the
    appropriate "board_name".

 setup-uboot-env-am18x.sh       |    5 +++++
 setup-uboot-env-am335x.sh      |    5 +++++
 setup-uboot-env-am3517.sh      |    5 +++++
 setup-uboot-env-am37x.sh       |    5 +++++
 setup-uboot-env-am43x.sh       |    5 +++++
 setup-uboot-env-am57xx-evm.sh  |    5 +++++
 setup-uboot-env-beagleboard.sh |    5 +++++
 setup-uboot-env-omap5.sh       |    5 +++++
 8 files changed, 40 insertions(+)

diff --git a/setup-uboot-env-am18x.sh b/setup-uboot-env-am18x.sh
index 5ee813e..8c296e5 100644
--- a/setup-uboot-env-am18x.sh
+++ b/setup-uboot-env-am18x.sh
@@ -226,6 +226,11 @@ if [ "$minicom" = "y" ]; then
     echo "verbose on" >> $minicomfilepath
     echo >> $minicomfilepath
     do_expect "\"stop autoboot:\"" "send \"\"" $minicomfilepath
+    do_expect "\"$prompt\"" "send \"env default -f -a\"" $minicomfilepath
+    do_expect "\"$prompt\"" "send \"saveenv\"" $minicomfilepath
+    do_expect "\"$prompt\"" "send \"reset\"" $minicomfilepath
+    do_expect "\"stop autoboot:\"" "send \" \"" $minicomfilepath
+
     do_expect "\"$prompt\"" "send \"setenv bootdelay 4\"" $minicomfilepath
     do_expect "\"$prompt\"" "send \"setenv baudrate 115200\"" $minicomfilepath
     do_expect "\"ENTER ...\"" "send \"\"" $minicomfilepath
diff --git a/setup-uboot-env-am335x.sh b/setup-uboot-env-am335x.sh
index b3be574..e3fb522 100644
--- a/setup-uboot-env-am335x.sh
+++ b/setup-uboot-env-am335x.sh
@@ -172,6 +172,11 @@ echo "timeout 300" > $cwd/setupBoard.minicom
 echo "verbose on" >> $cwd/setupBoard.minicom
 
 do_expect "\"stop autoboot:\"" "send \" \"" $cwd/setupBoard.minicom
+do_expect "\"U-Boot#\"" "send \"env default -f -a\"" $cwd/setupBoard.minicom
+do_expect "\"U-Boot#\"" "send \"saveenv\"" $cwd/setupBoard.minicom
+do_expect "\"U-Boot#\"" "send \"reset\"" $cwd/setupBoard.minicom
+do_expect "\"stop autoboot:\"" "send \" \"" $cwd/setupBoard.minicom
+
 if [ "$kernel" -eq "1" ]; then
 	if [ "$fs" -eq "1" ]; then
 		#TFTP and NFS Boot
diff --git a/setup-uboot-env-am3517.sh b/setup-uboot-env-am3517.sh
index f9ef134..73e9971 100644
--- a/setup-uboot-env-am3517.sh
+++ b/setup-uboot-env-am3517.sh
@@ -189,6 +189,11 @@ if [ "$minicom" = "y" ]; then
     echo "verbose on" >> $minicomfilepath
     echo >> $minicomfilepath
     do_expect "\"stop autoboot:\"" "send \"\"" $minicomfilepath
+    do_expect "\"$prompt\"" "send \"env default -f -a\"" $minicomfilepath
+    do_expect "\"$prompt\"" "send \"saveenv\"" $minicomfilepath
+    do_expect "\"$prompt\"" "send \"reset\"" $minicomfilepath
+    do_expect "\"stop autoboot:\"" "send \" \"" $minicomfilepath
+
     do_expect "\"$prompt\"" "send \"setenv bootdelay 3\"" $minicomfilepath
     do_expect "\"$prompt\"" "send \"setenv baudrate 115200\"" $minicomfilepath
     do_expect "\"ENTER ...\"" "send \"\"" $minicomfilepath
diff --git a/setup-uboot-env-am37x.sh b/setup-uboot-env-am37x.sh
index 0476483..e9970d6 100644
--- a/setup-uboot-env-am37x.sh
+++ b/setup-uboot-env-am37x.sh
@@ -189,6 +189,11 @@ if [ "$minicom" = "y" ]; then
     echo "verbose on" >> $minicomfilepath
     echo >> $minicomfilepath
     do_expect "\"stop autoboot:\"" "send \"\"" $minicomfilepath
+    do_expect "\"$prompt\"" "send \"env default -f -a\"" $minicomfilepath
+    do_expect "\"$prompt\"" "send \"saveenv\"" $minicomfilepath
+    do_expect "\"$prompt\"" "send \"reset\"" $minicomfilepath
+    do_expect "\"stop autoboot:\"" "send \" \"" $minicomfilepath
+
     do_expect "\"$prompt\"" "send \"setenv bootdelay 3\"" $minicomfilepath
     do_expect "\"$prompt\"" "send \"setenv baudrate 115200\"" $minicomfilepath
     do_expect "\"ENTER ...\"" "send \"\"" $minicomfilepath
diff --git a/setup-uboot-env-am43x.sh b/setup-uboot-env-am43x.sh
index 282ffc1..2e0067e 100644
--- a/setup-uboot-env-am43x.sh
+++ b/setup-uboot-env-am43x.sh
@@ -126,6 +126,11 @@ fi
 echo "timeout 300" > $cwd/setupBoard.minicom
 echo "verbose on" >> $cwd/setupBoard.minicom
 do_expect "\"stop autoboot:\"" "send \" \"" $cwd/setupBoard.minicom
+do_expect "\"U-Boot#\"" "send \"env default -f -a\"" $cwd/setupBoard.minicom
+do_expect "\"U-Boot#\"" "send \"saveenv\"" $cwd/setupBoard.minicom
+do_expect "\"U-Boot#\"" "send \"reset\"" $cwd/setupBoard.minicom
+do_expect "\"stop autoboot:\"" "send \" \"" $cwd/setupBoard.minicom
+
 if [ "$kernel" -eq "1" ]; then
 	if [ "$fs" -eq "1" ]; then
 		#TFTP and NFS Boot
diff --git a/setup-uboot-env-am57xx-evm.sh b/setup-uboot-env-am57xx-evm.sh
index 4707fa8..a3f4126 100644
--- a/setup-uboot-env-am57xx-evm.sh
+++ b/setup-uboot-env-am57xx-evm.sh
@@ -122,6 +122,11 @@ fi
 echo "timeout 300" > $cwd/setupBoard.minicom
 echo "verbose on" >> $cwd/setupBoard.minicom
 do_expect "\"stop autoboot:\"" "send \" \"" $cwd/setupBoard.minicom
+do_expect "\"U-Boot#\"" "send \"env default -f -a\"" $cwd/setupBoard.minicom
+do_expect "\"U-Boot#\"" "send \"saveenv\"" $cwd/setupBoard.minicom
+do_expect "\"U-Boot#\"" "send \"reset\"" $cwd/setupBoard.minicom
+do_expect "\"stop autoboot:\"" "send \" \"" $cwd/setupBoard.minicom
+
 if [ "$kernel" -eq "1" ]; then
 	if [ "$fs" -eq "1" ]; then
 		#TFTP and NFS Boot
diff --git a/setup-uboot-env-beagleboard.sh b/setup-uboot-env-beagleboard.sh
index 97a34db..bc237ae 100644
--- a/setup-uboot-env-beagleboard.sh
+++ b/setup-uboot-env-beagleboard.sh
@@ -189,6 +189,11 @@ if [ "$minicom" = "y" ]; then
     echo "verbose on" >> $minicomfilepath
     echo >> $minicomfilepath
     do_expect "\"stop autoboot:\"" "send \"\"" $minicomfilepath
+    do_expect "\"$prompt\"" "send \"env default -f -a\"" $minicomfilepath
+    do_expect "\"$prompt\"" "send \"saveenv\"" $minicomfilepath
+    do_expect "\"$prompt\"" "send \"reset\"" $minicomfilepath
+    do_expect "\"stop autoboot:\"" "send \" \"" $minicomfilepath
+
     do_expect "\"$prompt\"" "send \"setenv bootdelay 3\"" $minicomfilepath
     do_expect "\"$prompt\"" "send \"setenv baudrate 115200\"" $minicomfilepath
     do_expect "\"ENTER ...\"" "send \"\"" $minicomfilepath
diff --git a/setup-uboot-env-omap5.sh b/setup-uboot-env-omap5.sh
index 4b97575..94b246a 100644
--- a/setup-uboot-env-omap5.sh
+++ b/setup-uboot-env-omap5.sh
@@ -138,6 +138,11 @@ if [ "$minicom" = "y" ]; then
     echo "verbose on" >> $minicomfilepath
     echo >> $minicomfilepath
     do_expect "\"stop autoboot:\"" "send \"\"" $minicomfilepath
+    do_expect "\"$prompt\"" "send \"env default -f -a\"" $minicomfilepath
+    do_expect "\"$prompt\"" "send \"saveenv\"" $minicomfilepath
+    do_expect "\"$prompt\"" "send \"reset\"" $minicomfilepath
+    do_expect "\"stop autoboot:\"" "send \" \"" $minicomfilepath
+
     do_expect "\"$prompt\"" "send \"setenv bootdelay 3\"" $minicomfilepath
     do_expect "\"$prompt\"" "send \"setenv baudrate 115200\"" $minicomfilepath
 #    do_expect "\"ENTER ...\"" "send \"\"" $minicomfilepath
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-04-10 10:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-10 10:55 [tisdk-setup-scripts][PATCH v2] setup-uboot: Reset to default environment Jacob Stiffler

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.