I have always been interested in how software and hardware work together. Naturally this translated into me being curious about kernels (no, not corn kernels).

After going through my master's degree coursework, I became more familiar with topics such as the Linux kernel's programming interface along with how parts of the kernel work internally, the assembly language (I mostly used NASM), computer and instruction set architecture, how CPUs work internally, basics of compilers and language design.

All of a sudden, I noticed something: the board is set for me to follow two of my lifelong interests. Developing a kernel from scratch, and working with embedded systems.

It was at this point that I felt more confident about all of this. I could finally understand what's going on at the hardware level, and what it would take for software to "talk" to hardware.

RKern

Perhaps that's a strange name. I might agree with you.

"RKern" is shorthand for "Research Kernel". I was not interested in using a fruit's name for this project, and also could not come up with a better name, therefore I decided to keep it simple.

RKern is my new research project for developing a kernel from scratch in C++ to evaluate how the use of zero-overhead abstraction mechanisms can affect a kernel project in terms of codebase maintainability, modularity, usability, and performance.

RISC-V And How RKern Relates To It

Given the recent developments around RISC-V (pronounced "risk-five"), a free and open-source instruction set architecture, and my interest in open hardware, coupled with the fact that for RKern starting small and simple is crucial, I have chosen to target the RISC-V ISA while working on RKern. Particularly I have planned to use SiFive's HiFive1 Rev B development board first because it's simple, on the cheaper side, and has the most basic things I would want from a board to work on RKern. Plus I already have it around the house.

HiFive Rev B board by SiFive

If all goes well, I am planning on bringing RKern to HiFive Unmatched next. This is a much more capable board and is obviously more expensive to acquire, which is precisely why I am planning to work on it at a later time depending on how the initial experiments turn out.

HiFive Unmatched by SiFive

The source code for RKern is available on Github under the MIT License.

Given that I still don't have a comments section baked into this website, I would be more than happy to talk about this project with anyone that is interested to discuss. Please feel free to reach out to me via email: k.nejadfard@gmail.com

RKern compiled to x86 instruction set architecture running on Qemu