ChorusOS 4.0 Production Guide

The make Command

A system image is created from components which you have configured using the configure command. Even though you type a single command, make, the system image is created over four steps, to produce the binary files corresponding to the source components.

  1. Selection of the System Image: Choose which of the configured components you will include in your sytem. By changing the components included, you alter the resultant system. The system images are defined in:

    • The Makefile.bin file of the NUCLEUS component:

      <src_dir>/nucleus/sys/Makefile.bin

    • The conf directory:

      <work_dir>/conf/mkimage/mkimage.xml
      The conf directory is discussed in the next section of this Chapter. Once you have selected your system image, you can use the make command in two ways to build your system image:

    • Referencing the system image name:

      make <system image_name>

    • Building all configured components in your work directory:

      make build

    The make command automatically performs the next three steps as shown here.

  2. Compilation: The default action of make is to compile everything in your work directory, but not to produce a bootable system image. This is because configure may be used to build components which are not directly related to ChorusOS systems.

    Compilation can last from 5 minutes to more than an hour, depending on the host you are using. For the chorus system image, the make build output includes:

         sh <work_dir>/build-NUCLEUS/mkbuild chorus
  3. Rebuilding the Configurable Components: If the configuration of the system has been changed since the last time the make command was run, using the ews GUI tool or the configurator command, then some actors may need to be relinked. The make command checks if any configurable actors need to be relinked.

    Running obj/act/pmm/Makefile
        <bin_dir>/tools/host/bin/configurator 
        -c /<work_dir>/conf/ChorusOS.xml -action configure
        Running obj/dbg/Makefile
        Running obj/kern/Makefile
        Running obj/os/admin/sys/Makefile
        Running obj/os/am/sys/Makefile
        Running obj/os/cinit/ftpd/Makefile
        Running obj/os/cinit/hrCtrl/Makefile
        Running obj/os/cinit/rshd/Makefile
        Running obj/os/cinit/teld/Makefile
        Running obj/os/iom/sys/Makefile
    
  4. Building of the System Image: Once the necessary actors have been relinked, the make command calls mkimage. This produces the system image.

    Start mkimage
        Brief log file: /<work_dir>/image/RAM/chorus/log.brief
        Verbose log file: /<work_dir>/image/RAM/chorus/log.verbose
        Layout file: /<work_dir>/image/RAM/chorus/layout.xml
        Image file: /<work-dir>/chorus.RAM 
        Finish mkimage
    

    Once you have built your system image, the work directory contains a build directory for each source component you have included in the build.