key_increment_test: warn if atypical gbb flags are encountered.

BUG=b:70392534
TEST=excercised (up to the generating payloads phase) via "./keyinc_setup.sh
~/key_inc.conf ALL" with a key_inc.conf specifiying a binary with 0x39
flags and one with 0x4239 flags and observed the anticipated log messages.

Change-Id: Icbb8d08b779e71623cfebd00e7133c7874b40e08
Reviewed-on: https://chromium-review.googlesource.com/848212
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Kevin Shelton <kmshelton@chromium.org>
Reviewed-by: Shelley Chen <shchen@chromium.org>
diff --git a/provingground/firmware/keyinc_setup.sh b/provingground/firmware/keyinc_setup.sh
index 6e6b4be..764e9da 100755
--- a/provingground/firmware/keyinc_setup.sh
+++ b/provingground/firmware/keyinc_setup.sh
@@ -7,6 +7,8 @@
 # script to automate the setup steps for 1.6.8 Key increment testing test case
 #
 
+# TODO(kmshelton): Reimplement as an autotest or tast (go/tast) test.
+
 # Sample content of conf file
 cat <<EOF > /dev/null
 # name of the board or family
@@ -479,6 +481,21 @@
 
 }
 
+log_gbb_flags()
+{
+  cd $CHROMIUMOS_DIR
+
+  GBB_FLAGS=$(cros_sdk futility gbb --flags $BIOS)
+  log "GBB flags are $GBB_FLAGS"
+
+  if [ "flags: 0x00000039" == "${GBB_FLAGS}" ];
+  then log "GBB flags detected as 0x39, which is typical for firmware qual \
+  DUTs.";
+  else log "GBB flags not detected to be the typical firmware qual DUT value \
+  (0x39), unexpected behaviors may occur."
+  fi
+}
+
 
 #----------------------------------------------------------------------
 # MAIN
@@ -555,6 +572,8 @@
 log Board prepartion name: $BOARD_PAYLOAD
 log Will use chroot: $CHROMIUMOS_DIR
 
+log_gbb_flags
+
 # directory name in storage
 STORE_DIR=${BOARD}_keyinc_fw$(sed 's/\./_/g' <<<$BIOS_VER)_$USER
 FINAL_CONFIG="autoupdate-ascii-chromeos-$BOARD.config"