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/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) \