funk
funk copied to clipboard
Functional kernel written in OCaml.
The funk kernel: a functional kernel
This kernel aims at being a working kernel with processes and system calls, but the thing which makes it different from other kernels is that it is mainly written using the OCaml language, which is functional (by the way, it's a micro-kernel, because monolithic kernels are just bad).
It's exclusively intended to be a bad joke which means that you should not expect it to be:
- fast,
- secure,
- useful,
- etc.
Current status
Only the i386 architecture is supported for now. Here is what's currently working:
- a basic shell/console with keyboard input
- a RAM filesystem over a Virtual filesystem (VFS)
- kernel threads
- CPU detection
- PCI devices detection
Some of the x86_64 port has been done (notable PAE support), but is still missing some initialization bits, so doesn't even build yet.
Prerequisities
To compile the kernel you will need:
- OCaml 3.11
- findlib
- extlib
- mcopy
With Debian the required packages are therefore: ocaml-nox, ocaml-findlib, libextlib-ocaml-dev and mtools.
With Gentoo the required packages are : dev-lang/ocaml, findlib, extlib and mtools.
Testing the kernel
To test the kernel you must
- build the kernel (on an 32bit i386 system only, that can not work on a 64bit x86_64 system for now).
make
- launch the simulation
make qemu
(you need qemu for that)
2'. alternatively you can run a simulation with bochs
make bochs
2''. or in a console
make qemuconsole