Rebase with upstream op-build, add p10 Skiboot

 * Rebase with github.com/open-power/op-build master
 * Use latest github.IBM.com/p10/skiboot version
 * Use latest Skiroot kernel 5.4.18
   - remove Raptor Blackbird support for now as it will be
     eventually merged in Skiboot upstream

Signed-off-by: Klaus Heinrich Kiwi <klaus@linux.vnet.ibm.com>
diff --git a/openpower/configs/hostboot/rainier.config b/openpower/configs/hostboot/rainier.config
new file mode 100755
index 0000000..6777b66
--- /dev/null
+++ b/openpower/configs/hostboot/rainier.config
@@ -0,0 +1,85 @@
+# The HIOMAP protocol is used to access PNOR
+unset SFC_IS_AST2500
+unset SFC_IS_AST2400
+set   PNORDD_IS_IPMI
+unset PNORDD_IS_SFC
+unset ALLOW_MICRON_PNOR
+unset ALLOW_MACRONIX_PNOR
+
+# VPD options - Enable EECACHE
+set MVPD_READ_FROM_HW
+set MVPD_WRITE_TO_HW
+unset MVPD_READ_FROM_PNOR
+unset MVPD_WRITE_TO_PNOR
+
+set DJVPD_READ_FROM_HW
+set DJVPD_WRITE_TO_HW
+unset DJVPD_READ_FROM_PNOR
+unset DJVPD_WRITE_TO_PNOR
+
+set MEMVPD_READ_FROM_HW
+set MEMVPD_WRITE_TO_HW
+unset MEMVPD_READ_FROM_PNOR
+unset MEMVPD_WRITE_TO_PNOR
+
+# PLDM will be read via PLDM which is not supported yet
+#set PVPD_READ_FROM_HW
+#set PVPD_WRITE_TO_HW
+#unset PVPD_READ_FROM_PNOR
+#unset PVPD_WRITE_TO_PNOR
+
+# gpio config
+set GPIODD
+unset PALMETTO_VDDR
+
+# Disable SBE updates until it is supported
+# TODO: Re-enable SBE Updates when supported
+unset SBE_UPDATE_CONSECUTIVE
+unset SBE_UPDATE_INDEPENDENT
+unset SBE_UPDATE_SEQUENTIAL
+unset SBE_UPDATE_SIMULTANEOUS
+set NO_SBE_UPDATES
+
+#unset PCIE_HOTPLUG_CONTROLLER
+
+# turn on console output
+set CONSOLE
+
+set BMC_AST2500
+
+#set DISABLE_HOSTBOOT_RUNTIME
+
+# Compile in hostboot runtime PRD
+#unset HBRT_PRD
+
+# PNOR flags
+unset PNOR_TWO_SIDE_SUPPORT
+
+set BMC_BT_LPC_IPMI
+
+# AXONE configs must be set until those flags are reworked in Hostboot
+set AXONE
+set AXONE_BRINGUP
+set SUPPORT_EEPROM_CACHING
+
+# set for trace debug to console
+unset CONSOLE_OUTPUT_TRACE
+
+# Output FFDC to console
+set CONSOLE_OUTPUT_FFDCDISPLAY
+
+# RTC TODO 248361
+# Remove some time before product ships
+set PRINT_SYSTEM_INFO
+
+# Terminate Hostboot when errors occur in manufacturing mode
+#   (relies on BMC to not trigger reboot)
+#unset HANG_ON_MFG_SRC_TERM
+
+set ENABLE_HDAT_IN_HOSTBOOT
+
+# Until MCTP/PLDM file access available, load PHyp via the BOOTKERNEL partition
+set LOAD_PHYP_FROM_BOOTKERNEL
+
+# Perform presence detect using EECACHE until all parts of Rainier config are supported in simics
+set EECACHE_PRESENCE_DETECT
diff --git a/openpower/configs/rainier_defconfig b/openpower/configs/rainier_defconfig
new file mode 100644
index 0000000..4fb9769
--- /dev/null
+++ b/openpower/configs/rainier_defconfig
@@ -0,0 +1,77 @@
+BR2_powerpc64le=y
+BR2_powerpc_power8=y
+BR2_BINUTILS_EXTRA_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"
+BR2_GCC_VERSION_8_X=y
+BR2_EXTRA_GCC_CONFIG_OPTIONS="--enable-targets=powerpc64-linux --disable-libsanitizer"
+BR2_TOOLCHAIN_BUILDROOT_CXX=y
+BR2_TARGET_GENERIC_HOSTNAME="skiroot"
+BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
+BR2_ROOTFS_DEVICE_TABLE="../openpower/device_table.txt"
+BR2_TARGET_GENERIC_GETTY_PORT="hvc0"
+BR2_ENABLE_LOCALE_WHITELIST="C de en es fr it ja ko pt_BR ru zh_CN zh_TW"
+BR2_GENERATE_LOCALE="en_US.UTF-8 de_DE.UTF-8 es_ES.UTF-8 fr_FR.UTF-8 it_IT.UTF-8 ja_JP.UTF-8 ko_KR.UTF-8 pt_BR.UTF-8 ru_RU.UTF-8 zh_CN.UTF-8 zh_TW.UTF-8"
+BR2_SYSTEM_ENABLE_NLS=y
+BR2_ROOTFS_USERS_TABLES="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/users-table"
+BR2_ROOTFS_OVERLAY="../openpower/overlay"
+BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.18"
+BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
+BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
+BR2_LINUX_KERNEL_ZIMAGE_EPAPR=y
+BR2_LINUX_KERNEL_XZ=y
+BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
+BR2_PACKAGE_SKIBOOT=y
+BR2_SKIBOOT_CUSTOM_VERSION=y
+BR2_SKIBOOT_CUSTOM_VERSION_VALUE="cfc0beee45990af43dfd17311c9aed4785a9f3d7"
+BR2_SKIBOOT_CUSTOM_GIT=y
+BR2_SKIBOOT_CUSTOM_REPO_URL="git@github.ibm.com:p10/skiboot.git"
+BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/busybox.fragment"
+BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
+BR2_PACKAGE_LINUX_FIRMWARE=y
+BR2_PACKAGE_LINUX_FIRMWARE_BNX2X=y
+BR2_PACKAGE_LINUX_FIRMWARE_CXGB4_T4=y
+BR2_PACKAGE_CRYPTSETUP=y
+BR2_PACKAGE_IPMITOOL=y
+BR2_PACKAGE_IPMITOOL_USB=y
+BR2_PACKAGE_MDADM=y
+BR2_PACKAGE_PCIUTILS=y
+BR2_PACKAGE_NCURSES_WCHAR=y
+BR2_PACKAGE_DROPBEAR=y
+# BR2_PACKAGE_DROPBEAR_SERVER is not set
+BR2_PACKAGE_ETHTOOL=y
+BR2_PACKAGE_LRZSZ=y
+BR2_PACKAGE_NETCAT=y
+BR2_PACKAGE_RSYNC=y
+BR2_PACKAGE_SUDO=y
+BR2_PACKAGE_UTIL_LINUX_AGETTY=y
+BR2_TARGET_ROOTFS_CPIO_XZ=y
+BR2_TARGET_ROOTFS_INITRAMFS=y
+BR2_OPENPOWER_PLATFORM=y
+BR2_OPENPOWER_POWER10=y
+BR2_HOSTBOOT_P10_CONFIG_FILE="rainier.config"
+BR2_OPENPOWER_MACHINE_XML_CUSTOM_GIT=y
+BR2_OPENPOWER_MACHINE_XML_CUSTOM_GIT_VALUE="git@github.ibm.com:openbmc/rainier-xml.git"
+BR2_OPENPOWER_MACHINE_XML_VERSION="2dc3999065846e5b9a03b1222341b4cbd557bd4c"
+BR2_OPENPOWER_MACHINE_XML_FILENAME="Rainier-2U-MRW.xml"
+BR2_OPENPOWER_SYSTEM_XML_FILENAME="RAINIER_hb.system.xml"
+BR2_OPENPOWER_MRW_XML_FILENAME="RAINIER_hb.mrw.xml"
+BR2_OPENPOWER_BIOS_XML_FILENAME="Rainier-2U-MRW_bios.xml"
+BR2_OPENPOWER_PNOR_XML_LAYOUT_FILENAME="defaultPnorLayout_64.xml"
+BR2_OPENPOWER_CONFIG_NAME="rainier"
+BR2_OPENPOWER_PNOR_FILENAME="rainier.pnor"
+BR2_HOSTBOOT_BINARY_SBE_FILENAME="p10_sbe.img.ecc"
+BR2_HOSTBOOT_BINARY_SBEC_FILENAME="centaur_sbec_pad.img.ecc"
+BR2_HOSTBOOT_BINARY_WINK_FILENAME="p10.ref_image.hdr.bin.ecc"
+BR2_IMA_CATALOG_FILENAME="ima_catalog.bin"
+BR2_OPENPOWER_TARGETING_BIN_FILENAME="RAINIER_HB.targeting.bin"
+BR2_OPENPOWER_TARGETING_ECC_FILENAME="RAINIER_HB.targeting.bin.ecc"
+BR2_BUILD_PNOR_SQUASHFS=y
+BR2_PACKAGE_PETITBOOT=y
+BR2_PACKAGE_PETITBOOT_MTD=y
+BR2_OCC_GPU_BIN_BUILD=y
+BR2_CAPP_UCODE_BIN_FILENAME="cappucode.bin"
+BR2_PACKAGE_LOADKEYS=y
+BR2_IMA_CATALOG_DTS="POWER9"
diff --git a/openpower/package/Config.in b/openpower/package/Config.in
index 903e6cb..906b69b 100755
--- a/openpower/package/Config.in
+++ b/openpower/package/Config.in
@@ -1,6 +1,7 @@
 source "$BR2_EXTERNAL_OP_BUILD_PATH/package/openpower-ffs/Config.in"
 source "$BR2_EXTERNAL_OP_BUILD_PATH/package/hostboot/Config.in"
 source "$BR2_EXTERNAL_OP_BUILD_PATH/package/hostboot-p8/Config.in"
