[Skiboot] [PATCH 10/12] external/boot_tests: Add the partition name option -e
Claudio Carvalho
cclaudio at linux.vnet.ibm.com
Thu Aug 11 16:30:18 AEST 2016
There are situations where we want to flash a lid that isn't neither
BOOTKERNEL nor PAYLOAD. That's the case for CAPP, to test secure and
trusted boot patches we need to flash CAPP with different secure boot
headers.
This patch adds the -e option for BMC targets. -e specify the partition
name for -3.
Example: '-3 cappucode.bin.sec.ecc -e CAPP' will flash the
cappucode.bin.sec.ecc to the partition name that matches with CAPP.
The eyecatch for each partition is defined in
https://github/open-power/pnor.git
Signed-off-by: Claudio Carvalho <cclaudio at linux.vnet.ibm.com>
---
external/boot-tests/bmc_support.sh | 15 ++++++++++++++-
external/boot-tests/boot_test.sh | 13 +++++++++++--
2 files changed, 25 insertions(+), 3 deletions(-)
diff --git a/external/boot-tests/bmc_support.sh b/external/boot-tests/bmc_support.sh
index f28c610..8f5d44c 100644
--- a/external/boot-tests/bmc_support.sh
+++ b/external/boot-tests/bmc_support.sh
@@ -55,7 +55,10 @@ function flash {
if [ "${LID[1]}" != "" ]; then
remotecp ${LID[1]} $target /tmp/bootkernel
fi
-
+ if [ "${LID[2]}" != "" ]; then
+ remotecp ${LID[2]} $target /tmp/$(basename ${LID[2]})
+ fi
+
if [ "$?" -ne "0" ] ; then
error "Couldn't copy firmware image";
fi
@@ -94,6 +97,16 @@ function flash {
error "An unexpected pflash error has occurred";
fi
fi
+
+ if [ ! -z "${LID[2]}" -a ! -z "$partition" ] ; then
+ msg "Flashing $partition PNOR partition"
+ msg "$SSHCMD $PFLASH_BINARY -e -f -P $partition -p /tmp/$(basename ${LID[2]})"
+ $SSHCMD "$PFLASH_BINARY -e -f -P $partition -p /tmp/$(basename ${LID[2]})"
+ if [ "$?" -ne "0" ] ; then
+ error "An unexpected pflash error has occurred";
+ fi
+ fi
+
}
function boot_firmware {
diff --git a/external/boot-tests/boot_test.sh b/external/boot-tests/boot_test.sh
index 4ad869c..bfd9e5d 100755
--- a/external/boot-tests/boot_test.sh
+++ b/external/boot-tests/boot_test.sh
@@ -136,6 +136,7 @@ There are three usage modes.
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]
boot_test.sh [-vdp] -b fsp -t target [-1 lid1] [-2 lid2] [-3 lid3]
Flash the given firmware before boot testing.
@@ -143,7 +144,8 @@ There are three usage modes.
For a BMC target, -P specifies a full PNOR.
For a BMC target, -1/-2 specify the PAYLOAD and BOOTKERNEL PNOR partitions
- respectively. Only the given partitions will be flashed.
+ respectively; -e specify the partition name for -3.
+ Only the given partitions will be flashed.
For an FSP target, -1/-2/-3 specify lids. Any combination of lids is
acceptable.
@@ -185,12 +187,13 @@ firmware_supplied=0;
target=""
method=""
PNOR=""
+partition=""
LID[0]=""
LID[1]=""
LID[2]=""
keep_log_success=0
keep_log_failure=0
-while getopts "kKhvdpB1:2:3:P:t:b:" OPT; do
+while getopts "kKhvdpB1:2:3:P:t:b:e:" OPT; do
case "$OPT" in
v)
V=1;
@@ -234,6 +237,12 @@ while getopts "kKhvdpB1:2:3:P:t:b:" OPT; do
fi
PNOR="$OPTARG"
;;
+ e)
+ partition="$OPTARG";
+ if [ -z "${LID[2]}" ] ; then
+ error "-3 option not defined";
+ fi
+ ;;
t)
target=$OPTARG;
;;
--
1.9.1
More information about the Skiboot
mailing list