Skip to content

Raspberry Pi Image Setup

Steve Arnold edited this page Jan 14, 2015 · 18 revisions

This fork of the meta-raspberrypi layer contains both additional/modified recipes and a custom kernel config, and still supports the mpd and remote control support required for the new images. There are new builds available and new image recipes; the Xorg images and application tweaks have been moved to a new layer: meta-alt-desktop-extras.

There are both new console and xorg images in the above repo, and a few custom raspberrypi extras remain here (including a slightly tweaked rpi-console-image with full SSH kernel modules).

Note the manual network start (via ifup -a) on first boot is no longer a requirement (yay! progress...). The first boot is still not starting the network interfaces, but second and subsequent boots work normally.

  • Current images
  • built from this layer:

Each image has a minimum of ~250 MBs of free space (the actual rootfs is smaller than the card size). The xorg image may fit on a 1 GB SD Card, but I haven't tried anything that small for a while.

  • Extras

Note

The current toolchain is slightly behind the latest images. Check back for updates.

The cross-toolchain and SDK linked above is fairly small, since it only provides basic system library support. For building apps against a given runtime image, you would need to find and install all the required development packages into your local SDK sysroot (which is way too much work). The answer is building a custom image-based SDK of your very own. To build one, start by following the README and build an RPi image (eg, rpi-xorg-image). Then do:

$ bitbake -c populate_sdk xorg-openbox-image

(or replace the image name above with your preferred image)

Please use the one of the github issue trackers for reporting problems and requesting features, additional packages, etc.

For some initial tips on what to tweak for an optimal experience, see below, as well as the meta-alt-wiki.

Initial Image Setup

There are now several images available, the main differences being either a console or xorg desktop The openbox image includes tint2 and a minimal openbox menu setup, while the console image has the same set of console apps and development tools (basically anything that doesn't require X libraries).

Download and expand one of the image files:

$ wget http://www.gentoogeek.org/files/console-image-plus-raspberrypi-<image_date_stamp>.rootfs.rpi-sdimg.xz
$ xz rpi-*

Copy the image file to the card:

$ sudo dd if=console-image-plus-raspberrypi-<image_date_stamp>.rootfs.rpi-sdimg of=/dev/sdX bs=4M

where /dev/sdX is your card reader device. You can start the network interfaces manually on first boot:

$ ifup -a

or just reboot and the network should come up normally after the first boot. Login as the default user "rpi" with password "raspberrypi" and don't forget to change your password. The rpi user belongs to the sudo group so "sudo -i" will switch to the root user. Add groups as needed.

The default ethernet interface config for all images is DHCP on eth0; to change it, edit the interfaces file on the xorg image or wrestle connman on the sato image. If you don't have the IR sensor, then you can disable the lirc daemons:

$ update-rc.d -f [lircd|lircexec] remove

Alternate image writing tool:

If your desktop runs some flavor of Windows, you can use Win32DiskImager to write the image file to the SDCard.

Poky system config

The current OpenEmbedded build system (with or without Yocto/Poky) is designed to build any of several distributions, or even a custom "distro-less" build. The current builds linked above are based on the default "Poky" distribution and are built off the master branches of all repos. The packaging tools are based on a simplified interface to a deb-style package format. The packages use the suffix ".ipk" and the primary package manager tool is "opkg" (note: the two different images use the same package feed, so you can always install the available packages into either image). Think of opkg as a simple version of apt-get and it should be fairly straight-forward. For example, the first thing you should do after you boot the Pi with an active Internet connection is:

$ sudo opkg update
$ sudo opkg upgrade

Typing "opkg" with no arguments will give a list of commands and options (pipe the output to grep when using the "list" or "list-installed" options). The following pages provide some additional system configuration details:

In addition to the basic network/init setup used by the rpi-xorg image, there are also systemd and various network manager options (there are packages for connman and NetworkManager, but wicd doesn't seem to have and existing recipe in the usual places). Feel free to build/try them...

Build details

Note: The xorg desktop piece is now broken out as meta-alt-desktop-extras. If you plan to build from source, you'll need to clone both repositories and add both of them to bblayers.conf. The new repo should work equally well with meta-ti (eg, beaglebone) or other machine layers.

Current rpi-xorg image build info and layer config:

Build Configuration:
BB_VERSION        = "1.21.1"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Ubuntu-12.04"
TARGET_SYS        = "arm-poky-linux-gnueabi"
MACHINE           = "raspberrypi"
DISTRO            = "poky"
DISTRO_VERSION    = "1.5+snapshot-20140403"
TUNE_FEATURES     = "armv6 vfp callconvention-hard arm1176jzfs no-thumb-interwork"
TARGET_FPU        = "vfp"
meta
meta-yocto
meta-yocto-bsp    = "master:c0ced71c6662ea501da2b61c9ba3353c3e0ea5fd"
meta-raspberrypi  = "master:e70fbe0b2d9bd98cfac7799c118b937179c4f3aa"
meta-alt-desktop-extras = "master:f0d77248d231823ad73e7b6b4e5885ab19e1e30e"
meta-erlang       = "master:986fda4a4cd3ac521897206ba39fe4d9f42e50b9"
meta-oe
meta-gnome
meta-networking
meta-filesystems
meta-multimedia
meta-efl
meta-xfce         = "master:e199c2f17963496f7627606d4a8904a808fb1a1a"

See the meta-alt-wiki for more info.

Clone this wiki locally