Add support for using the hcode repo

    -Add hcode package to enable compiling hardware
     reference image
    -Modify pnor and sbe makefiles to include a dependency on
     the hcode repository
    -Modify config files so that p9 platfoms use the compiled
     version of the hardware reference image by default
    -Update hostboot-binaries.mk to install the ring images
     to the staging dir

[stewart: remove IBM Austin specific paths, update defconfigs]
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
diff --git a/openpower/package/openpower-pnor/openpower-pnor.mk b/openpower/package/openpower-pnor/openpower-pnor.mk
index fb32397..3bf4d8a 100644
--- a/openpower/package/openpower-pnor/openpower-pnor.mk
+++ b/openpower/package/openpower-pnor/openpower-pnor.mk
@@ -11,6 +11,10 @@
 OPENPOWER_PNOR_LICENSE_FILES = LICENSE
 OPENPOWER_PNOR_DEPENDENCIES = hostboot hostboot-binaries machine-xml skiboot host-openpower-ffs occ capp-ucode
 
+ifeq ($(BR2_OPENPOWER_POWER9),y)
+OPENPOWER_PNOR_DEPENDENCIES += hcode
+endif
+
 ifeq ($(BR2_PACKAGE_IMA_CATALOG),y)
 OPENPOWER_PNOR_DEPENDENCIES += ima-catalog
 endif
@@ -56,7 +60,10 @@
 OPENPOWER_PNOR_INSTALL_TARGET = NO
 
 HOSTBOOT_IMAGE_DIR=$(STAGING_DIR)/hostboot_build_images/
-HOSTBOOT_BINARY_DIR = $(STAGING_DIR)/hostboot_binaries/
+HOSTBOOT_BINARY_DIR = $(STAGING_DIR)/hostboot_binaries
+
+HCODE_STAGING_DIR = $(STAGING_DIR)/hcode
+
 SBE_BINARY_DIR = $(STAGING_DIR)/sbe_binaries/
 OPENPOWER_PNOR_SCRATCH_DIR = $(STAGING_DIR)/openpower_pnor_scratch/
 OPENPOWER_VERSION_DIR = $(STAGING_DIR)/openpower_version
@@ -92,6 +99,7 @@
             -hb_image_dir $(HOSTBOOT_IMAGE_DIR) \
             -scratch_dir $(OPENPOWER_PNOR_SCRATCH_DIR) \
             -hb_binary_dir $(HOSTBOOT_BINARY_DIR) \
+            -hcode_dir $(HCODE_STAGING_DIR) \
             -targeting_binary_filename $(BR2_OPENPOWER_TARGETING_ECC_FILENAME) \
             -targeting_binary_source $(BR2_OPENPOWER_TARGETING_BIN_FILENAME) \
             -sbe_binary_filename $(BR2_HOSTBOOT_BINARY_SBE_FILENAME) \