Adding wofdata support for op-build packages
diff --git a/openpower/configs/witherspoon_defconfig b/openpower/configs/witherspoon_defconfig
index 77cddac..6cf4b59 100644
--- a/openpower/configs/witherspoon_defconfig
+++ b/openpower/configs/witherspoon_defconfig
@@ -48,6 +48,8 @@
 BR2_HOSTBOOT_BINARY_SBE_FILENAME="nimbus_sbe.img.ecc"
 BR2_HOSTBOOT_BINARY_SBEC_FILENAME="centaur_sbec_pad.img.ecc"
 BR2_HOSTBOOT_BINARY_WINK_FILENAME="p9n.ref_image.hdr.bin.ecc"
+BR2_WOFDATA_FILENAME="wof_output"
+BR2_WOFDATA_BINARY_FILENAME="wofdata.bin.ecc"
 BR2_IMA_CATALOG_FILENAME="ima_catalog.bin"
 BR2_OPENPOWER_TARGETING_BIN_FILENAME="WITHERSPOON_HB.targeting.bin"
 BR2_OPENPOWER_TARGETING_ECC_FILENAME="WITHERSPOON_HB.targeting.bin.ecc"
diff --git a/openpower/configs/zaius_defconfig b/openpower/configs/zaius_defconfig
index c2af611..6524da8 100644
--- a/openpower/configs/zaius_defconfig
+++ b/openpower/configs/zaius_defconfig
@@ -47,6 +47,8 @@
 BR2_HOSTBOOT_BINARY_SBE_FILENAME="nimbus_sbe.img.ecc"
 BR2_HOSTBOOT_BINARY_SBEC_FILENAME="centaur_sbec_pad.img.ecc"
 BR2_HOSTBOOT_BINARY_WINK_FILENAME="p9n.ref_image.hdr.bin.ecc"
+BR2_WOFDATA_FILENAME="wof_output"
+BR2_WOFDATA_BINARY_FILENAME="wofdata.bin.ecc"
 BR2_IMA_CATALOG_FILENAME="ima_catalog.bin"
 BR2_OPENPOWER_TARGETING_BIN_FILENAME="ZAIUS_HB.targeting.bin"
 BR2_OPENPOWER_TARGETING_ECC_FILENAME="ZAIUS_HB.targeting.bin.ecc"
diff --git a/openpower/package/machine-xml/machine-xml.mk b/openpower/package/machine-xml/machine-xml.mk
index 5ac4bc2..5e31640 100644
--- a/openpower/package/machine-xml/machine-xml.mk
+++ b/openpower/package/machine-xml/machine-xml.mk
@@ -32,6 +32,8 @@
 PETITBOOT_BIOS_XML_METADATA_INITRAMFS_FILE = \
     $(TARGET_DIR)/usr/share/bios_metadata.xml
 
+WOFDATA_FILE = `ls $(MRW_SCRATCH)/wofdata`
+
 ifeq ($(BR2_OPENPOWER_MACHINE_XML_OPPOWERVM_ATTRIBUTES),y)
 MACHINE_XML_OPPOWERVM_ATTR_XML = $(MRW_HB_TOOLS)/attribute_types_oppowervm.xml
 MACHINE_XML_OPPOWERVM_TARGET_XML = $(MRW_HB_TOOLS)/target_types_oppowervm.xml
@@ -91,6 +93,18 @@
             $(PETITBOOT_BIOS_XML_METADATA_FILE) \
             $(PETITBOOT_XSLT_FILE) \
             $(BIOS_XML_METADATA_FILE)
+
+        # Create the wofdata
+        if [ -e $(MRW_HB_TOOLS)/wof-tables-img ]; then \
+            chmod +x $(MRW_HB_TOOLS)/wof-tables-img; \
+        fi
+        
+		if [ -d $(MRW_SCRATCH)/wofdata ]; then \
+			$(MRW_HB_TOOLS)/wof-tables-img --create $(MRW_SCRATCH)/wof_output $(MRW_SCRATCH)/wofdata; \
+        fi
+
+
+
 endef
 
 define MACHINE_XML_INSTALL_IMAGES_CMDS
