teaser

How to get started with STOS ?

Clone the student repository

$ git clone git://git.lse.epita.fr/stos-student

Build STOS

$ mkdir build && cd build
$ ../configure --arch=i386
$ make
$ make bootable # just for the first time
  • stos-config file contains the module list
  • make bootable is a bit hacky and racy, if nothing come out of the first launch, it is probably because it has failed.

Running STOS

$ qemu-system-x86_64 -nographic \
		-monitor pty \
		-serial stdio \
		-serial pty \
		stos-i386-pc.boot

How to debug STOS with Qemu and gdb ?

In order to activate remote debugging of your Qemu virtual machine, you can activate the gdb stub of Qemu with the -s switch (or with -gdb). You can also stop the VM from starting anything with -S.

With this option, you can now connect with gdb to your vm:

build$ gdb kernel/stos
(gdb) target remote localhost:1234

But with that, gdb “sees” only the stos core code. You can’t place any breakpoint on modules for example.

In order to be able to see something, you have 2 choices:

  • use add-symbol-file and the module list in order to load the elf of your module correclty.
  • Compile every modules of stos in static.

In order to compile your modules in static, you have to change M by K in your $BUILD/stos-config.