The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard.
The board measures 85.60mm x 53.98mm x 17mm, with a little overlap for the SD card and connectors which project over the edges. The SoC is a Broadcom BCM2835. This contains an ARM1176JZFS with floating point running at 700Mhz, and a Videocore 4 GPU.
Replace sdX in the following instructions with the device name for the SD card as it appears on your computer.
mkfs.vfat /dev/sdX1 mkdir boot mount /dev/sdX1 boot
mkfs.ext4 /dev/sdX2 mkdir root mount /dev/sdX2 root
wget http://os.archlinuxarm.org/os/ArchLinuxARM-rpi-latest.tar.gz bsdtar -xpf ArchLinuxARM-rpi-latest.tar.gz -C root sync
mv root/boot/* boot
umount boot root
alsa-utils should supply the needed programs to use onboard sound. Default
volume can be adjusted using alsamixer.
A key change with Linux kernel version 4.4.x for ARM related to ALSA and to the
needed sound module: in order to use tools such as alsamixer with the current
kernel, users must modify
/boot/config.txt to contain the following line:
To force audio over HDMI, add this to
If you experience distortion using the 3.5mm analogue output:
The X.org driver for Raspberry Pi can be installed with the
Memory split between the CPU and GPU can be set in
by adjusting the parameter
gpu_mem which stands for the amount of RAM in MB
that is available to the GPU (minimum 16, default 64) and the rest is available
to the ARM CPU.
With the default configuration, the Raspberry Pi uses HDMI video if a HDMI
monitor is connected. Otherwise, it uses analog TV-Out (also known as composite
output or RCA) To turn the HDMI or analog TV-Out on or off, have a look at
-s parameter to check the status; the
parameter to turn the display off and
-p parameter to power on HDMI with
Adjustments are likely required to correct proper
overscan/underscan and are easily achieved in
/boot/config.txt in which many
tweaks are set. To fix, simply uncomment the corresponding lines and setup per
the commented instructions:
# uncomment the following to adjust overscan. Use positive numbers if console # goes off screen, and negative if there is too much border #overscan_left=16 overscan_right=8 overscan_top=-16 overscan_bottom=-16
Or simply disable overscan if the TV/monitor has a "fit to screen" option.
Users wishing to use the analog video out should consult this config file which contains options for non-NTSC outputs.
The commands for the camera module are included as part of the raspberrypi-firmware package:
The following is a common error:
mmal: mmal_vc_component_enable: failed to enable component: ENOSPC mmal: camera component couldn't be enabled mmal: main: Failed to create camera component mmal: Failed to run camera app. Please check for firmware updates
which can be corrected by setting these values in
Another common error:
mmal: mmal_vc_component_create: failed to create component 'vc.ril.camera' (1:ENOMEM)
mmal: mmal_component_create_core: could not create component 'vc.ril.camera' (1)
mmal: Failed to create camera component
mmal: main: Failed to create camera component
mmal: Only 64M of gpu_mem is configured. Try running "sudo raspi-config" and ensure that "memory_split" has a value of 128 or greater
can be corrected by adding the following line to
In order to use standard applications (those that look for
V4L2 driver must be loaded. This can be done automatically at boot by creating
an autoload file,
The V4L2 driver by default only allows video recording up to 1280x720, else it
glues together consecutive still screens resulting in videos of 4 fps or lower.
Adding the following options removes this limitation,
options bcm2835-v4l2 max_video_width=3240 max_video_height=2464
Temperatures sensors can be queried with utils in the
$ /opt/vc/bin/vcgencmd measure_temp temp=49.8'C
Four different voltages can be monitored via
$ /opt/vc/bin/vcgencmd measure_volts <id>
BCM2708 has a hardware watchdog which can be utilized by enabling the
bcm2708_wdog kernel module.
For proper operation the watchdog daemon also has to be installed, configured
(by uncommenting the "watchdog-device" line in
This should also apply for Raspberry Pi 2 by using the
and Raspberry Pi 3 by using the
Arch Linux ARM for the Raspberry Pi had the
bcm2708-rng module set to load at
boot; starting with kernel 4.4.7 the
bcm2835_rng module replaces the
former on Raspberry Pi 2 and Raspberry Pi 3 units.
tell the Hardware RNG Entropy Gatherer Daemon (
rngd) where to find the hardware
random number generator. This can be done by editing
RNGD_OPTS="-o /dev/random -r /dev/hwrng"
and enabling and starting the
haveged is running, it should be stopped and disabled, as it might
rngd and is only preferred when there is no hardware random number
Once completed, this change ensures that data from the
hardware random number generator is fed into the kernel's entropy pool at
/dev/random. To check the available entropy, run:
# cat /proc/sys/kernel/random/entropy_avail
The number it reports should be around 3000, whereas before setting up rngd it would have been closer to 1000.
To be able to use the GPIO pins from Python, use the RPi.GPIO library. Install the python-raspberry-gpio package from the AUR.
To enable the
/dev/spidev* devices, uncomment the following line in
Configure the bootloader to enable the i2c hardware by appending to
i2c-bcm2708 (if not blacklisted for the camera) modules to be loaded at boot in
Reboot the Raspberry Pi and issue the following command to get the hardware address:
i2cdetect -y 0
Note: When using the I2C1 port instead of I2C0, one will need to run
-y 1 instead and replace
i2c-1 in the following steps.
Now instantiate the device. Change the hardware address to the address found in the previous step with '0x' as prefix (e.g. 0x48) and choose a device name:
echo <devicename> <hardware address> >/sys/class/i2c-adapter/i2c-0/new_device
dmesg for a new entry:
i2c-0: new_device: Instantiated device ds1621 at 0x48
Finally, read the sensor output: sensors
Copyright ©2009-2017 Arch Linux ARM
The registered trademark Linux® is used pursuant to a sublicense from LMI, the exclusive licensee of Linus Torvalds, owner of the mark on a world-wide basis.
The Arch Linux™ name and logo are used under permission of the Arch Linux Project Lead.