Enable P10 HCODE and HOSTBOOT_BINARIES compilation
- Implement makefiles for hostboot_binaries and hcode
to build the p10 content
- Add an override ENV Var to use a binary version of hcode
instead of compiling the source code
- Binary used for override is release: hw112519a.opmst10
diff --git a/openpower/configs/rainier_defconfig b/openpower/configs/rainier_defconfig
index 0b0a114..b78dced 100644
--- a/openpower/configs/rainier_defconfig
+++ b/openpower/configs/rainier_defconfig
@@ -59,7 +59,7 @@
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="p9n.ref_image.hdr.bin.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"
diff --git a/openpower/package/hcode-p10/Config.in b/openpower/package/hcode-p10/Config.in
index 7e5fbeb..ee96ec4 100644
--- a/openpower/package/hcode-p10/Config.in
+++ b/openpower/package/hcode-p10/Config.in
@@ -31,7 +31,7 @@
config BR2_HCODE_P10_VERSION
string
- default "hw092119a.opmst" if BR2_HCODE_P10_LATEST_VERSION
+ default "hw112519a.opmst10" if BR2_HCODE_P10_LATEST_VERSION
default BR2_HCODE_P10_CUSTOM_VERSION_VALUE \
if BR2_HCODE_P10_CUSTOM_VERSION
diff --git a/openpower/package/hcode-p10/hcode-p10.mk b/openpower/package/hcode-p10/hcode-p10.mk
index db59ad0..10f2b59 100644
--- a/openpower/package/hcode-p10/hcode-p10.mk
+++ b/openpower/package/hcode-p10/hcode-p10.mk
@@ -5,11 +5,11 @@
################################################################################
HCODE_P10_VERSION = $(call qstrip,$(BR2_HCODE_P10_VERSION))
-HCODE_P10_SITE = $(call github,open-power,hcode,$(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_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
@@ -17,20 +17,28 @@
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
+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 Workaround
+ifeq ($(BR2_HOSTBOOT_BINARIES_USE_HCODE_BIN),y)
+
+define HCODE_P10_INSTALL_IMAGES_CMDS
+ mkdir -p $(STAGING_DIR)/hcode
+ $(INSTALL) -D $(STAGING_DIR)/hostboot_binaries/$(HCODE_IMAGE_BIN_NAME) $(STAGING_DIR)/hcode/$(HCODE_IMAGE_BIN_NAME)
+endef
+
+else
+
+#TODO In the future use OPENPOWER_BUILD=1 to avoid all IBM-internal make functionality (afs, etc)
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\
+ 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- \
RINGFILEPATH=$(STAGING_DIR)/hostboot_binaries __EKB_PREFIX=$(CXXPATH) \
@@ -39,12 +47,12 @@
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)
+ $(INSTALL) $(@D)/$(HW_IMAGE_BIN_PATH)/$(HW_IMAGE_BIN_NAME) $(STAGING_DIR)/hcode/$(HCODE_IMAGE_BIN_NAME)
endef
define HCODE_P10_BUILD_CMDS
- $(HCODE_ENV_VARS) bash -c 'cd $(@D) && source ./env.bash && $(MAKE) '
+ $(HCODE_P10_ENV_VARS) bash -c 'cd $(@D) && source ./env.bash && $(MAKE) '
endef
+endif
$(eval $(generic-package))
diff --git a/openpower/package/hostboot-binaries/Config.in b/openpower/package/hostboot-binaries/Config.in
index 861dc3e..ca2eeb3 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 "hw080119a.940" if BR2_HOSTBOOT_BINARIES_LATEST_VERSION
+ default "66e9a6082cb192047c968db1665ae57d88b2b20e" 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 c8b2c13..bd22b3a 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
@@ -56,24 +59,33 @@
endif
###################################
-# P10:
-ifeq ($(BR2_OPENPOWER_POWER10),y)
+# P10 Workaround
+ifeq ($(BR2_HOSTBOOT_BINARIES_USE_HCODE_BIN),y)
-# TODO: Update for P10
-NIMBUS_RING_FILE=p9n.hw.rings.bin
-NIMBUS_RING_OVERLAYS_FILE=p9n.hw.overlays.bin
-AXONE_RING_FILE=p9a.hw.rings.bin
-AXONE_RING_OVERLAYS_FILE=p9a.hw.overlays.bin
+HCODE_BIN_FILE=p10.ref_image.bin
define HOSTBOOT_BINARIES_INSTALL_IMAGES_CMDS
- $(INSTALL) -D $(@D)/cvpd.bin $(STAGING_DIR)/hostboot_binaries/cvpd.bin
+ $(INSTALL) -D $(@D)/gpu_gpe1.bin $(STAGING_DIR)/hostboot_binaries/gpu_gpe1.bin
+ $(INSTALL) -D $(@D)/$(HCODE_BIN_FILE) $(STAGING_DIR)/hostboot_binaries/$(HCODE_BIN_FILE)
+ $(INSTALL) -D $(@D)/$(BR2_HOSTBOOT_BINARY_IONV_FILENAME) $(STAGING_DIR)/hostboot_binaries/
+ $(INSTALL) -D $(@D)/$(BR2_HOSTBOOT_BINARY_SBEC_FILENAME) $(STAGING_DIR)/hostboot_binaries/
+endef
+
+else 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)/$(NIMBUS_RING_FILE) $(STAGING_DIR)/hostboot_binaries/
- $(INSTALL) -D $(@D)/$(NIMBUS_RING_OVERLAYS_FILE) $(STAGING_DIR)/hostboot_binaries/
- $(INSTALL) -D $(@D)/$(AXONE_RING_FILE) $(STAGING_DIR)/hostboot_binaries/
- $(INSTALL) -D $(@D)/$(AXONE_RING_OVERLAYS_FILE) $(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