ChorusOS 4.0 Production Guide

System Generation

This section describes the operations necessary to generate a standard system image of the ChorusOS operating system. Standard system generation builds a non-customized version of the operating system.

During the build you use two commands:

configure Command Parameters

You will use three parameters with the configure command:

  1. Use the -f option to choose the predefined profile for the PowerPC, ppc60x family (Table 2-1), such as;

    -f <src_dir>/nucleus/sys/ppc60x/ppc60x
    It selects the NUCLEUS source component which contains a definition of variables for the build.

  2. Use the -s option to select the ChorusOS source components to be included in the build of your system image (Table 2-2), such as;

    -s <src_dir>/nucleus/bsp/powerpc/genesis2 \
       <src_dir>/nucleus/bsp/powerpc \
       <src_dir>/nucleus/bsp/drv
    The components included determine the identity of the image. In this case, you have included the BSP, DRV and DRV_F components.

  3. Use the -b option to include binary components in your system image.

The configure command searches the directories specified by the -s and -b options for the Makefile.src and Makefile.bin files and any file corresponding to Makefile.*.src or Makefile.*.bin. The command displays each component as it adds it to the configuration. The configure command creates two files, Makefile and Paths in <work_dir>. These files are discussed later in this Chapter.

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.