This document describes the provided SOS framework. This is provided to make it easier for you to get started with the project. The source code itself should be reasonably well commented, and you should ensure that you understand the provided source code.
Note that the structure of the project and the build system are intimately linked. Although you are free to change the build system and layout of the project it is discouraged for the following reasons:
seL4
: This is the microkernel you will be developing your project on.
You don't have the
sources, and will not be using most of the interface directly, but you
should still understand
all of the basic concepts. Documentation is here.
om_server
: The object manager(OM) server is a server that starts your
operating system,
and provides an abstraction layer for seL4 memory and object management.
The library for this server
is provided in libs/sel4/libom_server
and the sources are
in apps/om_server
.
Documentation can be found here.
sos
: This is the stub operating system that you will build your project
from. The starting
configuration has one thread in one address space and contains
functional networking libraries.
tty_test
: This is the first application that sos
will run.We have provided a fairly comprehensive build system for you, however you will need to edit the Makefiles and Kconfig/Kbuild files throughout your project as you add new libraries and applications. For the most part you should be able to work out how to alter them.
The root Makefile builds all of the separate applications as separate
binaries. It then uses
a program called dite to link all of these binaries into one image,
bootimg.bin. All of the other
Makefiles are used to specify source and header file locations for each library
or application, which are then used
in the common.mk
general purpose Makefile.
The Kbuild/Kconfig files are used to manage dependencies and select libraries
and applications
for building. Whenever you change one of these files
you need to
make menuconfig
to pick up the changes.
Executables are setup in a similar way to libraries. sos
, tty_out
,
sosh
and om_server
are all applications. Applications are placed in the
apps directory. See milestone 7 for details
on how to add a new application.
Most of the code you will write will be in the sos
directory. Currently there is a very minimal operating system
implemented, which should help get you started. The following section
presents a brief overview of each file. Find more details in the source!
main.c
. On startup the following happens:
root_tcb
and root_address_space
that have
been set up by the om_server for sos.
tty_test
application).sys_morecore
used within SOS.network.c
handles setting up the network
device drivers and initialising hardware for you. It exports the single
network_init
function, which you should ensure is called on
startup. You will need to edit this file at some stage to enable the nfs
part of networking.All of the libraries are provided in the libs
directory.
Libraries depend on each
other, so the Kconfig file in the root of each library directory defines any
dependencies.
In order to add a new library, you need to do the following:
make menuconfig
to select your library and include it
in the build.
LIBS
list, and modifying the Kconfig depends on
line to include your library.So that you don't have to write everything from scratch, we provide you with some libraries to get you going. Some of the libraries are directly relevant to you, in that you will be implementing and extending them. Others are used by other components of the system, but you are free to investigate the source out of interest (or while debugging). All of the libraries are listed here with brief descriptions, in order of relevance to your project.