mmc: Add read-only directory to support mboxd

The mboxd implementation assumes that there is a read-only and
read-write directory. During a write request, mboxd copies the
contents of the read-only to the read-write directory. To continue
to support mboxd, mount a read-only directory of the hostfw image
for mboxd to use. Otherwise the write command fails (can't copy
the file to itself) and mboxd exits.

Tested: Verified mboxd didn't fail and system powered on.

Change-Id: Idcb8ff0c5eee0179d5d70e60e5e01c7d0f76b880
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
diff --git a/vpnor/obmc-vpnor-util b/vpnor/obmc-vpnor-util
index b529f47..9043926 100644
--- a/vpnor/obmc-vpnor-util
+++ b/vpnor/obmc-vpnor-util
@@ -47,6 +47,7 @@
   PNOR_PATCH_LOCATION="/usr/local/share/pnor/"
   HOSTFW_PATCH_LOCATION="/usr/local/share/hostfw/"
   MMC_BASE_PATH="/media/hostfw"
+  MMC_RO_PATH="${MMC_BASE_PATH}/running-ro"
   MMC_RUNNING_PATH="${MMC_BASE_PATH}/running"
   MMC_ALTERNATE_PATH="${MMC_BASE_PATH}/alternate"
   HOSTFW_RUNNING_PATH="${HOSTFW_ACTIVE_PATH}/running"
@@ -80,13 +81,14 @@
       prsvTarget="${PNOR_PRSV}"
   elif [ -d "${MMC_BASE_PATH}" ]; then
       # Use eMMC
-      roTarget="${MMC_RUNNING_PATH}"
+      roTarget="${MMC_RO_PATH}"
       rwTarget="${MMC_RUNNING_PATH}"
       prsvTarget="${MMC_RUNNING_PATH}"
 
       if [ ! -d "${HOSTFW_ACTIVE_PATH}" ]; then
           mkdir -p "${HOSTFW_ACTIVE_PATH}"
       fi
+      # Symlinks used by PLDM
       if [[ $(readlink -f "${HOSTFW_RUNNING_PATH}") != ${MMC_RUNNING_PATH} ]]; then
           rm -f ${HOSTFW_RUNNING_PATH}
           ln -sfv ${MMC_RUNNING_PATH} ${HOSTFW_RUNNING_PATH}