Difference between revisions of "RPi Software"

From eLinux.org
Jump to: navigation, search
(Development environments)
(ARM)
(One intermediate revision by one other user not shown)
Line 51: Line 51:
 
The ARM is capable of around 500 BOGOMIPS <ref>http://www.raspberrypi.org/?p=78#more-78</ref>, 5400 LINPACK KFLOPS with software floating point and 22000 KFLOPS with softfp hardware floating point<ref>http://www.raspberrypi.org/?page_id=43&mingleforumaction=viewtopic&t=266.0</ref>.
 
The ARM is capable of around 500 BOGOMIPS <ref>http://www.raspberrypi.org/?p=78#more-78</ref>, 5400 LINPACK KFLOPS with software floating point and 22000 KFLOPS with softfp hardware floating point<ref>http://www.raspberrypi.org/?page_id=43&mingleforumaction=viewtopic&t=266.0</ref>.
  
The gcc compiler flags which will produce the most optimal code for the RPi are probably (can someone check!):
+
The gcc compiler flags which will produce the most optimal code for the RPi are:
<pre>-mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard [-marmv6z or -mthumb]</pre>
+
<pre>-Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6zk</pre>
-marm produces arm code, which is the original 32 bit ARM instruction set, -mthumb produces [http://en.wikipedia.org/wiki/ARM_architecture#Thumb thumb] code, which is the 16 bit encoded RISC sub-set. Thumb code is smaller but requires more instructions so may be slower.
+
-Ofast may produce compile errors for some programs. In this case, -O3 or -O2 should be used instead.
  
 
===GPU===
 
===GPU===
Line 67: Line 67:
  
 
==Other software==
 
==Other software==
 
===Flash===
 
 
From Eben:
 
"We'll have to take a look. We support hardware-accelerated OpenVG, and have had Flash Lite running incredibly fast. Personally, I'd like to get the official hardware-accelerated Flash 10 going on there, running against OpenGL ES 2.0, but that's something to think about after the launch."
 
 
==Software hints==
 
 
 
This section collects hints, tips & tricks for various software components.
 
This section collects hints, tips & tricks for various software components.
 
+
*[[RPi_applications#Raspberry_Pi_Software_Application_Notes]]
If you are using Debian and asked for an admin password, see this thread: http://www.raspberrypi.org/forum/absolute-beginners/debian-admin-password
+
  
 
==Performance==
 
==Performance==

Revision as of 01:51, 26 October 2012


Back to the Hub.


Software & Distributions:

Software - an overview.

Distributions - operating systems and development environments for the Raspberry Pi.

Kernel Compilation - advice on compiling a kernel.

Performance - measures of the Raspberry Pi's performance.

Programming - programming languages that might be used on the Raspberry Pi.


Overview

The Rpi is a fully fledged ARM computer, so it should be able to run about everything compiled for ARM (within system requirements). The boards do not have any on board storage, so everything is on the SD card. If you just want a working system, buy a preformatted SD card from the Foundation, or give PiCard a try, a GUI SD preparation tool made by Liam Frazer.

BootRom

The boards do not include NAND or NOR storage - everything is on the SD card, which has a FAT32 partition with GPU firmware and a kernel image, and an EXT2 partition with the rootfs.

We're not currently using a bootloader - we actually boot via the GPU, which contains a proprietary RISC core (wacky architecture). The GPU mounts the SD card, loads GPU firmware and brings up display/video/3d, loads a kernel image, resets the SD card host and starts the ARM.

You could replace the kernel image with a bootloader image, and that would work fine.

Distributions

Source code and binaries for Raspberry Pi will be available at various places from launch, including pre-built Linux distributions.

Debian is the recommended distribution and pre-loaded SD cards with this distribution will be available shortly after the initial launch through the Raspberry Pi Store.


Main page: RPi Distributions

Development environments

Instead of just using compiler + editor, you can use "development tool chains" which integrate compiler, build system, packaging tools etc, in one tool chain.


Main page: RPi_Development_environments

Kernel

The initial patches (Media:Rpi-linux-patches-3.1.9.tgz) are released against the 3.1.9 kernel - but may also work against later kernels.

The kernel is now also available on https://github.com/raspberrypi/linux

See rpi kernel compilation (unfinished) for how to compile the kernel.

(left here until new page is created:) TODO: Explain how to apply these patches and correctly obtain a default configured kernel.

Compiler

The Broadcom processor on Raspberry Pi contains an ARM v6 general purpose processor and a Broadcom VideoCore IV GPU. No data is currently available on other cores (if any) available in the BCM2835.

ARM

There is broad compiler support including gcc - please see ARM Compilers

The ARM is capable of around 500 BOGOMIPS [1], 5400 LINPACK KFLOPS with software floating point and 22000 KFLOPS with softfp hardware floating point[2].

The gcc compiler flags which will produce the most optimal code for the RPi are:

-Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6zk

-Ofast may produce compile errors for some programs. In this case, -O3 or -O2 should be used instead.

GPU

The GPU provides APIs for Open GL ES 2.0, hardware-accelerated OpenVG, and 1080p30 H.264 high-profile decode.

The GPU is capable of 1Gpixel/s, 1.5Gtexel/s or 24 GFLOPs of general purpose compute and features a bunch of texture filtering and DMA infrastructure - the Raspberry Pi team are looking at how they can make this available to application programmers. For the documentation on some Broadcom APIs exposed to control the GPU, see RPi VideoCore APIs.

The GPU blob is an 18MB elf file, including libraries. It does an awful lot. [3]

DSP

There is a DSP, but there isn't currently a public API (Liz thinks the BC team are keen to make one available at some point).

Other software

This section collects hints, tips & tricks for various software components.

Performance

Performance Page

Programming

Raspberry Pi plans to support Python and C as primary teaching languages, but expect to have some sort of BASIC on there too. Perhaps even BBC BASIC or SuperBASIC depending on copyright issues.


See main page RPi Programming for more detail.

References

  1. http://www.raspberrypi.org/?p=78#more-78
  2. http://www.raspberrypi.org/?page_id=43&mingleforumaction=viewtopic&t=266.0
  3. http://www.raspberrypi.org/?page_id=43&mingleforumaction=viewtopic&t=247