RaspberryPiLinux

From base48
Revision as of 10:25, 15 July 2013 by Klubko (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Introduction

Raspberry Pi devices are shipped with modified Linux kernel, that adds support for Broadcom BCM2835 (known as BCM2708 there) which is what most distributions use. They seldom rebase it on newer kernels and don't enjoy quality control mainline Linux does.

Currently (as of 3.9 rc), mainline Linux contains a platform driver and few device drivers (serial tty works), there many device drivers are left out.

Making it work

Start out with a working Linux installation (be it Fedora or Raspbian (recommended)).

You'll very likely need to hook up a serial console.

Tool chain

ARM cross-compiler:

# yum -y install gcc-arm-linux-gnu

Boot loader

Mainline Linux's RPi support it built around device tree; therefore you need DT capable bootloader to boot it, such as Das U-Boot. Install it by replacing kernel.img with it.

$ git clone git://git.denx.de/u-boot.git
$ cd u-boot
$ make CROSS_COMPILE=arm-linux-gnu- ARCH=arm rpi_b_config
$ make CROSS_COMPILE=arm-linux-gnu- ARCH=arm -j666
$ cp u-boot.bin /media/rpi-boot/kernel.img

U-Boot will execute boot.scr.uimg, which should load kernel and the flattened device-tree image. Create it:

$ cat >>/media/rpi-boot/uboot.scr
set bootargs 'console=tty0 console=ttyAMA0,115200 root=/dev/mmcblk0p2'
fatload ${devtype} ${devnum}:1 ${fdt_addr_r} fdt
fdt addr ${fdt_addr_r}
fdt resize
fdt chosen
fatload ${devtype} ${devnum}:1 ${loadaddr} zImage
bootz ${loadaddr} - ${fdt_addr_r}
^D
$ mkimage -T script -d /media/rpi-boot/boot.scr /media/rpi-boot/boot.scr.uimg

Kernel and FDT image

$ git clone git@github.com:hackerspace/rpi-linux.git
$ cd rpi-linux
$ make CROSS_COMPILE=arm-linux-gnu- ARCH=arm bcm2835_defconfig
$ make CROSS_COMPILE=arm-linux-gnu- ARCH=arm zImage fdt
$ cp arch/arm/boot/zImage /media/rpi-boot/
$ cp arch/arm/boot/dts/bcm2835-rpi-b.dtb /media/rpi-boot/fdt

Getting involved

Join the list.

Documents

Useful links

Status

Hardware Status
Board Mainline
USB (DWC-OTG) In staging/crap tree; needs poweron via mailbox in u-boot
Random number generator Done, in 3.10
Watchdog Queued for 3.11
Mailbox WIP
Watchdog WIP
Mailbox WIP
Thermal WIP
Sensors WIP
Framebuffer WIP; simplefb configured by u-boot in review
VHCIQ Needs work [5]
Sound Needs work
Camera Needs work