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/hcode-p10/hcode-p10.mk b/openpower/package/hcode-p10/hcode-p10.mk
new file mode 100644
index 0000000..8d2a43e
--- /dev/null
+++ b/openpower/package/hcode-p10/hcode-p10.mk
@@ -0,0 +1,50 @@
+################################################################################
+#
+# 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 = https://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
+
+# TODO: Customize next four lines for P10
+HW_IMAGE_BIN=p9n.hw_image.bin
+HCODE_IMAGE_BIN = p9n.ref_image.bin
+HW_AXONE_IMAGE_BIN=p9a.hw_image.bin
+HCODE_AXONE_IMAGE_BIN = p9a.ref_image.bin
+
+CROSS_COMPILER_PATH=$(PPE42_GCC_BIN)
+PPE_TOOL_PATH ?= $(CROSS_COMPILER_PATH)
+PPE_PREFIX ?= $(PPE_TOOL_PATH)/bin/powerpc-eabi-
+
+HCODE_P10_ENV_VARS= CONFIG_FILE=$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/hcode/$(BR2_HCODE_CONFIG_FILE) \
+ LD_LIBRARY_PATH=$(HOST_DIR)/usr/lib OPENPOWER_BUILD=1\
+ CROSS_COMPILER_PATH=$(PPE42_GCC_BIN) PPE_TOOL_PATH=$(CROSS_COMPILER_PATH) \
+ PPE_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)
+
+define HCODE_P10_INSTALL_IMAGES_CMDS
+ mkdir -p $(STAGING_DIR)/hcode
+ $(INSTALL) $(@D)/$(HW_IMAGE_BIN_PATH)/$(HW_IMAGE_BIN) $(STAGING_DIR)/hcode/$(HCODE_IMAGE_BIN)
+ $(INSTALL) $(@D)/$(HW_IMAGE_BIN_PATH)/$(HW_AXONE_IMAGE_BIN) $(STAGING_DIR)/hcode/$(HCODE_AXONE_IMAGE_BIN)
+endef
+
+define HCODE_P10_BUILD_CMDS
+ $(HCODE_ENV_VARS) bash -c 'cd $(@D) && source ./env.bash && $(MAKE) '
+endef
+
+$(eval $(generic-package))