ChorusOS 5.0 Source Delivery Guide

System Image Generation

A system image is created from components you have configured using the configure command. The system image is created automatically, in four stages:

  1. Selecting the System Image: Choose which of the configured components to include in your system. The system images are defined in:

    • The Makefile.bin file of the NUCLEUS component:

      source_dir/nucleus/sys/common/Makefile.bin

    • The conf directory:

      build_dir/conf/mkimage/mkimage.xml

    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:

      host% make system_image_name

    • Building all configured components in your work directory:

      host% make

    The make command automatically performs steps 2, 3 and 4.

  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 might 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 and the amount of new files being built. For the chorus system image, the make is as follows:

    host% make chorus
    
  3. Rebuilding the configurable components: If the configuration of the system has changed since the last make, some actors might need to be re-linked. The make command checks if any configurable actors require re-linking.

    Running obj/act/pmm/Makefile
    build_dir/build-DEVTOOLS/host/bin/configurator -c build_dir/conf/
    ChorusOS.xml 
    -action configure
    Running obj/act/sysdump/Makefile
    Running obj/dbg/Makefile
    Running obj/kern/Makefile
    Running obj/chorus.sbin/cinit/hrCtrl/Makefile
    Running obj/chorus.sbin/cinit/rshd/Makefile
    Running obj/sys/Makefile
    
  4. Building the System Image: Once the necessary actors have been re-linked, the make command calls mkimage. This generates the system image.

    Start mkdrv
    Finish mkdrv
    Start mkimage
      Brief log file: build_dir/image/RAM/chorus/log.brief
      Verbose log file: build_dir/image/RAM/chorus/log.verbose
      Layout file: build_dir/image/RAM/chorus/layout.xml
    Image file: build_dir/chorus.RAM
    Finish mkimage
    

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