An experiment with implementation of very simple operating system for Malta board
Clone or download
cahirwpz Build system rewrite (#488)
* Simplify build process
* Merge some makefile fragments
Latest commit d407b03 Dec 7, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Specify clang-format version in Makefile (#471) Oct 24, 2018
bin Build system rewrite (#488) Dec 7, 2018
build Build system rewrite (#488) Dec 7, 2018
debug Reverse thread priority meaning (#479) Dec 3, 2018
drv Build system rewrite (#488) Dec 7, 2018
include Better kernel oops handling (#486) Dec 6, 2018
launcher Improve debugging experience. Jul 17, 2018
lib Build system rewrite (#488) Dec 7, 2018
mips Build system rewrite (#488) Dec 7, 2018
script graph visualisation of system initialization process (#341) May 25, 2017
stdc Build system rewrite (#488) Dec 7, 2018
sys Build system rewrite (#488) Dec 7, 2018
tests Build system rewrite (#488) Dec 7, 2018
toolchain Switch kernel development to patched QEMU 2.12.0. Jul 11, 2018
.ackrc Build system rewrite (#488) Dec 7, 2018
.clang-format cv_wait accepts both mutex and spinlock Jul 27, 2018
.clang_complete Improved emacs integration Oct 6, 2016
.gdbinit.template Make it easier to start debugging user-space programs. Jul 27, 2018
.gitignore Build system rewrite (#488) Dec 7, 2018
.gitmodules Split user directory into bin & lib (#487) Dec 6, 2018
.taghl_config Minor usability improvements for Vim fans. Jul 13, 2018
.ycm_extra_conf.py Add .ycm_extra_conf.py Jul 18, 2016
CONTRIBUTORS.md Add contributors file. May 26, 2017
LICENSE Switch to (equivalent) BSD license. Change copyright owner to Univers… May 22, 2017
Makefile Build system rewrite (#488) Dec 7, 2018
README.md Moved missing documentation to mimiker server (fix #466) Nov 22, 2018
launch Fix PEP8 errors and warnings. (#349) May 25, 2017
run_tests.py Improve debugging experience. Jul 17, 2018
verify-format.sh Enforce PEP8 code style (#347) May 25, 2017
verify-pep8.sh Debugging framework improvements (#400) Jul 8, 2017

README.md

Mimiker: MIPS Micro-Kernel

An experiment with implementation of very simple operating system for Malta board.

Toolchain

To build Mimiker you will need a custom MIPS toolchain we use. You can download a binary debian package from here. It installs into /opt, so you'll need to add /opt/mipsel-mimiker-elf/bin to your PATH.

Otherwise, if you prefer to build the toolchain on your own, download crosstool-ng which we use for configuring the toolchain. You can get it from here. Then:

cd toolchain/mips/
ct-ng build

By default, this will build and install the mipsel-mimiker-elf toolchain to ~/local. Update your $PATH so that it provides mipsel-mimiker-elf-*, i.e. unless you've changed the install location you will need to append ~/local/mipsel-mimiker-elf/bin to your PATH.

Building

With toolchain in place, you are ready to compile Mimiker. Run

make

in project root. This will result with a mimiker.elf file containing the kernel image.

Running

As you presumably do not own a MIPS Malta board, you will need a simulator to test the kernel. We currently support OVPsim (incl. Imperas proprietary variant) and QEMU. If you're using OVPsim, make sure your $IMPERAS_HOME is set correctly.

We provide a python script which simplifies loading the kernel image to simulator. In project root dir, run:

./launch

This will start the kernel using OVPsim if available, or QEMU otherwise.

Some useful flags to the launch script:

  • -h - Prints usage.
  • -d - Starts simulation under a debugger.
  • -D DEBUGGER - Selects debugger to use.
  • -S SIMULATOR - Manually selects the simulator to use.
  • -t - Bind simulator UART to current stdio.

Any other argument is passed to the kernel as a kernel command-line argument. Some useful kernel arguments:

  • init=PROGRAM - Specifies the userspace program for PID 1. Browse ./user for currently available programs.

If you want to run tests please read this document.

Documentation

Useful sites:

Toolchain documentation:

MIPS documentation:

Hardware documentation: