[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 1

Comme il y a beaucoup d'appareils ARM qui arrivent sur le marché, il n'est pas possible de fournir du support pour tous dans la branche principale.

C'est pourquoi le Raspberry Pi est supporté en dehors de la branche principale de Slackware ARM par le communauté Slackware.

Slackware versions 13.37, 14.0, 14.2

Depuis la sortie de Slackware ARM 14.0, il y a eu de nombreux efforts de la communauté pour porter Slackware sur l'appareil :

Slackware ARM 14.2 est la seule version disponible qui est officiellement supportée/maintenue et qui tourne sur le Raspberry Pi 1. Les versions ultérieures à la version 14.2 de Slackware ARM ne sont pas “backwards compatibles” car elles ont migrées vers une interface matérielle ABI flottante et qu'elles nécessitent une version de CPU supérieure ou égale à V7.Le Raspberry Pi 1 n'a qu'une architecture de type ARM V6.

Vous devez suivre un des liens de la table ci-dessous. Chacun est maintenu par un auteur séparé qui fait parti de la communauté Slackware

Site Versions de Slackware Utilise les paquets officiels Slackware Méthodes d'installation Notes
FatDog 14.2 Oui Installateur Slackware Un guide complet d'installation et de configuration de bout en bout.
Stanley Garvey 14.0 Oui Installateur Slackware & Images précompilées Images précompilées de l'OS prêtes à être copiées sur une carte SD.
Dave's Collective 13.37 Oui Installateur Slackware Un excellent jeu d'instructions pour faire tourner Slackware ARM sur votre Raspberry Pi.

Méthode d'installation manuelle

Bien que la communauté fasse son maximum pour suivre les changements matériels il peut y avoir des moments où les notes et les images ci-dessus ne sont pas disponibles. Si cela vous arrive, vous pouvez contourner le problème en utilisant une image “miniroot” et une partition fonctionnelle venant d'une autre source (par exemple de Rasbian). Si le noyau est la seule solution, vous pouvez compiler votre propre noyau à partir des sources (regardez ici comment faire).

Voici les étapes à suivre pour établir un système Slackware ARM minimal à partir d'une image “minroot”:

Téléchargez l'image courante stable de Raspian sur le site http://www.raspberrypi.org/downloads Décompressez la et montez les partitions sur place en “loopback” puis mettez tout ce qui est nécessaire dans une archive tar pour plus tard/

root@darkstar:/tmp# fdisk -l 2016-05-10-raspbian-jessie-lite.img

Disk 2016-05-10-raspbian-jessie-lite.img: 1.3 GiB, 1386217472 bytes, 2707456 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
Disklabel type: dos
Disk identifier: 0x84f9d19f

Device                               Boot  Start     End Sectors  Size Id Type
2016-05-10-raspbian-jessie-lite.img1        8192  137215  129024   63M  c W95 FAT
2016-05-10-raspbian-jessie-lite.img2      137216 2707455 2570240  1.2G 83 Linux

root@darkstar:/tmp# losetup -o $((8192 * 512)) /dev/loop0 2016-05-10-raspbian-jessie-lite.img
root@darkstar:/tmp# losetup -o $((137216 * 512)) /dev/loop1 2016-05-10-raspbian-jessie-lite.img
root@darkstar:/tmp# mount -o ro /dev/loop1 /mnt/floppy/
root@darkstar:/tmp# mount -o ro /dev/loop0 /mnt/floppy/boot
root@darkstar:/tmp# cd /mnt/floppy/
root@darkstar:/mnt/hd# tar vcpzf /tmp/raspbian_boot_stuff.tgz boot lib/modules/ lib/firmware opt/vc

Please note the sectors of the beginning of the partitions: 8192 and 137216. We need to multiply these by 512 to get the byte offset for the loop device setup. This is done by $((8192 * 512)) and $((137216 * 512)). You will need to change these if the image partitioning scheme changes.
Now partition and format an SD like this: (NB the “fdisk -l” is just to show how I partitioned my SD)

root@darkstar:~# fdisk  -l -u  /dev/sde

Disk /dev/sde: 4093 MB, 4093640704 bytes
126 heads, 62 sectors/track, 1023 cylinders, total 7995392 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: 0xd0b5414a

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1            2048      133119       65536    c  W95 FAT32 (LBA)
/dev/sde2          133120     7995391     3931136   83  Linux
root@darkstar:~# mkdosfs -F 16 /dev/sde1
root@darkstar:~# mke2fs -t ext4 -b 4096 -i 16384 -m 0  -L root /dev/sde2
root@darkstar:~# mount -o noatime /dev/sde2 /mnt/hd/
root@darkstar:~# mkdir /mnt/hd/boot
root@darkstar:~# mount -o noatime /dev/sde1 /mnt/hd/boot/

It's not a typo I got a bad headache figuring out why it did not work: the boot partition is to me made with id “c” but such small partitions have issues when you try to make a fat32 filesystem on them, you will get an error lamenting some issue with insufficient clusters but some sort of filesystem is made and if you ignore that and proceed you end up with something that does not boot. What you need to do is actually tell mkdosfs to make a fat16 filesystem and then things start to work right.

Now you can extract the Slackware ARM miniroot and then the raspbian_boot_stuff.tgz in /mnt/hd.
Edit the /mnt/hd/boot/cmdline.txt and add at the end “ro” and check that the root parameter matches the partitioning of the SD.
Edit the fstab to match your formatting (if that was like I suggested it will look like this:)

root@darkstar:/mnt/hd/etc# cat fstab
proc            /proc           proc    defaults          0       0
/dev/mmcblk0p1  /boot           vfat    errors=remount-ro          0       2
/dev/mmcblk0p2  /               ext4    errors=remount-ro,noatime  0       1
root@darkstar:/mnt/hd/etc# 

You can now umount the SD, insert it into the RasbberyPI and boot into your Slackware ARM miniroot to add whatever else you need.
I generally add whatever else I need by simply using wget to pull down slackpkg, installing manually the downloaded slackpkg, editing the mirrors file and then install the rest that's needed with slackpkg itself (internet connection is required for this).
You might want to edit or comment the serial console in inittab to suppress the “s0” respawning to fast message.

Incidentally if you download a recent version of raspbian this procedure will create bootable images for the RPi, RPi 2, RPi 3, and RPi Zero.

Sources

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