aboutsummaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2015-10-01 12:35:41 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-10-01 12:35:41 +1000
commit5f23d0f55e9f69148bda711afdf7e2d5cd0fa182 (patch)
treed3f6fb97249649b1fa1f36737649f11bc9417c77 /external
parent0896e73b1a0ec72aad5c464b4fdb6a826b9a3160 (diff)
downloadskiboot-5f23d0f55e9f69148bda711afdf7e2d5cd0fa182.zip
skiboot-5f23d0f55e9f69148bda711afdf7e2d5cd0fa182.tar.gz
skiboot-5f23d0f55e9f69148bda711afdf7e2d5cd0fa182.tar.bz2
Add ability to copy pflash binary to BMC to boot_tests.sh
Some BMC firmware versions don't ship pflash. Support PFLASH_TO_COPY environment variable to a pflash binary built for the BMC that will be copied over and used to pflash the partition or whole pnor. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'external')
-rw-r--r--external/boot-tests/bmc_support.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/external/boot-tests/bmc_support.sh b/external/boot-tests/bmc_support.sh
index d021cd3..c584dd3 100644
--- a/external/boot-tests/bmc_support.sh
+++ b/external/boot-tests/bmc_support.sh
@@ -10,6 +10,8 @@ export SSHPASS=${SSHPASS:-superuser};
#Username/password for IPMI
IPMI_AUTH="-U ${IPMI_USER:-admin} -P ${IPMI_PASS:-admin}"
+PFLASH_TO_COPY=${PFLASH_TO_COPY:-}
+PFLASH_BINARY=/usr/local/bin/pflash
# Strip control characters from IPMI before grepping?
STRIP_CONTROL=0
@@ -33,6 +35,10 @@ function poweroff {
}
function flash {
+ if [ ! -z "$PFLASH_TO_COPY" ]; then
+ remotecp $PFLASH_TO_COPY $target /tmp/pflash
+ PFLASH_BINARY=/tmp/pflash
+ fi
if [ ! -z "$PNOR" ]; then
remotecp $PNOR $target /tmp/image.pnor;
fi
@@ -60,7 +66,7 @@ function flash {
# flash it
if [ ! -z "$PNOR" ]; then
msg "Flashing full PNOR"
- $SSHCMD "/usr/local/bin/pflash -E -f -p /tmp/image.pnor"
+ $SSHCMD "$PFLASH_BINARY -E -f -p /tmp/image.pnor"
if [ "$?" -ne "0" ] ; then
error "An unexpected pflash error has occured";
fi
@@ -68,7 +74,7 @@ function flash {
if [ ! -z "${LID[0]}" ] ; then
msg "Flashing PAYLOAD PNOR partition"
- $SSHCMD "/usr/local/bin/pflash -e -f -P PAYLOAD -p /tmp/skiboot.lid"
+ $SSHCMD "$PFLASH_BINARY -e -f -P PAYLOAD -p /tmp/skiboot.lid"
if [ "$?" -ne "0" ] ; then
error "An unexpected pflash error has occured";
fi
@@ -76,7 +82,7 @@ function flash {
if [ ! -z "${LID[1]}" ] ; then
msg "Flashing BOOTKERNEL PNOR partition"
- $SSHCMD "/usr/local/bin/pflash -e -f -P BOOTKERNEL -p /tmp/bootkernel"
+ $SSHCMD "$PFLASH_BINARY -e -f -P BOOTKERNEL -p /tmp/bootkernel"
if [ "$?" -ne "0" ] ; then
error "An unexpected pflash error has occured";
fi