Differences between revisions 1 and 88 (spanning 87 versions)
Revision 1 as of 2013-04-10 23:23:35
Size: 1529
Editor: PaulWise
Comment: initial draft
Revision 88 as of 2022-05-31 11:29:50
Size: 9274
Editor: ?DiederikDeHaas
Comment: s/works [with|using]/runs on/ (to make it consistent with previous edit)
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
/!\ this page is a draft #language en
Line 3: Line 3:
The Raspberry Pi is a device with several issues that we recommend you do not buy. Instead, please consider one of these devices: <<TableOfContents(6)>>
Line 5: Line 5:
* [[FreedomBox/TargetedHardware|FreedomBox targetted hardware]]
* <insert more lists of suitable hardware>
= Can I put Debian on my Raspberry Pi? =
Line 8: Line 7:
The Raspberry Pi issues include issues related to technical problems, software freedom and hype: Yes. To quickly get a ready-to-use image, visit RaspberryPiImages. To know more, please read on.
Line 10: Line 9:
* The CPU in the Raspberry Pi implements the ARMv6 ISA and is thus incompatible with the Debian armhf port (and ARM hardware floating-point ports for other distributions), which means that floating-point tasks will be slow when running the Debian armel port.
* The Raspberry Pi boots from its GPU and only non-free software is currently available for the GPU, even starting the machine requires a large blob of non-free, unsupportable software.
* The 3D driver for the Raspberry Pi, while free software, is just a shim that passes OpenGL commands directly to the non-free software running on the GPU. This means that any issues with OpenGL cannot be fixed nor performance improved.
* The Raspberry Pi has been hyped as an educational device but [[http://whitequark.org/blog/2012/09/25/why-raspberry-pi-is-unsuitable-for-education/|is not fit for that purpose]].
* <insert more issues>
== Booting via a binary blob ==
Line 16: Line 11:
If you have already bought a Raspberry Pi and still want to use it, we suggest that you run [[Raspbian|http://www.raspbian.org/]] armhf on it rather than Debian armel. Raspbian armhf is a recompilation of Debian armhf that is compatible with the Raspberry Pi CPU. All Raspberry Pi models before the 4 (1A, 1B, 1A+, 1B+, Zero, Zero W, 2, 3, Zero 2 W) boot from their GPU (not from the CPU!), so they require a non-free binary blob to boot. This binary blob is available in the non-free Debian repository, packaged as the DebianPackage:raspi-firmware package (or DebianPackage:raspi3-firmware until Debian 10).

== Raspberry Pi OS (formerly Raspbian) and Debian ==

The most often used distribution across all raspberries is [[https://www.raspberrypi.org/software/|Raspberry Pi OS]] (originally known as ''Raspbian''), a derivative of Debian. This is, first of all, for historical reasons (booting a mainline Linux kernel was not supported on Raspberries until late 2018), but also because of other non-free components that are shipped as part of Raspberry Pi OS (such as Oracle Java, Wolfram Mathematica, and several games such as a Pi-specific Minecraft version).

Raspberry Pi OS builds a single image for all of the Raspberry families, so you will get an [[ArmHardFloatPort|armhf]] 32-bit, hard floating-point system, but built for the ARMv6 ISA (with VFP2), unlike Debian's ARMv7 ISA (with VFP3) port.

Raspberry Pi OS is '''not''' affiliated with the Debian project. Questions related to Raspberry Pi OS should be asked on (f.e.) [[https://forums.raspberrypi.com/ | their forums]].

You can also run regular Debian on your Raspberry Pi's! (keep reading...)

== Raspberry Pi Models ==

=== Raspberry Pi 4 and Raspberry Pi 400 ===

Announced in 2019, this system adds a second HDMI port, more memory, true Gigabit Ethernet and USB3. This family runs on [[Arm64Port|Debian arm64]].

More technical details about Raspberry Pi 4 support are available on the [[RaspberryPi4]] page.

==== Raspberry Pi 400 ====

The Raspberry Pi 400, announced in November 2020, is quite similar to the Raspberry Pi 4 B models. RPi 4 images work on the Pi 400, although a different DTB (not yet available/mainlined as of Linux 5.10) is needed for some hardware support, i.e. for WiFi connectivity.

=== Raspberry Pi 3 (3, 3A+, 3B+, Zero 2 W) ===

The Raspberry Pi 3 was announced in 2016, and is the first 64-bit member of the family. Some models include wireless connectivity. This family runs on [[Arm64Port|Debian arm64]]. For further details and information on how to run with this hardware, go to the RaspberryPi3 page.

=== Raspberry Pi 2 ===

The second generation systems were announced on 2014. The only member of this family is the Raspberry Pi 2.

Second-generation Raspberry Pi systems (model 2 only) runs on [[ArmHardFloatPort|Debian armhf]].

You can refer to the RaspberryPi2 page, which aims to collect more detailed information how to run Debian on this hardware.

=== Raspberry Pi 1 (A, B, A+, B+, Zero, Zero W) ===

The systems now known as Raspberry Pi model 1 models A and B were announced in February 2012. This family was expanded by very similar models A+ and B+. In 2015, the Zero model was announced, using the same CPU as the 1 family but with a smaller form factor, followed by the Zero W, which adds wireless connectivity.

The first generation Raspberry Pi systems runs on [[ArmEabiPort|Debian armel]].
The Raspberry Pi 1's processor falls uncomfortably between the processor families that Debian has chosen to target, between [[ArmEabiPort|armel]] and [[ArmHardFloatPort|armhf]]. While Raspberry Pi OS solves this to some degree an unofficial port will always give less certainty than an official one.

The Zero uses the same SoC/CPU as the first version, so they should function identically.

= Should I buy a Raspberry Pi? =

That is a decision that you will have to make given your application, below are some pros and cons that you should consider.

Pros:
 * Large and active community
 * Low price for the capabilities offered
 
Cons:
 * 3D acceleration is not integrated with X or other standard mechanisms. Therefore 3D applications will currently require Pi specific builds. As of November 2020, there is work in progress to integrate it into both the Linux kernel and Mesa for the Raspberry Pi 4.
 * All models before the Raspberry Pi 4 boot from the GPU. This needs a binary blob used by the GPU present on the boot medium for the system to boot. 2021-06, the binary blob for the GPU is non-free. Even starting the machine requires a large (2MB) blob of non-free, unsupportable software. (Editor Question: isnt this also true for the 4?)
 * While some hardware documentation has been released the documentation is sorely lacking.
 * While schematics are available the board design is closed and the main processor is not available for purchase by the general public.

Other issues:
 * The 3D driver for the Raspberry Pi, while Free Software, is just a shim that passes OpenGL commands directly to the non-free software running on the GPU (does this also apply for the vc4 driver in the RPi 4?). This means that any issues with OpenGL cannot be fixed nor performance improved. This is better than some other GPUs because the ARM part can be rebuilt. More recently (when?) an alternative driver (what's the name of that driver?) has become available that drives the 3D core in the GPU directly from the ARM rather than passing messages to the VPU core in the GPU which in turn drove the 3D core.
 * The CPU in the Raspberry Pi 1 and Zero implements the ARMv6 ISA (with VFP2) and is thus incompatible with the Debian armhf port baseline of ARMv7+VFP3 and ARM hardware-floating-point ports for other distributions, which all have the same baseline. It is compatible with Debian armel (armv4t, soft(emulated) FP), but floating-point tasks will be slow when running the Debian armel port. (This doesn't stand for newer families)

A number of similar boards are available, generally at slightly higher prices but also usually with more powerful processors. Some examples can be found in the CheapServerBoxHardware list.

= Binary blob needed to boot =

The binary blob needed to boot the Raspberry Pi has been packaged as DebianPackage:raspi-firmware in the non-free repository since Debian Bullseye (In Debian Buster, the Raspberry Pi firmware package is called DebianPackage:raspi3-firmware). It can be used with vmdebootstrap to create a bootable SD card image, according to [[http://people.skolelinux.org/pere/blog/Teaching_vmdebootstrap_to_create_Raspberry_Pi_SD_card_images.html|a recipe from Petter Reinholdtsen]].

Previously this page referred to {{{rpi-update}}} but that tool is meant for firmware development, not for end users! Therefor that information has been removed.

There is an independent documentation project based on a combination of static analysis and trial and error on real hardware available on https://github.com/hermanhermitage/videocoreiv/, but this has not seen any progress since early 2019 (2021-06).

Since then, Broadcom publicly released some code, licensed as 3-Clause BSD, to aid the making of an open source GPU driver.
The [[https://github.com/christinaa/rpi-open-firmware|"rpi-open-firmware"]] effort to replace the VPU firmware blob started in 2016. See more at https://news.ycombinator.com/item?id=11703842 .
Unfortunately development of rpi-open-firmware is currently (2021-06) [[https://github.com/christinaa/rpi-open-firmware/issues/37|stalled]].

A [[https://github.com/librerpi/rpi-open-firmware|revival attempt]] seems to be underway (2021-06).

= QEMU User Emulation for Raspberry Pi Development =
See [[RaspberryPi/qemu-user-static]] for information on how you can mount, edit, and run a Raspberry Pi disk image on a host Debian machine using QemuUserEmulation (much faster/simpler than than full system emulation)

= Usage Tips =

 * Many problems are/were caused by using a poor quality power supply. For stable and reliable operations you need a '''good and reliable''' adapter with a good cable. The shorter and thicker the better.
 * You can safely attach simple (ie low-power) USB devices to a RPi. But if you attach many and/or USB devices which consume a 'lot' of power, like SSD/HDD, consider using a powered hub for those.
 * The quality of SD cards provided in 'RPi kits' is often of poor quality. Investing in higher quality and higher capacity cards can improve the endurance significantly. It's good to have much free space on SD cards.
 * Putting/Adding swap space on a SD card is generally a (very) bad idea. Swap is no substitute for RAM and it can significantly reduce the lifespan of your SD card.
 * If you're running Debian Buster with a 4.19 kernel, consider upgrading to the current Debian Stable version (Bullseye) with a 5.10 kernel. Many improvements for RPi devices have landed in the 5.10 kernel. And running the current Debian Stable release is generally a good advice.

= More Info =

== Talks ==

 * At 2019-07-25 Gunnar Wolff gave a talk at DebConf19 about [[https://meetings-archive.debian.net/pub/debian-meetings/2019/DebConf19/debian-on-the-raspberryscape.webm | the current state of Debian on the Raspberry Pi]]

Can I put Debian on my Raspberry Pi?

Yes. To quickly get a ready-to-use image, visit RaspberryPiImages. To know more, please read on.

Booting via a binary blob

All Raspberry Pi models before the 4 (1A, 1B, 1A+, 1B+, Zero, Zero W, 2, 3, Zero 2 W) boot from their GPU (not from the CPU!), so they require a non-free binary blob to boot. This binary blob is available in the non-free Debian repository, packaged as the raspi-firmware package (or raspi3-firmware until Debian 10).

Raspberry Pi OS (formerly Raspbian) and Debian

The most often used distribution across all raspberries is Raspberry Pi OS (originally known as Raspbian), a derivative of Debian. This is, first of all, for historical reasons (booting a mainline Linux kernel was not supported on Raspberries until late 2018), but also because of other non-free components that are shipped as part of Raspberry Pi OS (such as Oracle Java, Wolfram Mathematica, and several games such as a Pi-specific Minecraft version).

Raspberry Pi OS builds a single image for all of the Raspberry families, so you will get an armhf 32-bit, hard floating-point system, but built for the ARMv6 ISA (with VFP2), unlike Debian's ARMv7 ISA (with VFP3) port.

Raspberry Pi OS is not affiliated with the Debian project. Questions related to Raspberry Pi OS should be asked on (f.e.) their forums.

You can also run regular Debian on your Raspberry Pi's! (keep reading...)

Raspberry Pi Models

Raspberry Pi 4 and Raspberry Pi 400

Announced in 2019, this system adds a second HDMI port, more memory, true Gigabit Ethernet and USB3. This family runs on Debian arm64.

More technical details about Raspberry Pi 4 support are available on the RaspberryPi4 page.

Raspberry Pi 400

The Raspberry Pi 400, announced in November 2020, is quite similar to the Raspberry Pi 4 B models. RPi 4 images work on the Pi 400, although a different DTB (not yet available/mainlined as of Linux 5.10) is needed for some hardware support, i.e. for WiFi connectivity.

Raspberry Pi 3 (3, 3A+, 3B+, Zero 2 W)

The Raspberry Pi 3 was announced in 2016, and is the first 64-bit member of the family. Some models include wireless connectivity. This family runs on Debian arm64. For further details and information on how to run with this hardware, go to the RaspberryPi3 page.

Raspberry Pi 2

The second generation systems were announced on 2014. The only member of this family is the Raspberry Pi 2.

Second-generation Raspberry Pi systems (model 2 only) runs on Debian armhf.

You can refer to the RaspberryPi2 page, which aims to collect more detailed information how to run Debian on this hardware.

Raspberry Pi 1 (A, B, A+, B+, Zero, Zero W)

The systems now known as Raspberry Pi model 1 models A and B were announced in February 2012. This family was expanded by very similar models A+ and B+. In 2015, the Zero model was announced, using the same CPU as the 1 family but with a smaller form factor, followed by the Zero W, which adds wireless connectivity.

The first generation Raspberry Pi systems runs on Debian armel. The Raspberry Pi 1's processor falls uncomfortably between the processor families that Debian has chosen to target, between armel and armhf. While Raspberry Pi OS solves this to some degree an unofficial port will always give less certainty than an official one.

The Zero uses the same SoC/CPU as the first version, so they should function identically.

Should I buy a Raspberry Pi?

That is a decision that you will have to make given your application, below are some pros and cons that you should consider.

Pros:

  • Large and active community
  • Low price for the capabilities offered

Cons:

  • 3D acceleration is not integrated with X or other standard mechanisms. Therefore 3D applications will currently require Pi specific builds. As of November 2020, there is work in progress to integrate it into both the Linux kernel and Mesa for the Raspberry Pi 4.
  • All models before the Raspberry Pi 4 boot from the GPU. This needs a binary blob used by the GPU present on the boot medium for the system to boot. 2021-06, the binary blob for the GPU is non-free. Even starting the machine requires a large (2MB) blob of non-free, unsupportable software. (Editor Question: isnt this also true for the 4?)
  • While some hardware documentation has been released the documentation is sorely lacking.
  • While schematics are available the board design is closed and the main processor is not available for purchase by the general public.

Other issues:

  • The 3D driver for the Raspberry Pi, while Free Software, is just a shim that passes OpenGL commands directly to the non-free software running on the GPU (does this also apply for the vc4 driver in the RPi 4?). This means that any issues with OpenGL cannot be fixed nor performance improved. This is better than some other GPUs because the ARM part can be rebuilt. More recently (when?) an alternative driver (what's the name of that driver?) has become available that drives the 3D core in the GPU directly from the ARM rather than passing messages to the VPU core in the GPU which in turn drove the 3D core.
  • The CPU in the Raspberry Pi 1 and Zero implements the ARMv6 ISA (with VFP2) and is thus incompatible with the Debian armhf port baseline of ARMv7+VFP3 and ARM hardware-floating-point ports for other distributions, which all have the same baseline. It is compatible with Debian armel (armv4t, soft(emulated) FP), but floating-point tasks will be slow when running the Debian armel port. (This doesn't stand for newer families)

A number of similar boards are available, generally at slightly higher prices but also usually with more powerful processors. Some examples can be found in the CheapServerBoxHardware list.

Binary blob needed to boot

The binary blob needed to boot the Raspberry Pi has been packaged as raspi-firmware in the non-free repository since Debian Bullseye (In Debian Buster, the Raspberry Pi firmware package is called raspi3-firmware). It can be used with vmdebootstrap to create a bootable SD card image, according to a recipe from Petter Reinholdtsen.

Previously this page referred to rpi-update but that tool is meant for firmware development, not for end users! Therefor that information has been removed.

There is an independent documentation project based on a combination of static analysis and trial and error on real hardware available on https://github.com/hermanhermitage/videocoreiv/, but this has not seen any progress since early 2019 (2021-06).

Since then, Broadcom publicly released some code, licensed as 3-Clause BSD, to aid the making of an open source GPU driver. The "rpi-open-firmware" effort to replace the VPU firmware blob started in 2016. See more at https://news.ycombinator.com/item?id=11703842 . Unfortunately development of rpi-open-firmware is currently (2021-06) stalled.

A revival attempt seems to be underway (2021-06).

QEMU User Emulation for Raspberry Pi Development

See RaspberryPi/qemu-user-static for information on how you can mount, edit, and run a Raspberry Pi disk image on a host Debian machine using QemuUserEmulation (much faster/simpler than than full system emulation)

Usage Tips

  • Many problems are/were caused by using a poor quality power supply. For stable and reliable operations you need a good and reliable adapter with a good cable. The shorter and thicker the better.

  • You can safely attach simple (ie low-power) USB devices to a RPi. But if you attach many and/or USB devices which consume a 'lot' of power, like SSD/HDD, consider using a powered hub for those.
  • The quality of SD cards provided in 'RPi kits' is often of poor quality. Investing in higher quality and higher capacity cards can improve the endurance significantly. It's good to have much free space on SD cards.
  • Putting/Adding swap space on a SD card is generally a (very) bad idea. Swap is no substitute for RAM and it can significantly reduce the lifespan of your SD card.
  • If you're running Debian Buster with a 4.19 kernel, consider upgrading to the current Debian Stable version (Bullseye) with a 5.10 kernel. Many improvements for RPi devices have landed in the 5.10 kernel. And running the current Debian Stable release is generally a good advice.

More Info

Talks