SARPi Project - Slacking on a Raspberry Pi


Upgrading Slackware Linux on a Raspberry Pi using SARPi system packages

Upgrading the SARPi kernel, kernel-modules, and boot-firmware packages on a Slackware Linux system running on a Raspberry Pi is not an automated process by default, as one might assume or expect. This is because the packages built and distributed by the SARPi Project are not part of the official Slackware Linux package-tree and tools like 'slackpkg' will not recognise such packages. The information in this guide explains why and includes instructions on how to successfully upgrade your Slackware Linux system running on a Raspberry Pi with SARPi system packages.

SARPi Project muse views ...If you're not interested in all of the information on this page, and only want the instructions on how to upgrade using SARPi packages, then skip to the "Upgrading with SARPi system packages" section.

Differences between Slackware Linux kernel and those built by the SARPi Project

The Slackware Linux OS comes with its own kernel, modules, and firmware packages, which can easily be managed, installed and/or removed, with 'pkgtool' or 'slackpkg' (for example) as they are included in the Slackware Linux package-tree. On most ARM based computer systems these official packages work flawlessly and are more than adequate.

On the Raspberry Pi devices it's a little different because of the way the purposely designed boot loader works (i.e. from a FAT32 partition), and due to some propietary hardware that's unique to this family of ARM devices. The mainline Linux kernel source, which Slackware Linux builds and distributes, does not include all of the Raspberry Pi-specific patches which are implemented in order to fully support any bespoke hardware, such as the Broadcom VideoCore processor which currently can only be found on Raspberry Pi SoCs.

The reason why the SARPi Project compiles its installer images and kernel packages using the Raspberry Pi kernel source is very straightforward; it's all been preconfigured and optimised specifically for these ARM devices (e.g. processors, buses, GPIO, etc.) and requires no additional patching or extra work. However, by building these SARPi kernel packages and distributing them, unfortunately that does not translate to end-users (i.e. YOU) who need to do some extra work in order to manage and maintain these unofficial Slackware Linux packages.

Which official Slackware Linux packages should not be installed on the Raspberry Pis?

The official Slackware Linux kernel related packages that should not be installed while running on a Raspberry Pi device are; kernel_armv7 and kernel-modules-armv7. These packages will replace any existing kernel and modules on your system and are not configured, or have been patched, specifically for the Raspberry Pi devices. The kernel and kernel-modules always go hand-in-hand and each should be compiled from the same source code to maintain compatibility. Although it should be noted that there's absolutely nothing wrong at all with the official Slackware Linux kernel and kernel-modules packages, and they work as intended on many existing ARM devices, it's just that they are not optimised for the Raspberry Pis.

