Palmetto PNOR Build Process Functionality
diff --git a/openpower/package/openpower-pnor/Config.in b/openpower/package/openpower-pnor/Config.in
new file mode 100644
index 0000000..5078824
--- /dev/null
+++ b/openpower/package/openpower-pnor/Config.in
@@ -0,0 +1,42 @@
+config BR2_PACKAGE_OPENPOWER_PNOR
+        bool "openpower_pnor"
+        default y if (BR2_OPENPOWER_PLATFORM && BR2_powerpc_power8)
+        help
+            Utilites for building a targeting binary image
+
+config BR2_OPENPOWER_PNOR_XML_LAYOUT_FILENAME
+        string "Name of Openpower pnor xml layout file"
+        help
+            String used to define hw specific make config file
+
+config BR2_OPENPOWER_CONFIG_NAME
+        string "Name of configuration"
+        help
+            String used to define configuration name
+
+config BR2_OPENPOWER_PNOR_FILENAME
+        string "Name of pnor file to be created"
+        help
+            String used to define pnor filename to be created
+
+config BR2_SKIBOOT_LID_NAME
+        string "Name of skiboot lid name to be used"
+        default "skiboot.lid"
+        help
+            String used to define sapphire lid filename
+
+config BR2_HOSTBOOT_BINARY_SBE_FILENAME
+        string "Name of sbe hostboot binary"
+        help
+            String used to define name of sbe hostboot binary file
+
+
+config BR2_HOSTBOOT_BINARY_SBEC_FILENAME
+        string "Name of sbec hostboot binary"
+        help
+            String used to define name of sbec hostboot binary file
+
+config BR2_OPENPOWER_TARGETING_BIN_FILENAME
+        string "Name of openpower binary targeting file"
+        help
+            String used to define name of openpower targeting binary file
diff --git a/openpower/package/openpower-pnor/openpower-pnor.mk b/openpower/package/openpower-pnor/openpower-pnor.mk
new file mode 100644
index 0000000..62c9a69
--- /dev/null
+++ b/openpower/package/openpower-pnor/openpower-pnor.mk
@@ -0,0 +1,35 @@
+################################################################################
+#
+# openpower_pnor
+#
+################################################################################
+
+OPENPOWER_PNOR_VERSION = a7f9b25eb1e7fac405bc1a54597cfc812a07fb3f
+OPENPOWER_PNOR_SITE = $(call github,open-power,pnor,$(OPENPOWER_PNOR_VERSION))
+OPENPOWER_PNOR_LICENSE = Apache-2.0
+OPENPOWER_PNOR_DEPENDENCIES = hostboot hostboot-binaries openpower-targeting skiboot host-openpower-ffs 
+
+OPENPOWER_PNOR_INSTALL_IMAGES = YES
+OPENPOWER_PNOR_INSTALL_TARGET = NO
+
+#OPENPOWER_PNOR_FILENAME = palmetto.pnor
+#OPENPOWER_PNOR_TARGETING_FILE = $(STAGING_DIR)/openpower_targeting/PALMETTO_HB_targeting.bin
+
+
+#ECC_TOOL_DIR ???
+OPENPOWER_TARGETING_DIR=$(STAGING_DIR)/openpower_targeting/
+HOSTBOOT_IMAGE_DIR=$(STAGING_DIR)/hostboot_build_images/
+HOSTBOOT_BINARY_DIR = $(STAGING_DIR)/hostboot_binaries/
+OPENPOWER_PNOR_SCRATCH_DIR = $(STAGING_DIR)/openpower_pnor_scratch/
+
+define OPENPOWER_PNOR_INSTALL_IMAGES_CMDS
+        mkdir -p $(OPENPOWER_PNOR_SCRATCH_DIR)
+        $(TARGET_MAKE_ENV) $(@D)/update_image_$(BR2_OPENPOWER_CONFIG_NAME).pl -op_target_dir $(STAGING_DIR)/openpower_targeting/ -hb_image_dir $(HOSTBOOT_IMAGE_DIR) -scratch_dir $(OPENPOWER_PNOR_SCRATCH_DIR) -hb_binary_dir $(HOSTBOOT_BINARY_DIR);
+
+        mkdir -p $(STAGING_DIR)/pnor/
+        $(TARGET_MAKE_ENV) $(@D)/create_pnor_image.pl -xml_layout_file $(@D)/$(BR2_OPENPOWER_PNOR_XML_LAYOUT_FILENAME) -pnor_filename $(STAGING_DIR)/pnor/$(BR2_OPENPOWER_PNOR_FILENAME) -hb_image_dir $(HOSTBOOT_IMAGE_DIR) -scratch_dir $(OPENPOWER_PNOR_SCRATCH_DIR) -outdir $(STAGING_DIR)/pnor/ -payload $(BINARIES_DIR)/$(BR2_SKIBOOT_LID_NAME) -sbe_binary_filename $(BR2_HOSTBOOT_BINARY_SBE_FILENAME) -sbec_binary_filename $(BR2_HOSTBOOT_BINARY_SBEC_FILENAME) -targeting_binary_filename $(BR2_OPENPOWER_TARGETING_BIN_FILENAME)
+
+	$(INSTALL) $(STAGING_DIR)/pnor/$(BR2_OPENPOWER_PNOR_FILENAME) $(BINARIES_DIR)
+endef
+
+$(eval $(generic-package))