This is an xv6 port to Raspberry Pi
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


xv6_rpi_port is based on MIT xv6 (
It is ported from x86 to armv6 in Raspberry Pi (RPI). The rpi port follows
the coding style of xv6 as much as possible to hide the architectural
differences between x86 and armv6. The port is not for multiprocessor yet
as RPI has only a single processor.


xv6_rpi_port is inspired by MIT xv6 and Alex Chadwick's Baking Pi 
Tutorials (
Most architecture-independent code is directly from MIT xv6 though sometimes
minor adjustments were done to explicitly initialize data structures.
Some C code such as the GPU driver is based on the understanding of 
Alex Chadwick's assembly code. 

Some code for mmu and trap handling is based on the understanding of the
Plan 9 bcm port (,
though the assembly code was completely rewritten. 
David Welch's RPI code ( is also
inspiring for trap handling and uart driver.

If you spot errors or suggest improvements, please send email to
Zhiyi Huang (

Building xv6_rpi_port:

Suppose you have checked out the source with:

$ git clone

On an RPI installed with Raspbian, type 'make' to make 'kernel.img'.

Copy 'kernel.img' to /boot with a different name:
# cp kernel.img /boot/kernel-xv6.img

Comment out the entry 'kernel=kernel_36y.img' and add a new entry
'kernel=kernel-xv6.img' to /boot/config.txt.

Reboot the machine.

Building xv6 user programs and FS (You don't need this step if you
don't change the user programs):

cd uprogs
make initcode 
make fs.img

copy 'initcode' and 'fs.img' to the directory 'source'