Update OCC Make Process to use GPU Binaries
- Update hostboot_binaries to point to latest commit containing
occ gpu gpe binary
- Add Config variables to conditionally compile occ using gpu
gpe binary if enabled
- Update OCC Makefile to use config vars
diff --git a/openpower/configs/witherspoon_defconfig b/openpower/configs/witherspoon_defconfig
index a7ef6be..44035fb 100644
--- a/openpower/configs/witherspoon_defconfig
+++ b/openpower/configs/witherspoon_defconfig
@@ -58,6 +58,8 @@
BR2_PACKAGE_PETITBOOT=y
BR2_PACKAGE_PETITBOOT_MTD=y
BR2_OCC_BIN_FILENAME="occ.bin"
+BR2_OCC_GPU_BIN_FILENAME="gpu_gpe1.bin"
+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/hostboot-binaries/hostboot_binaries.mk b/openpower/package/hostboot-binaries/hostboot_binaries.mk
index e65dea4..4c5b3b6 100644
--- a/openpower/package/hostboot-binaries/hostboot_binaries.mk
+++ b/openpower/package/hostboot-binaries/hostboot_binaries.mk
@@ -4,7 +4,7 @@
#
################################################################################
-HOSTBOOT_BINARIES_VERSION ?= d45f5e3c086decb9c437cc3c6410108487334663
+HOSTBOOT_BINARIES_VERSION ?= cddd766c40f1fbcc91dee315158438ad48a0c5ea
HOSTBOOT_BINARIES_SITE ?= $(call github,open-power,hostboot-binaries,$(HOSTBOOT_BINARIES_VERSION))
HOSTBOOT_BINARIES_LICENSE = Apache-2.0
diff --git a/openpower/package/occ/Config.in b/openpower/package/occ/Config.in
index 29b5eb4..1d77dff 100644
--- a/openpower/package/occ/Config.in
+++ b/openpower/package/occ/Config.in
@@ -9,3 +9,15 @@
string "Name of OCC image file"
help
String used to define name of the OCC binary image file
+
+config BR2_OCC_GPU_BIN_BUILD
+ bool "Enables Compilation of GPU Binary Image"
+ default n
+ help
+ Boolean used to flag whether to compile OCC GPU binary
+
+config BR2_OCC_GPU_GPE_BIN_FILENAME
+ string "Name of OCC GPU GPE Binary file"
+ help
+ String used to define name of the OCC GPUE GPE binary image file
+
diff --git a/openpower/package/occ/occ.mk b/openpower/package/occ/occ.mk
index 65fd28a..92f60b3 100644
--- a/openpower/package/occ/occ.mk
+++ b/openpower/package/occ/occ.mk
@@ -23,7 +23,7 @@
OCC_IMAGE_BIN_PATH = $(if $(BR2_OPENPOWER_POWER9),obj/image.bin,src/image.bin)
OCC_DEPENDENCIES_P8 = host-binutils host-p8-pore-binutils
-OCC_DEPENDENCIES_P9 = host-binutils host-ppe42-gcc
+OCC_DEPENDENCIES_P9 = host-binutils host-ppe42-gcc hostboot-binaries
OCC_DEPENDENCIES ?= $(if $(BR2_OPENPOWER_POWER9),$(OCC_DEPENDENCIES_P9),$(OCC_DEPENDENCIES_P8))
define OCC_APPLY_PATCHES
@@ -50,8 +50,13 @@
make combineImage
endef
define OCC_BUILD_CMDS_P9
- 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
+ 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_build_images/ 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_BUILD_CMDS ?= $(if $(BR2_OPENPOWER_POWER9),$(OCC_BUILD_CMDS_P9),$(OCC_BUILD_CMDS_P8))