Subsections


6.5 Modes

The following modes are defined:

tiny Minimal environment. Includes basic libc functionality from one of the C libraries selected and utility functions.    
sigma0 Minimal L4 environment. Includes basic libc functionality like tiny mode but additionally links log and names libraries.    
l4env Default mode to build L4Env applications. Sets appropriate include and library paths. Also links against the L4Env libraries. I/O output is printed to log.    
l4env_minimal l4env mode with just write(1, ...) as I/O backend.    
l4env_base l4env mode with the libc backends: basic_io, basic_mmap, mmap_util, syslog, simple_sleep, time, file_table.    
libc Rather internal mode to compile C libraries    
host Build an application for the host operating system.    
l4linux Build hybrid applications for L$^4~$Linux, which are normal Linux applications, but are also linked against L4Env libraries.    

Deprecated modes: l4linux_kern, l4env_oskit06, l4env_oskit10, l4env_freebsd, loader, sigma0_oskit06, oskit10_sigma0,

The mode specifies which standard C library and header files are being used, which objects for startup-code (CRT0), end-/marker-code (CRTN) are being linked and which linker scripts are used for all this. See Tables 6, 7, 8, 9, 10, 11, and 12 for what is determined by each mode. See Section 8.2 and Section 8.3 for the meaning of the variables.


Table 6: Directories for include file search depending on the mode for dietlibc.
Mode $LIBCINCDIR
l4env -nostdinc -DUSE_DIETLIBC=y -I{ $(L4DIR)/include/dietlibc $(DROPS_STDDIR)/include/dietlibc $(GCCINCDIR) }
l4env_minimal -nostdinc -DUSE_DIETLIBC=y -I{ $(L4DIR)/include/dietlibc $(DROPS_STDDIR)/include/dietlibc $(GCCINCDIR) }
l4env_base -nostdinc -I{ $(L4DIR)/include/dietlibc $(DROPS_STDDIR)/include/dietlibc $(GCCINCDIR) }
tiny -nostdinc -DUSE_DIETLIBC=y -I{ $(L4DIR)/include/dietlibc $(DROPS_STDDIR)/include/dietlibc $(GCCINCDIR) }
sigma0 -nostdinc -DUSE_DIETLIBC=y -I{ $(L4DIR)/include/dietlibc $(DROPS_STDDIR)/include/dietlibc $(GCCINCDIR) }
libc -nostdinc -I{ $(GCCINCDIR) $(L4DIR)/include/dietlibc $(DROPS_STDDIR)/include/dietlibc }
host -
l4linux -I$(GCCINCDIR)



Table 7: Directories for include file search depending on the mode for uclibc.
Mode $LIBCINCDIR
l4env -nostdinc -I{ $(L4DIR)/include/{x86, arm, amd64}/uclibc $(L4DIR)/include/uclibc $(L4DIR)/include/uclibc++ $(DROPS_STDDIR)/include/{x86, arm, amd64}/uclibc $(DROPS_STDDIR)/include/uclibc $(DROPS_STDDIR)/include/uclibc++ $(GCCINCDIR) }
l4env_minimal -nostdinc -I{ $(L4DIR)/include/{x86, arm, amd64}/uclibc $(L4DIR)/include/uclibc $(L4DIR)/include/uclibc++ $(DROPS_STDDIR)/include/{x86, arm, amd64}/uclibc $(DROPS_STDDIR)/include/uclibc $(DROPS_STDDIR)/include/uclibc++ $(GCCINCDIR) }
l4env_base -nostdinc -I{ $(L4DIR)/include/{x86, arm, amd64}/uclibc $(L4DIR)/include/uclibc $(L4DIR)/include/uclibc++ $(DROPS_STDDIR)/include/{x86, arm, amd64}/uclibc $(DROPS_STDDIR)/include/uclibc $(DROPS_STDDIR)/include/uclibc++ $(GCCINCDIR) }
tiny -nostdinc -I{ $(L4DIR)/include/{x86, arm, amd64}/uclibc $(L4DIR)/include/uclibc $(L4DIR)/include/uclibc++ $(DROPS_STDDIR)/include/{x86, arm, amd64}/uclibc $(DROPS_STDDIR)/include/uclibc $(DROPS_STDDIR)/include/uclibc++ $(GCCINCDIR) }
sigma0 -nostdinc -I{ $(L4DIR)/include/{x86, arm, amd64}/uclibc $(L4DIR)/include/uclibc $(L4DIR)/include/uclibc++ $(DROPS_STDDIR)/include/{x86, arm, amd64}/uclibc $(DROPS_STDDIR)/include/uclibc $(DROPS_STDDIR)/include/uclibc++ $(GCCINCDIR) }
libc -nostdinc -I{ $(GCCINCDIR) $(L4DIR)/include/dietlibc $(DROPS_STDDIR)/include/dietlibc }
host -
l4linux -I$(GCCINCDIR)



Table 8: Directories for library path search depending on the mode.
Mode $LIBCLIBDIR
l4env -
l4env_minimal -
l4env_base -
tiny -
sigma0 -
libc -
host -
l4linux -



Table 9: Standard libc-libraries of dietlibc depending on the mode.
Mode $LIBCLIBS
l4env -nostdlib $(GCCLDNOSTDLIB) $(DIETLIBC_IMPLEMENTATION) -ldietlibc_support $(MALLOC_BACKEND) -lc_be_mmap -lc_be_mmap_util -lc_be_l4env_start_stop -lc_be_minimal_log_io -ldiet_be_simple_sleep -ll4env -llogserver_capsule -ll4rm -ldm_generic -ldm_mem -lthread -lgeneric_ts $(DIETLIBC_IMPLEMENTATION) $(GCCLIB) $(DIETLIBC_IMPLEMENTATION) -ll4sys
l4env_minimal -nostdlib $(GCCLDNOSTDLIB) $(MALLOC_BACKEND) $(DIETLIBC_IMPLEMENTATION) -lc_be_l4env_start_stop -lgeneric_ts -lc_be_minimal_log_io -lc_be_mmap_util $(MALLOC_BACKEND) -lc_be_mmap -lc_be_mmap_util -ll4rm -ldm_mem -ldm_generic -lthread -lsemaphore -ll4env -ll4env_err -lslab -llogserver_capsule -ll4rm -lthread -ldm_generic -lnames -ll4util_root -ll4util -lsigma0 $(DIETLIBC_IMPLEMENTATION) $(GCCLIB) $(DIETLIBC_IMPLEMENTATION) -lc_be_l4env_start_stop -ll4sys
l4env_base -nostdlib $(GCCLDNOSTDLIB) -u printf -lc_be_io.o $(MALLOC_BACKEND) -lc_be_time -lrtc -ll4rm -ldm_mem -ldm_generic -lthread -lsemaphore -ll4env -ll4env_err -lslab -llogserver_capsule -ll4rm -lthread -ldm_generic -lnames -ll4util_root -ll4util -lsigma0 $(DIETLIBC_IMPLEMENTATION) $(GCCLIB) $(DIETLIBC_IMPLEMENTATION) $(MALLOC_BACKEND) -ll4rm -ldm_mem -ldm_generic -lc_be_time -lc_be_mmap -lc_be_mmap_util -lc_be_l4env_start_stop -lgeneric_ts -lc_be_syslog -lc_be_file-table -ldiet_be_simple_sleep -ll4vfs_common_io -ll4vfs_basic_io -ll4vfs_connection -ll4vfs_basic_name_server -ll4vfs_name_server -ll4vfs_name_space_provider -ll4vfs_extendable
tiny -nostdlib $(GCCLDNOSTDLIB) -ldiet_c -ldietlibc_support -ldiet_be_minimal_io -ldiet_be_l4_start_stop -ldiet_be_sigma0_mem -ldiet_c -ll4util -lsigma0 -ldiet_c $(GCCLIB) -ldiet_c -ll4sys
sigma0 -nostdlib $(GCCLDNOSTDLIB) -ldiet_c -ldietlibc_support -ldiet_be_minimal_io -ldiet_be_l4_start_stop -ldiet_be_sigma0_mem -ldiet_c -llogserver -lnames -lsigma0 -ll4util_root -ll4util $(ROOTLIB) -ldiet_c $(GCCLIB) -ldiet_c -ll4sys
libc -nostdlib $(GCCLDNOSTDLIB) -ldiet_c $(LIBCBACKEND_LIB) $(GCCLIB) -ldiet_c
host -
l4linux -ldm_generic -ldm_mem -lnames -ll4util_root -ll4util $(ROOTLIB) -lloaderif -ll4env -ll4env_err -lslab -ll4sys



