Git Product home page Git Product logo

komik0 / mimiker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cahirwpz/mimiker

0.0 0.0 0.0 6.07 MB

Simple unix-like operating system for education and research purposes

Home Page: https://mimiker.ii.uni.wroc.pl

License: BSD 3-Clause "New" or "Revised" License

Makefile 0.73% C 90.34% Assembly 2.28% Python 1.49% C++ 0.87% Shell 0.34% Dockerfile 0.02% Lua 0.12% GDB 0.02% Objective-C 0.17% Yacc 0.63% Roff 2.97%

mimiker's Introduction

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. Currently two additional command-line options are supported:

  • CLANG=1 - Use the Clang compiler instead of GCC (make sure you have it installed!).
  • KASAN=1 - Compile the kernel with the KernelAddressSanitizer, which is a dynamic memory error detector.

For example, use make KASAN=1 command to create a GCC-KASAN build.

The result will be a mimiker.elf file containing the kernel image.

Running

We provide a Python script that simplifies running Mimiker OS. The kernel image is run with QEMU simulator. Several serial consoles are available for interaction. Optionally you can attach to simulator with gdb debugger. All of that is achieved by running all interactive sessions within tmux terminal multiplexer with default key bindings.

In project main directory, run command below that will start the kernel in test-run mode. To finish simulation simply detach from tmux session by pressing Ctrl+b and d (as in detach) keys. To switch between emulated serial consoles and debugger press Ctrl+b and corresponding terminal number.

./launch test=all

Some useful flags to the launch script:

  • -h - Prints usage.
  • -d - Starts simulation under a debugger.
  • -D DEBUGGER - Selects debugger 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 bin and usr.bin directories for currently available programs.
  • klog-quiet=1 - Turns off printing kernel diagnostic messages.

If you want to run tests please read this document.

Documentation

Useful sites:

Toolchain documentation:

MIPS documentation:

Hardware documentation:

mimiker's People

Contributors

cahirwpz avatar rafalcieslak avatar pj1031999 avatar j-piecuch avatar coodie avatar jpszczolowski avatar xthaid avatar franciscozdo avatar michalblk avatar mzr avatar czapiga avatar wiklam avatar tomatosoup97 avatar dyniec avatar staffik avatar darge avatar pwit81 avatar wmoc avatar laky55555 avatar bkjg avatar goniz avatar ilikeheaps avatar jakubszczerbinski avatar mohrcore avatar molotoha avatar bgrm avatar komik0 avatar psie avatar lynxd avatar thomasstachovsky avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.