Block attempts to create a pnor-patch volume in field mode

This patch improves the obmc-flash-bios script by blocking attempts to
create and mount a pnor-patch volume when the system is in field mode.

When this scenario is reached, the current behavior is to error out
because the script tries to mount pnor-patch to /usr/local/share/pnor,
which is inaccessible in field mode. This fix simply blocks these
attempts to suppress the error message.

Change-Id: I78b5171e66f194d7b8d2b1baa639ee29a1b11794
Signed-off-by: Michael Tritz <mtritz@us.ibm.com>
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios
index d92fad5..1c90e8b 100644
--- a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios
@@ -112,6 +112,9 @@
   pnordev="/dev/mtd${pnor}"
 
   if [[ "${name}" == "pnor-patch" ]]; then
+    if [[ "$(fw_printenv fieldmode 2>/dev/null)" == "fieldmode=true" ]]; then
+      return 0
+    fi
     if [[ ! "$(hexdump -C -n 3 ${pnordev})" =~ "UBI" ]]; then
       return 0
     fi