Do not allow power on if PNOR doesn't have required image

- The new BMC code requires the UBI based PNOR image to be loaded before
HOST turns on. If the PNOR is not formatted as UBI, we want a clear error in
the journal and quick fail to boot to notify the user.

Resolves openbmc/openbmc#2117

Change-Id: I547ba488a94c5b5871c6327b0fd3af678c656b1b
Signed-off-by: Saqib Khan <khansa@us.ibm.com>
Signed-off-by: Edward A. James <eajames@us.ibm.com>
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/mboxd/mboxd.bbappend b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/mboxd/mboxd.bbappend
index 8b6248a..ac35ae9 100644
--- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/mboxd/mboxd.bbappend
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/mboxd/mboxd.bbappend
@@ -1 +1,12 @@
 MBOXD_FLASH_SIZE = "64M"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SYSTEMD_SERVICE_${PN} += "check-pnor-format.service"
+
+SRC_URI += "file://check_pnor_format.sh"
+
+do_install_append() {
+	install -d ${D}${bindir}
+	install -m 0755 ${WORKDIR}/check_pnor_format.sh ${D}${bindir}/check_pnor_format.sh
+}