2012-06-25

raspi - Raspbian


Extract from

Raspbian


Raspbian is a free operating system based on Debian for the Raspberry Pi. An operating system is the set of basic programs and utilities that make your Rasberry Pi run.
Raspbian provides more than a pure OS: it comes with over 34,000 packages, pre-compiled software bundled in a nice format for easy installation on your Raspberry Pi. 

What is Raspbian?


Raspbian is an unofficial port of Debian Wheezy armhf with compilation settings adjusted to produce optimized "hard float" code that will run on the Raspberry Pi. This should provide significantly faster performance for applications that make heavy use of floating point arithmetic operations. 

The port is necessary because the official Debian Wheezy armhf release is compatible only with versions of the ARM architecture later than the one used on the Raspberry Pi (ARMv7-A CPUs and higher, vs the Raspberry Pi's ARMv6 CPU).

The official Debian Squeeze image issued by the Raspberry Pi foundation uses "soft float" settings. The foundation found it necessary to use the existing
Debian port for less capable ARM devices due to time and resource constraints during development of the Raspberry Pi. Therefore, it does not use of the Pi's processor's floating point hardware - reducing the Pi's performance during floating point intensive applications - or the advanced instructions of the ARMv6 CPU.

[..]

What compilation options should be set Raspbian code?


The compiler tools included in the Raspbian repository are, by default, pre-configured to produce code compatible with Raspbian. However, if you are looking to port compiler tools over to Raspbian, the settings required for most GNU tools are as follows:
  • -march=armv6
  • -mfpu=vfp
  • -mfloat-abi=hard
These settings produce code with armv6 specific instructions, vector floating point instructions and specify the ARM EABI where floating point values are to be passed in floating point registers. Additional information can be found in the Debian hard float documents.