Table 10: Standard libc-libraries of uclibc depending on the mode.
Mode $LIBCLIBS
l4env -nostdlib $(GCCLDNOSTDLIB) $(UCLIBC_IMPLEMENTATION) -luclibc_support $(MALLOC_BACKEND) -lc_be_mmap -lc_be_mmap_util -lc_be_l4env_start_stop -lc_be_minimal_log_io -luc_be_simple_sleep -ll4env -llogserver_capsule -ll4rm -ldm_generic -ldm_mem -lthread -lgeneric_ts $(UCLIBC_IMPLEMENTATION) $(GCCLIB) $(UCLIBC_IMPLEMENTATION) -ll4sys
l4env_minimal -nostdlib $(GCCLDNOSTDLIB) $(MALLOC_BACKEND) $(UCLIBC_IMPLEMENTATION) -lc_be_l4env_start_stop -lgeneric_ts -lc_be_minimal_log_io -lc_be_mmap_util $(MALLOC_BACKEND) -lc_be_mmap -lc_be_mmap_util -ll4rm -ldm_mem -ldm_generic -lthread -lsemaphore -ll4env -ll4env_err -lslab -llogserver_capsule -ll4rm -lthread -ldm_generic -lnames -ll4util_root -ll4util -lsigma0 $(UCLIBC_IMPLEMENTATION) $(GCCLIB) $(UCLIBC_IMPLEMENTATION) -lc_be_l4env_start_stop -luclibc_support -ll4sys
l4env_base -nostdlib $(GCCLDNOSTDLIB) -u printf -lc_be_io.o $(MALLOC_BACKEND) -lc_be_time -lrtc -ll4rm -ldm_mem -ldm_generic -lthread -lsemaphore -ll4env -ll4env_err -lslab -llogserver_capsule -ll4rm -lthread -ldm_generic -lnames -ll4util_root -ll4util -lsigma0 $(UCLIBC_IMPLEMENTATION) $(GCCLIB) $(UCLIBC_IMPLEMENTATION) $(MALLOC_BACKEND) -ll4rm -ldm_mem -ldm_generic -lc_be_time -lc_be_mmap -lc_be_mmap_util -lc_be_l4env_start_stop -lgeneric_ts -lc_be_syslog -lc_be_file-table -luc_be_simple_sleep -ll4vfs_common_io -ll4vfs_basic_io -ll4vfs_connection -ll4vfs_basic_name_server -ll4vfs_name_server -ll4vfs_name_space_provider -ll4vfs_extendable -ll4sys
tiny -nostdlib $(GCCLDNOSTDLIB) -luc_c -luc_be_minimal_io -luc_be_l4_start_stop -luc_be_sigma0_mem -luc_c -luclibc_support -ll4util -lsigma0 -luc_c $(GCCLIB) -luc_c -ll4sys
sigma0 -nostdlib $(GCCLDNOSTDLIB) -luc_c -luc_be_minimal_io -luc_be_l4_start_stop -luc_be_sigma0_mem -luc_c -luclibc_support -llogserver -lnames -lsigma0 -ll4util_root -ll4util $(ROOTLIB) -luc_c $(GCCLIB) -luc_c -ll4sys
libc -nostdlib $(GCCLDNOSTDLIB) -ldiet_c $(LIBCBACKEND_LIB) $(GCCLIB) -ldiet_c
host -
l4linux -ldm_generic -ldm_mem -lnames -ll4util_root -ll4util $(ROOTLIB) -lloaderif -ll4env -ll4env_err -lslab -ll4sys



Table 11: L4 libraries to be linked depending on the mode.
Mode $L4LIBS
l4env -static -lgeneric_ts -ll4env -ll4rm -ldm_generic -ldm_mem -lthread -lsemaphore -llogserver_capsule -lnames -ll4util_root -ll4util -lsigma0 $(ROOTLIB) -ll4env -ll4env_err -ll4rm -ldm_generic -ldm_mem -lthread -lslab -ll4sys
l4env_minimal -static -ll4rm -ldm_mem -ldm_generic -lthread -lsemaphore -ll4env -ll4env_err -lslab -llogserver_capsule -ll4rm -lthread -ldm_generic -lnames -ll4util_root -ll4util -lsigma0 $(ROOTLIB) -ll4sys
l4env_base -static -ll4rm -ldm_mem -ldm_generic -lthread -lsemaphore -ll4env -ll4env_err -lslab -llogserver_capsule -ll4rm -lthread -ldm_generic -lnames -ll4util_root -ll4util -lsigma0 $(ROOTLIB) -ll4sys
tiny -static -lmain -ll4util -ll4sys
sigma0 -static -lmain -lnames -llogserver -ll4util_root -ll4util -ll4sys
libc -
host -
l4linux -



Table 12: Startup code (CRT0) and linker scripts depending on the mode.
Mode $CRT0 $LDSCRIPT
l4env crt0.o main_stat.ld
l4env_minimal crt0.o main_stat.ld
l4env_base crt0.o main_stat.ld
tiny crt0.o main_stat.ld
sigma0 crt0.o main_stat.ld
libc crt0.o main_stat.ld
host - -
l4linux - -


Examples

Examples for the various modes can be found within the following packages:

sigma0
names: library
host
names: lister example
l4env
con: library and server

L4 Checker 2012-04-11