Skip to content

coodie/mimiker

 
 

Repository files navigation

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 toolchnain 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:

  • -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 aguments:

  • init=PROGRAM - Specifies the userspace program for PID 1. Browse ./user for currently available programs.
  • test=TEST - Requests the kernel to run the specified test (from ./tests directory).
  • test=all - Runs a number of tests one after another, and reports success only when all of them passed.
  • seed=UINT - Sets the RNG seed for shuffling the list of test when using test=all.
  • repeat=UINT - Specifies the number of (shuffled) repetitions of each test when using test=all.

Documentation

Useful sites:

Toolchain documentation:

MIPS documentation:

Hardware documentation:

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 87.3%
  • Python 7.1%
  • Assembly 2.3%
  • Makefile 1.8%
  • C++ 1.3%
  • Shell 0.2%