Difference between revisions of "FR:RPi Software"

From eLinux.org
Jump to: navigation, search
(Programmation)
(Vue d'ensemble)
Line 5: Line 5:
 
==Vue d'ensemble==
 
==Vue d'ensemble==
  
If you just want a working system, all that is required is a correctly formatted SD card. For details on how to create or get one, please see the [[RPi_Hardware_Basic_Setup#Prepared_Operating_System_SD_Card|Hardware Basic Setup]] page.
+
Si vous souhaitez juste un système qui fonctionne, tout ce dont vous avez besoin est une carte SD corretement formatée. Pour les détails sur comment la créer ou en obtenir une, veuillez lire la page [[FR:RPi_Hardware_Basic_Setup#Carte_SD_préchargée_avec_le_système_d'exploitation|Hardware Basic Setup]].
  
In order to understand the software compoonents in the RPi, you should first understand how it boots up. At power-up, the CPU is offline, and a small RISC core on the GPU is responsible for booting the SoC, therefore most of the boot components are actually run on the GPU code, not the CPU.
+
Afin de comprendre les composants logiciels du RPi, vous devez au préalable comprendre la façon dont il est amorcé. À la mise sous tension, le CPU est hors ligne, et un petit cœur RISC sur le GPU est responsable de l'amorçage du SoC, par conséquent, la plupart des éléments d'amorçage est en réalité exécutée par le code du GPU, pas par le CPU.
  
The boot order and components are as follows:
+
La séquence d'amorçage et les composants se répartissent ainsi :
 
* '''First stage bootloader''' - This is used to mount the FAT32 boot partition on the SD card so that the second stage bootloader can be accessed. It is programmed into the SoC itself during manufacture of the RPi and cannot be reprogrammed by a user.
 
* '''First stage bootloader''' - This is used to mount the FAT32 boot partition on the SD card so that the second stage bootloader can be accessed. It is programmed into the SoC itself during manufacture of the RPi and cannot be reprogrammed by a user.
 
* '''Second stage bootloader''' (bootcode.bin) - This is used to retrieve the GPU firmware from the SD card, program the firmware, then start the GPU.
 
* '''Second stage bootloader''' (bootcode.bin) - This is used to retrieve the GPU firmware from the SD card, program the firmware, then start the GPU.
Line 19: Line 19:
 
Raspbian Linux image (others?) available on the foundation's website ([http://www.raspberrypi.org/downloads]) also contains cut-down versions of the above files (fixup_cd.dat, start_cd.elf). These are used when GPU memory is set to 16 MB, which in result disables some GPU features. More info [http://www.raspberrypi.org/phpBB3/viewtopic.php?p=198420#p198420 here]. In addition, there are also testing versions of the above files (fixup_x.dat, start_x.elf), which enable potentially unstable/not-fully-tested/hacky functionality - currently, using these files instead of the usual fixup.dat/start.elf will cause extra video codecs to become available.
 
Raspbian Linux image (others?) available on the foundation's website ([http://www.raspberrypi.org/downloads]) also contains cut-down versions of the above files (fixup_cd.dat, start_cd.elf). These are used when GPU memory is set to 16 MB, which in result disables some GPU features. More info [http://www.raspberrypi.org/phpBB3/viewtopic.php?p=198420#p198420 here]. In addition, there are also testing versions of the above files (fixup_x.dat, start_x.elf), which enable potentially unstable/not-fully-tested/hacky functionality - currently, using these files instead of the usual fixup.dat/start.elf will cause extra video codecs to become available.
  
Because of this boot process, use of an SD card to boot the RPi is mandatory. This does however mean that you cannot 'brick' the device.
+
En raison de ce processus d'amorçage, l'utilisation d'une carte SD pour démarrer le RPi est obligatoire. Cela implique cependant que vous ne pouvez pas le 'bricker'.
  
 
==Gestionnaires d'amorçage du GPU==
 
==Gestionnaires d'amorçage du GPU==

Revision as of 19:49, 25 May 2013


Retour vers le Hub.


Logiciels et Distributions :

Logiciels - une vue d'ensemble.

Distributions - systèmes d'exploitation et environnements de développement pour le Pi.

Compilation du noyau - conseils sur la compilation du noyau.

Performances - mesure des performances du Pi.

Programmation - langages de programmation utilisables sur le Pi.


Vue d'ensemble

Si vous souhaitez juste un système qui fonctionne, tout ce dont vous avez besoin est une carte SD corretement formatée. Pour les détails sur comment la créer ou en obtenir une, veuillez lire la page Hardware Basic Setup.

Afin de comprendre les composants logiciels du RPi, vous devez au préalable comprendre la façon dont il est amorcé. À la mise sous tension, le CPU est hors ligne, et un petit cœur RISC sur le GPU est responsable de l'amorçage du SoC, par conséquent, la plupart des éléments d'amorçage est en réalité exécutée par le code du GPU, pas par le CPU.

La séquence d'amorçage et les composants se répartissent ainsi :

  • First stage bootloader - This is used to mount the FAT32 boot partition on the SD card so that the second stage bootloader can be accessed. It is programmed into the SoC itself during manufacture of the RPi and cannot be reprogrammed by a user.
  • Second stage bootloader (bootcode.bin) - This is used to retrieve the GPU firmware from the SD card, program the firmware, then start the GPU.
  • GPU firmware (start.elf) - Once loaded, this allows the GPU to start up the CPU. An additional file, fixup.dat, is used to configure the SDRAM partition between the GPU and the CPU. At this point, the CPU is release from reset and execution is transferred over.
  • User code - This can be one of any number of binaries. By default, it is the Linux kernel (usually named kernel.img), but it can also be another bootloader (e.g. U-Boot), or a bare-bones application.

Prior to 19th October 2012, there was previously also a third stage bootloader (loader.bin) but this is no longer required. [1]

Raspbian Linux image (others?) available on the foundation's website ([1]) also contains cut-down versions of the above files (fixup_cd.dat, start_cd.elf). These are used when GPU memory is set to 16 MB, which in result disables some GPU features. More info here. In addition, there are also testing versions of the above files (fixup_x.dat, start_x.elf), which enable potentially unstable/not-fully-tested/hacky functionality - currently, using these files instead of the usual fixup.dat/start.elf will cause extra video codecs to become available.

En raison de ce processus d'amorçage, l'utilisation d'une carte SD pour démarrer le RPi est obligatoire. Cela implique cependant que vous ne pouvez pas le 'bricker'.

Gestionnaires d'amorçage du GPU

Currently all of the GPU software and firmware is supplied in binary format. For Raspbian the latest stable release is included in the image and can be updated with apt-get (see the adding software page). The latest bleeding edge version can be downloaded from the RPI firmware section on GitHub. At this time, the source code is not available.

rpi-update is also available as an easier way of updating the firmware and kernel. Please note, as this firmware is bleeding edge, it really should only be used by advanced users and could potentially still have bugs and be incompatible with existing images.

Distributions

Main page: Distributions

SD card images of a number of pre-built distributions including Raspbian (the RPi official distribution based on Debian), Arch Linux ARM, and RISC OS are available from the Raspberry Pi foundation website. Pre-loaded SD cards are also available from The Pi Hut.

Several other Distributions made RPI Images as well. See at http://www.raspberrypi.org/phpBB3/viewforum.php?f=18

Raspbian is the recommended distribution.

Noyau

Main page: RPi Kernel Compilation

The kernel is sources can be obtained from the RPI linux section on GitHub

Compilateur

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 for the ARM processor including GCC - please see ARM Compilers. There are also a number of cross-compiler toolchains - please see toolchains.

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

-Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s

-Ofast may produce compile errors for some programs. In this case, -O3 or -O2 should be used instead. Note that -mcpu=arm1176jzf-s can be used in place of -march=armv6zk -mtune=arm1176jzf-s.

If you want to generate a relatively up-to-date compiler that uses the optimal flags by default, you can roll your own version of Linaro GCC - see RPi Linaro GCC Compilation.

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. [2]

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).

Performances

Un grand nombre de résultats de tests de performances est disponible sur la page performances.

Programmation

Des environnements de développement sont disponibles selon le langage qui vous utilisez - voir la page programmation.

Émulation

Le processeur ARM du RPi peut être émulé grâce à QEMU. Voir le tutoriel d'emercer, et également cette discussion.

Références