ChorusOS 5.0 Source Delivery 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 OS component contains:

OS_XML = os.xml sys_rule.xml sys_action.xml cinit.xml cinit_action.xml 
hrCtrl.xm
l hrCtrl_action.xml
OS_SYSADM = sysadm.ini


xml:: DEVTOOLS.all $(OS_DIR)/exports.lst
    @sh $(DEVTOOLS_DIR)/cpxml $(BUILD_DIR)/conf/mkconfig $(OS_DIR)/conf/
    mkconfig $(OS_XML)
    @sh $(DEVTOOLS_DIR)/cpxml $(BUILD_DIR)/conf $(OS_DIR)/conf $(OS_SYSADM)
    @sh $(DEVTOOLS_DIR)/cpxml $(OS_DIR) $(OS) Makefile.bin

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