Support building p10 PNOR images

Implements initial experimental support for building P10 PNOR images using
GCC8 (host and cross compiler) as the toolchain

- Introduced rainier configuration files
- Added p10 specific packages for sbe, hcode, hostboot, occ
- Pointed at starting commits for various pacakges to build op-build for p10
- Created various patches to fully compile all packages, to be removed
  when package owners have time to address them
- Generally updated package configurations to support p10 and p10 package
  variants

Signed-off-by: Nick Bofferding <bofferdn@us.ibm.com>
diff --git a/openpower/package/openpower-pnor/Config.in b/openpower/package/openpower-pnor/Config.in
index 82280f5..ab35d4c 100644
--- a/openpower/package/openpower-pnor/Config.in
+++ b/openpower/package/openpower-pnor/Config.in
@@ -1,18 +1,21 @@
 config BR2_PACKAGE_OPENPOWER_PNOR
         bool "openpower_pnor"
         default y if (BR2_OPENPOWER_PLATFORM)
-        select BR2_PACKAGE_HOSTBOOT if !BR2_OPENPOWER_POWER8
+        select BR2_PACKAGE_HOSTBOOT_P10 if (! (BR2_OPENPOWER_POWER8 || BR2_OPENPOWER_POWER9) )
+        select BR2_PACKAGE_HOSTBOOT if BR2_OPENPOWER_POWER9
         select BR2_PACKAGE_HOSTBOOT_P8 if BR2_OPENPOWER_POWER8
         select BR2_PACKAGE_HOSTBOOT_BINARIES
         select BR2_PACKAGE_SKIBOOT
         select BR2_PACKAGE_OPENPOWER_FFS
-        select BR2_PACKAGE_OCC if !BR2_OPENPOWER_POWER8
+        select BR2_PACKAGE_OCC_P10 if (! (BR2_OPENPOWER_POWER8 || BR2_OPENPOWER_POWER9 ) )
+        select BR2_PACKAGE_OCC if !BR2_OPENPOWER_POWER9
         select BR2_PACKAGE_OCC_P8 if BR2_OPENPOWER_POWER8
         select BR2_PACKAGE_CAPP_UCODE
         select BR2_PACKAGE_IMA_CATALOG
         select BR2_PACKAGE_HOST_OPENPOWER_VPNOR
         select BR2_PACKAGE_MACHINE_XML
-        select BR2_PACKAGE_HCODE if BR2_OPENPOWER_POWER9
+        select BR2_PACKAGE_HCODE_P10 if (BR2_OPENPOWER_POWER10)
+        select BR2_PACKAGE_HCODE if (BR2_OPENPOWER_POWER9)
         help
             Utilites for building a targeting binary image
 
diff --git a/openpower/package/openpower-pnor/openpower-pnor.mk b/openpower/package/openpower-pnor/openpower-pnor.mk
index 9408a07..71ca734 100644
--- a/openpower/package/openpower-pnor/openpower-pnor.mk
+++ b/openpower/package/openpower-pnor/openpower-pnor.mk
@@ -4,15 +4,20 @@
 #
 ################################################################################
 
-OPENPOWER_PNOR_VERSION ?= bdfd0d08a7a04b1326553f570d35e778eda9db81
-OPENPOWER_PNOR_SITE ?= $(call github,open-power,pnor,$(OPENPOWER_PNOR_VERSION))
+OPENPOWER_PNOR_VERSION ?= e75dcb184995fd60f1add131681e4df9dc671eff
+
+# TODO: WORKAROUND: Need to reenable next line and comment out the two lines
+# after that, when code is propagated to a public repo
+#OPENPOWER_PNOR_SITE ?= $(call github,open-power,pnor,$(OPENPOWER_PNOR_VERSION))
+OPENPOWER_PNOR_SITE = https://github.ibm.com/open-power/pnor.git
+OPENPOWER_PNOR_SITE_METHOD=git
 
 OPENPOWER_PNOR_LICENSE = Apache-2.0
 OPENPOWER_PNOR_LICENSE_FILES = LICENSE
 OPENPOWER_PNOR_DEPENDENCIES = hostboot-binaries machine-xml skiboot host-openpower-ffs capp-ucode host-openpower-pnor-util
 
 ifeq ($(BR2_OPENPOWER_POWER9),y)
-OPENPOWER_PNOR_DEPENDENCIES += hcode
+    OPENPOWER_PNOR_DEPENDENCIES += hcode
 endif
 
 ifeq ($(BR2_PACKAGE_IMA_CATALOG),y)
@@ -46,7 +51,9 @@
 SIGN_MODE_ARG=-sign_mode $(BR2_OPENPOWER_SECUREBOOT_SIGN_MODE)
 endif
 
-ifeq ($(BR2_OPENPOWER_POWER9),y)
+ifeq ($(BR2_OPENPOWER_POWER10),y)
+    OPENPOWER_RELEASE=p10
+else ifeq ($(BR2_OPENPOWER_POWER9),y)
     OPENPOWER_RELEASE=p9
 else
     OPENPOWER_RELEASE=p8
@@ -79,12 +86,16 @@
 
 # Subpackages we want to include in the version info (do not include openpower-pnor)
 OPENPOWER_VERSIONED_SUBPACKAGES = skiboot
+
 ifeq ($(BR2_PACKAGE_HOSTBOOT_P8),y)
-OPENPOWER_VERSIONED_SUBPACKAGES += hostboot-p8 occ-p8
+    OPENPOWER_VERSIONED_SUBPACKAGES += hostboot-p8 occ-p8
+else ifeq ($(BR2_PACKAGE_HOSTBOOT_P10),y)
+    OPENPOWER_VERSIONED_SUBPACKAGES += hostboot-p10 occ-p10 sbe-p10 hcode-p10
+	OPENPOWER_PNOR_DEPENDENCIES += hostboot-p10 occ-p10 sbe-p10 hcode-p10
+else ifeq ($(BR2_PACKAGE_HOSTBOOT),y)
+    OPENPOWER_VERSIONED_SUBPACKAGES += hostboot occ
 endif
-ifeq ($(BR2_PACKAGE_HOSTBOOT),y)
-OPENPOWER_VERSIONED_SUBPACKAGES += hostboot occ
-endif
+
 OPENPOWER_VERSIONED_SUBPACKAGES += linux petitboot machine-xml hostboot-binaries capp-ucode
 OPENPOWER_PNOR = openpower-pnor
 
@@ -93,7 +104,9 @@
     OPENPOWER_VERSIONED_SUBPACKAGES += sbe hcode
 endif
 
-ifeq ($(BR2_PACKAGE_OCC_P8),y)
+ifeq ($(BR2_PACKAGE_OCC_P10),y)
+    OCC_BIN_FILENAME=$(BR2_OCC_P10_BIN_FILENAME)
+else ifeq ($(BR2_PACKAGE_OCC_P8),y)
     OCC_BIN_FILENAME=$(BR2_OCC_P8_BIN_FILENAME)
 else
     OCC_BIN_FILENAME=$(BR2_OCC_BIN_FILENAME)