Abstract
The Raspberry Pi is a nice cheap Linux board, but inevitably with anything so new useful information is scattered around the Internet. Here are some articles I found useful, but I’ve made no attempt to be exhaustive or definitive!
Images, kernels, and firmware
The canonical source for SD card images is the RPi download page.1
When I originally wrote this in July 2012, things were a bit complicated but now, in April 2013, ‘just use Raspbian’ seems to be the universal choice.
At the time of editing, 2013-04-01, the 2013-02-09 release2 of Raspbian3 is recommended.
The past is a different country
Progress is a wonderful thing, and I no longer worry about:
- The distinction between ‘hard-float’ and ‘soft-float’. For more details, read Raspbian’s FAQ.4
- Special kernels from Chris Boot5, or special WiFi drivers6.
- Firmware updating, though I suspect Hexxah’s rpi-update script7 is still the best solution here.
Writing the card on the Mac
Happily the key instructions have been documented.8
In essence (change disk3 to suit):
- diskutil unmountDisk /dev/disk3s1
- sudo dd bs=1m if=foo.img of=/dev/rdisk3
- diskutil eject /dev/rdisk3
At least on my MacBook Pro, an external USB SD card reader supports a wider range of cards than the laptops’s own SD slot.
Initial configuration
The initial Raspbian boot leads to a menu which allows for some crude configuration.
- RAM allocation. The Raspberry Pi has 256MB of RAM split between main system RAM and graphics. If you’re primarily running the machine headless, it makes sense to minimize the memory devoted to graphics.
- Partition resizing. The Raspbian image is small: only about 1.9GB. If you install it on a 8GB SD card, then that leaves 6GB unused. Happily the root partition can be resized to fill the card. Magic!
GPIO and other animals
One of the nice things about the Raspberry is the GPIO interface:9 a set of pins you can control at will.
The kernel exposes most of the functionality in various /dev devices, but Mike McCauley has written a nice library10 to make the process smoother.
Finally there’s an official datasheet11 from Broadcom.
References
- 1. http://www.raspberrypi.org/downloads
- 2. http://downloads.raspberrypi.org/images/raspbian/2013-02-09-wheezy-raspbian/2013-02-09-wheezy-raspbian.zip
- 3. http://www.raspbian.org
- 4. http://www.raspbian.org/RaspbianFAQ
- 5. http://www.bootc.net/about/
- 6. http://www.ctrl-alt-del.cc/2012/05/raspberry-pi-meets-edimax-ew-7811un-wireless-ada.html
- 7. https://github.com/Hexxeh/rpi-update
- 8. http://elinux.org/RPi_Easy_SD_Card_Setup
- 9. http://elinux.org/RPi_Low-level_peripherals#General_Purpose_Input.2FOutput_.28GPIO.29
- 10. http://www.open.com.au/mikem/bcm2835/
- 11. http://www.raspberrypi.org/wp-content/uploads/2012/02/BCM2835-ARM-Peripherals.pdf