+source "$BR2_EXTERNAL_OP_BUILD_PATH/package/hostboot-p10/Config.in"
 source "$BR2_EXTERNAL_OP_BUILD_PATH/package/hostboot-binaries/Config.in"
 source "$BR2_EXTERNAL_OP_BUILD_PATH/package/openpower-mrw/Config.in"
 source "$BR2_EXTERNAL_OP_BUILD_PATH/package/common-p8-xml/Config.in"
@@ -9,8 +10,10 @@
 source "$BR2_EXTERNAL_OP_BUILD_PATH/package/petitboot/Config.in"
 source "$BR2_EXTERNAL_OP_BUILD_PATH/package/p8-pore-binutils/Config.in"
 source "$BR2_EXTERNAL_OP_BUILD_PATH/package/hcode/Config.in"
+source "$BR2_EXTERNAL_OP_BUILD_PATH/package/hcode-p10/Config.in"
 source "$BR2_EXTERNAL_OP_BUILD_PATH/package/occ/Config.in"
 source "$BR2_EXTERNAL_OP_BUILD_PATH/package/occ-p8/Config.in"
+source "$BR2_EXTERNAL_OP_BUILD_PATH/package/occ-p10/Config.in"
 source "$BR2_EXTERNAL_OP_BUILD_PATH/package/capp-ucode/Config.in"
 source "$BR2_EXTERNAL_OP_BUILD_PATH/package/skiboot/Config.in"
 source "$BR2_EXTERNAL_OP_BUILD_PATH/package/libflash/Config.in"
@@ -19,6 +22,8 @@
 source "$BR2_EXTERNAL_OP_BUILD_PATH/package/ppe42-gcc/Config.in"
 source "$BR2_EXTERNAL_OP_BUILD_PATH/package/ima-catalog/Config.in"
 source "$BR2_EXTERNAL_OP_BUILD_PATH/package/sbe/Config.in"
+source "$BR2_EXTERNAL_OP_BUILD_PATH/package/sbe-p10/Config.in"
 source "$BR2_EXTERNAL_OP_BUILD_PATH/package/sb-signing-utils/Config.in"
 source "$BR2_EXTERNAL_OP_BUILD_PATH/package/sb-signing-framework/Config.in"
 source "$BR2_EXTERNAL_OP_BUILD_PATH/package/ocmb-explorer-fw/Config.in"
