rainier_defconfig: Add multi-target support
Through OpenBMC and PLDM file.io, Power10 will support multiple MRW
definitions as part of one driver.
In order to achieve this in a staged approach, this commit introduces a
new 'openpower-pnor-p10' package that still creates the expected
pnor-related artifacts and intermediate files, while also creating the
individual files for each of the PNOR partitions (PAYLOAD, BOOTKERNEL)
inside the images/mmc directory. Each of those files will be suffixed
with ".P10" for target-agnostic files, or "uppercase-xml-name" (i.e.,
RAINIER_2U_XML) for target-specific files.
This patch also creates packages rainier-2u-xml and rainier-4u-xml(based
on machine-xml) that are both built and included in rainier_defconfig,
with rainier_2u_xml also serving as the 'legacy' pnor for smooth
transitions purposes.
Several other packages makefiles had to be reworked, but that should
allow both legacy openpower-pnor as well as the new mmc variant to build.
Signed-off-by: Klaus Heinrich Kiwi <klaus@linux.vnet.ibm.com>
diff --git a/openpower/package/sbe-p10/sbe-p10.mk b/openpower/package/sbe-p10/sbe-p10.mk
index 9ebe164..de85d15 100644
--- a/openpower/package/sbe-p10/sbe-p10.mk
+++ b/openpower/package/sbe-p10/sbe-p10.mk
@@ -19,6 +19,12 @@
SBE_P10_INSTALL_IMAGES = YES
SBE_P10_INSTALL_TARGET = NO
+ifeq ($(BR2_PACKAGE_OPENPOWER_PNOR_P10),y)
+BINARY_SBE_FILENAME=$(BR2_HOSTBOOT_P10_BINARY_SBE_FILENAME)
+else
+BINARY_SBE_FILENAME=$(BR2_HOSTBOOT_BINARY_SBE_FILENAME)
+endif
+
define SBE_P10_BUILD_CMDS
SBE_COMMIT_ID=$(SBE_P10_VERSION) $(MAKE) -C $(@D) \
LD_LIBRARY_PATH=$(HOST_DIR)/usr/lib \
@@ -28,7 +34,7 @@
define SBE_P10_INSTALL_IMAGES_CMDS
$(INSTALL) -D $(@D)/images/ipl_image_tool $(HOST_DIR)/usr/bin/
- python $(@D)/src/build/sbeOpDistribute.py --sbe_binary_dir=$(STAGING_DIR)/sbe_binaries --img_dir=$(@D)/images --sbe_binary_filename $(BR2_HOSTBOOT_BINARY_SBE_FILENAME)
+ python $(@D)/src/build/sbeOpDistribute.py --sbe_binary_dir=$(STAGING_DIR)/sbe_binaries --img_dir=$(@D)/images --sbe_binary_filename $(BINARY_SBE_FILENAME)
cp $(@D)/src/build/sbeOpDistribute.py $(STAGING_DIR)/sbe_binaries/
cp $(@D)/src/build/sbeOpToolsRegister.py $(STAGING_DIR)/sbe_binaries/
endef