[Skiboot] [PATCH] boot-tests: force booting from primary (non-golden) side

Stewart Smith stewart at linux.vnet.ibm.com
Fri Apr 1 13:28:43 AEDT 2016


Some machines decide to go boot from the Golden side, and this means
we are not boot testing what we flash.

So, use the magic incantation and goat sacrifice that is IPMI raw commands
to boot from the primary side.

Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
---
 external/boot-tests/bmc_support.sh | 6 ++++++
 external/boot-tests/boot_test.sh   | 2 ++
 external/boot-tests/fsp_support.sh | 4 ++++
 3 files changed, 12 insertions(+)

diff --git a/external/boot-tests/bmc_support.sh b/external/boot-tests/bmc_support.sh
index 610c050026f1..0b4c6752ca52 100644
--- a/external/boot-tests/bmc_support.sh
+++ b/external/boot-tests/bmc_support.sh
@@ -34,6 +34,12 @@ function poweroff {
     sleep 10
 }
 
+function force_primary_side {
+    # Now we force booting from primary (not golden) side
+    $IPMI_COMMAND raw 0x04 0x30 0x5c 0x01 0x00 0x00 0 0 0 0 0 0
+    sleep 8
+}
+
 function flash {
 	if [ ! -z "$PFLASH_TO_COPY" ]; then
 		remotecp $PFLASH_TO_COPY $target /tmp/pflash
diff --git a/external/boot-tests/boot_test.sh b/external/boot-tests/boot_test.sh
index fd6972b72059..58e228253afe 100755
--- a/external/boot-tests/boot_test.sh
+++ b/external/boot-tests/boot_test.sh
@@ -260,6 +260,8 @@ if ! is_off; then
     fi
 fi
 
+force_primary_side # ensure we're booting from side we flash.
+
 # run the boot test
 echo "$target: Boot testing $target";
 begin_t=$(date +%s);
diff --git a/external/boot-tests/fsp_support.sh b/external/boot-tests/fsp_support.sh
index 861d218ffd35..d3d0de9614da 100644
--- a/external/boot-tests/fsp_support.sh
+++ b/external/boot-tests/fsp_support.sh
@@ -51,6 +51,10 @@ function poweroff {
     msg "Finishing with state '$state'."
 }
 
+function force_primary_side {
+    # N/A for FSP
+}
+
 function flash {
 	#Make a backup of the current lids
 	$REMOTECPCMD $target:/opt/extucode/80f00100.lid 80f00100.lid.bak &&
-- 
2.1.4



More information about the Skiboot mailing list