[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Ceci est une ancienne révision du document !


Slackware ARM sur Raspberry Pi 3

Le Raspberry Pi 3 a un Broadcom BCM2837 SoC qui intégre un CPU Quad-core ARMv8 Cortex-A53 [64 bit] @ 1.2GHz et un GPU VideoCore IV @ 400MHz, et il arrive avec une carte SDRAM 1GB LPDDR2 @ 900MHz. Cette carte mère revisé et mise à jour succède au Raspberry Pi (2); elle est considérablement plus rapide et beaucoup plus puissante. Le Wi-Fi et le Bluetooth sont maintenant fournis sur la carte. Pas encore de RTC cependant.Voyez le RPI3 comme une rénovation plutôt que comme une innovation. Slackware ARM, comme vous pouvez y attendre, tourne sans souci sur cet appareil avec une vitesse nettement accrue par rapport auv versions précédentes. Les temps de compliation sont beaucoup plus courts par rapport au RPI2 par exemple.

Le Raspberry Pi 3 est supporté en dehors de la branche officielle de Slackware ARM par la communauté Slackware.

Slackware version 14.2, -current

Slackware ARM current ou Slackware ARM 14.2 peuvent être installés sur le Raspberry Pi 3.

Suivez les liens dans la table ci-dessous. Ils sont maintenus par un développeur séparé qui fait partie de la communauté Slackware autour du Raspberry Pi.

Site Versions Slackware Utilisation des paquetages Slackware officiels Méthodes d'installation Notes
FatDog 14.2,-current Oui Installateur Slackware Un guide complet d'installation et de paramétrage

Aussi longtemps que vous utilisez l’image Raspbian et le firmware les plus récents la méthode d'installation manuelle du Raspberry Pi 1 marchera également pour le Pi2 et le Pi3.

Installation manuelle sans image Raspbian

Cette méthode permet d'installer Slackware ARM 14.2 sur un Raspberry Pi 3 Model B qui n'a pas d'image Raspbian. cpendant elle doit aussi fonctionner pour d'autres versions de Slackware ARM et de Raspberry Pi.

1. Partition et formatage de la carte SD

$ sudo fdisk -l /dev/mmcblk0

Disk /dev/mmcblk0: 31.9 GB, 31914983424 bytes
4 heads, 16 sectors/track, 973968 cylinders, total 62333952 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1            2048       67583       32768    b  W95 FAT32
/dev/mmcblk0p2           67584    62333951    31133184   83  Linux
$ sudo mkfs.vfat /dev/mmcblk0p1
$ sudo mkfs.ext4 /dev/mmcblk0p2

Remarques:

  • J'utilise une carte SD de 32 Go
  • Je choisis 32 Mo comme taille de la première partition
  • Je laisse tout l'espace vide pour la seconde partition

2. Mettre le firmware du Raspberry Pi sur la carte SD

$ git clone https://github.com/raspberrypi/firmware.git
$ sudo mount /dev/mmcblk0p1 ~/mnt
$ sudo cp -r firmware/boot/* ~/mnt
$ sudo umount ~/mnt
$ sudo mount /dev/mmcblk0p2 ~/mnt
$ sudo mkdir -p ~/mnt/lib/modules
$ sudo cp -r firmware/modules/* ~/mnt/lib/modules
$ sudo umount ~/mnt

3. Mettre le filesystem mini root de Slackware ARM sur la carte SD mini

$ wget -c ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-devtools/minirootfs/roots/slack-14.2-miniroot_01Jul16.tar.xz
$ sudo mount /dev/mmcblk0p2 ~/mnt
$ sudo tar -C ~/mnt -xf slack-14.2-miniroot_01Jul16.tar.xz
$ echo "/dev/mmcblk0p1 /boot vfat defaults 0 0" | sudo tee ~/mnt/etc/fstab
$ echo "/dev/mmcblk0p2 /     ext4 defaults 0 0" | sudo tee -a ~/mnt/etc/fstab
$ echo "proc           /proc proc defaults 0 0" | sudo tee -a ~/mnt/etc/fstab
$ PASSWD=$(openssl passwd -1 -salt cetkq/enZx6/c2 password)
$ sudo sed -i "s|\(root:\).*\(:16983:0:::::\)|\1${PASSWD}\2|" ~/mnt/etc/shadow
$ sudo sed -i 's|USE_DHCP\[1\]=""|USE_DHCP\[1\]="yes"|' ~/mnt/etc/rc.d/rc.inet1.conf
$ echo "PermitRootLogin yes" | sudo tee -a ~/mnt/etc/ssh/sshd_config
$ sudo umount ~/mnt

Remarques:

  • Je mets “password” comme mot de passe pour l'utilisateur “root”
  • J'active DHCP sur l'interface réseau “eth1”
  • J'autorise l’utilisateur “root” à se connecter par SSH

4. Insérer la carte SD dans le Raspberry Pi

Votre carte SD est prête et vous pouvez l'insérer dans le Raspberry Pi et le démarrer.

Vous pouvez vous connecter à distance sur votre Raspberry Pi par SSH en tant que “root”.

$ ssh root@raspberrypi

Dès que vous êtes connecté, vous pouvez installer les paquetages additionnels de Slackware ARM:

$ wget --mirror ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-14.2
$ upgradepkg --install-new ftp.arm.slackware.com/slackwarearm/slackwarearm-14.2/slackware/*/*.txz
$ removepkg ftp.arm.slackware.com/slackwarearm/slackwarearm-14.2/slackware/*/kernel_*.txz
  • Je considère que nom d'hôte du Raspberry Pi est “raspberrypi”
  • Je recommande de choisir un utilisateur normal plutôt que “root”
  • Je recommande de changer le mot de passe de “root”
  • Je recommande d'interdire à “root” de se connecter par ssh
  • Je recommande de créer vos propres paquetages du noyau Linux car le noyau que vous utilisez ne coïncident pas avec les paquetages installés de Slackware ARM

5. Tips and tricks

5.1. Processor

The Raspberry Pi processor can reach 1.2GHz. However, by default, it is stuck to 600MHz even if it is used at 100%. You can check the current frequency of the processor by typing:

$ cpufreq-info

In order to reach 1.2GHz when the processor is used at 100% (i.e., use the frequency scaling), you need to change the default governors. Add the following line to the end of the /etc/rc.d/rc.local file:

echo ondemand | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

Now, the processor is correctly set.

5.2. Time

Unfortunately, the Raspberry Pi does not provide a Real-Time Clock (RTC). That is why there is no battery included with the board. It means that each time you shutdown the Raspberry Pi, the time is reset! However, if you have internet access, you can update the time during the Slackware ARM boot. Add the following line to the end of the /etc/rc.d/rc.local file:

ntpdate pool.ntp.org

Now, the time is correctly set.

5.3. Video

Unfortunately, the Raspberry Pi is not compatible with OpenGL (it is compatible OpenGL ES that is a subset of OpenGL). It means that, by default, each application requiring OpenGL will be slow. However, you can reach 60 FPS with OpenGL applications on the Raspberry Pi by using the correct driver.

Firstly, you need to build Mesa (>= 17.0.4) with the VC4 DRI driver:

$ CFLAGS="-O2 -march=armv8-a -mtune=cortex-a53 -mfloat-abi=softfp -mfpu=neon-vfpv4" \
	CXXFLAGS="-O2 -march=armv8-a -mtune=cortex-a53 -mfloat-abi=softfp -mfpu=neon-vfpv4" \
	./configure \
	--prefix=/usr \
	--sysconfdir=/etc \
	--with-dri-driverdir=/usr/lib/xorg/modules/dri \
	--with-egl-platforms=x11,drm \
	--with-gallium-drivers=vc4
$ make -j4
$ make install DESTDIR=/where/you/want/to/install

Then build your own Slackware ARM Mesa package and install it.

Secondly, add the following line to the end of the /boot/config.txt file:

dtoverlay=vc4-fkms-v3d

Then reboot the Raspberry Pi.

You can check that you are able to get 60 FPS with OpenGL applications on the Raspberry Pi by typing the following command in an X terminal:

$ glxgears

Now, the video is correctly set.

Sources

 fr:howtos:hardware:arm:raspberrypi3 ()
Cette traduction est plus ancienne que la page originale et est peut-être dépassée. Voir ce qui a changé.