+source "$BR2_EXTERNAL_OP_BUILD_PATH/package/fsp-trace/Config.in"
diff --git a/openpower/package/fsp-trace/Config.in b/openpower/package/fsp-trace/Config.in
new file mode 100644
index 0000000..68aa688
--- /dev/null
+++ b/openpower/package/fsp-trace/Config.in
@@ -0,0 +1,31 @@
+config BR2_PACKAGE_FSP_TRACE
+        bool "fsp_trace"
+        default y if (BR2_OPENPOWER_PLATFORM)
+        help
+            Project to build fsp-trace tool
+
+if BR2_PACKAGE_FSP_TRACE
+
+choice
+	prompt "FSP-Trace version"
+	default BR2_FSP_TRACE_LATEST_VERSION
+
+config BR2_FSP_TRACE_LATEST_VERSION
+	bool "Use latest FSP_TRACE master"
+
+config BR2_FSP_TRACE_CUSTOM_VERSION
+	bool "Custom FSP_TRACE version"
+
+endchoice
+
+config BR2_FSP_TRACE_CUSTOM_VERSION_VALUE
+	string "FSP_TRACE version"
+	depends on BR2_FSP_TRACE_CUSTOM_VERSION
+
+config BR2_FSP_TRACE_VERSION
+	string
+	default "cf0bd9b36c0d8cb091a471973493d1370330c7d1" if BR2_FSP_TRACE_LATEST_VERSION
+	default BR2_FSP_TRACE_CUSTOM_VERSION_VALUE \
+		if BR2_FSP_TRACE_CUSTOM_VERSION
+
+endif
diff --git a/openpower/package/fsp-trace/fsp_trace.mk b/openpower/package/fsp-trace/fsp_trace.mk
new file mode 100644
index 0000000..eb7431b
--- /dev/null
+++ b/openpower/package/fsp-trace/fsp_trace.mk
@@ -0,0 +1,26 @@
+################################################################################
+#
+# fsp_trace
+#
+################################################################################
+
+FSP_TRACE_VERSION = $(call qstrip,$(BR2_FSP_TRACE_VERSION))
+FSP_TRACE_SITE ?= $(call github,open-power,fsp-trace,$(FSP_TRACE_VERSION))
+
+FSP_TRACE_LICENSE = Apache-2.0
+FSP_TRACE_LICENSE_FILES = LICENSE
+
+FSP_TRACE_INSTALL_IMAGES = YES
+FSP_TRACE_INSTALL_TARGET = NO
+
+define FSP_TRACE_BUILD_CMDS
+        bash -c 'cd $(@D) && $(MAKE)'
+endef
+
+define FSP_TRACE_INSTALL_IMAGES_CMDS
+    mkdir -p $(STAGING_DIR)/fsp-trace/
+    $(INSTALL) -D $(@D)/fsp-trace $(STAGING_DIR)/fsp-trace/
+endef
+
+
+$(eval $(generic-package))
diff --git a/openpower/package/hcode-p10/Config.in b/openpower/package/hcode-p10/Config.in
new file mode 100644
index 0000000..945060a
--- /dev/null
+++ b/openpower/package/hcode-p10/Config.in
@@ -0,0 +1,38 @@
+config BR2_PACKAGE_HCODE_P10
+        bool "hcode-p10"
+        default y if (BR2_OPENPOWER_PLATFORM && BR2_OPENPOWER_POWER10)
+        select BR2_CPP
+        help
+            Project to build the HCODE package for P10
+
+if BR2_PACKAGE_HCODE_P10
+
+config BR2_HCODE_INCLUDE_IONV
+        bool "Enables packaging of the NVIDIA GPU image into the final hw image"
+        default y
+        help
+            Boolean used to flag whether to include NVIDIA GPU binary
+
+choice
+	prompt "HCODE version"
+	default BR2_HCODE_P10_LATEST_VERSION
+
+config BR2_HCODE_P10_LATEST_VERSION
+	bool "Use latest HCODE P10 version"
+
+config BR2_HCODE_P10_CUSTOM_VERSION
+	bool "Custom HCODE P10 version"
+
+endchoice
+
+config BR2_HCODE_P10_CUSTOM_VERSION_VALUE
+	string "HCODE P10 version"
+	depends on BR2_HCODE_P10_CUSTOM_VERSION
+
+config BR2_HCODE_P10_VERSION
+	string
+	default "hw021420a.opmst10" if BR2_HCODE_P10_LATEST_VERSION
+	default BR2_HCODE_P10_CUSTOM_VERSION_VALUE \
+		if BR2_HCODE_P10_CUSTOM_VERSION
+
+endif
diff --git a/openpower/package/hcode-p10/hcode-p10.mk b/openpower/package/hcode-p10/hcode-p10.mk
new file mode 100644
index 0000000..2d94128
--- /dev/null
+++ b/openpower/package/hcode-p10/hcode-p10.mk
@@ -0,0 +1,49 @@
+################################################################################
+#
+# HCODE for P10
+#
+################################################################################
+
+HCODE_P10_VERSION = $(call qstrip,$(BR2_HCODE_P10_VERSION))
+#HCODE_P10_SITE ?= $(call github,open-power,hcode,$(HCODE_P10_VERSION))
+# TODO: Need to comment out above line and enable next two lines
+# once buildable P10 HCODE is available in GHE
+HCODE_P10_SITE ?= git@github.ibm.com:open-power/hcode.git
+HCODE_P10_SITE_METHOD ?= git
+HCODE_P10_LICENSE = Apache-2.0
+
+HCODE_P10_INSTALL_IMAGES = YES
+HCODE_P10_INSTALL_TARGET = NO
+
+HCODE_P10_DEPENDENCIES = host-binutils host-ppe42-gcc hostboot-binaries
+
+HW_IMAGE_BIN_PATH = output/images/hw_image
+HW_IMAGE_BIN_NAME = p10.hw_image.bin
+HCODE_IMAGE_BIN_NAME = p10.ref_image.bin
+
+CROSS_COMPILER_PATH=$(PPE42_GCC_BIN)
+PPE_TOOL_PATH ?= $(CROSS_COMPILER_PATH)
+PPE_PREFIX    ?= $(PPE_TOOL_PATH)/bin/powerpc-eabi-
+
+###################################
+# P10 Compilation
+
+HCODE_P10_ENV_VARS= CONFIG_FILE=$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/hcode/$(BR2_HCODE_CONFIG_FILE) \
+	LD_LIBRARY_PATH=$(HOST_DIR)/usr/lib \
+	CROSS_COMPILER_PATH=$(PPE42_GCC_BIN) PPE_TOOL_PATH=$(CROSS_COMPILER_PATH) \
+	PPE_PREFIX=$(CROSS_COMPILER_PATH)/bin/powerpc-eabi- \
+        SELF_REST_PREFIX=$(CROSS_COMPILER_PATH)/bin/powerpc-eabi- \
+	RINGFILEPATH=$(STAGING_DIR)/hostboot_binaries __EKB_PREFIX=$(CXXPATH) \
+	CONFIG_IONV_FILE_LOCATION=$(STAGING_DIR)/hostboot_binaries/$(BR2_HOSTBOOT_BINARY_IONV_FILENAME) \
+	CONFIG_INCLUDE_IONV=$(BR2_HCODE_INCLUDE_IONV) OPENPOWER_BUILD=1
+
+define HCODE_P10_INSTALL_IMAGES_CMDS
+	mkdir -p $(STAGING_DIR)/hcode
+	$(INSTALL) $(@D)/$(HW_IMAGE_BIN_PATH)/$(HW_IMAGE_BIN_NAME) $(STAGING_DIR)/hcode/$(HCODE_IMAGE_BIN_NAME)
+endef
+
+define HCODE_P10_BUILD_CMDS
+	$(HCODE_P10_ENV_VARS) bash -c 'cd $(@D) && source ./env.bash && $(MAKE) '
+endef
+
+$(eval $(generic-package))
diff --git a/openpower/package/hostboot-binaries/Config.in b/openpower/package/hostboot-binaries/Config.in
index 2866153..51162f3 100644
--- a/openpower/package/hostboot-binaries/Config.in
+++ b/openpower/package/hostboot-binaries/Config.in
@@ -24,8 +24,14 @@
 
 config BR2_HOSTBOOT_BINARIES_VERSION
 	string
-	default "hw013120a.opmst" if BR2_HOSTBOOT_BINARIES_LATEST_VERSION
+	default "hw021420a.opmst10" if BR2_HOSTBOOT_BINARIES_LATEST_VERSION
 	default BR2_HOSTBOOT_BINARIES_CUSTOM_VERSION_VALUE \
 		if BR2_HOSTBOOT_BINARIES_CUSTOM_VERSION
 
+config BR2_HOSTBOOT_BINARIES_USE_HCODE_BIN
+        bool "Use HCODE Binary instead of compiling HCODE"
+        default n
+        help
+            Boolean used to flag using HCODE Binary
+
 endif
diff --git a/openpower/package/hostboot-binaries/hostboot_binaries.mk b/openpower/package/hostboot-binaries/hostboot_binaries.mk
index 658c281..5402076 100644
--- a/openpower/package/hostboot-binaries/hostboot_binaries.mk
+++ b/openpower/package/hostboot-binaries/hostboot_binaries.mk
@@ -4,9 +4,12 @@
 #
 ################################################################################
 
