The configure command creates two files, Makefile and Paths. The make command creates a directory for each component included in the system image, as well as a conf, obj and image directory. These files and directories are discussed in this section.
Table 2-3 lists the files and directories generated in your work directory by the configure and make commands.
Table 2-3 Files and Directories generated by the configure and make commandsFiles/Directories | Description |
Makefile | top level Makefile |
Paths | paths to the source or binary components |
conf/ | system configuration files |
obj/ | object files used by configurable actors |
image/ | image generation files |
build-NUCLEUS/ | build directory for nucleus |
build-DRV/ | build directory for generic drivers |
build-BSP/ | build directory for the board specific boot code |
build-DRV_F/ | build directory for the family specific drivers |
build-OS/ | build directory for the POSIX system |
build-IOM/ | build directory for the I/O manager |
The make command creates a build directory, in your work directory, for each component included in the system image created. In Table 2-3, there is a build directory for the NUCLEUS (build-NUCLEUS), generic drivers (build-DRV), board specific code (build-BSP), family specific drivers (DRV_F), operating system (build-OS) and I/O manager (build-IOM). Each build directory contains the binary code for the corresponding component.
The Paths file is created in your work directory by the configure command. For each source component, the Paths file defines two subdirectories, one located in <src_dir> and one in <work_dir>. For example, for the BSP component there is a BSP directory, which is the component source directory, and BSP_DIR, which is the directory where the component will be generated. For binary components, only one directory, that is the BSP_DIR directory, is defined.
... BSP= <src_dir>/nucleus/bsp/powerpc/genesis2 BSP_DIR= <work_dir>/build-BSP ...
The ChorusOS production environment will not modify any file outside of your work directory. This means that regardless of where the source directories of the BSP component are, they will be compiled in the build-BSP subdirectory of your work directory.
The Makefile produced by the configure command includes all the Makefiles for each component. View the Makefile.
all::DEVTOOLS.all PROFILE = -f <src_dir>/nucleus/sys/ppc60x/ppc60x include Paths include <src_dir>/nucleus/bsp/drv/src/Makefile.bin include <src_dir>/nucleus/bsp/drv/src/Makefile.src include <src_dir>/nucleus/bsp/powerpc/Makefile.bin include <src_dir>nucleus/bsp/powerpc/Makefile.src include <src_dir>/nucleus/bsp/powerpc/genesis2/Makefile.bin include <src_dir>/nucleus/bsp/powerpc/genesis2/Makefile.src include <src_dir>/os/Makefile.bin include <src_dir>/os/Makefile.src include <src_dir>/iom/Makefile.bin include <src_dir>/iom/Makefile.src include <bin_dir>/tools/Makefile.bin include <bin_dir>/tools/Makefile.CDS.bin include <src_dir>/nucleus/sys/common/Makefile.bin include <src_dir>/nucleus/sys/common/Makefile.src include <bin_dir>/tools/Makefile.CHSERVER.bin include <bin_dir>/tools/Makefile.CHTOOLS.bin COMPONENTS = DRV DRV_F BSP OS IOM DEVTOOLS NUCLEUS CDS CHSERVER CHTOOLS CLEAN = $(DRV_DIR) $(DRV_F_DIR) $(BSP_DIR) $(OS_DIR) $(IOM_DIR) $(NUCLEUS_DIR) clean:; rm -rf $(CLEAN) dist: DRV.dist DRV_F.dist BSP.dist OS.dist IOM.dist NUCLEUS.dist reconfigure: ; cd /<work_dir>; \ sh <bin_dir>/tools/host/bin/configure \ -f /<src_dir>/nucleus/ppc60x/ppc60x \ -s /<src_dir>/nucleus/bsp/drv /<src_dir>/nucleus/bsp/powerpc \ /<src_dir>/nucleus/bsp/powerpc/genesis2 /<src_dir>/os /<src_dir>/iom $(NEWCONF)
The clean, dist, reconfigure, all and root make targets may be present in Makefiles. They are discussed at the end of this Chapter in relation to the generation of the ChorusOS system image.
In the Makefile shown above, the all target is followed by :: which means you can have multiple update rules. You must use :: if the make command is to work. Note, also, the clean, dist and reconfigure targets in the Makefile shown here.
The top level Makefile of the work directory includes a Makefile.bin and a Makefile.src for each source component. You receive these files with your source delivery. This ensures the compatibility of components even if they are built using different development tools.
View the IOM Makefile.bin file for the IOM component, found in the <src_dir>/iom directory.
The output states that the component is the IOM component and gives a list of the components that must be present in the operating system if the IOM component is to work. In this case the OS and NUCLEUS components must be present.
The Makefile.src file is more complex than the Makefile.bin file, as it describes how the IOM component is compiled. The IOM component is compiled using the mkmk tool.
View the contents of the Makefile.src file for the IOM component, found in the <src_dir>/iom directory.
You are given the information:
This is an IOM component.
The IOM.all target is dependent on the DRV, NUCLEUS and OS components and on the DONE file.
The conf directory contains files which describe the ChorusOS current configuration. These files are expressed in XML. The details of XML files are provided in Chapter 7, XML Syntax.
ChorusOS.xml is the top level configuration file. It contains references to all other configuration files located in the conf directory, as explained in ChorusOS 4.0 Introduction. When building the ChorusOS operating system from the source code, XML configuration files are copied from the various component source files to the conf directory.
The obj directory contains all necessary configurable actors. For instance, the IOM component is compiled in the build-IOM directory. Its object files are copied to the build-IOM/obj directory and then linked in the obj directory.
The image directory is used during the creation of a system image. The information contained within this directory includes temporary files, log files, symbol tables, and relocated binary files.
If you have created your system image and do not need to manipulate your source delivery further, you will not need to continue reading this document.