This sections exposes how to configure LSE/OS. Basically there are two important files used for creating the LSE/OS image in the 'conf' directory:

There is a friendly tool for configuring these files for common use cases that is called, it requires to edit a file called 'config' located in the 'in' subdirectory.

Init.conf syntax
This file contains the drivers to be loaded by kernel (see bootstrap).

The parser recognizes quotes " to enclose whitespaces or even a special way of quoting with less_than and greater_than signs <> (for quoting macros output).

Sharp sign '#' is used for comments.

Basically the file is the list of programs to launch and a set of variable definitions.

The parser recognizes some configuration variables. It is possible to set them at any time in the file:

name            description             possible values     default values
----            -----------             ---------------     --------------
verbose         be verbose              on|off              off
trace           ltrace(2) programs      on|off              off
fs_gate         fs or vfs gate          a gate number       GATE_RAMFS
execve_bootfs   find progs on bootfs    on|off              on
execve_show_errmsg                      on|off              off
emulate_vfs     fs_gate is not a vfs    on|off              on
rt_malloc       real time malloc        on|off              on
share_binaries                          on|off              on
execve_nbstkpgs                         a number            16

Programs to be launched are specified in the following way:

cpu#  pl    stkpgs    sched   file                    args

-1      0       1       no      [internal]              npx
-1      3       1       no      /modules/sec            sec
-1      3       1       no      /modules/pic            pic
-1      3       1       no      /modules/notify         notify
-1      3       1       no      /modules/timer          timer

The first parameter 'cpu#' specifies the cpu where the task must start, -1 means any cpu.

The second parameter 'pl' specifies the ring where the task starts. Ring 0 means processor 'supervisor mode', ring 3 is the lowest 'user mode'. In most cases there are no reason choosing a ring other than 3. Note also that 'usermode' 'superuser' (uid 0) programs could create threads of ring 1 or 2 for interrupt handlers, so there are no *good* reason to launch a driver whith a ring of 2.

The third parameter 'stkpgs' is the number of stack pages to use for task, '1' is good for a driver. Other programs could wrap SIGSEGV to enlarge dynamically their stacks.

The 4th parameter 'sched' specifies if kernel has to wait the exit of the program before passing hand to the next task. If you specify 'yes', the kernel won't wait. If you specify 'no', the system will wait for the program to yield(0) before continuing. Please note it doesn't mean that the task could not be interrupted by interrupts (see also drivers).

The 5th parameter 'file' is the bootfs path of the program file. '[internal]' means that is a kernel internal and optional service.

The last parameters, from 6 to (MAXARGV-6) correspond to arguments passed to program starting from arg0.

Modules.list syntax
It is a simple list of files to be copied in boot file system. Sharp sign '#' is used for comments.

Config Syntax
This files is a list of macros that define which modules have to be copied and/or launched launched at bootstrap. Example:

#define USE_BOCHS

#define NEED_PIC
#define LAUNCH_PIC

#define NEED_TIMER

#define NEED_TTY
#define LAUNCH_TTY

#define NEED_PIPE

#define NEED_RAMFS



#define NEED_RC
#define NEED_RC_SH

#define NEED_SH
#define LAUNCH_SH

#define NEED_PROP


There are three kinds of macros:

It is possible to see the definition of those macros in the 'in/' and 'in/' template files.

For example, here is a minimal configuration that program the PIC (Programmable Interrupt Controller) and the timer controller and launch a standalone shell:

  Launch a simple stand-alone shell but no filesystem:
# define NEED_PIC
# define LAUNCH_PIC
# define NEED_TIMER
# define NEED_SASH
# define LAUNCH_SASH

Other configuration files
There are other configuration files that are used for TFTP configuration that willl be documented soon.