Split P8 and P9 Hostboot and OCC packages
This was causing a couple of issues:
1) increased complexity in build files
2) It breaks the pkg-version patch detection/checksum
3) Failing to apply patches to would silently fail
The split makes this a bit easier and requires less custom code.
We keep the P9 hostboot/occ named hostboot/occ, so that day-to-day,
nobody notices a difference. The only difference you'll notice
is if doing POWER8 hostboot/occ development, as the package name
will be 'hostboot-p8' or 'occ-p8'.
Fixes: https://github.com/open-power/op-build/issues/876
Fixes: https://github.com/open-power/op-build/issues/1194
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
diff --git a/openpower/package/Config.in b/openpower/package/Config.in
index eb685db..6e3fc97 100755
--- a/openpower/package/Config.in
+++ b/openpower/package/Config.in
@@ -1,5 +1,6 @@
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-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"
@@ -7,8 +8,9 @@
source "$BR2_EXTERNAL_OP_BUILD_PATH/package/openpower-pnor/Config.in"
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/occ/Config.in"
source "$BR2_EXTERNAL_OP_BUILD_PATH/package/hcode/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/capp-ucode/Config.in"
source "$BR2_EXTERNAL_OP_BUILD_PATH/package/skiboot/Config.in"
source "$BR2_EXTERNAL_OP_BUILD_PATH/package/libflash/Config.in"
diff --git a/openpower/package/common-p8-xml/Config.in b/openpower/package/common-p8-xml/Config.in
index 2c01702..560c1d6 100644
--- a/openpower/package/common-p8-xml/Config.in
+++ b/openpower/package/common-p8-xml/Config.in
@@ -1,4 +1,4 @@
config BR2_PACKAGE_COMMON_P8_XML
bool "Common P8 XML files"
- default y if BR2_PACKAGE_HOSTBOOT
+ default y if BR2_PACKAGE_HOSTBOOT_P8
select BR2_PACKAGE_OPENPOWER_MRW
diff --git a/openpower/package/hostboot/p8Patches/hostboot-0001-Increase-uart-delay.patch b/openpower/package/hostboot-p8/0001-Increase-uart-delay.patch
similarity index 100%
rename from openpower/package/hostboot/p8Patches/hostboot-0001-Increase-uart-delay.patch
rename to openpower/package/hostboot-p8/0001-Increase-uart-delay.patch
diff --git a/openpower/package/hostboot/p8Patches/hostboot-0002-GCC-4.9-Make-compiler-use-ELFv1-ABI.patch b/openpower/package/hostboot-p8/0002-GCC-4.9-Make-compiler-use-ELFv1-ABI.patch
similarity index 100%
rename from openpower/package/hostboot/p8Patches/hostboot-0002-GCC-4.9-Make-compiler-use-ELFv1-ABI.patch
rename to openpower/package/hostboot-p8/0002-GCC-4.9-Make-compiler-use-ELFv1-ABI.patch
diff --git a/openpower/package/hostboot/p8Patches/hostboot-0003-Default-to-std-gnu-03.patch b/openpower/package/hostboot-p8/0003-Default-to-std-gnu-03.patch
similarity index 100%
rename from openpower/package/hostboot/p8Patches/hostboot-0003-Default-to-std-gnu-03.patch
rename to openpower/package/hostboot-p8/0003-Default-to-std-gnu-03.patch
diff --git a/openpower/package/hostboot/p8Patches/hostboot-0004-fix-build-error-return-statement-with-a-value-in-fun.patch b/openpower/package/hostboot-p8/0004-fix-build-error-return-statement-with-a-value-in-fun.patch
similarity index 100%
rename from openpower/package/hostboot/p8Patches/hostboot-0004-fix-build-error-return-statement-with-a-value-in-fun.patch
rename to openpower/package/hostboot-p8/0004-fix-build-error-return-statement-with-a-value-in-fun.patch
diff --git a/openpower/package/hostboot/p8Patches/hostboot-0005-error-dereferencing-type-punned-pointer-will-break-s.patch b/openpower/package/hostboot-p8/0005-error-dereferencing-type-punned-pointer-will-break-s.patch
similarity index 100%
rename from openpower/package/hostboot/p8Patches/hostboot-0005-error-dereferencing-type-punned-pointer-will-break-s.patch
rename to openpower/package/hostboot-p8/0005-error-dereferencing-type-punned-pointer-will-break-s.patch
diff --git a/openpower/package/hostboot/p8Patches/hostboot-0006-Change-cv_forcedMemPeriodic-to-uint8_t-as-bool-is-in.patch b/openpower/package/hostboot-p8/0006-Change-cv_forcedMemPeriodic-to-uint8_t-as-bool-is-in.patch
similarity index 100%
rename from openpower/package/hostboot/p8Patches/hostboot-0006-Change-cv_forcedMemPeriodic-to-uint8_t-as-bool-is-in.patch
rename to openpower/package/hostboot-p8/0006-Change-cv_forcedMemPeriodic-to-uint8_t-as-bool-is-in.patch
diff --git a/openpower/package/hostboot/p8Patches/hostboot-0007-error-the-compiler-can-assume-that-the-address-of-r-.patch b/openpower/package/hostboot-p8/0007-error-the-compiler-can-assume-that-the-address-of-r-.patch
similarity index 100%
rename from openpower/package/hostboot/p8Patches/hostboot-0007-error-the-compiler-can-assume-that-the-address-of-r-.patch
rename to openpower/package/hostboot-p8/0007-error-the-compiler-can-assume-that-the-address-of-r-.patch
diff --git a/openpower/package/hostboot/p8Patches/hostboot-0008-Fix-compiler-can-assume-address-will-never-be-NULL-e.patch b/openpower/package/hostboot-p8/0008-Fix-compiler-can-assume-address-will-never-be-NULL-e.patch
similarity index 100%
rename from openpower/package/hostboot/p8Patches/hostboot-0008-Fix-compiler-can-assume-address-will-never-be-NULL-e.patch
rename to openpower/package/hostboot-p8/0008-Fix-compiler-can-assume-address-will-never-be-NULL-e.patch
diff --git a/openpower/package/hostboot/p8Patches/hostboot-0009-error-in-C-98-l_vmVersionBuf-must-be-initialized-by-.patch b/openpower/package/hostboot-p8/0009-error-in-C-98-l_vmVersionBuf-must-be-initialized-by-.patch
similarity index 100%
rename from openpower/package/hostboot/p8Patches/hostboot-0009-error-in-C-98-l_vmVersionBuf-must-be-initialized-by-.patch
rename to openpower/package/hostboot-p8/0009-error-in-C-98-l_vmVersionBuf-must-be-initialized-by-.patch
diff --git a/openpower/package/hostboot/p8Patches/hostboot-0010-Use-std-gnu-03-for-host-g-invocations.patch b/openpower/package/hostboot-p8/0010-Use-std-gnu-03-for-host-g-invocations.patch
similarity index 100%
rename from openpower/package/hostboot/p8Patches/hostboot-0010-Use-std-gnu-03-for-host-g-invocations.patch
rename to openpower/package/hostboot-p8/0010-Use-std-gnu-03-for-host-g-invocations.patch
diff --git a/openpower/package/hostboot/p8Patches/hostboot-0012-kernel-Update-assembly-for-modern-binutils.patch b/openpower/package/hostboot-p8/0012-kernel-Update-assembly-for-modern-binutils.patch
similarity index 100%
rename from openpower/package/hostboot/p8Patches/hostboot-0012-kernel-Update-assembly-for-modern-binutils.patch
rename to openpower/package/hostboot-p8/0012-kernel-Update-assembly-for-modern-binutils.patch
diff --git a/openpower/package/hostboot-p8/Config.in b/openpower/package/hostboot-p8/Config.in
new file mode 100644
index 0000000..4dacfab
--- /dev/null
+++ b/openpower/package/hostboot-p8/Config.in
@@ -0,0 +1,17 @@
+config BR2_PACKAGE_HOSTBOOT_P8
+ bool "hostboot-p8"
+ default y if (BR2_OPENPOWER_POWER8)
+ select BR2_CPP
+ help
+ Project to build the hostboot firmware codebase
+
+if BR2_PACKAGE_HOSTBOOT_P8
+
+config BR2_HOSTBOOT_P8_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-p8/hostboot-p8.mk b/openpower/package/hostboot-p8/hostboot-p8.mk
new file mode 100644
index 0000000..c50679e
--- /dev/null
+++ b/openpower/package/hostboot-p8/hostboot-p8.mk
@@ -0,0 +1,32 @@
+################################################################################
+#
+# hostboot for POWER8
+#
+################################################################################
+HOSTBOOT_P8_VERSION ?= d3025f5d7ddd0723946bb54fcb471d2bf1fd2da4
+
+HOSTBOOT_P8_SITE ?= $(call github,open-power,hostboot,$(HOSTBOOT_P8_VERSION))
+
+HOSTBOOT_P8_LICENSE = Apache-2.0
+HOSTBOOT_P8_LICENSE_FILES = LICENSE
+HOSTBOOT_P8_DEPENDENCIES = host-binutils
+
+HOSTBOOT_P8_INSTALL_IMAGES = YES
+HOSTBOOT_P8_INSTALL_TARGET = NO
+
+HOSTBOOT_P8_ENV_VARS=$(TARGET_MAKE_ENV) \
+ CONFIG_FILE=$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/hostboot/$(BR2_HOSTBOOT_P8_CONFIG_FILE) \
+ OPENPOWER_BUILD=1 CROSS_PREFIX=$(TARGET_CROSS) HOST_PREFIX="" HOST_BINUTILS_DIR=$(HOST_BINUTILS_DIR) \
+ HOSTBOOT_P8_VERSION=`cat $(HOSTBOOT_P8_VERSION_FILE)`
+
+HOSTBOOT_P8_POST_PATCH_HOOKS += HOSTBOOT_P8_APPLY_PATCHES
+
+define HOSTBOOT_P8_BUILD_CMDS
+ $(HOSTBOOT_P8_ENV_VARS) bash -c 'cd $(@D) && source ./env.bash && $(MAKE)'
+endef
+
+define HOSTBOOT_P8_INSTALL_IMAGES_CMDS
+ cd $(@D) && source ./env.bash && $(@D)/src/build/tools/hbDistribute --openpower $(STAGING_DIR)/hostboot_build_images/
+endef
+
+$(eval $(generic-package))
diff --git a/openpower/package/hostboot/p9Patches/hostboot-0007-Disable-warnings-that-crop-up-a-lot-with-GCC6.patch b/openpower/package/hostboot/0007-Disable-warnings-that-crop-up-a-lot-with-GCC6.patch
similarity index 100%
rename from openpower/package/hostboot/p9Patches/hostboot-0007-Disable-warnings-that-crop-up-a-lot-with-GCC6.patch
rename to openpower/package/hostboot/0007-Disable-warnings-that-crop-up-a-lot-with-GCC6.patch
diff --git a/openpower/package/hostboot/Config.in b/openpower/package/hostboot/Config.in
index d864c49..b818174 100644
--- a/openpower/package/hostboot/Config.in
+++ b/openpower/package/hostboot/Config.in
@@ -1,13 +1,17 @@
config BR2_PACKAGE_HOSTBOOT
bool "hostboot"
- default y if (BR2_OPENPOWER_PLATFORM)
+ default y if (BR2_OPENPOWER_POWER9)
select BR2_CPP
help
Project to build the hostboot firmware codebase
+if BR2_PACKAGE_HOSTBOOT
config BR2_HOSTBOOT_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/p9Patches/hostboot-0002-Revert-Mark-Read-Only-Partitions-as-Such.patch b/openpower/package/hostboot/hostboot-0002-Revert-Mark-Read-Only-Partitions-as-Such.patch
similarity index 100%
rename from openpower/package/hostboot/p9Patches/hostboot-0002-Revert-Mark-Read-Only-Partitions-as-Such.patch
rename to openpower/package/hostboot/hostboot-0002-Revert-Mark-Read-Only-Partitions-as-Such.patch
diff --git a/openpower/package/hostboot/p9Patches/hostboot-1020-Revert-jgr17071200-Removed-pdwn-settings.patch b/openpower/package/hostboot/hostboot-1020-Revert-jgr17071200-Removed-pdwn-settings.patch
similarity index 100%
rename from openpower/package/hostboot/p9Patches/hostboot-1020-Revert-jgr17071200-Removed-pdwn-settings.patch
rename to openpower/package/hostboot/hostboot-1020-Revert-jgr17071200-Removed-pdwn-settings.patch
diff --git a/openpower/package/hostboot/hostboot.mk b/openpower/package/hostboot/hostboot.mk
index c4b907f..cb98e32 100644
--- a/openpower/package/hostboot/hostboot.mk
+++ b/openpower/package/hostboot/hostboot.mk
@@ -1,12 +1,10 @@
################################################################################
#
-# hostboot
+# hostboot for POWER9
#
################################################################################
-HOSTBOOT_VERSION_BRANCH_MASTER_P8 ?= d3025f5d7ddd0723946bb54fcb471d2bf1fd2da4
-HOSTBOOT_VERSION_BRANCH_MASTER ?= c38615a583b7f19c0ae6a5a152b575fe61ff3d2a
-HOSTBOOT_VERSION ?= $(if $(BR2_OPENPOWER_POWER9),$(HOSTBOOT_VERSION_BRANCH_MASTER),$(HOSTBOOT_VERSION_BRANCH_MASTER_P8))
+HOSTBOOT_VERSION ?= c38615a583b7f19c0ae6a5a152b575fe61ff3d2a
HOSTBOOT_SITE ?= $(call github,open-power,hostboot,$(HOSTBOOT_VERSION))
HOSTBOOT_LICENSE = Apache-2.0
@@ -21,23 +19,6 @@
OPENPOWER_BUILD=1 CROSS_PREFIX=$(TARGET_CROSS) HOST_PREFIX="" HOST_BINUTILS_DIR=$(HOST_BINUTILS_DIR) \
HOSTBOOT_VERSION=`cat $(HOSTBOOT_VERSION_FILE)`
-define HOSTBOOT_APPLY_PATCHES
- if [ "$(BR2_OPENPOWER_POWER9)" == "y" ]; then \
- $(APPLY_PATCHES) $(@D) $(BR2_EXTERNAL_OP_BUILD_PATH)/package/hostboot/p9Patches \*.patch; \
- if [ -d $(BR2_EXTERNAL_OP_BUILD_PATH)/custom/patches/hostboot/p9Patches ]; then \
- $(APPLY_PATCHES) $(@D) $(BR2_EXTERNAL_OP_BUILD_PATH)/custom/patches/hostboot/p9Patches \*.patch; \
- fi; \
- fi; \
- if [ "$(BR2_OPENPOWER_POWER8)" == "y" ]; then \
- $(APPLY_PATCHES) $(@D) $(BR2_EXTERNAL_OP_BUILD_PATH)/package/hostboot/p8Patches \*.patch; \
- if [ -d $(BR2_EXTERNAL_OP_BUILD_PATH)/custom/patches/hostboot/p8Patches ]; then \
- $(APPLY_PATCHES) $(@D) $(BR2_EXTERNAL_OP_BUILD_PATH)/custom/patches/hostboot/p8Patches \*.patch; \
- fi; \
- fi;
-endef
-
-HOSTBOOT_POST_PATCH_HOOKS += HOSTBOOT_APPLY_PATCHES
-
define HOSTBOOT_BUILD_CMDS
$(HOSTBOOT_ENV_VARS) bash -c 'cd $(@D) && source ./env.bash && $(MAKE)'
endef
diff --git a/openpower/package/machine-xml/machine-xml.mk b/openpower/package/machine-xml/machine-xml.mk
index e335e8b..dc05d0d 100644
--- a/openpower/package/machine-xml/machine-xml.mk
+++ b/openpower/package/machine-xml/machine-xml.mk
@@ -13,7 +13,14 @@
MACHINE_XML_LICENSE = Apache-2.0
MACHINE_XML_LICENSE_FILES = LICENSE
-MACHINE_XML_DEPENDENCIES = hostboot openpower-mrw common-p8-xml
+MACHINE_XML_DEPENDENCIES = openpower-mrw common-p8-xml
+
+ifeq ($(BR2_OPENPOWER_POWER9),y)
+MACHINE_XML_DEPENDENCIES += hostboot
+endif
+ifeq ($(BR2_OPENPOWER_POWER8),y)
+MACHINE_XML_DEPENDENCIES += hostboot-p8
+endif
MACHINE_XML_INSTALL_IMAGES = YES
MACHINE_XML_INSTALL_TARGET = YES
diff --git a/openpower/package/occ-p8/Config.in b/openpower/package/occ-p8/Config.in
new file mode 100644
index 0000000..0137e94
--- /dev/null
+++ b/openpower/package/occ-p8/Config.in
@@ -0,0 +1,16 @@
+config BR2_PACKAGE_OCC_P8
+ bool "OCC for P8"
+ default y if (BR2_OPENPOWER_PLATFORM && BR2_OPENPOWER_POWER8)
+ select BR2_CPP
+ help
+ Project to build OCC
+
+if BR2_PACKAGE_OCC_P8
+
+config BR2_OCC_P8_BIN_FILENAME
+ string "Name of OCC P8 image file"
+ default "occ.bin"
+ help
+ String used to define name of the OCC binary image file
+
+endif
diff --git a/openpower/package/occ-p8/occ-p8.mk b/openpower/package/occ-p8/occ-p8.mk
new file mode 100644
index 0000000..7f64e59
--- /dev/null
+++ b/openpower/package/occ-p8/occ-p8.mk
@@ -0,0 +1,35 @@
+################################################################################
+#
+# occ for power8
+#
+################################################################################
+
+OCC_P8_VERSION ?= 28f2cec690b7f19548ce860a8820f519e6c39a6a
+OCC_P8_SITE ?= $(call github,open-power,occ,$(OCC_P8_VERSION))
+OCC_P8_LICENSE = Apache-2.0
+
+OCC_P8_LICENSE_FILES = src/LICENSE
+
+OCC_P8_INSTALL_IMAGES = YES
+OCC_P8_INSTALL_TARGET = NO
+
+OCC_P8_STAGING_DIR = $(STAGING_DIR)/occ
+
+OCC_P8_IMAGE_BIN_PATH = src/image.bin
+OCC_P8_DEPENDENCIES = host-binutils host-p8-pore-binutils
+
+define OCC_P8_BUILD_CMDS
+ cd $(@D)/src && \
+ make POREPATH=$(P8_PORE_BINUTILS_BIN)/bin/ OCC_OP_BUILD=1 CROSS_PREFIX=$(TARGET_CROSS) all && \
+ make tracehash && \
+ make combineImage
+endef
+
+OCC_P8_BUILD_CMDS ?= $(OCC_P8_BUILD_CMDS_P8)
+
+define OCC_P8_INSTALL_IMAGES_CMDS
+ mkdir -p $(STAGING_DIR)/occ
+ cp $(@D)/$(OCC_P8_IMAGE_BIN_PATH) $(OCC_P8_STAGING_DIR)/$(BR2_OCC_P8_BIN_FILENAME)
+endef
+
+$(eval $(generic-package))
diff --git a/openpower/package/occ/Config.in b/openpower/package/occ/Config.in
index a71f25d..2512e24 100644
--- a/openpower/package/occ/Config.in
+++ b/openpower/package/occ/Config.in
@@ -1,12 +1,15 @@
config BR2_PACKAGE_OCC
- bool "occ"
- default y if (BR2_OPENPOWER_PLATFORM)
+ bool "OCC (POWER9)"
+ default y if (BR2_OPENPOWER_PLATFORM && BR2_OPENPOWER_POWER9)
select BR2_CPP
help
Project to build OCC
+if BR2_PACKAGE_OCC
+
config BR2_OCC_BIN_FILENAME
- string "Name of OCC image file"
+ string "Name of OCC P9 image file"
+ default "occ.bin"
help
String used to define name of the OCC binary image file
@@ -22,3 +25,5 @@
help
String used to define name of the OCC GPUE GPE binary image file
+endif
+
diff --git a/openpower/package/occ/occ.mk b/openpower/package/occ/occ.mk
index e733af9..f6b27cf 100644
--- a/openpower/package/occ/occ.mk
+++ b/openpower/package/occ/occ.mk
@@ -1,58 +1,29 @@
################################################################################
#
-# occ
+# occ for POWER9
#
################################################################################
-OCC_VERSION_BRANCH_MASTER_P8 ?= 28f2cec690b7f19548ce860a8820f519e6c39a6a
-OCC_VERSION_BRANCH_MASTER ?= cd30b100eee09956a27b69f7893349451400e5ba
+OCC_VERSION ?= cd30b100eee09956a27b69f7893349451400e5ba
-OCC_VERSION ?= $(if $(BR2_OPENPOWER_POWER9),$(OCC_VERSION_BRANCH_MASTER),$(OCC_VERSION_BRANCH_MASTER_P8))
OCC_SITE ?= $(call github,open-power,occ,$(OCC_VERSION))
OCC_LICENSE = Apache-2.0
-OCC_LICENSE_FILES_P8 = src/LICENSE
-OCC_LICENSE_FILES_P9 = LICENSE
-OCC_LICENSE_FILES ?= $(if $(BR2_OPENPOWER_POWER9),$(OCC_LICENSE_FILES_P9),$(OCC_LICENSE_FILES_P8))
+OCC_LICENSE_FILES = LICENSE
OCC_INSTALL_IMAGES = YES
OCC_INSTALL_TARGET = NO
OCC_STAGING_DIR = $(STAGING_DIR)/occ
-OCC_IMAGE_BIN_PATH = $(if $(BR2_OPENPOWER_POWER9),obj/image.bin,src/image.bin)
+OCC_IMAGE_BIN_PATH = obj/image.bin
-OCC_DEPENDENCIES_P8 = host-binutils host-p8-pore-binutils
-OCC_DEPENDENCIES_P9 = host-binutils host-ppe42-gcc hostboot-binaries
+OCC_DEPENDENCIES = host-binutils host-ppe42-gcc
ifeq ($(BR2_OCC_GPU_BIN_BUILD),y)
- OCC_DEPENDENCIES_P9 += hostboot-binaries
+ OCC_DEPENDENCIES += hostboot-binaries
endif
-OCC_DEPENDENCIES ?= $(if $(BR2_OPENPOWER_POWER9),$(OCC_DEPENDENCIES_P9),$(OCC_DEPENDENCIES_P8))
-define OCC_APPLY_PATCHES
- if [ "$(BR2_OPENPOWER_POWER9)" == "y" ]; then \
- $(APPLY_PATCHES) $(@D) $(BR2_EXTERNAL_OP_BUILD_PATH)/package/occ/p9Patches \*.patch; \
- if [ -d $(BR2_EXTERNAL_OP_BUILD_PATH)/custom/patches/occ/p9Patches ]; then \
- $(APPLY_PATCHES) $(@D) $(BR2_EXTERNAL_OP_BUILD_PATH)/custom/patches/occ/p9Patches \*.patch; \
- fi; \
- fi; \
- if [ "$(BR2_OPENPOWER_POWER8)" == "y" ]; then \
- $(APPLY_PATCHES) $(@D) $(BR2_EXTERNAL_OP_BUILD_PATH)/package/occ/p8Patches \*.patch; \
- if [ -d $(BR2_EXTERNAL_OP_BUILD_PATH)/custom/patches/occ/p8Patches ]; then \
- $(APPLY_PATCHES) $(@D) $(BR2_EXTERNAL_OP_BUILD_PATH)/custom/patches/occ/p8Patches \*.patch; \
- fi; \
- fi;
-endef
-
-OCC_POST_PATCH_HOOKS += OCC_APPLY_PATCHES
-
-define OCC_BUILD_CMDS_P8
- cd $(@D)/src && \
- make POREPATH=$(P8_PORE_BINUTILS_BIN)/bin/ OCC_OP_BUILD=1 CROSS_PREFIX=$(TARGET_CROSS) all && \
- make tracehash && \
- make combineImage
-endef
-define OCC_BUILD_CMDS_P9
+define OCC_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; \
@@ -61,7 +32,7 @@
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))
+OCC_BUILD_CMDS ?= $(OCC_BUILD_CMDS_P9)
define OCC_INSTALL_IMAGES_CMDS
mkdir -p $(STAGING_DIR)/occ
diff --git a/openpower/package/openpower-mrw/Config.in b/openpower/package/openpower-mrw/Config.in
index 633e166..9e3b355 100644
--- a/openpower/package/openpower-mrw/Config.in
+++ b/openpower/package/openpower-mrw/Config.in
@@ -1,3 +1,3 @@
config BR2_PACKAGE_OPENPOWER_MRW
bool "Machine Readable Workbook (MRW) infrastructure"
- default y if BR2_PACKAGE_HOSTBOOT
+ default y if (BR2_PACKAGE_HOSTBOOT_P8 || BR2_PACKAGE_HOSTBOOT_P9)
diff --git a/openpower/package/openpower-pnor/Config.in b/openpower/package/openpower-pnor/Config.in
index 1c43735..836ef77 100644
--- a/openpower/package/openpower-pnor/Config.in
+++ b/openpower/package/openpower-pnor/Config.in
@@ -1,11 +1,13 @@
config BR2_PACKAGE_OPENPOWER_PNOR
bool "openpower_pnor"
default y if (BR2_OPENPOWER_PLATFORM)
- select BR2_PACKAGE_HOSTBOOT
+ select BR2_PACKAGE_HOSTBOOT if !BR2_OPENPOWER_POWER8
+ 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
+ select BR2_PACKAGE_OCC if !BR2_OPENPOWER_POWER8
+ 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
diff --git a/openpower/package/openpower-pnor/openpower-pnor.mk b/openpower/package/openpower-pnor/openpower-pnor.mk
index 4591d6f..cdbd5aa 100644
--- a/openpower/package/openpower-pnor/openpower-pnor.mk
+++ b/openpower/package/openpower-pnor/openpower-pnor.mk
@@ -9,7 +9,7 @@
OPENPOWER_PNOR_LICENSE = Apache-2.0
OPENPOWER_PNOR_LICENSE_FILES = LICENSE
-OPENPOWER_PNOR_DEPENDENCIES = hostboot hostboot-binaries machine-xml skiboot host-openpower-ffs occ capp-ucode
+OPENPOWER_PNOR_DEPENDENCIES = hostboot-binaries machine-xml skiboot host-openpower-ffs capp-ucode
ifeq ($(BR2_OPENPOWER_POWER9),y)
OPENPOWER_PNOR_DEPENDENCIES += hcode
@@ -82,7 +82,14 @@
# Subpackages we want to include in the version info (do not include openpower-pnor)
-OPENPOWER_VERSIONED_SUBPACKAGES = skiboot hostboot linux petitboot machine-xml occ hostboot-binaries capp-ucode
+OPENPOWER_VERSIONED_SUBPACKAGES = skiboot
+ifeq ($(BR2_PACKAGE_HOSTBOOT_P8),y)
+OPENPOWER_VERSIONED_SUBPACKAGES += hostboot-p8 occ-p8
+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
ifeq ($(BR2_OPENPOWER_POWER9),y)
@@ -90,6 +97,12 @@
OPENPOWER_VERSIONED_SUBPACKAGES += sbe hcode
endif
+ifeq ($(BR2_PACKAGE_OCC_P8),y)
+ OCC_BIN_FILENAME=$(BR2_OCC_P8_BIN_FILENAME)
+else
+ OCC_BIN_FILENAME=$(BR2_OCC_BIN_FILENAME)
+endif
+
define OPENPOWER_PNOR_INSTALL_IMAGES_CMDS
mkdir -p $(OPENPOWER_PNOR_SCRATCH_DIR)
@@ -106,7 +119,7 @@
-sbe_binary_dir $(SBE_BINARY_DIR) \
-sbec_binary_filename $(BR2_HOSTBOOT_BINARY_SBEC_FILENAME) \
-wink_binary_filename $(BR2_HOSTBOOT_BINARY_WINK_FILENAME) \
- -occ_binary_filename $(OCC_STAGING_DIR)/$(BR2_OCC_BIN_FILENAME) \
+ -occ_binary_filename $(OCC_STAGING_DIR)/$(OCC_BIN_FILENAME) \
-capp_binary_filename $(BINARIES_DIR)/$(BR2_CAPP_UCODE_BIN_FILENAME) \
-ima_catalog_binary_filename $(BINARIES_DIR)/$(BR2_IMA_CATALOG_FILENAME) \
-openpower_version_filename $(OPENPOWER_PNOR_VERSION_FILE) \
@@ -132,7 +145,7 @@
-sbe_binary_filename $(BR2_HOSTBOOT_BINARY_SBE_FILENAME) \
-sbec_binary_filename $(BR2_HOSTBOOT_BINARY_SBEC_FILENAME) \
-wink_binary_filename $(BR2_HOSTBOOT_BINARY_WINK_FILENAME) \
- -occ_binary_filename $(OCC_STAGING_DIR)/$(BR2_OCC_BIN_FILENAME) \
+ -occ_binary_filename $(OCC_STAGING_DIR)/$(OCC_BIN_FILENAME) \
-targeting_binary_filename $(BR2_OPENPOWER_TARGETING_ECC_FILENAME) \
-wofdata_binary_filename $(OPENPOWER_PNOR_SCRATCH_DIR)/$(BR2_WOFDATA_BINARY_FILENAME) \
-memddata_binary_filename $(OPENPOWER_PNOR_SCRATCH_DIR)/$(BR2_MEMDDATA_BINARY_FILENAME) \