-
 HOSTBOOT_BINARIES_VERSION = $(call qstrip,$(BR2_HOSTBOOT_BINARIES_VERSION))
-HOSTBOOT_BINARIES_SITE ?= $(call github,open-power,hostboot-binaries,$(HOSTBOOT_BINARIES_VERSION))
+# TODO: WORKAROUND: Need to reenable next line and comment out the two lines
+# after that, when code is propagated to a public repo
+#HOSTBOOT_BINARIES_SITE ?= $(call github,open-power,hostboot-binaries,$(HOSTBOOT_BINARIES_VERSION))
+HOSTBOOT_BINARIES_SITE ?= git@github.ibm.com:open-power/hostboot-binaries.git
+HOSTBOOT_BINARIES_SITE_METHOD ?= git
 
 HOSTBOOT_BINARIES_LICENSE = Apache-2.0
 HOSTBOOT_BINARIES_LICENSE_FILES = LICENSE
@@ -55,5 +58,24 @@
 endef
 endif
 
+###################################
+# P10:
+ifeq ($(BR2_OPENPOWER_POWER10),y)
+
+P10_RING_DYNAMIC_FILE=p10.hw.dynamic.bin
+P10_RING_OVERLAYS_FILE=p10.hw.overlays.bin
+P10_RING_QME_FILE=p10.hw.qme.rings.bin
+P10_RING_SBE_FILE=p10.hw.sbe.rings.bin
+
+define HOSTBOOT_BINARIES_INSTALL_IMAGES_CMDS
+     $(INSTALL) -D $(@D)/gpu_gpe1.bin  $(STAGING_DIR)/hostboot_binaries/gpu_gpe1.bin
+     $(INSTALL) -D $(@D)/$(BR2_HOSTBOOT_BINARY_IONV_FILENAME)  $(STAGING_DIR)/hostboot_binaries/
+     $(INSTALL) -D $(@D)/$(BR2_HOSTBOOT_BINARY_SBEC_FILENAME) $(STAGING_DIR)/hostboot_binaries/
+     $(INSTALL) -D $(@D)/$(P10_RING_DYNAMIC_FILE)  $(STAGING_DIR)/hostboot_binaries/
+     $(INSTALL) -D $(@D)/$(P10_RING_OVERLAYS_FILE)  $(STAGING_DIR)/hostboot_binaries/
+     $(INSTALL) -D $(@D)/$(P10_RING_QME_FILE)  $(STAGING_DIR)/hostboot_binaries/
+     $(INSTALL) -D $(@D)/$(P10_RING_SBE_FILE)  $(STAGING_DIR)/hostboot_binaries/
+endef
+endif
 
 $(eval $(generic-package))
diff --git a/openpower/package/hostboot-p10/Config.in b/openpower/package/hostboot-p10/Config.in
new file mode 100644
index 0000000..f0762a4
--- /dev/null
+++ b/openpower/package/hostboot-p10/Config.in
@@ -0,0 +1,39 @@
+config BR2_PACKAGE_HOSTBOOT_P10
+        bool "hostboot-p10"
+        default y if (BR2_OPENPOWER_POWER10)
+        select BR2_CPP
+        help
+            Project to build the Hostboot package for P10
+
+if BR2_PACKAGE_HOSTBOOT_P10
+
+choice
+	prompt "P10 Hostboot version"
+	default BR2_HOSTBOOT_P10_LATEST_VERSION
+
+config BR2_HOSTBOOT_P10_LATEST_VERSION
+	bool "Use latest Hostboot version"
+
+config BR2_HOSTBOOT_P10_CUSTOM_VERSION
+	bool "Use custom Hostboot version"
+
+endchoice
+
+config BR2_HOSTBOOT_P10_CUSTOM_VERSION_VALUE
+	string "Hostboot P10 version"
+	depends on BR2_HOSTBOOT_P10_CUSTOM_VERSION
+
+config BR2_HOSTBOOT_P10_VERSION
+	string
+	default "e5df1123fe36c59c0d51d9c8cde10902db834fba" if BR2_HOSTBOOT_P10_LATEST_VERSION
+	default BR2_HOSTBOOT_P10_CUSTOM_VERSION_VALUE \
+		if BR2_HOSTBOOT_P10_CUSTOM_VERSION
+
+config BR2_HOSTBOOT_P10_CONFIG_FILE
+        string "Hostboot configuration file for compilation"
+        default default
+        help
+            String used to define hw specific make config file
+
+endif
+
diff --git a/openpower/package/hostboot-p10/hostboot-p10.mk b/openpower/package/hostboot-p10/hostboot-p10.mk
new file mode 100644
index 0000000..9a766a2
--- /dev/null
+++ b/openpower/package/hostboot-p10/hostboot-p10.mk
@@ -0,0 +1,43 @@
+################################################################################
+#
+# Hostboot for POWER10
+#
+################################################################################
+
+HOSTBOOT_P10_VERSION = $(call qstrip,$(BR2_HOSTBOOT_P10_VERSION))
+# TODO: WORKAROUND: Need to reenable next line and comment out the two lines
+# after that, when code is propagated to a public repo
+#HOSTBOOT_P10_SITE ?= $(call github,open-power,hostboot,$(HOSTBOOT_P10_VERSION))
+HOSTBOOT_P10_SITE ?= git@github.ibm.com:open-power/hostboot.git
+HOSTBOOT_P10_SITE_METHOD ?= git
+
+HOSTBOOT_P10_LICENSE = Apache-2.0
+HOSTBOOT_P10_LICENSE_FILES = LICENSE
+HOSTBOOT_P10_DEPENDENCIES = host-binutils fsp-trace
+
+HOSTBOOT_P10_INSTALL_IMAGES = YES
+HOSTBOOT_P10_INSTALL_TARGET = NO
+
+HOSTBOOT_P10_ENV_VARS=$(TARGET_MAKE_ENV) PERL_USE_UNSAFE_INC=1 \
+    CONFIG_FILE=$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/hostboot/$(BR2_HOSTBOOT_P10_CONFIG_FILE) \
+    OPENPOWER_BUILD=1 CROSS_PREFIX="$(CCACHE) $(TARGET_CROSS)" HOST_PREFIX="" HOST_BINUTILS_DIR=$(HOST_BINUTILS_DIR) \
+    HOSTBOOT_VERSION=`cat $(HOSTBOOT_P10_VERSION_FILE)`
+
+FSP_TRACE_IMAGES_DIR = $(STAGING_DIR)/fsp-trace/
+
+# TODO: WORKAROUND: Currently the git clone causes a bad symlink
+# to be created for src/include/usr/tracinterface.H; so delete it and rebuild it
+# manually
+define HOSTBOOT_P10_BUILD_CMDS
+        $(HOSTBOOT_P10_ENV_VARS) bash -c 'cd $(@D) && rm -f src/include/usr/tracinterface.H && cp src/include/usr/trace/interface.H src/include/usr/tracinterface.H && source ./env.bash && $(MAKE)'
+endef
+
+define HOSTBOOT_P10_INSTALL_IMAGES_CMDS
+        cd $(@D) && $(HOSTBOOT_P10_ENV_VARS) source ./env.bash && $(@D)/src/build/tools/hbDistribute --openpower $(STAGING_DIR)/hostboot_build_images/
+        cd $(@D) && $(HOSTBOOT_P10_ENV_VARS) source ./env.bash && $(@D)/src/build/tools/hbDistribute --openpower-sim $(STAGING_DIR)/hostboot_sim_data/
+	cp $(FSP_TRACE_IMAGES_DIR)/fsp-trace $(STAGING_DIR)/hostboot_sim_data/
+        mkdir -p $(OUTPUT_IMAGES_DIR)/sim/
+	tar -zcvf $(OUTPUT_IMAGES_DIR)/sim/hostboot_sim.tar -C $(STAGING_DIR)/hostboot_sim_data/ .
+endef
+
+$(eval $(generic-package))
diff --git a/openpower/package/machine-xml/Config.in b/openpower/package/machine-xml/Config.in
index c1064d7..63d31e2 100755
--- a/openpower/package/machine-xml/Config.in
+++ b/openpower/package/machine-xml/Config.in
@@ -18,17 +18,17 @@
 
 config BR2_OPENPOWER_MACHINE_XML_FILTER_UNWANTED_ATTRIBUTES
        bool "Filter Unwanted Attributes"
