Subsections

3 How to build DROPS

3.1 Downloading and Unpacking

The source code of the DROPS packages and the tools can be obtained from http://tudos.org/drops/download.html as tar-balls or via remote-CVS - see download instructions at this web page. Put all the tar-balls into one directory and unpack them.

If you are at the Dresden OS group, you can use the CVS repository at /home/cvs. You can also use the installed components at /home/drops. Check out the components you want to compile on your own. Additionally, you need the BID macros at L4DIR/mk, the Makefile at L4DIR. If you want to compile DROPS packages, you should also check out the Makefile at L4DIR/pkg. Before building a package you need to config your environment and target platform (see Section 3.3). For this, you need the config and gendep tools from the L4DIR/tool directory. Most packages use IDL to specify their interfaces. To compile the IDLs you need our IDL compiler dice also in the L4DIR/tool directory. We set up some CVS modules, please see the aforementioned download page for details.

3.2 OS requirements

The following external compilers and tools which are not part of the DROPS distribution are required:


Table 2: Required build tools
tool supported versions
GNU C 3.x
GNU make $\geq$ 3.77
Binutils $\geq$ 2.13.90
GNU bash $\geq$ 2.05
GNU find  
awk posix compatible
GNU sed  
GNU perl $\geq$ 5.6.1
flex  
byacc / bison  
Doxygen (recommended) $\geq$ 1.2.15
autoconf $\geq$ 2.59
automake $\geq$ 1.4
ncurses-dev(el)  
python-curses  


We have tested DROPS with various versions of the GNU tools, but cannot give a guarantee that it works with the versions installed on your system. If you encounter a problem and cannot use the versions mentioned in table 2, contact us and we will try to solve the issue.


3.3 Configuring

Prior to compilation, you must configure the DROPS environment. Go into your L4DIR directory. If you uncompressed the tar-balls, this should be l4/. A

l4/> make config

starts an interactive configuration tool. You should at least adapt the DROPS_STDDIR setting at ``Paths and Directories'', as this is the directory where the components will be installed on a make install.

The default values meet most peoples requirements. Thus, instead of doing the interactive configuration, you can also configure non-interactively. Set the environment variable DROPS_STDDIR and use the make-target oldconfig:

l4/> DROPS_STDDIR=yourdir make oldconfig

If you are at Dresden OS group, a ``make oldconfig'' should do it.

3.4 Compilation

3.4.1 The Easy way

After configuring, go to the L4DIR directory and do a

l4/> make

This builds everything available as sources: the tools, C libraries, Fiasco micro-kernel and the DROPS packages. It also builds the documentation.

To install the things into DROPS_STDDIR (and obtain the same setup as we have at Dresden), do a

l4/> make install

3.4.2 Doing it separately

If you want to restart the build process, e.g. after editing some source files, you do not have to build everything again. Here is what the Makefile in L4DIR does.

  1. DROPS tools in L4DIR/tool
    cd l4/tool ; make
    
  2. L$\!^4$Linux v2.2 (if available)
    cd linux22 ; make -f Makefile.drops
    
  3. Fiasco micro-kernel
    cd l4/kernel ; make
    
  4. DROPS packages
    cd l4/pkg ; make
    
  5. DROPS package and tool documentation
    cd l4/pkg ; make doc
    cd l4/doc/html ; make doc
    cd l4/tool; make doc
    

Generally, you can build the DROPS packages and tools separately, i.e., you can switch into the directory of a specific DROPS package or tool and issue the make command there. See Section 3.4.3 for details.

Note, although the makefile in L4DIR builds the documentation per default, the called sub-makefiles only build the documentation when doc is explicitly mentioned as a target on the cmdline.


3.4.3 Sub-makefiles and Sub-tree consistency

The DROPS build system allows to bring a subtree in a properly built state by issuing make at the top of that subtree. Make generally not builds things upwards in the directory hierarchy.

This is true for everything below L4DIR. An exception is L$\!^4$Linux, which has its own build system. L4DIR, serving as the project root directory, is the other exception, as it integrates the external components.

As a consequence, a make issued within a package X cannot help you building other packages X may depend on. Or, if you are within the server/ directory of a package, make does not rebuild the lib/ directory of that package. In these cases, you have to issue the make upwards the directory hierarchy.

As another consequence, you can be sure that make does not change your file-system outside the current subtree. Exceptions are the installation directories L4DIR/bin, L4DIR/lib, L4DIR/include and L4DIR/doc.

3.4.4 Dependencies

The DROPS build system automatically detects source code dependencies by intercepting the file system calls during compilation. This turned out the be both a robust and general solution.

It is generally not necessary to enforce rebuilding of DROPS source code, e.g. by doing a make clean followed by a make. A make rebuilds the depending files reliably, be it within one DROPS package, across DROPS packages or code of external components such as the C library.

L4 Checker 2012-04-11