blob: 01c81d0964883f1debbede6e9bb7c7b0cc4b7587 [file] [log] [blame]
Brian Silver015b5912014-08-07 15:50:15 -05001################################################################################
2#
3# palmetto_xml
4#
5################################################################################
6
7PALMETTO_XML_VERSION = 7667c42a1a6097030564dcf06879b7ae66656e9a
8PALMETTO_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
17MRW_INSTALL_DIRECTORY=$(STAGING_DIR)/preprocessed_mrw
18MRW_HB_TOOLS=$(STAGING_DIR)/hostboot_build_images
19
20PALMETTO_XML_ENV_VARS= \
21 SCHEMA_FILE=$(MRW_SCRATCH)/schema/mrw.xsd \
22 PARSER_PATH=$(STAGING_DIR)/usr/bin \
23 XSL_PATH=$(MRW_SCRATCH)/xslt \
24 OUTPUT_PATH=$(MRW_INSTALL_DIRECTORY)
25
26define PALMETTO_XML_BUILD_CMDS
27 # copy the palmetto xml where the common lives
28 bash -c 'mkdir -p $(MRW_SCRATCH) && cp -r $(@D)/* $(MRW_SCRATCH)'
29 mkdir -p $(MRW_INSTALL_DIRECTORY)
30
31 # run the mrw parsers
32 $(PALMETTO_XML_ENV_VARS) bash -c 'cd $(MRW_SCRATCH) && $(MAKE) palmetto'
33
34 # generate the system mrm xml
35 $(MRW_HB_TOOLS)/genHwsvMrwXml.pl \
36 --system=$(BR2_OPENPOWER_CONFIG_NAME) \
37 --mrwdir=$(MRW_INSTALL_DIRECTORY) \
38 --build=hb > $(MRW_INSTALL_DIRECTORY)/$(BR2_PALMETTO_MRW_XML_FILENAME)
39
40endef
41
42define PALMETTO_XML_INSTALL_IMAGES_CMDS
43
44 # merge in any system specific attributes, hostboot attributes
45 $(MRW_HB_TOOLS)/mergexml.sh $(@D)/$(BR2_PALMETTO_SYSTEM_XML_FILENAME) \
46 $(MRW_HB_TOOLS)/attribute_types.xml \
47 $(MRW_HB_TOOLS)/attribute_types_hb.xml \
48 $(MRW_HB_TOOLS)/target_types_merged.xml \
49 $(MRW_HB_TOOLS)/target_types_hb.xml \
50 $(MRW_INSTALL_DIRECTORY)/$(BR2_PALMETTO_MRW_XML_FILENAME) > $(MRW_HB_TOOLS)/temporary_hb.hb.xml;
51
52 # creating the targeting binary
53 $(MRW_HB_TOOLS)/xmltohb.pl \
54 --hb-xml-file=$(MRW_HB_TOOLS)/temporary_hb.hb.xml \
55 --fapi-attributes-xml-file=$(MRW_HB_TOOLS)/fapiattrs.xml \
56 --src-output-dir=none \
57 --img-output-dir=$(MRW_HB_TOOLS)/ \
58 --vmm-consts-file=$(MRW_HB_TOOLS)/vmmconst.h --noshort-enums
59
60 mv $(MRW_HB_TOOLS)/targeting.bin $(MRW_HB_TOOLS)/$(BR2_OPENPOWER_TARGETING_BIN_FILENAME)
61endef
62
63$(eval $(generic-package))