[[https://arm.slackware.com/|Slackware ARM project web site]] | [[https://www.linuxquestions.org/questions/slackware-arm-108/|Forum]] | [[slackwarearm:development|Slackware ARM development documentation]] | [[slackwarearm:inst|Slackware ARM installation guides]] ^ ^ ^ | Document | Transition to the Raspberry Pi Kernel fork packages | | Version | 1.00, June 2023 | | Author | Stuart Winter | | See also | * [[slackwarearm:cstmz_kernel|Slackware AArch64 Kernel customisation and self-build options]] * [[slackwarearm:cstmz_kernel_rpi_selfbuild|Self-build Raspberry Pi Slackware Kernel packages]] | Read through this before following to familiarise yourself with the limitations and workarounds. If you can help with any of the configuration or have ideas for improvements to this document, please post on the [[https://www.linuxquestions.org/questions/slackware-arm-108/|Slackware ARM LinuxQuestions forum]]. ====== 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. Consequently, 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 [[slackwarearm:inst|official Slackware Linux installer]] * Migrate to the RPi Kernel fork packages from within the Operating System proper (i.e. 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, [[slackwarearm:cstmz_kernel|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'' In other Linux distributions, the [[https://www.raspberrypi.com/documentation/computers/config_txt.html|Raspberry Pi Native Boot Loader configuration file]] is ''/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: [[howtos:network_services:ntp|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 == You probably have the Slackware ARM GPG key installed at this point, but if not, use the command below to import it. $ curl -sSL https://www.slackware.com/infra/keys/arm/GPG-KEY | gpg --import - == Verify the packages == $ gpg --verify-files rpi-kernel-fork/*.asc If you see validation errors such as ''gpg: key 1623FC33 was created 1402910394 seconds in the future (time warp or clock problem)'' your machine's clock is wrong. === 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 == kernel-modules package **must** be upgraded first. root@rpi:/tmp/rpikernel/rpi-kernel-fork# upgradepkg kernel-modules-*.t?z kernel_arm*.t?z Unless you are compiling a package that requires something specific within the Raspberry Pi Kernel source, you do not need to upgrade the ''kernel-source'' package. === Warnings during upgrade === As a consequence of the Kernel configuration disparity, this warning message 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) [[https://slackware.uk/slackwarearm/slackwareaarch64-current/source/k/SlkOS-initrd-overlay/load_kernel_modules|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. {{:slackwarearm:slackarm-rpi-kernel-fork-missing-mods.png?600|}} === Warnings once the OS has booted === This message will appear on the Virtual Console every few minutes, and is due to the serial console configuration within the Kernel. init: Id "s0" respawning too fast: disabled for 5 minutes 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 Once you're running the Kernel from the RPi Kernel fork packages, ''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 ===== == Revert previous changes == - 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'' == Upgrade to the official Slackware Kernel packages == root@rpi:~# slackpkg update root@rpi:~# slackpkg upgrade-all {{:slackwarearm:slackarm-switchbackofficialkernel.png?600|}} You will see the same errors emitted as during the initial transition. These are harmless and can be ignored. WARNING: /boot/dtb-6.1.32/overlays/wm8960-soundcard.dtbo changed after package installation. --> Deleting /boot/dtb-6.1.32/overlays/wm8960-soundcard.dtbo --> Deleting empty directory /boot/dtb-6.1.32/overlays/ Verifying package kernel_armv8-6.1.32-aarch64-1.txz. Installing package kernel_armv8-6.1.32-aarch64-1.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.txz. modinfo: ERROR: Module algif_hash not found. modinfo: ERROR: Module algif_skcipher not found. modinfo: ERROR: Module bcm2835_codec not found. modinfo: ERROR: Module bcm2835_isp not found. modinfo: ERROR: Module rpivid_hevc not found. modinfo: ERROR: Module vc_sm_cma not found. modinfo: ERROR: Module uio_pdrv_genirq not found. modinfo: ERROR: Module uio not found. modinfo: ERROR: Module nvmem_rmem not found. Package kernel_armv8-6.1.32-aarch64-1.txz installed. Package kernel_armv8-6.1.32-aarch64-1_rpi upgraded with new package ./kernel_armv8-6.1.32-aarch64-1.txz. Searching for NEW configuration files... No .new files found. Finally, reboot.