aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Carvalho <cclaudio@linux.vnet.ibm.com>2016-09-28 05:11:01 -0300
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-10-10 15:29:37 +1100
commitb352dd68489a9d079dc193b5ce1dca9112a3b008 (patch)
tree8fe89738e51814d846e5fdadf5676bdc49c2c8b3
parentd1cb3a5bbdecf2c53428d7334922da00cd47eb6c (diff)
downloadskiboot-b352dd68489a9d079dc193b5ce1dca9112a3b008.zip
skiboot-b352dd68489a9d079dc193b5ce1dca9112a3b008.tar.gz
skiboot-b352dd68489a9d079dc193b5ce1dca9112a3b008.tar.bz2
external/boot_tests: add the nobooting option -N
This adds the -N option for BMC targets, which does not boot the firmware. The option helps in situations that we need to flash multiple partitions before booting the firmware. Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rwxr-xr-xexternal/boot-tests/boot_test.sh31
1 files changed, 21 insertions, 10 deletions
diff --git a/external/boot-tests/boot_test.sh b/external/boot-tests/boot_test.sh
index 88b4e69..4b73914 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 [ $nobooting -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 [-F eyecatcher:lid ]
+3) boot_test.sh [-vdp] -b bmc -t target -P pnor [-N]
+ boot_test.sh [-vdp] -b bmc -t target [-1 PAYLOAD] [-2 BOOTKERNEL] [-N]
+ boot_test.sh [-vdp] -b bmc -t target [-F eyecatcher:lid] [-N]
boot_test.sh [-vdp] -b fsp -t target [-1 lid1] [-2 lid2] [-3 lid3]
Flash the given firmware before boot testing.
@@ -166,6 +168,8 @@ Common Options:
-k keep logs on failure.
-K keep logs on success or failure.
+
+ -N No booting.
EOF
exit 1;
}
@@ -182,6 +186,7 @@ done
# Parse options
V=0;
bootonly=0;
+nobooting=0;
powerdown=0;
firmware_supplied=0;
target=""
@@ -194,7 +199,7 @@ LID[1]=""
LID[2]=""
keep_log_success=0
keep_log_failure=0
-while getopts "kKhvdpB1:2:3:P:t:b:F:" OPT; do
+while getopts "kKhvdpB1:2:3:P:t:b:F:N" OPT; do
case "$OPT" in
v)
V=1;
@@ -218,6 +223,12 @@ while getopts "kKhvdpB1:2:3:P:t:b:F:" OPT; do
usage
fi
;;
+ N)
+ nobooting=1;
+ if [ $firmware_supplied -eq 0 ] ; then
+ error "Firmware not supplied."
+ fi
+ ;;
p)
powerdown=1;
;;