This is an old revision of the document!
Table of Contents
Slackware ARM project web site | Forum | Slackware ARM development documentation | Slackware ARM installation guides
Document | Transition to the Raspberry Pi Kernel fork packages |
Version | 1.00, June 2023 |
Author | Stuart Winter <mozes@slackware> |
See also | * Slackware AArch64 Kernel customisation and self-build options * Self-build Raspberry Pi Slackware Kernel packages |
Background
Raspberry Pi's are only intended to run the vendor's own Linux distribution, or to run as an 'Appliance' using the Raspberry Pi Linux Kernel fork.
As a consequence, the upstream mainline Linux Kernel in which support for the Raspberry Pi is fragile, prone to breaking without warning and has a feature disparity (most noticeably for hardware support). Slackware uses official upstream repositories/releases and has a no-patch policy. As such, the recommendation of using the vendor's own Kernel fork is far outside the scope of Slackware.
If you are considering purchasing a Raspberry Pi and have not yet done so, take heed of this caution and you may wish to consider purchasing one of the other Hardware Models. Over time the support for the Raspberry Pi will continue to appear in the main stream Kernel.
The workaround
Install using the official Slackware Linux installer and official Kernel packages, then migrate to the RPi Kernel fork packages from within the Operating System proper (e.g. when the OS has been installed and booted) using the instructions within this document.
Caveats
General
Update cadence
These packages are typically upgraded once a month.
Testing
These packages aren't thoroughly tested, but because it uses the default Kernel configuration for the Raspberry Pi, the likelihood is that it'll work properly.
Kernel configuration change requests
Unlike with the Slackware AArch64 generic Kernel, where change requests (typically adding extra hardware/feature support) are accepted, Kernel config requests are not accepted for this Kernel. The default configuration for the Raspberry Pi is used. This is because these packages are to bridge the gap until the fixes and features are merged into the mainline Linux Kernel.
Feature disparity between the Slackware AArch64 generic Kernel
Since the Raspberry Pi default Kernel configuration is used to build these packages, there is an feature disparity between the Kernels.
If you want to update the Kernel or change its configuration, you can build your own Raspberry Pi Kernel fork packages from source easily.
Technical
In Slackware AArch64's default configuration, when switching to the Raspberry Pi Kernel fork packages there are a number of technical differences:
Console/video output only available on HDMI
By default in Slackware AArch64, the initial boot is available over the serial console and subsequently when fully booted, the OS can be accessed via the serial console and the Virtual Console (HDMI/monitor & keyboard). However, in the Raspberry Pi Kernels all output is directed to the virtual console (monitor/keyboard).
This author has tried changing the Kernel cmdline setting console=
values within the boot loader but has been unable to match the normal settings.
To set the console=
setting, add it to the APPEND
line within the U-Boot Boot Loader configuration:
/boot/extlinux/extlinux.conf
Example:
APPEND awaitrootdev earlyprintk rootfstype=ext4 root=LABEL=SLKroot irqpoll console=ttyAMA0,115200
If you want to experiment with the Raspberry Pi Native Boot Loader configuration options, edit:
/boot/platform/hwm_bw/config.txt
/boot/config.txt
. In Slackware, it's /boot/platform/hwm_bw/config.txt
Serial console access setting creates noise on the Virtual Console
Due to the issue with the serial console setting, there are persistent warnings emitted to the Virtual Console. These can be surpressed through a simple change covered in this document.
RTC model 'DS3231' not supported
The Raspberry Pi Kernel fork doesn't support the DS3231
RTC that is recommended in the Slackware AArch64 Installation Guide.
Workaround: Use NTP to syncronise the time.
Transitioning
slackpkg: Blacklist the official Slackware Kernel packages
If you are using 'slackpkg' to keep your system up to date, you should blacklist the official Linux Kernel Slackware packages to prevent them from replacing the Raspberry Pi versions.
$ cat << EOF >> /etc/slackpkg/blacklist # Blacklist the official Linux Kernel Slackware packages so that the # Raspberry Pi Kernel fork packages can remain installed. kernel-modules-armv8 kernel_armv8 kernel-source # The kernel-headers package should not be blacklisted. The official Slackware # package should remain - there's no need to install an RPi specific version. #kernel-headers EOF
Download the Raspberry Pi Kernel fork Slackware packages
$ mkdir /tmp/rpikernel && cd /tmp/rpikernel
Set the version of Slackware
Example for the development tree:
$ SLKVER=current
Example for a stable release:
$ SLKVER=15.1
Set the distribution server
$ SLKSRV=ftp.arm.slackware.com::slackwarearm
Download the packages
$ rsync --delete -PavL $SLKSRV/experimental/slackwareaarch64-${SLKVER}/rpi-kernel-fork . $ cd rpi-kernel-fork
Verify the download
Import the Slackware ARM GPG key
$ curl -sSL https://www.slackware.com/infra/keys/arm/GPG-KEY | gpg --import -
Verify the packages
$ gpg --verify-files *.asc
Transition to the new Kernel packages
Elevate privileges to 'root'
$ su -
Change into the directory in which the Raspberry Pi Kernel fork packages have been downloaded:
root@rpi:# cd /tmp/rpikernel/rpi-kernel-fork
'Upgrade' to the new packages
root@rpi:/tmp/rpikernel/rpi-kernel-fork# upgradepkg kernel-modules-*.t?z kernel_arm*.t?z
kernel-source
package.
Warnings during upgrade
The packages of the Raspberry Pi Kernel fork are configured using the default Kernel configuration for that Hardware Model, rather than the generic configuration for Slackware. As a consequence, there is a feature disparity between the two Kernels which presents itself during the transition in the following ways.
These warnings are harmless and should be ignored.
Missing modules
Installing package kernel_armv8-6.1.31-aarch64-1_rpi.txz: PACKAGE DESCRIPTION: # Linux kernel for the 64-bit AArch64/ARM64 platform. # # This is a generic Linux kernel for systems that are powered by an # ARM CPU that supports the ARMv8 or higher chip set. # # # # # Other drivers (such as additional file system support) may be # loaded as modules. See /etc/rc.d/rc.modules for examples. Executing install script for kernel_armv8-6.1.31-aarch64-1_rpi.txz. modinfo: ERROR: Module mrp not found. modinfo: ERROR: Module btsdio not found. [..] modinfo: ERROR: Module simpledrm not found. Package kernel_armv8-6.1.31-aarch64-1_rpi.txz installed. Package kernel_armv8-6.1.31-aarch64-1 upgraded with new package ./kernel_armv8-6.1.31-aarch64-1_rpi.txz.
Modified files
If official Slackware Kernel release is the same as the Raspberry Pi, you may see warning messages indicating that numerous files have been modified since the package was installed.
Reboot into the new Kernel
Now that the Kernel packages have been upgraded, you can reboot your Raspberry Pi:
Still as root:
root@rpi ~# reboot
Warnings during boot
You may see a number of 'FATAL' messages during boot as the Operating System Initial RAM Disk (OS InitRD) Kernel Module Loader scripts attempt to load modules that are not present due to the disparity between the generic Slackware Kernel configuration and the Raspberry Pi's. These are harmless and should be ignored.
Warnings once the OS has booted
init: Id "s0" respawning too fast: disabled for 5 minutes
This is due to the serial console configuration and will be outputted to the Virtual Console. It's harmless and can be ignored or disabled.
root@rpi:~# nano /etc/inittab
Find this line and comment it out (prepend a #
):
# Local serial lines: s0:12345:respawn:/sbin/agetty --keep-baud 115200,38400,9600 ttyS1 vt100
Cause init
to reload its configuration:
root@rpi:~# killall -HUP init
Keeping the RPi Kernel fork packages up to date
Repeat the steps above to :
- Download the packages
- Verify the packages
- Upgrade the packages - remembering to upgrade the
kernel-modules
package first! - Reboot
upgradepkg
should not emit any of the errors or warnings surfaced during the initial transition: it should be clean as shown in the output below.
Verifying package kernel_armv8-6.1.32-aarch64-1_rpi.txz. Installing package kernel_armv8-6.1.32-aarch64-1_rpi.txz: PACKAGE DESCRIPTION: # Linux kernel for the 64-bit AArch64/ARM64 platform. # # This is a generic Linux kernel for systems that are powered by an # ARM CPU that supports the ARMv8 or higher chip set. # # # # # Other drivers (such as additional file system support) may be # loaded as modules. See /etc/rc.d/rc.modules for examples. Executing install script for kernel_armv8-6.1.32-aarch64-1_rpi.txz. Package kernel_armv8-6.1.32-aarch64-1_rpi.txz installed. Package kernel_armv8-6.1.31-aarch64-1_rpi upgraded with new package ./kernel_armv8-6.1.32-aarch64-1_rpi.txz. root@rpi:/tmp/rpikernel/rpi-kernel-fork#
Rolling back to the official Slackware Linux Kernel packages
- Comment/remove the Kernel packages from slackpkg's blacklist
- Uncomment serial line configuration in
/etc/inittab
- Revert any changes within the Raspberry Pi's Native Boot Loader config:
/boot/platform/hwm_bw/config.txt
- Revert any changes within the Slackware U-Boot Boot Loader config:
/boot/extlinux/extlinux.conf