ChorusOS 4.0 Production Guide

Adding a New XML File

XML files used during ChorusOS system generation are copied to the conf directory, so that they can be modified using the configurator command or the ews graphical tool. A component that adds new XML files must have rules to execute these files in its Makefile.bin file. For instance, the Makefile.bin of the IOM component contains:

IOM_XML = iom.xml iom_rule.xml iom_action.xml

xml:: DEVTOOLS.all $(IOM_DIR)/exports.lst
sh $(DEVTOOLS_DIR)/cpxml $(BUILD_DIR)/conf/mkconfig $(IOM_DIR)/conf/mkconfig $(IOM_XML)

In this example, the XML files have to be copied from the IOM merged tree, so the XML target depends on $(IOM_DIR)/exports.lst (which is produced by mkmerge during the IOM merge). The cpxml command acts as a wrapper around cp.

The conf/ChorusOS.xml file includes, directly or indirectly, all the XML files used during the ChorusOS system generation. This file is generated automatically. As the inclusion order of XML files is important, the generation of conf/ChorusOS.xml uses the XML0, XML1, XML2 and XML3 make variables in that order. In other words, files in XML0 are included in ChorusOS.xml, before files in XML1.

For instance, the Makefile.bin of the IOM component contains:

XML3 += mkconfig/iom.xml

For further information on XML files, see Chapter 7, XML Syntax.