blob: e165c138b950361a3b9f62db8e167c8ce5c8cd91 [file] [log] [blame]
Brian Silver015b5912014-08-07 15:50:15 -05001################################################################################
2#
3# palmetto_xml
4#
5################################################################################
6
Matt Ploetzed8800a2015-02-10 13:12:24 -06007PALMETTO_XML_VERSION = a3fc5ca767f0447a80442bbed70eec16f67fc7f4
Brian Silver015b5912014-08-07 15:50:15 -05008PALMETTO_XML_SITE = $(call github,open-power,palmetto-xml,$(PALMETTO_XML_VERSION))
9
10PALMETTO_XML_LICENSE = Apache-2.0
11PALMETTO_XML_DEPENDENCIES = hostboot-install-images openpower-mrw-install-images common-p8-xml-install-images
12
13PALMETTO_XML_INSTALL_IMAGES = YES
14PALMETTO_XML_INSTALL_TARGET = NO
15
16MRW_SCRATCH=$(STAGING_DIR)/openpower_mrw_scratch
Brian Silver015b5912014-08-07 15:50:15 -050017MRW_HB_TOOLS=$(STAGING_DIR)/hostboot_build_images
18
Brian Silver015b5912014-08-07 15:50:15 -050019define PALMETTO_XML_BUILD_CMDS
20 # copy the palmetto xml where the common lives
21 bash -c 'mkdir -p $(MRW_SCRATCH) && cp -r $(@D)/* $(MRW_SCRATCH)'
Brian Silver015b5912014-08-07 15:50:15 -050022
Matt Ploetzed8800a2015-02-10 13:12:24 -060023 # generate the system mrw xml
24 perl -I $(MRW_HB_TOOLS) \
25 $(MRW_HB_TOOLS)/processMrw.pl -x $(MRW_SCRATCH)/palmetto.xml
Brian Silver015b5912014-08-07 15:50:15 -050026endef
27
28define PALMETTO_XML_INSTALL_IMAGES_CMDS
29
30 # merge in any system specific attributes, hostboot attributes
Matt Ploetzed8800a2015-02-10 13:12:24 -060031 $(MRW_HB_TOOLS)/mergexml.sh $(MRW_SCRATCH)/$(BR2_PALMETTO_SYSTEM_XML_FILENAME) \
Brian Silver015b5912014-08-07 15:50:15 -050032 $(MRW_HB_TOOLS)/attribute_types.xml \
33 $(MRW_HB_TOOLS)/attribute_types_hb.xml \
34 $(MRW_HB_TOOLS)/target_types_merged.xml \
35 $(MRW_HB_TOOLS)/target_types_hb.xml \
Matt Ploetzed8800a2015-02-10 13:12:24 -060036 $(MRW_SCRATCH)/$(BR2_PALMETTO_MRW_XML_FILENAME) > $(MRW_HB_TOOLS)/temporary_hb.hb.xml;
Brian Silver015b5912014-08-07 15:50:15 -050037
38 # creating the targeting binary
39 $(MRW_HB_TOOLS)/xmltohb.pl \
40 --hb-xml-file=$(MRW_HB_TOOLS)/temporary_hb.hb.xml \
41 --fapi-attributes-xml-file=$(MRW_HB_TOOLS)/fapiattrs.xml \
42 --src-output-dir=none \
43 --img-output-dir=$(MRW_HB_TOOLS)/ \
44 --vmm-consts-file=$(MRW_HB_TOOLS)/vmmconst.h --noshort-enums
45
46 mv $(MRW_HB_TOOLS)/targeting.bin $(MRW_HB_TOOLS)/$(BR2_OPENPOWER_TARGETING_BIN_FILENAME)
47endef
48
49$(eval $(generic-package))