[Skiboot] [PATCH 11/12] external/boot_tests: Add the flash only option -f
Claudio Carvalho
cclaudio at linux.vnet.ibm.com
Thu Aug 11 16:30:19 AEST 2016
This adds the -f option for BMC targets. It flashes the lid, but the
firmware is not booted.
The option helps in situations that we need to flash multiple partitions
before booting the firmware.
Signed-off-by: Claudio Carvalho <cclaudio at linux.vnet.ibm.com>
---
external/boot-tests/boot_test.sh | 31 +++++++++++++++++++++----------
1 file changed, 21 insertions(+), 10 deletions(-)
diff --git a/external/boot-tests/boot_test.sh b/external/boot-tests/boot_test.sh
index bfd9e5d..d20aea8 100755
--- a/external/boot-tests/boot_test.sh
+++ b/external/boot-tests/boot_test.sh
@@ -89,15 +89,17 @@ function boot_test {
flash $@;
fi
- msg "Booting $target..."
- boot_firmware;
- msg "firmware looks good, waiting for linux";
+ if [ $flashonly -ne 1 ] ; then
+ msg "Booting $target..."
+ boot_firmware;
+ msg "firmware looks good, waiting for linux";
- linux_boot;
- if [ $? -ne 0 ] ; then
+ linux_boot;
+ if [ $? -ne 0 ] ; then
error "Couldn't reach petitboot on $target";
+ fi
+ msg "$target has booted";
fi
- msg "$target has booted";
unset SSHPASS;
}
@@ -134,9 +136,9 @@ There are three usage modes.
Boot test the target without flashing. Specify the type of machine
(FSP or BMC) with the -b option.
-3) boot_test.sh [-vdp] -b bmc -t target -P pnor
- boot_test.sh [-vdp] -b bmc -t target [-1 PAYLOAD] [-2 BOOTKERNEL]
- boot_test.sh [-vdp] -b bmc -t target [-3 lid3 -e eyecatch]
+3) boot_test.sh [-vdp] -b bmc -t target -P pnor [-f]
+ boot_test.sh [-vdp] -b bmc -t target [-1 PAYLOAD] [-2 BOOTKERNEL] [-f]
+ boot_test.sh [-vdp] -b bmc -t target [-3 lid3 -e eyecatch] [-f]
boot_test.sh [-vdp] -b fsp -t target [-1 lid1] [-2 lid2] [-3 lid3]
Flash the given firmware before boot testing.
@@ -161,6 +163,8 @@ Common Options:
Only use this for debugging the script: it's highly likely that
successful booting into Petitboot will not be detected with this option.
+ -f flash only. Will not boot the machine.
+
-b BMC type (bmc or fsp).
-k keep logs on failure.
@@ -182,6 +186,7 @@ done
# Parse options
V=0;
bootonly=0;
+flashonly=0;
powerdown=0;
firmware_supplied=0;
target=""
@@ -193,7 +198,7 @@ LID[1]=""
LID[2]=""
keep_log_success=0
keep_log_failure=0
-while getopts "kKhvdpB1:2:3:P:t:b:e:" OPT; do
+while getopts "kKhvdpB1:2:3:P:t:b:e:f" OPT; do
case "$OPT" in
v)
V=1;
@@ -217,6 +222,12 @@ while getopts "kKhvdpB1:2:3:P:t:b:e:" OPT; do
usage
fi
;;
+ f)
+ flashonly=1;
+ if [ $firmware_supplied -eq 0 ] ; then
+ error "Firmware not supplied."
+ fi
+ ;;
p)
powerdown=1;
;;
--
1.9.1
More information about the Skiboot
mailing list