-       default y if (BR2_OPENPOWER_POWER9)
+       default y if (BR2_OPENPOWER_POWER9 || BR2_OPENPOWER_POWER10)
        default n
 
 config BR2_OPENPOWER_MACHINE_XML_OPPOWERVM_ATTRIBUTES
        bool "OPPOWERVM Attributes/Target"
-       default y if (BR2_OPENPOWER_POWER9)
+       default y if (BR2_OPENPOWER_POWER9 || BR2_OPENPOWER_POWER10)
        default n
 
 config BR2_OPENPOWER_MACHINE_XML_TARGET_TYPES_OPENPOWER_XML
        bool "Include target_types_openpower.xml"
-       default y if (BR2_OPENPOWER_POWER9)
+       default y if (BR2_OPENPOWER_POWER9 || BR2_OPENPOWER_POWER10)
        default n
 
 config BR2_OPENPOWER_MACHINE_XML_CUSTOM_GIT_VALUE
diff --git a/openpower/package/machine-xml/machine-xml.mk b/openpower/package/machine-xml/machine-xml.mk
index 4d31c4f..29170de 100644
--- a/openpower/package/machine-xml/machine-xml.mk
+++ b/openpower/package/machine-xml/machine-xml.mk
@@ -15,6 +15,9 @@
 MACHINE_XML_LICENSE_FILES = LICENSE
 MACHINE_XML_DEPENDENCIES =
 
