key increment test: use unibuild interface

BUG=b:66966755
TEST=ran keyinc_setup.sh as specified below, and inspected
/usr/local/google/home/kmshelton/chromiumos/chroot/tmp/fm_and_key.out
for the line "All payloads are available at
/tmp/key_increment_working_folder/payloads":

~/chromiumos/src/platform/crostestutils/provingground/firmware $
./keyinc_setup.sh /tmp/robo_key_inc.conf generate_payload

with robo_key_inc.conf as follows:

BOARD="coral"
CHROMIUMOS_DIR="/usr/local/google/home/kmshelton/chromiumos"
IMAGE="/usr/local/google/home/kmshelton/chromiumos/src/build/crosdl/coral_10124.0.0_dev_Test/chromiumos_test_image.bin"
BIOS="/tmp/image-coral.bin"
LOGS="/tmp"
DUT_IP="172.22.19.161"

MODEL="robo360"

Change-Id: Ibfd308d17f2cca1d10c151b8b5aab784ff2d00a9
Reviewed-on: https://chromium-review.googlesource.com/806240
Commit-Ready: Kevin Shelton <kmshelton@chromium.org>
Tested-by: Kevin Shelton <kmshelton@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
diff --git a/provingground/firmware/keyinc_setup.sh b/provingground/firmware/keyinc_setup.sh
index fac079c..6e6b4be 100755
--- a/provingground/firmware/keyinc_setup.sh
+++ b/provingground/firmware/keyinc_setup.sh
@@ -9,7 +9,7 @@
 
 # Sample content of conf file
 cat <<EOF > /dev/null
-# name of the board
+# name of the board or family
 BOARD="veyron_jerry"
 # Directory where you run cros_sdk
 CHROMIUMOS_DIR="/disk2/chromiumos3/"
@@ -21,6 +21,9 @@
 # DUT ip address
 DUT_IP="100.96.48.138"
 
+# The following are not always required.
+# If testing a unibuild image, the model must be specified.
+# MODEL="robo360"
 # get_payload uses different name for board.
 # BOARD_PAYLOAD="veyron-jerry"
 # If you want to bypass the default get_payloads.par
@@ -63,7 +66,7 @@
 cd ~/trunk/src/platform/dev/
 
 git log fm_and_key_version_test_prep.sh \
-  | grep b681c97226e4e485823e391413208eaa61563291 > /dev/null
+  | grep I1f1c5bb2045c7d121182d13c6f20b1dd4d5c6f6a > /dev/null
 if [ \$? -ne 0 ]; then
   echo =======================================================
   echo Your fm_and_key_version_test_prep.sh does not contain the
@@ -73,6 +76,9 @@
 fi
 echo Running from chroot \$(pwd)
 cmd="./fm_and_key_version_test_prep.sh -b $BOARD_PAYLOAD -i /tmp/chromiumos_test_image.bin -f $BIOS_VER -s /tmp/image.bin -v $BIOS_STR"
+if [[ -n "${MODEL}" ]]; then
+  cmd+=" -m ${MODEL}"
+fi
 \$cmd > /tmp/fm_and_key.out 2>&1
 
 PAYLOAD_BIN="/tmp/key_increment_working_folder/bios/${BOARD_PAYLOAD}_${BIOS_VER}.1_signed.bin"