ChorusOS 4.0 Production Guide

Recompilation of a Source File

Recompile a source file, for example pathName.C, by removing the object file, <work_dir>/build-IOM/src/os/iom/sys/sys/lib/mem/pathName.o and running the make command. You get a very long output which includes the following:

host% rm <work_dir>/build-IOM/src/os/iom/sys/sys/lib/mem/pathName.o
host% make
>> In src/os/iom/sys/sys/lib/mem prod
    	...
     CC pathName.C
    	...
     ar -> mem.a
     ...
     sh <bin_dir>/tools/host/bin//../../tgt-make/genLink \
     <work_dir>/build-NUCLEUS/ <work_dir> -r -c -e _start -o N_iom.r -B \
     ...<work_dir>/build-NUCLEUS/lib/classix/libsys.s.a
     
     <bin_dir>/tools/host/bin/configurator \
     -c <work_dir>/conf/ChorusOS.xml -action configure
       
     <bin_dir>/tools/powerpc/solaris/5.00/powerpc-elf/bin/gcc \
     ...
     bsd/kern/vfs/vfs_vnops.o \
     ...
     <bin_dir>/tools/host/bin/mkctors -T <work_dir>/obj/os/iom/sys/tunables.k \
     <work_dir>/obj/os/iom/sys/N_iom.r.xpO > <work_dir>/obj/os/iom/sys/N_iom.r.CT.s
     <bin_dir>/tools/powerpc/solaris/5.00/powerpc-elf/bin/gcc
     ...
     <work_dir>/obj/os/iom/sys/N_iom.r.CT.o
     ...
     <bin_dir>/tools/powerpc/solaris/5.00/powerpc-elf/bin/gcc
     ...
     <work_dir>/obj/os/iom/sys/N_iom.r.CT.o
     ...

Look at this output as occurring in several steps.

  1. For step 1:

        ...
         >> In src/os/iom/sys/sys/lib/mem prod
        	...
         CC pathName.C
        	...
         ar -> mem.a
         ...

    The <work_dir>/build-IOM/src/os/iom/sys/sys/lib/mem directory builds a library used during the IOM link. The object file is generated, the library is updated, and the mkmake command continues.

  2. For step 2:

          ...
          sh <bin_dir>/tools/host/bin//../../tgt-make/genLink \
          <work_dir>/build-NUCLEUS/ <work_dir> -r -c -e _start -o N_iom.r -B \
          ...<work_dir>/build-NUCLEUS/lib/classix/libsys.s.a
    

    The linked actor is copied back to the source directory.

  3. Step 3 calls the configurator command:

         <bin_dir>/tools/host/bin/configurator \
         -c <work_dir>/conf/ChorusOS.xml -action configure
    

    This gets the IOM configuration settings from the XML configuration file.

  4. The last step is the link itself.

     <bin_dir>/tools/powerpc/solaris/5.00/powerpc-elf/bin/gcc    ...
     bsd/kern/vfs/vfs_vnops.o \...
     <bin_dir>/tools/host/bin/mkctors -T <work_dir>/obj/os/iom/sys/tunables.k \
     <work_dir>/obj/os/iom/sys/N_iom.r.xpO > <work_dir>/obj/os/iom/sys/N_iom.r.CT.s
     <bin_dir>/tools/powerpc/solaris/5.00/powerpc-elf/bin/gcc
     ...
     <work_dir>/obj/os/iom/sys/N_iom.r.CT.o
     ...
     <bin_dir>/tools/powerpc/solaris/5.00/powerpc-elf/bin/gcc
     ...
     <work_dir>/obj/os/iom/sys/N_iom.r.CT.o
     ...
    

    This is done after several loops of gcc, and a call to mkctors, in order to set the values of the tunable parameters.