+ifeq ($(BR2_OPENPOWER_POWER10),y)
+MACHINE_XML_DEPENDENCIES += hostboot-p10
+endif
 ifeq ($(BR2_OPENPOWER_POWER9),y)
 MACHINE_XML_DEPENDENCIES += hostboot
 endif
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..e71d2f3
--- /dev/null
+++ b/openpower/package/occ-p10/Config.in
@@ -0,0 +1,50 @@
+config BR2_PACKAGE_OCC_P10
+        bool "OCC (POWER10)"
+        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 P10 OCC image file"
+	default "occ.bin"
+        help
+            String used to define name of the P10 OCC binary image file
+
+config BR2_OCC_P10_GPU_BIN_BUILD
+        bool "Enables Compilation of P10 GPU Binary Image"
+        default n
+        select BR2_PACKAGE_HOSTBOOT_BINARIES
+        help
+            Boolean used to flag whether to compile P10 OCC GPU binary
+
+config BR2_OCC_P10_GPU_GPE_BIN_FILENAME
+        string "Name of P10 OCC GPU GPE Binary file"
+        help
+            String used to define name of the P10 OCC GPUE GPE binary image file
+
+choice
+	prompt "P10 OCC version"
+	default BR2_OCC_P10_LATEST_VERSION
+
+config BR2_OCC_P10_LATEST_VERSION
+	bool "Use latest P10 OCC master"
+
+config BR2_OCC_P10_CUSTOM_VERSION
+	bool "Custom P10 OCC version"
+
+endchoice
+
+config BR2_OCC_P10_CUSTOM_VERSION_VALUE
+	string "P10 OCC version"
+	depends on BR2_OCC_P10_CUSTOM_VERSION
+
+config BR2_OCC_P10_VERSION
+	string
+	default "437890b6bcc25b8c45a108b940977b55299b67d1" if BR2_OCC_P10_LATEST_VERSION
+	default BR2_OCC_P10_CUSTOM_VERSION_VALUE \
+		if BR2_OCC_P10_CUSTOM_VERSION
+
+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..64be388
--- /dev/null
+++ b/openpower/package/occ-p10/occ-p10.mk
@@ -0,0 +1,47 @@
+################################################################################
+#
+# occ for power10
+#
+################################################################################
+
+OCC_P10_VERSION = $(call qstrip,$(BR2_OCC_P10_VERSION))
+# 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 ?= git@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_P10_GPU_BIN_BUILD),y)
+	OCC_P10_DEPENDENCIES += hostboot-binaries
+endif
+
+define OCC_P10_BUILD_CMDS
+	if [ "$(BR2_OCC_P10_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_P10_BIN_FILENAME)
+endef
+
+$(eval $(generic-package))
diff --git a/openpower/package/openpower-pnor-util/openpower-pnor-util.mk b/openpower/package/openpower-pnor-util/openpower-pnor-util.mk
index 1bfa73f..b5d1c21 100644
--- a/openpower/package/openpower-pnor-util/openpower-pnor-util.mk
+++ b/openpower/package/openpower-pnor-util/openpower-pnor-util.mk
@@ -6,10 +6,11 @@
 
 HOST_OPENPOWER_PNOR_UTIL_VERSION ?= 647d6134d448178e6b32892322596a5cc3d78b2d
 HOST_OPENPOWER_PNOR_UTIL_SITE ?= $(call github,openbmc,openpower-pnor-code-mgmt,$(HOST_OPENPOWER_PNOR_UTIL_VERSION))
-HOST_OPENPOWER_PNOR_UTIL_DEPENDENCIES = host-squashfs host-libflash
+HOST_OPENPOWER_PNOR_UTIL_DEPENDENCIES = host-squashfs host-libflash host-mtd
 
 define HOST_OPENPOWER_PNOR_UTIL_INSTALL_CMDS
 	$(INSTALL) -D $(@D)/generate-tar $(HOST_DIR)/usr/bin/generate-tar
+	$(INSTALL) -D $(@D)/generate-ubi $(HOST_DIR)/usr/bin/generate-ubi
 endef
 
 OPENPOWER_PNOR_UTIL_LICENSE = Apache-2.0
diff --git a/openpower/package/openpower-pnor/Config.in b/openpower/package/openpower-pnor/Config.in
index 82280f5..5233fff 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 59e7d39..1e5a095 100644
--- a/openpower/package/openpower-pnor/openpower-pnor.mk
+++ b/openpower/package/openpower-pnor/openpower-pnor.mk
@@ -4,15 +4,20 @@
 #
 ################################################################################
 
-OPENPOWER_PNOR_VERSION ?= 6fb8d914134d544a8466c739370947e32d5a4469
-OPENPOWER_PNOR_SITE ?= $(call github,open-power,pnor,$(OPENPOWER_PNOR_VERSION))
+OPENPOWER_PNOR_VERSION ?= 544815b3f51c2882214b3cb9708e193626d1f524
+
+# 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 = git@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
@@ -67,10 +74,7 @@
 OUTPUT_BUILD_DIR = $(STAGING_DIR)/../../../build/
 OUTPUT_IMAGES_DIR = $(STAGING_DIR)/../../../images/
 HOSTBOOT_BUILD_IMAGES_DIR = $(STAGING_DIR)/hostboot_build_images/
-# See Open-Power's Hostboot repo, file: src/build/buildpnor/PnorUtils.pm,
-# function: loadPnorLayout(); at the end of that function the generated XML file
-# is concatenated with "WithOffsets.xml"
-GENERATED_PNOR_LAYOUT_FILES = $(shell find "$(OPENPOWER_PNOR_SCRATCH_DIR)" -maxdepth 1 -name "*WithOffsets.xml")
+FSP_TRACE_IMAGES_DIR = $(STAGING_DIR)/fsp-trace/
 
 FILES_TO_TAR = $(HOSTBOOT_BUILD_IMAGES_DIR)/* \
                $(OUTPUT_BUILD_DIR)/skiboot-$(BR2_SKIBOOT_VERSION)/skiboot.elf \
@@ -78,17 +82,22 @@
                $(OUTPUT_BUILD_DIR)/linux-$(BR2_LINUX_KERNEL_VERSION)/.config \
                $(OUTPUT_BUILD_DIR)/linux-$(BR2_LINUX_KERNEL_VERSION)/vmlinux \
                $(OUTPUT_BUILD_DIR)/linux-$(BR2_LINUX_KERNEL_VERSION)/System.map \
-               $(OUTPUT_IMAGES_DIR)/zImage.epapr \
-               $(GENERATED_PNOR_LAYOUT_FILES)
+ 	       $(FSP_TRACE_IMAGES_DIR)/fsp-trace \
+               $(OUTPUT_IMAGES_DIR)/zImage.epapr
+
 
 # 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
 
@@ -97,7 +106,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)
@@ -176,6 +187,8 @@
         if [ "$(BR2_BUILD_PNOR_SQUASHFS)" == "y" ]; then \
             PATH=$(HOST_DIR)/usr/bin:$(PATH) $(HOST_DIR)/usr/bin/generate-tar -i squashfs -m $(BR2_OPENPOWER_CONFIG_NAME) -f $(STAGING_DIR)/pnor/$(BR2_OPENPOWER_PNOR_FILENAME).squashfs.tar $(STAGING_DIR)/pnor/$(BR2_OPENPOWER_PNOR_FILENAME) -s; \
             $(INSTALL) $(STAGING_DIR)/pnor/$(BR2_OPENPOWER_PNOR_FILENAME).squashfs.tar $(BINARIES_DIR); \
+            cd $(STAGING_DIR)/pnor/; PATH=$(HOST_DIR)/usr/sbin:$(PATH) $(HOST_DIR)/usr/bin/generate-ubi $(BR2_OPENPOWER_PNOR_FILENAME).squashfs.tar; \
+            $(INSTALL) $(STAGING_DIR)/pnor/$(BR2_OPENPOWER_PNOR_FILENAME).ubi.mtd $(BINARIES_DIR); \
         else \
             PATH=$(HOST_DIR)/usr/bin:$(PATH) $(HOST_DIR)/usr/bin/generate-tar -i static -m $(BR2_OPENPOWER_CONFIG_NAME) -f $(STAGING_DIR)/pnor/$(BR2_OPENPOWER_PNOR_FILENAME).static.tar.gz $(STAGING_DIR)/pnor/$(BR2_OPENPOWER_PNOR_FILENAME) -s; \
             $(INSTALL) $(STAGING_DIR)/pnor/$(BR2_OPENPOWER_PNOR_FILENAME).static.tar.gz $(BINARIES_DIR); \
diff --git a/openpower/package/ppe42-binutils/Config.in b/openpower/package/ppe42-binutils/Config.in
index 824e557..341e8ad 100644
--- a/openpower/package/ppe42-binutils/Config.in
+++ b/openpower/package/ppe42-binutils/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_HOST_PPE42_BINUTILS
         bool "ppe42-binutils"
-        default y if (BR2_OPENPOWER_PLATFORM && BR2_OPENPOWER_POWER9)
+        default y if (BR2_OPENPOWER_PLATFORM && (BR2_OPENPOWER_POWER10 || BR2_OPENPOWER_POWER9))
         select BR2_CPP
         help
             Project to build the PPE42 PORE binutils
diff --git a/openpower/package/ppe42-gcc/Config.in b/openpower/package/ppe42-gcc/Config.in
index d66418d..54ae38b 100644
--- a/openpower/package/ppe42-gcc/Config.in
+++ b/openpower/package/ppe42-gcc/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_HOST_PPE42_GCC
         bool "ppe42-gcc"
-        default y if (BR2_OPENPOWER_PLATFORM && BR2_OPENPOWER_POWER9)
+        default y if (BR2_OPENPOWER_PLATFORM && (BR2_OPENPOWER_POWER10 || BR2_OPENPOWER_POWER9))
         select BR2_CPP
         help
             Project to build the PPE42 gcc
diff --git a/openpower/package/ppe42-gcc/ppe42-gcc.mk b/openpower/package/ppe42-gcc/ppe42-gcc.mk
index 518e458..31496cc 100644
--- a/openpower/package/ppe42-gcc/ppe42-gcc.mk
+++ b/openpower/package/ppe42-gcc/ppe42-gcc.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-PPE42_GCC_VERSION ?= b4772a9fa65ea0dd812f8f305ce157bb1cb5ab4a
+PPE42_GCC_VERSION ?= 3d454701206d141a26777c3f6c1d966921f363de
 PPE42_GCC_SITE ?= $(call github,open-power,ppe42-gcc,$(PPE42_GCC_VERSION))
 PPE42_GCC_LICENSE = GPLv3+
 
diff --git a/openpower/package/sbe-p10/0001-Update-SBE-distribute-to-export-P10-DD1-files.patch b/openpower/package/sbe-p10/0001-Update-SBE-distribute-to-export-P10-DD1-files.patch
new file mode 100644
index 0000000..26cea10
--- /dev/null
+++ b/openpower/package/sbe-p10/0001-Update-SBE-distribute-to-export-P10-DD1-files.patch
@@ -0,0 +1,37 @@
+From b0a445addc19754ebea92ea3ee46185a3716267a Mon Sep 17 00:00:00 2001
+From: Nick Bofferding <bofferdn@us.ibm.com>
+Date: Thu, 3 Oct 2019 13:22:58 -0500
+Subject: [PATCH] Update SBE distribute to export P10 DD1 files
+
+Change-Id: I8bda043e0fe69187923abcfb1e79dd4de98e98ae
+---
+ src/build/sbeOpDistribute.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/build/sbeOpDistribute.py b/src/build/sbeOpDistribute.py
+index 14546d9..32b0cff 100755
+--- a/src/build/sbeOpDistribute.py
++++ b/src/build/sbeOpDistribute.py
+@@ -5,7 +5,7 @@
+ #
+ # OpenPOWER sbe Project
+ #
+-# Contributors Listed Below - COPYRIGHT 2017,2018
++# Contributors Listed Below - COPYRIGHT 2017,2019
+ # [+] International Business Machines Corp.
+ #
+ #
+@@ -26,8 +26,8 @@ import os
+ import sys
+ import getopt
+ 
+-CHIPID = 'p9n'
+-p9n_EC = {'21':'DD2', '22':'DD2', '23':'DD2'}
++CHIPID = 'p10'
++p9n_EC = {'10':'DD1'}
+ 
+ def usage():
+     print "usage:sbeOpDistribute.py [--sbe_binary_dir] <sbe binary path> [--img_dir] <images path>"
+-- 
+1.8.2.2
+
diff --git a/openpower/package/sbe-p10/0002-Temporarily-disabled-install-directive-in-SBE-distri.patch b/openpower/package/sbe-p10/0002-Temporarily-disabled-install-directive-in-SBE-distri.patch
new file mode 100644
index 0000000..c0fb22d
--- /dev/null
+++ b/openpower/package/sbe-p10/0002-Temporarily-disabled-install-directive-in-SBE-distri.patch
@@ -0,0 +1,36 @@
+From e34aaa2b68ec05f85f3d47ef37bdbd2aa5a162ae Mon Sep 17 00:00:00 2001
+From: Nick Bofferding <bofferdn@us.ibm.com>
+Date: Mon, 7 Oct 2019 15:58:41 -0500
+Subject: [PATCH] Temporarily disabled install directive in SBE distribute
+
+Change-Id: I3f54da025cde5944b098ced69be43995c495ec66
+---
+ src/build/sbeOpDistribute.py | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/build/sbeOpDistribute.py b/src/build/sbeOpDistribute.py
+index 32b0cff..373edb7 100755
+--- a/src/build/sbeOpDistribute.py
++++ b/src/build/sbeOpDistribute.py
+@@ -3,7 +3,7 @@
+ #
+ # $Source: src/build/sbeOpDistribute.py $
+ #
+-# OpenPOWER sbe Project
++# OpenPOWER HostBoot Project
+ #
+ # Contributors Listed Below - COPYRIGHT 2017,2019
+ # [+] International Business Machines Corp.
+@@ -103,7 +103,8 @@ def main(argv):
+             # Copy sbe raw binary to scratch folder
+             run_system_cmd('cp '+sbe_binary_dir+'/'+basename+'.bin'+' '+scratch_dir+'/'+basename+'.bin')
+             # Add HW ref image
+-            run_system_cmd('p9_ipl_build '+scratch_dir+'/'+basename+'.bin '+hw_ref_image+' 0x'+ecLevel)
++            #TODO: This is currently not working in p10 op-build
++            # run_system_cmd('p9_ipl_build '+scratch_dir+'/'+basename+'.bin '+hw_ref_image+' 0x'+ecLevel)
+             #add pnor header
+             run_system_cmd("env echo -en VERSION\\\\0 > "+scratch_dir+"/"+basename+".sha.bin")
+             run_system_cmd("sha512sum "+scratch_dir+"/"+basename+".bin | awk '{print $1}' | xxd -pr -r >> "+scratch_dir+"/"+basename+".sha.bin")
+-- 
+1.8.2.2
+
diff --git a/openpower/package/sbe-p10/Config.in b/openpower/package/sbe-p10/Config.in
new file mode 100644
index 0000000..a4b6e65
--- /dev/null
+++ b/openpower/package/sbe-p10/Config.in
@@ -0,0 +1,33 @@
+config BR2_PACKAGE_SBE_P10
+        bool "sbe-p10"
+        default y if (BR2_OPENPOWER_PLATFORM && BR2_OPENPOWER_POWER10)
+        select BR2_CPP
+        depends on BR2_PACKAGE_HCODE_P10
+        help
+            Project to build the sbe firmware codebase for P10
+
+if BR2_PACKAGE_SBE_P10
+
+choice
+	prompt "SBE version"
+	default BR2_SBE_P10_LATEST_VERSION
+
+config BR2_SBE_P10_LATEST_VERSION
+	bool "Use latest SBE master"
+
+config BR2_SBE_P10_CUSTOM_VERSION
+	bool "Custom SBE version"
+
+endchoice
+
+config BR2_SBE_P10_CUSTOM_VERSION_VALUE
+	string "SBE version"
+	depends on BR2_SBE_P10_CUSTOM_VERSION
+
+config BR2_SBE_P10_VERSION
+	string
+	default "2fc9533c88d665ad83a0593199cb5c29ed495083" if BR2_SBE_P10_LATEST_VERSION
+	default BR2_SBE_P10_CUSTOM_VERSION_VALUE \
+		if BR2_SBE_P10_CUSTOM_VERSION
+
+endif
diff --git a/openpower/package/sbe-p10/sbe-p10.mk b/openpower/package/sbe-p10/sbe-p10.mk
new file mode 100644
index 0000000..6b171e5
--- /dev/null
+++ b/openpower/package/sbe-p10/sbe-p10.mk
@@ -0,0 +1,35 @@
+################################################################################
+#
+# SBE for P10
+#
+################################################################################
+
+SBE_P10_VERSION = $(call qstrip,$(BR2_SBE_P10_VERSION))
+# TODO: WORKAROUND: Need to reenable next line and comment out the two lines
+# after that, when code is propagated to a public repo
+#SBE_P10_SITE ?= $(call github,open-power,sbe,$(SBE_P10_VERSION))
+SBE_P10_SITE ?= git@github.ibm.com:open-power/sbe.git
+SBE_P10_SITE_METHOD ?= git
+
+SBE_P10_LICENSE = Apache-2.0
+SBE_P10_DEPENDENCIES = host-ppe42-gcc hcode-p10
+# TODO WORKAROUND ... host-ppe42-gc not compiling
+# host-ppe42-gcc hcode-p10
+
+SBE_P10_INSTALL_IMAGES = YES
+SBE_P10_INSTALL_TARGET = NO
+
+define SBE_P10_BUILD_CMDS
+	SBE_COMMIT_ID=$(SBE_P10_VERSION) $(MAKE) -C $(@D) \
+		LD_LIBRARY_PATH=$(HOST_DIR)/usr/lib \
+		CROSS_COMPILER_PATH=$(PPE42_GCC_BIN) \
+		all
+endef
+
+define SBE_P10_INSTALL_IMAGES_CMDS
+	$(INSTALL) -D $(@D)/images/ipl_image_tool $(HOST_DIR)/usr/bin/
+	python $(@D)/src/build/sbeOpDistribute.py  --sbe_binary_dir=$(STAGING_DIR)/sbe_binaries --img_dir=$(@D)/images --sbe_binary_filename $(BR2_HOSTBOOT_BINARY_SBE_FILENAME)
+	cp $(@D)/src/build/sbeOpDistribute.py $(STAGING_DIR)/sbe_binaries/
+endef
+
+$(eval $(generic-package))
diff --git a/openpower/package/skiboot/0001-platform-add-Raptor-Blackbird-support.patch b/openpower/package/skiboot/0001-platform-add-Raptor-Blackbird-support.patch
deleted file mode 100644
index a7ed4f1..0000000
--- a/openpower/package/skiboot/0001-platform-add-Raptor-Blackbird-support.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-From 376bed3fbe902138b92e95d9da58bb5e1509072e Mon Sep 17 00:00:00 2001
-From: Stewart Smith <stewart@flamingspork.com>
-Date: Sun, 8 Dec 2019 19:06:25 -0800
-Subject: [PATCH] platform: add Raptor Blackbird support
-
-Based off the Raptor patch:
-https://git.raptorcs.com/git/blackbird-skiboot/commit/?id=c81f9d66592dc2a7cf7f6c59c3def5cee0638c1f
-
-Notable changes are slot names matching what's silkscreened on the board.
-See https://i1.wp.com/www.flamingspork.com/blog/wp-content/uploads/2019/12/IMG_4006-scaled.jpg
-for a photo of the actual board.
-
-I haven't included the port 80h bit as I haven't worked out how to probe that from the BMC to test.
-
-Boot tested, seems good.
-
-Signed-off-by: Stewart Smith <stewart@flamingspork.com>
----
- platforms/astbmc/Makefile.inc |  3 +-
- platforms/astbmc/blackbird.c  | 66 +++++++++++++++++++++++++++++++++++
- 2 files changed, 68 insertions(+), 1 deletion(-)
- create mode 100644 platforms/astbmc/blackbird.c
-
-diff --git a/platforms/astbmc/Makefile.inc b/platforms/astbmc/Makefile.inc
-index fd4eaeac..e0f8760d 100644
---- a/platforms/astbmc/Makefile.inc
-+++ b/platforms/astbmc/Makefile.inc
-@@ -6,7 +6,8 @@ ASTBMC_OBJS = pnor.o common.o slots.o \
- 	      garrison.o barreleye.o \
- 	      witherspoon.o zaius.o romulus.o p9dsu.o \
- 	      vesnin.o nicole.o mihawk.o\
--	      talos.o swift.o
-+	      talos.o blackbird.o \
-+	      swift.o
- 
- ASTBMC = $(PLATDIR)/astbmc/built-in.a
- $(ASTBMC): $(ASTBMC_OBJS:%=$(PLATDIR)/astbmc/%)
-diff --git a/platforms/astbmc/blackbird.c b/platforms/astbmc/blackbird.c
-new file mode 100644
-index 00000000..8817b8c5
---- /dev/null
-+++ b/platforms/astbmc/blackbird.c
-@@ -0,0 +1,66 @@
-+// SPDX-License-Identifier: Apache-2.0
-+/* Copyright 2017 IBM Corp.
-+ * Copyright 2018-2019 Raptor Engineering, LLC
-+ * Copyright 2019 Stewart Smith
-+ */
-+
-+#include <skiboot.h>
-+#include <device.h>
-+#include <console.h>
-+#include <chip.h>
-+#include <ipmi.h>
-+#include <psi.h>
-+
-+#include "astbmc.h"
-+
-+ST_PLUGGABLE(blackbird_cpu1_slot1, "SLOT1 PCIE 4.0 X16");
-+ST_PLUGGABLE(blackbird_cpu1_slot2, "SLOT2 PCIE 4.0 X8");
-+
-+ST_BUILTIN_DEV(blackbird_builtin_sata, "Builtin SATA");
-+ST_BUILTIN_DEV(blackbird_builtin_usb, "Builtin USB");
-+ST_BUILTIN_DEV(blackbird_builtin_ethernet, "Builtin Ethernet");
-+ST_BUILTIN_DEV(blackbird_builtin_bmc, "BMC");
-+
-+static const struct slot_table_entry blackbird_phb_table[] = {
-+	ST_PHB_ENTRY(0, 0, blackbird_cpu1_slot1),
-+	ST_PHB_ENTRY(0, 1, blackbird_cpu1_slot2),
-+
-+	ST_PHB_ENTRY(0, 2, blackbird_builtin_sata),
-+	ST_PHB_ENTRY(0, 3, blackbird_builtin_usb),
-+	ST_PHB_ENTRY(0, 4, blackbird_builtin_ethernet),
-+	ST_PHB_ENTRY(0, 5, blackbird_builtin_bmc),
-+
-+	{ .etype = st_end },
-+};
-+
-+static bool blackbird_probe(void)
-+{
-+	if (!dt_node_is_compatible(dt_root, "rcs,blackbird"))
-+		return false;
-+
-+	/* Lot of common early inits here */
-+	astbmc_early_init();
-+
-+	/* Setup UART for use by OPAL (Linux hvc) */
-+	uart_set_console_policy(UART_CONSOLE_OPAL);
-+
-+	slot_table_init(blackbird_phb_table);
-+
-+	return true;
-+}
-+
-+DECLARE_PLATFORM(blackbird) = {
-+	.name			= "Blackbird",
-+	.probe			= blackbird_probe,
-+	.init			= astbmc_init,
-+	.start_preload_resource	= flash_start_preload_resource,
-+	.resource_loaded	= flash_resource_loaded,
-+	.bmc			= &bmc_plat_ast2500_openbmc,
-+	.pci_get_slot_info	= slot_table_get_slot_info,
-+	.pci_probe_complete	= check_all_slot_table,
-+	.cec_power_down         = astbmc_ipmi_power_down,
-+	.cec_reboot             = astbmc_ipmi_reboot,
-+	.elog_commit		= ipmi_elog_commit,
-+	.exit			= astbmc_exit,
-+	.terminate		= ipmi_terminate,
-+};
--- 
-2.23.0
-
diff --git a/openpower/platform/Config.in b/openpower/platform/Config.in
index 3232cd0..b6baa4d 100644
--- a/openpower/platform/Config.in
+++ b/openpower/platform/Config.in
@@ -1,7 +1,7 @@
 config BR2_OPENPOWER_PLATFORM
     bool "Enables only one openPower platform"
     default n
-    depends on ((BR2_OPENPOWER_POWER8 || BR2_OPENPOWER_POWER9) && !(BR2_OPENPOWER_POWER8 && BR2_OPENPOWER_POWER9))
+    depends on ((BR2_OPENPOWER_POWER8 || BR2_OPENPOWER_POWER9 || BR2_OPENPOWER_POWER10) && !(BR2_OPENPOWER_POWER8 && BR2_OPENPOWER_POWER9) && !(BR2_OPENPOWER_POWER8 && BR2_OPENPOWER_POWER10) && !(BR2_OPENPOWER_POWER9 && BR2_OPENPOWER_POWER10) && !(BR2_OPENPOWER_POWER8 && BR2_OPENPOWER_POWER9 && BR2_OPENPOWER_POWER10))
 
 config BR2_OPENPOWER_POWER8
     bool "Enables the OpenPower p8 platform"
@@ -12,3 +12,8 @@
     bool "Enables the OpenPower p9 platform"
     default n
     depends on BR2_powerpc64 || BR2_powerpc64le
+
+config BR2_OPENPOWER_POWER10
+    bool "Enables the OpenPower p10 platform"
+    default n
+    depends on BR2_powerpc64 || BR2_powerpc64le