[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

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
howtos:hardware:arm:raspberrypi3 [2019/07/25 17:03 (UTC)] – text arrangement exagahowtos:hardware:arm:raspberrypi3 [2019/08/23 05:02 (UTC)] – [Manual install method without a Raspbian image] add the Bluetooth subsection, add the Keyboard subsection, add the Memory subsection, add the UART subsection, add a recommendation for the the ''/etc/HOSTNAME'' file, put a space between values and units, yugiohjcj
Line 12: Line 12:
  
 ^ Site ^ Slackware versions ^ Using official Slackware packages ^ Installation methods ^ Notes ^ ^ Site ^ Slackware versions ^ Using official Slackware packages ^ Installation methods ^ Notes ^
-| [[http://sarpi.co.uk/|SARPi Project]] | 14.2,-current | Yes | Slackware installer | An end-to-end HOW TO tutorial taking you through the installation and setup process. |+| [[http://sarpi.fatdog.eu/|SARPi Project]] | 14.2,-current | Yes | Slackware installer | An end-to-end HOW TO tutorial taking you through the installation and setup process. |
  
 ==== AArch64 ARM64 [Experimental], Slackware ARM -current ==== ==== AArch64 ARM64 [Experimental], Slackware ARM -current ====
Line 22: Line 22:
  
  
-==== Manual install method without a Raspbian image ====+==== Manual install method ====
  
-As long you use the most recent release of firmware [i.e. post-June 2019] and the latest Raspbian Buster image the [[howtos:hardware:arm:raspberrypi|Raspberry Pi 1 manual install method]] also works for the Pi 3. +This method is for installing Slackware ARM 14.2 on a Raspberry Pi 3 Model B.
- +
-This method is for installing Slackware ARM 14.2 on a Raspberry Pi 3 Model B without a Raspbian image.+
 However, it should work for other Slackware ARM and Raspberry Pi versions. However, it should work for other Slackware ARM and Raspberry Pi versions.
  
Line 49: Line 47:
  
 Remarks: Remarks:
-  * I use a 32GB SD Card +  * I use a 32 GB SD Card 
-  * I choose 32MB for the size of the first partition+  * I choose 32 MB for the size of the first partition
   * I let the empty space left for the second partition   * I let the empty space left for the second partition
  
Line 83: Line 81:
  
 Remarks: Remarks:
-  * I set "passwordas password for the "rootuser +  * I set ''password'' as password for the ''root'' user 
-  * I set DHCP on the "eth1network interface +  * I set DHCP on the ''eth1'' network interface 
-  * I allow the "rootuser to connect through SSH+  * I allow the ''root'' user to connect through SSH
  
 === 4. Insert the SD Card in the Raspberry Pi === === 4. Insert the SD Card in the Raspberry Pi ===
Line 91: Line 89:
 Your SD Card is ready so you can insert it in the Raspberry Pi and boot. Your SD Card is ready so you can insert it in the Raspberry Pi and boot.
  
-You can connect remotely to your Raspberry Pi as "rootthrough SSH.+You can connect remotely to your Raspberry Pi as ''root'' through SSH.
 <code> <code>
 $ ssh root@raspberrypi $ ssh root@raspberrypi
Line 104: Line 102:
  
 Remarks: Remarks:
-  * I consider that the Raspberry Pi hostname is "raspberrypi" +  * I consider that the Raspberry Pi hostname is ''raspberrypi'' 
-  * I recommend to add a normal user and use this user instead of "root" +  * I recommend to add a normal user by using the ''adduser'' command and use this user instead of ''root'' 
-  * I recommend to change the "rootuser password +  * I recommend to change the ''root'' user password by using the ''passwd'' command 
-  * I recommend to disallow the "rootuser to connect through SSH+  * I recommend to disallow the ''root'' user to connect through SSH by editing the ''/etc/ssh/sshd_config'' file
   * I recommend to [[https://www.raspberrypi.org/documentation/linux/kernel/building.md|build your own Linux kernel]] packages because the kernel you are running does not match with the installed Slackware ARM packages   * I recommend to [[https://www.raspberrypi.org/documentation/linux/kernel/building.md|build your own Linux kernel]] packages because the kernel you are running does not match with the installed Slackware ARM packages
 +  * I recommend to change the ''slackware.localdomain'' hostname by editing the ''/etc/HOSTNAME'' file
  
 === 5. Tips and tricks === === 5. Tips and tricks ===
  
-== 5.1. Processor ==+== 5.1. Bluetooth ==
  
-The Raspberry Pi processor can reach 1.2GHz+The Raspberry Pi has a Broadcom chip providing Bluetooth. 
-However, by default, it is stuck to 600MHz even if it is used at 100%.+However, the required firmware is not installed on Slackware ARM. 
 +It means that you need to download and install it: 
 +<code> 
 +$ git clone https://github.com/OpenELEC/misc-firmware.git 
 +$ mkdir -pv /where/you/want/to/install/etc/firmware 
 +$ cp -v misc-firmware/firmware/brcm/BCM43430A1.hcd /where/you/want/to/install/etc/firmware 
 +</code> 
 +Then build your own Slackware ARM ''bluez-firmware-brcm'' package and install it. 
 + 
 +In order to enable Bluetooth you need to add the Bluetooth module, run the Bluetooth daemon, attach the device then open and initialize the device. 
 +Add the following lines to the end of the ''/etc/rc.d/rc.local'' file: 
 +<code> 
 +if ps axc | grep -q bluetoothd; then 
 + killall bluetoothd 
 +fi 
 +if ps axc | grep -q hciattach; then 
 + killall hciattach 
 +fi 
 +if lsmod | grep -q hci_uart; then 
 + rmmod hci_uart 
 +fi 
 +if lsmod | grep -q btbcm; then 
 + rmmod btbcm 
 +fi 
 +modprobe btbcm 
 +bluetoothd & 
 +while ! hciattach /dev/ttyAMA0 bcm43xx; do 
 + echo "Unable to attach the device! We try again..." 
 +done 
 +hciconfig hci0 up 
 +</code> 
 +Remark: Sometimes there is a failure with the ''hciattach'' command so that is why you need a ''while''
 + 
 +You can check that Bluetooth is working by typing: 
 +<code> 
 +$ hcitool dev 
 +$ hcitool scan 
 +$ sudo bluetoothctl 
 +</code> 
 +Now, the Bluetooth is correctly set. 
 + 
 +== 5.2. Keyboard == 
 + 
 +The default keyboard map on Slackware ARM is the one of United Kingdom. 
 +If you want to load an other keyboard map, edit the ''/etc/rc.d/rc.keymap'' file. 
 + 
 +If you want to change the keyboard layout for X11, you need to copy the X11 configuration file then edit it: 
 +<code>sudo cp /usr/share/X11/xorg.conf.d/90-keyboard-layout.conf /etc/X11/xorg.conf.d</code> 
 +Now, the keyboard is correctly set. 
 + 
 +== 5.3. Memory == 
 + 
 +Unfortunately, the Raspberry Pi has only 1 GB of memory. 
 +It means that you will eventually not be able to run some applications requiring more memory. 
 +However, you can extend your memory by creating a temporary 4 GB swap partition: 
 +<code> 
 +$ dd if=/dev/zero of=/tmp/swap bs=1M count=4000 
 +$ mkswap /tmp/swap 
 +$ sudo swapon /tmp/swap 
 +</code> 
 + 
 +You can check the current memory by typing: 
 +<code>$ free</code> 
 +Now, the memory is correctly set. 
 + 
 +== 5.4. Processor == 
 + 
 +The Raspberry Pi processor can reach 1.2 GHz
 +However, by default, it is stuck to 600 MHz even if it is used at 100%.
 You can check the current frequency of the processor by typing: You can check the current frequency of the processor by typing:
 <code>$ cpufreq-info</code> <code>$ cpufreq-info</code>
  
-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.+In order to reach 1.2 GHz 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: Add the following line to the end of the ''/etc/rc.d/rc.local'' file:
 <code>echo ondemand | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor</code> <code>echo ondemand | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor</code>
 Now, the processor is correctly set. Now, the processor is correctly set.
  
-== 5.2. Time ==+== 5.5. Time ==
  
 Unfortunately, the Raspberry Pi does not provide a Real-Time Clock (RTC). Unfortunately, the Raspberry Pi does not provide a Real-Time Clock (RTC).
Line 134: Line 201:
 Now, the time is correctly set. Now, the time is correctly set.
  
-== 5.3. Video ==+== 5.6. Video ==
  
-Unfortunately, the Raspberry Pi is not compatible with OpenGL (it is compatible OpenGL ES that is a subset of OpenGL).+Unfortunately, the Raspberry Pi is not compatible with OpenGL (it is compatible with OpenGL ES that is a subset of OpenGL).
 It means that, by default, each application requiring OpenGL will be slow. 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. 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:+Firstly, you need to build Mesa (>= 17.1.10) with the VC4 DRI driver:
 <code> <code>
 $ CFLAGS="-O2 -march=armv8-a -mtune=cortex-a53 -mfloat-abi=softfp -mfpu=neon-vfpv4" \ $ CFLAGS="-O2 -march=armv8-a -mtune=cortex-a53 -mfloat-abi=softfp -mfpu=neon-vfpv4" \
Line 153: Line 220:
 $ make install DESTDIR=/where/you/want/to/install $ make install DESTDIR=/where/you/want/to/install
 </code> </code>
-Then build your own Slackware ARM Mesa package and install it.+Then build your own Slackware ARM ''mesa'' package and install it (you can safely upgrade the one provided by Slackware ARM).
  
 Secondly, add the following line to the end of the ''/boot/config.txt'' file: Secondly, add the following line to the end of the ''/boot/config.txt'' file:
Line 159: Line 226:
 Then reboot the Raspberry Pi. 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 terminal:+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 X11 terminal:
 <code>$ glxgears</code> <code>$ glxgears</code>
  
 +An other problem with the video is that the default resolution is 1824x984.
 +It means that you can see black borders around your 1920x1080 screen.
 +In order to fix that, add the following line to the end of the ''/boot/config.txt'' file:
 +<code>disable_overscan=1</code>
 +Then reboot the Raspberry Pi.
 +
 +You can check that you are using a 1920x1080 resolution on the Raspberry Pi by typing the following command in an X11 terminal:
 +<code>$ xrandr</code>
 Now, the video is correctly set. Now, the video is correctly set.
 +
 +== 5.7. UART ==
 +
 +In the ''/etc/inittab'' file, ''s0'' refers to the mini [[https://www.raspberrypi.org/documentation/configuration/uart.md|UART]] that is disabled by default on the Raspberry Pi.
 +Consequently, every 5 minutes, this line will be written to ''/dev/tty1'' by the ''init'' process:
 +<code>INIT: Id "s0" respawning too fast: disabled for 5 minutes</code>
 +
 +An easy fix is to edit the ''/etc/inittab'' file and replace the following line:
 +<code>s0:12345:respawn:/sbin/agetty 115200 ttyS0 vt100</code>
 +with this one:
 +<code>#s0:12345:respawn:/sbin/agetty 115200 ttyS0 vt100</code>
 +Then reboot the Raspberry Pi.
 +Now, the UART is correctly set.
 ===== Sources ===== ===== Sources =====
  
 howtos:hardware:arm:raspberrypi3 ()