Skip to content
CK Kashyap edited this page Jan 18, 2015 · 13 revisions

Welcome to the unix wiki!

A human readable kernel that can be used for experimentation and potentially some real world scenarios.

Building

If you have the dependencies installed - its just a matter of hitting make from the root directory.

To run the kernel under qemu -

make run

Common Dependencies

  • Rust compiler. You'd need to download and build RUST from source. And make sure that Rules.inc is set with the path to the RUST source. The makefiles assume that RUST source is located at $(HOME)/Documents/RUST/rust and is configured with prefix=$(HOME)/Documents/RUST/install
  • Linker - ld You can download the latest binutils from ftp://ftp.gnu.org/gnu/binutils and then do the usual ./configure; make; make install I got the information from http://wiki.osdev.org/GCC_Cross-Compiler#Binutils

For mac, you can get pre-built binaries from http://crossgcc.rts-software.org/doku.php?id=compiling_for_linux

  • Qemu - this is for running the kernel

Building on Mac

Binutils

  1. Download binutils-2.24 from ftp://ftp.gnu.org/gnu/binutils

  2. Untar the contents - say at /path/to/binutils-2.24

  3. Go to /path/to/binutils-2.24 and run the configure script as follows

./configure --prefix=/path/to/binutils/install --target=x86_64-linux-gnu --disable-nls --disable-werror
make
make install

After this do a make and make install. Binutils should get installed at $PREFIX/bin.

LINKEDITOR=/path/to/binutils/install/bin/x86_64-linux-gnu-ld

Important Please copy libcompiler-rt.a and libmorestack.a from

Building on Linux

Common dependencies are sufficient for Linux. Nothing extra needs to be done.

Clone this wiki locally