RaspberryPi Osdev

From eLinux.org
Jump to: navigation, search

Raspberry Pi is an opportunity for people to learn OS development on fixed hardware. This makes it easier to make designs that you can share with others. Thereby we have started a community, which communicates through IRC.

Hardware Specific Documentation

It is bit of essential to know the hardware you're programming. I propose looting the RPi Hardware -page. From the Components -section you should pick yourself the datasheets of the SoC and CPU Core. Also you might like to look up the quick reference card for ARM instruction set by searching in the internet a bit.

There's other documentation there all splattered around. Especially the forums seem to have gathered some posts that are worth referencing in the wiki once they're refound.

The basics for programming a kernel for raspberry pi seem straightforward. You'll fill a fat32 -partition to a memory card. It contains some specific files you can retrieve from /boot -directory in raspberry firmware github repository[1].

Your kernel goes into kernel.img. The first 16 bytes contain an interrupt vector table and the very first vector is a RESET interrupt, which will boot up the computer. Bootloader might corrupt the first 0x8000 bytes with linux-related attributes if misconfigured. Because of that you might want to add such padding to your kernel as well.

First Steps

Once you've gotten the Raspberry Pi to blink a led there's an one very logical next step. First thing any kernel should be able to do is to load some programs from the development computer. A working environment will resemble a live coding system, bit similar to SuperCollider. The motivation is that you should be able to have fast compile-test -cycles and removing-reformatting-inserting the SD card all the time causes external and internal wearing on the card.


David Welch's Raspberry Pi Examples are some very well structured programs that should lessen the trouble of writing or porting a kernel considerably. In fact, as a very first step you should actually study these examples through.

Existing Forums Posts On Assembly Code

These posts should help one with learning assembly, though a page should be written based on these forum posts.

IRC Channel


How to connect

* install irssi
* start irssi and type in: /connect irc.freenode.net
* then type: /join #raspberrypi-osdev