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/occ-p10/0001-Workaround-certain-OCC-errors-for-P10.patch b/openpower/package/occ-p10/0001-Workaround-certain-OCC-errors-for-P10.patch
new file mode 100644
index 0000000..c00a28c
--- /dev/null
+++ b/openpower/package/occ-p10/0001-Workaround-certain-OCC-errors-for-P10.patch
@@ -0,0 +1,28 @@
+From 48c944978a8fea129b4fce39063386237881871b Mon Sep 17 00:00:00 2001
+From: Nick Bofferding <bofferdn@us.ibm.com>
+Date: Thu, 3 Oct 2019 14:36:31 -0500
+Subject: [PATCH] Workaround certain OCC errors for P10
+
+To allow P10 OCC code to compile, temporarily suppress errors for:
+  aggressive-loop-optimizations
+  unused-but-set-variable
+---
+ src/occ_405/occ_defs.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/occ_405/occ_defs.mk b/src/occ_405/occ_defs.mk
+index c87c44a..fa06a42 100644
+--- a/src/occ_405/occ_defs.mk
++++ b/src/occ_405/occ_defs.mk
+@@ -23,7 +23,7 @@
+ #
+ # IBM_PROLOG_END_TAG
+ 
+-GCC-CFLAGS += -Werror
++GCC-CFLAGS += -Werror -Wno-error=aggressive-loop-optimizations  -Wno-error=unused-but-set-variable
+ 
+ %.o: %.c
+ $(OBJDIR)/%.o: %.c
+-- 
+1.8.2.2
+
diff --git a/openpower/package/occ-p10/Config.in b/openpower/package/occ-p10/Config.in
new file mode 100644
index 0000000..6a2e284
--- /dev/null
+++ b/openpower/package/occ-p10/Config.in
@@ -0,0 +1,16 @@
+config BR2_PACKAGE_OCC_P10
+        bool "OCC for P10"
+        default y if (BR2_OPENPOWER_PLATFORM && BR2_OPENPOWER_POWER10)
+        select BR2_CPP
+        help
+            Project to build OCC for P10
+
+if BR2_PACKAGE_OCC_P10
+
+config BR2_OCC_P10_BIN_FILENAME
+    string "Name of OCC P10 image file"
+    default "occ.bin"
+    help
+        String used to define name of the OCC binary image file
+
+endif
diff --git a/openpower/package/occ-p10/occ-p10.mk b/openpower/package/occ-p10/occ-p10.mk
new file mode 100644
index 0000000..14410df
--- /dev/null
+++ b/openpower/package/occ-p10/occ-p10.mk
@@ -0,0 +1,47 @@
+################################################################################
+#
+# occ for power10
+#
+################################################################################
+
+OCC_P10_VERSION ?= 36b56e72c2dd6c2a2fb21667c55a594f86f6132e
+# TODO: WORKAROUND: Need to reenable next line and comment out the two lines
+# after that, when code is propagated to a public repo
+#OCC_P10_SITE ?= $(call github,open-power,occ,$(OCC_P10_VERSION))
+OCC_P10_SITE = https://github.ibm.com/open-power/occ.git
+OCC_P10_SITE_METHOD=git
+
+OCC_P10_LICENSE = Apache-2.0
+
+OCC_P10_LICENSE_FILES = LICENSE
+
+OCC_P10_INSTALL_IMAGES = YES
+OCC_P10_INSTALL_TARGET = NO
+
+OCC_P10_STAGING_DIR = $(STAGING_DIR)/occ
+
+OCC_P10_IMAGE_BIN_PATH = obj/image.bin
+
+OCC_P10_DEPENDENCIES = host-binutils host-ppe42-gcc
+ifeq ($(BR2_OCC_GPU_BIN_BUILD),y)
+	OCC_P10_DEPENDENCIES += hostboot-binaries
+endif
+
+define OCC_P10_BUILD_CMDS
+	if [ "$(BR2_OCC_GPU_BIN_BUILD)" == "y"  ]; then \
+	    cd $(@D)/src && \
+            make PPE_TOOL_PATH=$(PPE42_GCC_BIN) OCC_OP_BUILD=1 CROSS_PREFIX=$(TARGET_CROSS) LD_LIBRARY_PATH=$(HOST_DIR)/usr/lib GPE1_BIN_IMAGE_PATH=$(STAGING_DIR)/hostboot_binaries/ OPOCC_GPU_SUPPORT=1 all; \
+	else \
+            cd $(@D)/src && \
+            make PPE_TOOL_PATH=$(PPE42_GCC_BIN) OCC_OP_BUILD=1 CROSS_PREFIX=$(TARGET_CROSS) LD_LIBRARY_PATH=$(HOST_DIR)/usr/lib all; \
+	fi;
+endef
+
+OCC_P10_BUILD_CMDS ?= $(OCC_BUILD_CMDS_P9)
+
+define OCC_P10_INSTALL_IMAGES_CMDS
+       mkdir -p $(STAGING_DIR)/occ
+       cp $(@D)/$(OCC_P10_IMAGE_BIN_PATH) $(OCC_P10_STAGING_DIR)/$(BR2_OCC_BIN_FILENAME)
+endef
+
+$(eval $(generic-package))