SARPi Project muse views ... There may come a time when MoZes (the Slackware Team's ARM port developer) fully supports the Raspberry Pi devices in his OS distribution. Until then, installing the official Slackware Linux kernel packages highlighted above may render your system unbootable on Raspberry Pi devices.

When using 'slackpkg upgrade-all' you can select/deselect these packages by highlighting any kernel and kernel-modules packages in the list and pressing the key. The screenshot below shows a kernel 5.14.10 version as an available upgrade, but your own will almost certainly be different.

slackpkg

You can check the status of official Slackware Linux installed [kernel] packages using 'slackpkg' built-in search functions...

slackpkg

You can also check the status of any installed [kernel] packages (official Slackware Linux or otherwise) using 'ls' and piped 'grep' commands...

ls grep kernel

The caveat is that the kernel-headers package is OK to install/upgrade only if the current kernel (or the one to be installed/upgraded) is the same MAJOR:MINOR version (e.g. kernel 5.14.9 -- 5=MAJOR, 14=MINOR, 9=REVISION). So, for example, if you are using kernel 5.14.x then the official Slackware Linux kernel-headers package is fine to keep. The kernel-headers package MAJOR:MINOR version should always match that of the kernel exactly! In the event that the official Slackware Linux kernel-headers package does not match that of the SARPi kernel version then a 'kernel-headers-sarpi' package is available from the relevant SARPi Downloads page.

The 'kernel-source' package should also match the kernel MAJOR:MINOR version if it's intended to be used for purposes on the same system. It's entirely at the end-users discretion whether this package is installed because it's not always required.

Upgrading the SARPi kernel, kernel modules, and boot-firmware on Slackware Linux

As mentioned previously, the SARPi Project system packages are not included in the official Slackware Linux package-tree. That means in order to install and/or upgrade new packages it should be done manually. Alternatively, a third-party tool such as 'slackpkg+' can be used to manage it, but we're not going to cover that here.

First we check our system to see which kernel version it is currently running. This is achieved with the 'uname' command:

uname -a

The results of running this command informs us that our system is running Linux kernel 5.14.9 version.

So, the easiest way to upgrade with SARPi system packages (i.e. kernel, kernel-modules, kernel-headers, boot-firmware, etc.) is, as 'root' user, to create a new directory and download any updated packages into it, then install/upgrade them from there.

It can be done like this...

root@slackware:~# mkdir -p /tmp/sarpi-pkgs
root@slackware:~# cd /tmp/sarpi-pkgs

This has created a temporary directory to use and made it the current working directory. You can basically have this directory located anywhere on your system and name it whatever you like.

Now to download the package files. You can achieve this by any methods that are easiest for you; rsync, ftp, scp, or downloading via your browser, and saving the files into the temporary directory you have created for this purpose - e.g. '/tmp/sarpi-pkgs' or whichever directory you chose.

For example, we're using a Raspberry Pi 4 installed with Slackware AArch64 current (the hostname of our system is 'torq'), and we want to download and upgrade the kernel and boot-firmware for our system using newer SARPi packages. We will get these packages from the Slackware UK mirror repository, who generously host the SARPi Project downloads, and we'll do this using 'rsync' because it's quick, easy, and very reliable.

To download all of the latest SARPi system packages for Slackware AArch64 current, we do it like this:

root@torq:/tmp/sarpi-pkgs# rsync -Parv slackware.uk::sarpi/rpi4/current-armv7l/pkg/*.txz .

NB: Don't forget the period '.' at the end of the command or it won't work!

SARPi Project muse views ... NB: For a different Raspberry Pi model you can replace 'rpi4' in the rsync command remote path with 'rpi1', 'rpi2', or 'rpi3' accordingly to suit your own device. Also replace 'armv7l' with 'armv7' for all non-Raspberry Pi 4 downloads.

As a result of running this 'rsync' command, we then check with 'ls' to ensure all the files are present and correct:

rsync

That looks perfect. We've downloaded approx. 30MB of data and all the expected package (.txz) files are there. Now we can use one more command to easily upgrade our system with these new packages. Slackware [ARM] will do the rest of the hard work for us. So, while still in the temporary directory we've created that now has all the packages downloaded into it, we initiate the upgrade process like this:

root@torq:/tmp/sarpi-pkgs# upgradepkg *.txz

SARPi Project muse views ... To reinstall the same version of any existing package(s) the 'upgradepkg --reinstall' command option is used...

root@torq:/tmp/sarpi-pkgs# upgradepkg --reinstall *.txz

This will result in any currently installed packages being upgraded to newer versions. If any packages are not already found on the system then new ones will not be installed. The 'upgradepkg' only upgrades existing packages. To install new packages the 'installpkg' command must be used. The upgrade process should look similar to the screenshot below:

upgradepkg

No errors were flagged up so that means everything went smoothly. Error messages will only appear when there are any problems while upgrading packages. No errors is always a good sign. ;-)

Now we will 'reboot' the system and log in once again as 'root' user at the prompt. After logging in, we check the current status of the kernel using the same 'uname' command as before:

uname -a

We now see that the Linux kernel 5.14.17 version is currently running on our system. Before upgrading it was a kernel 5.14.9 version. This indicates that the upgrade process was 100% successful.

The very last thing we'll do is remove the downloaded package files in the temporary directory. You may wish to backup, or leave these SARPi package files where they are. We don't. So...

root@torq:~# rm -rf /tmp/sarpi-pkgs

That's all there is to it. Each time we want to upgrade the system we'll follow the exact same steps that we've carried out in this guide.

Thanks!

Thank you for reading and taking part in this SARPi mini-project. We hope you enjoyed it and found it interesting and educational.

Thanks also to Patrick Volkerding, and the entire Slackware Team, for producing a truly wonderful OS. Without you, and the work you do, the SARPi Project would not exist.

If you have any questions or need help, visit the Slackware Linux Forum on Linux Questions. Or get in touch on the #SARPi IRC channel on irc.libera.chat.

Back to Top


Updated: 2024-03-13 04:58:59 UTC

Disclaimer: The SARPi Project website is for non-commercial and general information purposes only. The content is provided by Penthux.NET and while we endeavour to keep information up to date and correct, we make no representations or warranties of any kind, express or implied, about the completeness, accuracy, reliability, suitability or availability with respect to the website or any information, software, products, services, or related graphics which is available on the website for any purpose. Any reliance you place on such information is therefore strictly at your own risk. In no event will Penthux.NET be liable for any loss or damage including without limitation, indirect or consequential loss or damage, or any loss or damage whatsoever arising from loss of data or profits arising out of, or in connection with, the use of this website or any of its contents. Through this website you are able to visit other websites which are not under our control. Penthux.NET has no influence over the nature, content or availability of any external URLs. The inclusion of any URLs does not necessarily imply a recommendation or endorsement of any content therein. Every effort is made to ensure the SARPi Project website remains accessible. However, Penthux.NET takes no responsibility for, and will not be liable for, the SARPi Project website being temporarily unavailable due to technical issues beyond our control. SARPi Project is in no way affiliated with Slackware Linux, Inc, or the Linux Foundation, or Raspberry Pi Ltd., or any of their respective members, trustees, partners, or associates.


Accept!

SARPi Project uses cookies for website traffic data analytics purposes only. Cookies from this website do not collect or store any of your personal data.

Please read the SARPi Project website [ Cookie Policy ] for more details.