Skip to content

fxlin/p1-kernel

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A tiny, modern kernel for Raspberry Pi 3

Experiment descriptions are for you to read & reproduce. The assignments will be on LMS (e.g. Canvas).

Get the code:

git clone https://github.com/fxlin/p1-kernel
# load build commands
cd p1-kernel && source env-qemu.sh

A tiny kernel incrementally built for OS education.

Start with minimal, baremetal code. Then each assignment adds new features. Each experiment is a self-contained and can run on both Rpi3 hardware and QEMU.

On the website, there is a top-right search box -- use it!

Learning objectives

Knowledge:

  • protection modes
  • interrupt handling
  • preemptive scheduling
  • virtual memory

Skills:

  • Learning by doing: the core concepts of a modern OS kernel
  • Experiencing OS engineering: hands-on programming & debugging at the hardware/software boundary
  • Daring to plumb: working with baremetal hardware: CPU protection modes, registers, IO, MMU, etc.

Secondary:

  • Armv8 programming. Arm is everywhere, including future Mac.
  • Working with C and assembly
  • Cross-platform development

Non-goals:

  • Non-core or advanced functions of OS kernel, e.g. filesystem or power management, which can be learnt via experimenting with commodity OS.
  • Rpi3-specific hardware details. The SoC of Rpi3 is notoriously unfriendly to kernel hackers.
  • Implementation details of commodity kernels, e.g. Linux or Windows.

Experiments

  1. Sharpen your tools! (p1 exp0)
  2. Helloworld from baremetal (p1 exp1)
  3. Exception elevated (p1 exp2)
  4. Heartbeats on (p1 exp3)
  5. Process scheduler (p1 exp4)
  6. A world of two lands (p1 exp5)
  7. Into virtual (p1 exp6)

Acknowledgement

Derived from the RPi OS project and its tutorials, which is modeled after the Linux kernel.

About

A tiny, modern kernel on real hardware

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 78.2%
  • Assembly 19.1%
  • Other 2.7%