diff --git a/openpower/package/openpower-pnor/Config.in b/openpower/package/openpower-pnor/Config.in
index a94f72c..438ea95 100644
--- a/openpower/package/openpower-pnor/Config.in
+++ b/openpower/package/openpower-pnor/Config.in
@@ -65,6 +65,16 @@
         help
             String used to define name of winkle hostboot binary file
 
+config BR2_WOFDATA_FILENAME
+        string "Name of wofdata original file"
+        help
+            String used to define name of wofdata original file
+
+config BR2_WOFDATA_BINARY_FILENAME
+        string "Name of wofdata binary file"
+        help
+            String used to define name of wofdata binary ecc'd file
+
 config BR2_IMA_CATALOG_FILENAME
         string "Name of IMA catalog binary"
         help
diff --git a/openpower/package/openpower-pnor/openpower-pnor.mk b/openpower/package/openpower-pnor/openpower-pnor.mk
index 95c831f..2f64253 100644
--- a/openpower/package/openpower-pnor/openpower-pnor.mk
+++ b/openpower/package/openpower-pnor/openpower-pnor.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-OPENPOWER_PNOR_VERSION ?= 86474de814334341cc6146174b6aee9afe0e5547
+OPENPOWER_PNOR_VERSION ?= 3ab2d5d3f0c030bd68a4b431ac128004d54f7511
 OPENPOWER_PNOR_SITE ?= $(call github,open-power,pnor,$(OPENPOWER_PNOR_VERSION))
 
 OPENPOWER_PNOR_LICENSE = Apache-2.0
@@ -44,6 +44,7 @@
 SBE_BINARY_DIR = $(STAGING_DIR)/sbe_binaries/
 OPENPOWER_PNOR_SCRATCH_DIR = $(STAGING_DIR)/openpower_pnor_scratch/
 OPENPOWER_VERSION_DIR = $(STAGING_DIR)/openpower_version
+OPENPOWER_MRW_SCRATCH_DIR = $(STAGING_DIR)/openpower_mrw_scratch
 
 # Subpackages we want to include in the version info (do not include openpower-pnor)
 OPENPOWER_VERSIONED_SUBPACKAGES = skiboot hostboot linux petitboot machine-xml occ hostboot-binaries capp-ucode
@@ -73,6 +74,7 @@
             -capp_binary_filename $(BINARIES_DIR)/$(BR2_CAPP_UCODE_BIN_FILENAME) \
             -ima_catalog_binary_filename $(BINARIES_DIR)/$(BR2_IMA_CATALOG_FILENAME) \
             -openpower_version_filename $(OPENPOWER_PNOR_VERSION_FILE) \
+            -wof_binary_filename $(OPENPOWER_MRW_SCRATCH_DIR)/$(BR2_WOFDATA_FILENAME) \
             -payload $(BINARIES_DIR)/$(BR2_SKIBOOT_LID_NAME) \
             $(if ($(BR2_OPENPOWER_PNOR_XZ_ENABLED),y),-xz_compression)
 
@@ -91,6 +93,7 @@
             -wink_binary_filename $(BR2_HOSTBOOT_BINARY_WINK_FILENAME) \
             -occ_binary_filename $(OCC_STAGING_DIR)/$(BR2_OCC_BIN_FILENAME) \
             -targeting_binary_filename $(BR2_OPENPOWER_TARGETING_ECC_FILENAME) \
+            -wofdata_binary_filename $(OPENPOWER_PNOR_SCRATCH_DIR)/$(BR2_WOFDATA_BINARY_FILENAME) \
             -openpower_version_filename $(OPENPOWER_PNOR_VERSION_FILE)
 
         $(INSTALL) $(STAGING_DIR)/pnor/$(BR2_OPENPOWER_PNOR_FILENAME) $(BINARIES_DIR)