RaspberryPi

Differences between revisions 9 and 12 (spanning 3 versions)
Revision 9 as of 2015-03-02 04:16:39
Size: 6708
Editor: fo0bar
Comment:
Revision 12 as of 2015-04-02 04:45:56
Size: 8354
Editor: fo0bar
Comment:
Deletions are marked like this. Additions are marked like this.
Line 48: Line 48:
 * If you are using a wifi dongle, you will likely need to get the linux-firmware package:
{{{
$ sudo apt-get install linux-firmware
}}}
Line 88: Line 93:

 * Serial console / login

To enable the serial console, change the /boot/cmdline.txt as follows:
{{{
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootwait
}}}
and add a new file /etc/init/ttyAMA0.conf:
{{{
start on stopped rc or RUNLEVEL=[12345]
stop on runlevel [!12345]

respawn
exec /sbin/getty -L 115200 ttyAMA0 vt102
}}}

=== Kernel ===

The kernel used by the Raspberry Pi 2 port is an Ubuntu-style kernel package of an "rpi2" flavor, e.g. linux-image-3.18.0-20-rpi2. Currently it is comprised of the following functionality:

 * Mainline 3.18.x
 * Fork of [[http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-vivid.git;a=shortlog;h=f8e80fa0d166ec8df70d769d0e679fed5d93add1|Ubuntu-3.18.0-14.15 from the ubuntu-vivid git tree]]
  * Provides extra functionality such as aufs
  * Also includes additional stability fixes, many of which have been rolled into mainline post-3.18.7
 * Raspberry Pi-specific patches from the [[https://github.com/raspberrypi/linux/tree/rpi-3.18.y-rebase|rpi-3.18.y branch of Raspberry Pi's linux git tree]]

Ubuntu's 3.18 development is no longer active, as they moved on to 3.19 to be released with 15.04 vivid. However, mainline 3.18 was designated an LTS kernel release, and is still getting active security/stability updates. Because of this, 3.18 will likely remain the "supported" kernel of this port. (Again, this is a community-maintained port and no support guarantee is implied.)

Raspberry Pi

With the release of the Raspberry Pi 2 Model B and its ARMv7-based BCM2709 processor, it is now possible to run Ubuntu directly on the Raspberry Pi.

Note that the information on this page currently only applies to the Raspberry Pi 2, not the original Raspberry Pi.

Ubuntu 14.04 LTS

An Ubuntu 14.04 LTS (Trusty Tahr) image is available for the Raspberry Pi 2, which combines the released 14.04 distribution with a PPA containing kernels and firmware which work on the Raspberry Pi 2.

Warning /!\ This is a community-maintained image, and is not supported by Ubuntu. The 3.13 kernel has been replaced with an updated 3.18 kernel which is not guaranteed to receive security updates the same as the LTS kernel provides. Warning /!\

Download

If you downloaded an older image than the current one above, you shouldn't need to reinstall, but be sure to review the changelog below.

Installation

Installation is the same as other Raspberry Pi images; a generic installation guide from raspberrypi.org is available here.

Additionally, the distribution .zip includes a .bmap file. If you are installing to the SD card from Linux, you may use the bmap-tools package to save some time by writing only the non-zero blocks.

$ sudo bmaptool copy --bmap ubuntu-trusty.bmap ubuntu-trusty.img /dev/sdX

Usage

  • There are no Raspbian-specific utilities included, specifically no automatic root resizer. However, it's not hard to do manually. Once booted:

$ sudo fdisk /dev/mmcblk0

Delete the second partition (d, 2), then re-create it using the defaults (n, p, 2, enter, enter), then write and exit (w). Reboot the system, then:

$ sudo resize2fs /dev/mmcblk0p2
  • There is no swap partition/file included. If you want swap, it's recommended you do:

$ sudo apt-get install dphys-swapfile

You should have a (resized) SD card at least 4GB, because by default it will want to create a ~2GB swapfile.

  • If you are using a wifi dongle, you will likely need to get the linux-firmware package:

$ sudo apt-get install linux-firmware
  • This is a minimal ubuntu-standard image. If you want a full desktop, go ahead and do so:

$ sudo apt-get install xubuntu-desktop  # or
$ sudo apt-get install lubuntu-desktop  # or
$ sudo apt-get install kubuntu-desktop  # etc

Ubuntu (Unity) and Ubuntu-GNOME just display a blank screen, presumably because they require 3D compositing. Kubuntu works but is slow unless you turn off desktop effects under System Settings. Xubuntu and Lubuntu work fine out of the box.

  • If you would like to install an SSH server for remote access:

$ sudo apt-get install openssh-server
  • An accelerated x.org video driver is available (fbturbo), though this is limited to hardware accelerated window moving/scrolling on the Raspberry Pi. To install:

$ sudo apt-get install xserver-xorg-video-fbturbo

Then add this to /etc/X11/xorg.conf (create if it doesn't already exist):

Section "Device"
    Identifier "Raspberry Pi FBDEV"
    Driver "fbturbo"
    Option "fbdev" "/dev/fb0"
    Option "SwapbuffersWait" "true"
EndSection
  • As with Raspbian, VideoCore packages are available:

$ sudo apt-get install libraspberrypi-bin libraspberrypi-dev

However, since these packages are compiled from source during build, the files are installed in their "proper" locations in /usr. Some third-party scripts may expect e.g. /opt/vc/bin/vcgencmd; if so, this hack should do it:

$ sudo ln -s /usr /opt/vc

(Raspbian packages use precompiled repositories during build, which install in /opt/vc.) vcdbg and edidparser are not part of the open source package and must be installed separately:

$ sudo apt-get install libraspberrypi-bin-nonfree
  • Serial console / login

To enable the serial console, change the /boot/cmdline.txt as follows:

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootwait

and add a new file /etc/init/ttyAMA0.conf:

start on stopped rc or RUNLEVEL=[12345]
stop on runlevel [!12345]

respawn
exec /sbin/getty -L 115200 ttyAMA0 vt102

Kernel

The kernel used by the Raspberry Pi 2 port is an Ubuntu-style kernel package of an "rpi2" flavor, e.g. linux-image-3.18.0-20-rpi2. Currently it is comprised of the following functionality:

Ubuntu's 3.18 development is no longer active, as they moved on to 3.19 to be released with 15.04 vivid. However, mainline 3.18 was designated an LTS kernel release, and is still getting active security/stability updates. Because of this, 3.18 will likely remain the "supported" kernel of this port. (Again, this is a community-maintained port and no support guarantee is implied.)

Building

  • The script used to build the images is available here.

Changelog

2015-03-02

  • Updated Ubuntu / PPA packages
  • Kernel module bcm2708_rng now loaded on boot
  • Blacklisted platform modules not applicable to the RPi2 (snd_soc_pcm512x_i2c, snd_soc_pcm512x, snd_soc_tas5713, snd_soc_wm8804)

2015-02-19

If you installed the 2015-02-17 image, you don't need to reinstall this image, but you should remove /var/lib/dbus/machine-id and reboot.

  • Updated Ubuntu / kernel packages
  • Default apt-src repositories are now commented out
  • Installed language-pack-en package
  • Sound driver (snd_bcm2835) now loaded by default
  • Created legacy /boot/config.txt and /boot/cmdline.txt symlinks as these live in /boot/firmware
  • Cleaned up /etc/hosts formatting
  • Renamed ubuntu user GECOS from "Ubuntu" to "Ubuntu user"
  • Removed variant /var/lib/dbus/machine-id (will be regenerated on first boot)
  • Removed console=ttyAMA0,115200 from default cmdline.txt (interferes with non-console use of the serial port)

2015-02-17

  • Initial release

Snappy Ubuntu Core

Snappy Ubuntu Core is a new rendition of Ubuntu with transactional updates - a minimal server image with the same libraries as today’s Ubuntu, but applications are provided through a simpler mechanism. A developer preview is available for the Raspberry Pi 2.

ARM/RaspberryPi (last edited 2020-10-29 13:18:04 by peterm-ubuntu)