Welcome to the Slackware Documentation Project

Slackware ARM gcc-9.1.x armv8 arm64 aarch64 cross-compiler for the Raspberry Pi 4

Preface

With the recent congruous updates to Slackware ARM [~24 June 2019 - “A MILLION THANKS to MoZes!”] and the surprise arrival of the Raspberry Pi 4, this just had to be done. Creating a 64-bit gcc-9.1.0 arm64 aarch64 cross-compiler with the intention of building aarch64-linux binaries from source code and turning them into Slackware packages.

Previous work in this area had already been done since 2016/2017. However, this time we'll be compiling with gcc-9.1.0 and not gcc-5.4.0 and we'll be using a Raspberry Pi 4 Model B and not a Mk3 version. The old build scripts weren't totally useless and some of the code was reused for this project, to save time.

Notes

Slackware ARM current was used on a Raspberry Pi 4 to build and install the gcc-9.1.0 aarch64-linux cross-compiler, and build the armv8 Linux kernel, modules, and device tree blob(s). This was to achieve the highest degree of compatibility possible.

In this guide we are using '/tmp/build-dir' for our temporary 'BUILD' directory and '/tmp/.gcc-cross' as our permanent 'INSTALL' directory. '/tmp/.gcc-cross' is the location where the gcc cross-compiler will be located after it's been compiled. You can, of course, use your own locations for both of these directories.

NB: The gcc-9.1.0 'libsanitizer asan' might need patching before building glibc-2.29 if the compile crashes unexpectedly. If this is a problem for you then patching the offending gcc-9.1.0/libsanitizer/asan/asan_linux.cc source file will get around this issue. The issue itself is that no PATH_MAX has been defined in the source and there needs to be a value set in order for it to compile successfully. Instructions on how to successfully patch this file are included herein, should they be needed.

Requirements

As a pre-requisite, you should have;

  • a Raspberry Pi 4 running Slackware ARM current with as much unused storage space on your system as possible.
  • gawk, git, bison and flex, already installed on your system.
  • a (spare) microSD card with Slackware ARM current installed on it. # not essential but it is advised.

What's involved

This tutorial will enable you to;

  • download the required package source(s) in order to build a gcc-9.1.0 cross-compiler on Slackware ARM.
  • download the Raspberry Pi Linux kernel GitHub tree rpi-5.2.y development branch.
  • configure, and install, a gcc-9.1.0 aarch64-linux (armv8) cross-compiler on your Raspberry Pi 4.
  • build the aarch64 (armv8) Linux kernel, modules, and device tree blob(s), and install them on your [spare] Slackware ARM current microSD card.
  • successfully boot Slackware ARM current on your Raspberry Pi 4 running an aarch64 (armv8) kernel.
In order not to risk messing up the Slackware ARM system which you use for cross-compiling, a (spare) microSD card containing a working Slackware ARM system should be used to install the arm64 Linux kernel, modules, and device tree blob(s). You'll need a recent (i.e. post-June 2019) version of the Raspberry Pi bootloader/GPU firmware installed on this (spare) microSD card to avoid any problems. To be sure, boot your RPi4 with it and update the firmware. The Linux kernel version on this (spare) microSD card doesn't matter as you'll be replacing it with the aarch64 (armv8) kernel.

Downloading required source and configuration

First of all, as a normal user (i.e. not 'root') create a working directory. For example, I usually work from the '/tmp' directory:

mkdir -p /tmp/build-dir
cd /tmp/build-dir

This is the directory you will download all the required packages and RPi Linux source to. You can choose your own 'BUILD' directory location if you prefer. Just remember to work around the instructions in this guide if/when you do.

Downloading RPi Linux kernel source

Use the following 'git' command to download the Raspberry Pi Linux kernel source into a directory named 'linux'. You only need to download the last full commit so a depth=1 has been specified and the specific branch we want to work with [branch 'rpi-5.2.y' in our case]. Which saves time and space.

git clone --depth=1 --single-branch -b rpi-5.2.y https://github.com/raspberrypi/linux linux

This may take a while, depending on the speed of your Internet connection and other factors. Once it has completed you need to switch to the 64 bit kernel development branch.

cd linux
git fetch --depth=1 https://github.com/raspberrypi/linux rpi-5.2.y
git checkout -f rpi-5.2.y

When that's done you should see a message that 'origin/rpi-5.2.y' is the current branch.

You can select which kernel source you would like to build instead of rpi-5.2.y branch. Just substitute it in the 'git checkout -f rpi-5.2.y' command for your chosen branch. To see a list of available branches use this command while in your Linux source directory:
git branch -a

Downloading required package source

Before downloading the package source needed to build the gcc cross-compiler, be aware that more recent package versions may exist than the ones shown here. You may wish to install newer versions. It's always a good idea to check. To keep things simple, you might consider downloading a version of gcc which matches the one you currently have installed. I've read lots of articles about this and most advise to install the latest and greatest version of gcc available. However, if you're running Slackware ARM current you'll have gcc-9.1.0 installed and this is adequate for what you need.

So, first move back into the 'BUILD' directory and then download the packages below.

cd ../
wget -nc https://ftp.gnu.org/gnu/binutils/binutils-2.32  
wget -nc ftp://gcc.gnu.org/pub/gcc/infrastructure/cloog-0.18.1   
wget -nc https://ftp.gnu.org/gnu/gcc/gcc-9.1.0  
wget -nc https://ftp.gnu.org/gnu/glibc/glibc-2.29  
wget -nc https://ftp.gnu.org/gnu/gmp/gmp-6.1.2  
wget -nc ftp://gcc.gnu.org/pub/gcc/infrastructure/isl-0.18 
wget -nc https://ftp.gnu.org/gnu/mpc/mpfr-4.0.2  
wget -nc https://ftp.gnu.org/gnu/mpfr/mpc-1.1.0

Unpacking downloaded tarballs

Now unpack all the downloaded tarballs. You can do this easily with a 'for loop' command.

for t in *.tar*; do tar -xvf $t; done

Once this has completed you can us the 'ls' command to verify that the directories are present.

Now you are going to create some symbolic links in the gcc-9.1.0 directory. These will point to some of the source directories you have just unpacked, which are dependencies of gcc, and when these symbolic links are present gcc will build them automatically.

cd gcc-9.1.0
ln -sf ../cloog-0.18.1 cloog
ln -sf ../gmp-6.1.2 gmp
ln -sf ../isl-0.18 isl
ln -sf ../mpfr-4.0.2 mfpr
ln -sf ../mpc-1.1.0 mpc

Alternatively, some articles will advise you to use the following command in order to achieve the same thing.

cd gcc-9.1.0
./contrib/download_prerequisites

Personally, I always prefer the manual method because then I know what's being downloaded/installed and what to expect. It's up to you which method you use.

Creating gcc-9.1.0 cross-compiler install directory

The next thing to do is create an 'INSTALL' directory. This is the directory where the gcc cross-compiler will be installed. As before, I like to work from the '/tmp' directory so the install directory is where I will locate it.

mkdir -p /tmp/.gcc-cross

You don't have to use the '/tmp' directory. You can install the gcc cross-compiler anywhere on your system where you have access. Such as your '/home/user' directory. Just remember to work around the instructions in this guide if/when you do.

Exporting install directory PATH

You need to export the installation directory's '/bin' folder to your user's $PATH. The PATH of your gcc-9.1.0 cross-compiler bin needs to be the FIRST item in the $PATH in order to be successful.

export PATH=/tmp/.gcc-cross/bin:$PATH

To check that this has been entered correctly, use the following command:

echo $PATH

You should see the first $PATH entry is to your 'INSTALL' directory's '/bin' folder. It's important that your installation directory's '/bin' folder appears before any other entry in the $PATH.

/tmp/.gcc-cross/bin:/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib/kde4/libexec:/usr/lib/qt/bin

NB: your $PATH may be very different from the one shown above, but that doesn't matter. As long as the PATH to your gcc cross-compiler's '/bin' directory is the first item in the $PATH it's all good.

Building the gcc aarch64 cross-compiler

Now with all that in place, concentration focuses on building the cross-assembler, cross-disassembler, cross-linker, and other useful tools.

Building binutils

First move back into the 'BUILD' directory and then create a build directory for binutils. You'll notice the various CFLAGS but as a quick explanation; '–with-sysroot' basically tells binutils to enable 'sysroot' support in the cross-compiler by pointing it to a default empty directory, '–target=aarch64-linux' is the target system type (arm64), and '–disable-multilib' means that we only want binutils to work with the aarch64 instruction set and nothing else.

cd build-dir
mkdir build-binutils
cd build-binutils
../binutils-2.32/configure --prefix=/tmp/.gcc-cross --target=aarch64-linux --with-sysroot --disable-multilib
make -j4 
make install

Installing Linux kernel headers

Here you need to install the Linux kernel headers. Note the 'ARCH=arm64' option for the make process. gcc uses 'aarch64' where the Linux kernel uses 'arm64'. The two separate open source projects identify the same CPU architecture differently.

cd ../linux
make ARCH=arm64 INSTALL_HDR_PATH=/tmp/.gcc-cross/aarch64-linux headers_install

Build gcc C and C++ cross-compilers

First move into the 'BUILD' directory and create a build directory for gcc before building it. Notice that only C and C++ have been specified as build languages. That's all you will need here. Incidentally, the available build language options allow just one, or a selection, or all, of the following '–enable-languages=all,ada,c,c++,fortran,go,jit,lto,objc,obj-c++'.

cd ../
mkdir build-gcc
cd build-gcc
../gcc-9.1.0/configure --prefix=/tmp/.gcc-cross --target=aarch64-linux --enable-languages=c,c++ --disable-multilib
make -j4 all-gcc
make -j4 install-gcc

Patching gcc before compiling glibc

If you find that compiling glibc is problematic, or crashes every time, and it concerns 'libsantizer asan' you will need to patch gcc-9.1.0 before it will compile successfully.

First, move into your 'BUILD' directory and create the patch file.

cd /tmp/build-dir
touch asan_linux-cc.patch

Next, copy the code below into the asan_linux-cc.patch file or use cat as shown below. It needs to be exact!

--- orig/asan_linux.cc	2019-07-11 21:18:56.000000000 +0100
+++ mod/asan_linux.cc	2019-07-11 16:31:42.000000000 +0100
@@ -75,6 +75,10 @@
 asan_rt_version_t  __asan_rt_version;
 }

+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
 namespace __asan {

 void InitializePlatformInterceptors() {}

Check the contents of the file and verify that they look the same as shown here, including an empty line at the bottom. Then you are able to finally patch the offending file using the following command:

patch -b gcc-9.1.0/libsanitizer/asan/asan_linux.cc asan_linux-cc.patch

This will patch the file and create a backup [option -b] in case things don't go as planned. Now you should find that glibc compiles without any problem(s).

NB: The location of the backed up file is: gcc-9.1.0/libsanitizer/asan/asan_linux.cc.orig

Build and install glibc

First move into the 'BUILD' directory and create a 'build-glibc' directory. Then move into the 'build-glibc' directory before building it. '–build=$MACHTYPE' is a predefined environment variable which describes the Raspberry Pi 4 (in this case) and it's required to compile some additional tools which are utilised during the build process. Notice that you're installing the C library startup files to the installation directory (csu/crt1.o, csu/crti.o, and csu/crtn.o) separately because there doesn’t seem to a 'make' rule that does this without creating other problems.

cd ../
mkdir -p build-glibc
cd build-glibc
../glibc-2.29/configure --prefix=/tmp/.gcc-cross/aarch64-linux --build=$MACHTYPE --host=aarch64-linux --target=aarch64-linux --with-headers=/tmp/.gcc-cross/aarch64-linux/include --disable-multilib libc_cv_forced_unwind=yes    
make -j4 install-bootstrap-headers=yes install-headers
make -j4 csu/subdir_lib
install csu/crt1.o csu/crti.o csu/crtn.o /tmp/.gcc-cross/aarch64-linux/lib
aarch64-linux-gcc -nostdlib -nostartfiles -shared -x c /dev/null -o /tmp/.gcc-cross/aarch64-linux/lib/libc.so
touch /tmp/.gcc-cross/aarch64-linux/include/gnu/stubs.h

Building glibc support library

Now move into the 'build-gcc' directory once again and build the gcc cross-compiler support library.

cd ../build-gcc
make -j4 all-target-libgcc
make install-target-libgcc

Finish building glibc C library

Move into the 'build-glibc' directory to finish building glibc C library and then install it.

cd ../build-glibc
make -j4
make install

Finish building gcc C++ library

Move into the 'build-gcc' directory to finish building gcc C++ library and then install it.

cd ../build-gcc
make -j4
make install

Be prepared for these build procedures to take some time. A few hours at least.

Testing the cross-compiler

To test/check that your gcc aarch64-linux cross-compiler is working properly run the following command.

aarch64-linux-gcc -v

You should get a response similar to the following.

aarch64-linux-gcc -v

Using built-in specs.
COLLECT_GCC=aarch64-linux-gcc
COLLECT_LTO_WRAPPER=/tmp/.gcc-cross/libexec/gcc/aarch64-linux/9.1.0/lto-wrapper
Target: aarch64-linux
Configured with: ../gcc-9.1.0/configure --prefix=/tmp/.gcc-cross --target=aarch64-linux --enable-languages=c,c++ --disable-multilib : (reconfigured) ../gcc-9.1.0/configure --prefix=/tmp/.gcc-cross --target=aarch64-linux --enable-languages=c,c++ --disable-multilib
Thread model: posix
gcc version 9.1.0 (GCC)

Once this process has been completed, export the gcc cross-compiler PATH on your normal user. If/when you're wanting to cross-compile do this each time after you've (re)booted your system so that the gcc cross-compiler can be located via your user's $PATH. You also have the option to add this command to your ~/.profile as a permanent setting. Whether or not you decide to permanently add the gcc cross-compiler PATH to your ~/.profile is entirely up to you. If you are using your Slackware ARM current system for exclusively building aarch64 (arm64) packages then it would make sense to do so.

Example export command:

export PATH=/tmp/.gcc-cross/bin:$PATH

The gcc aarch64-linux cross-compiler on your Slackware ARM system is now ready to rock-n-roll!

Building the arm64 kernel, modules, and device tree blob (DTB)

To build the aarch64 kernel, modules and device tree blob(s) is exactly the same method as you would carry it out under normal circumstances. Commands such as 'make bzImage && make modules && make modules_install' may be all too familiar to you. The major difference when cross-compiling is that you'll use certain Makefile variables/arguments/switches, commonly known as build options<. In our case, build options will be used to instruct the gcc cross-compiler to build for the aarch64 (arm64) architecture specifically.

Creating the arm64 kernel .config

First of all, as always, you need to be in the Raspberry Pi Linux kernel source directory which is within your 'BUILD' directory. Then you need to create a kernel .config file, based on Raspberry Pi 4 parameters. To keep it simple you can generate a default .config (defconfig) file. This file holds the Linux kernel configuration for the arm64 kernel you are going to build. To achieve this run the following commands:

cd /tmp/build-dir/linux
make -j4 ARCH=arm64 CROSS_COMPILE=aarch64-linux- bcm2711_defconfig
Make a note here of the build options [ARCH=arm64 CROSS_COMPILE=aarch64-linux-] which have been specified. They should be self-explanatory by now. Pay special attention to the trailing '-' of 'CROSS_COMPILE=aarch64-linux-' because that's NOT a typo. It needs to be like that!

Now that you've created a kernel .config which contains the default settings for your hardware, some settings within need to be checked and possibly modified. The Raspberry Pi 4's “VideoCore VI” GPU is not 64-bit compatible and the build process will crash each time you attempt to compile the module's source code for ARMv8 architecture.

Here are the 3 kernel configuration settings you need to check. Whether they are destined as modules [CONFIG=m] or included in the kernel [CONFIG=y] it's of no consequence. You need to unset these settings:

CONFIG_VIDEO_BCM2835=m
CONFIG_BCM2835_VCHIQ_MMAL=m
CONFIG_BCM_VC_SM_CMA=m

Change the settings so they are all commented out, like this:

# CONFIG_VIDEO_BCM2835 is not set
# CONFIG_BCM2835_VCHIQ_MMAL is not set
# CONFIG_BCM_VC_SM_CMA is not set

You can either edit the kernel .config file directly with 'vi' or 'nano' text editors:

vi /tmp/build-dir/linux/.config
nano -w /tmp/build-dir/linux/.config

Or can use use the 'sed' command to achieve this:

sed -Ei 's/^CONFIG_VIDEO_BCM2835=.*/# CONFIG_VIDEO_BCM2835 is not set/' /tmp/build-dir/linux/.config
sed -Ei 's/^CONFIG_BCM2835_VCHIQ_MMAL=.*/# CONFIG_BCM2835_VCHIQ_MMAL is not set/' /tmp/build-dir/linux/.config
sed -Ei 's/^CONFIG_BCM_VC_SM_CMA=.*/# CONFIG_BCM_VC_SM_CMA is not set/' /tmp/build-dir/linux/.config

Or you can use 'make menuconfig':

cd /tmp/build-dir/linux/
make menuconfig

ATTENTION: DO NOT modify ANYTHING ELSE in the kernel .config file!!!

A great number of Linux users will rebuke you for editing the kernel .config file directly! It's generally considered unsafe [and rightly so] to edit the kernel .config because there are a multitude of CONFIG -options that are dependent on other -options and if they aren't all present and correct, or don't correlate, then success will not be in your favour. As an alternative to editing the kernel .config directly, if you'd rather use 'make menuconfig' which is a much safer way to modify these settings then that's your prerogative.

Building the arm64 kernel

Next up is building the kernel, based on the .config file you have just created. Again, you'll use the same build options as before. You can even set a 'LOCALVERSION' here which appends whatever you set to the end of the kernel version (e.g. LOCALVERSION=“-aarch64” would eventually give you 5.2.1-v8-aarch64) once the kernel and modules have been built. Just as an example we'll use it here. Run the following command to start building the arm64 Linux kernel:

make -j4 ARCH=arm64 CROSS_COMPILE=aarch64-linux- LOCALVERSION="-aarch64" Image

So, here you 'make' the kernel which will be saved with the name 'Image'. The rest you should be familiar with. This process will take a while. Maybe an hour or so.

Building the arm64 device tree blob(s)

Device tree is a means of describing hardware which is read by the kernel at boot time to tell it what hardware exists on the system. In our case it relates to the Raspberry Pi 4 and is the method by which the systems knows which drivers to load for the hardware. On ARM-based devices the use of device trees has become mandatory for all new SOCs, including the Raspberry Pi.

To build the Raspberry Pi device tree blob(s) run the following command:

make -j4 ARCH=arm64 CROSS_COMPILE=aarch64-linux- LOCALVERSION="-aarch64" dtbs

It's basically the same as you did to build the kernel, only where 'Image' is substituted for 'dtbs'.

Building the arm64 modules

To build the kernel modules you do it in much the same way as before. Run the following command:

make -j4 ARCH=arm64 CROSS_COMPILE=aarch64-linux- LOCALVERSION="-aarch64" modules

Notice how each time the command is the same except when specifying what you're building. If you have set a 'LOCALVERSION' then it must be kept the same for building the kernel and modules. This process will probably take a while longer than building the arm64 kernel.

Installing the arm64 modules

Once the modules have been built, you have to 'make modules_install'. The process will install your kernel modules to '/lib/modules/5.2.1-v8-aarch64'.

You could build out-of-tree kernel modules but, to keep things simple, you're going to install them to the usual location. Again, you will use the same build options as before but without any 'LOCALVERSION' set.

First you need become 'root' user and enter a passwd when prompted. To install the aarch64 modules run the following commands:

su -
make -j4 ARCH=arm64 CROSS_COMPILE=aarch64-linux- modules_install
You need to be 'root' user to install the arm64 modules. A normal user does not have the rights to do so!

So, as I'm a great believer in being thorough, I always verify things at every opportunity. Just to be sure, if nothing else, because it's always a good policy. Make sure the files and directories you have just spent quite a bit of time compiling actually do exist on your system and that they're in the right place. If this is the first time you have installed the gcc cross-compiler on your system and/or built the kernel, modules, and device tree blob(s), then it goes without saying. You could actually do this after each build process, which I often do as well.

ls -lah arch/arm64/boot/Image 
ls -lah arch/arm64/boot/dts/broadcom/bcm*.dtb
ls -lah /lib/modules/5.2.1-v8*

If you can see that they all exist, then everything has worked as planned.

Copying the arm64 kernel, modules, and device tree blobs (DTB)

Connect the (spare) microSD card containing a working Slackware ARM current system to your Raspberry Pi 4 using a USB microSD card reader. You'll need to mount the partitions first, before copying the arm64 kernel, modules, and device tree blob(s) onto it.

You should still be logged in as 'root' user. If not, type the following command and enter the passwd for the 'root' user when prompted:

su -
You need to be 'root' user to carry out any mount procedures. A normal user does not have the rights to do so!

As 'root' user type the following command:

fdisk -l

This should show you which device the (spare) microSD card is using on your system. In our case it's a 32GB card and has been identified as '/dev/sda', as shown below. This tells us that '/dev/sda1' is our /boot partition and '/dev/sda3' is our root filesystem partition. Yours may be allocated differently so bear that in mind.

Device     Boot  Start      End  Sectors  Size Id Type
/dev/sda1  *        32   195327   195296 95.4M  c W95 FAT32 (LBA)
/dev/sda2       196608   720895   524288  256M 82 Linux swap
/dev/sda3       720896 61145087 60424192 28.8G 83 Linux

In order to mount the partitions you first need to create mount directories. Working in the /tmp directory you can do it like this:

cd /tmp
mkdir rpi-boot
mkdir rpi-root
mount /dev/sda1 rpi-boot
mount /dev/sda3 rpi-root

To check that you've done this correctly, use the 'mount' command. The output from this should give you something similar to the following:

/dev/mmcblk0p3 on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /dev/shm type tmpfs (rw)
/dev/mmcblk0p1 on /boot type vfat (rw,fmask=177,dmask=077)
/dev/sda1 on /tmp/rpi-boot type vfat (rw)
/dev/sda3 on /tmp/rpi-root type ext4 (rw)

The next thing to do is copy the arm64 kernel, modules, and device tree blobs to your newly mounted directories. It's important to get this right. After all the hard work you've done it would be a shame to mess it up at this stage.

To copy these files, run the following commands, as 'root' user:

cp build-dir/linux/arch/arm64/boot/Image rpi-boot/boot/kernel8.img
cp build-dir/linux/arch/arm64/boot/dts/broadcom/bcm*.dtb rpi-boot/boot
cp -rv /lib/modules/5.2.1-v8* rpi-root/lib/modules/

Once you have done that, check that the files you have copied are present and in the right place.

ls -lah rpi-boot/boot/kernel*
ls -lah rpi-boot/boot/bcm*-rpi-4-b.dtb 
ls -lah rpi-root/lib/modules/5.2.1-v8*

If it all looks fine and dandy then the next thing you need to do is delete the old armv7 kernel in the rpi-boot/boot directory. This old kernel is named 'kernel7.img' and to avoid any conflicts with the new arm64 'kernel8.img' you should remove it.

rm -rf rpi-boot/kernel7.img 

No changes to the config.txt or cmdline.txt file(s) should be necessary. If you are using a recent blootloader/GPU firmware version (i.e. post-June 24 2019) then nothing else needs to be changed or deleted. The system should boot using all your existing settings.

Now you can unmount the previously mounted directories.

umount rpi-boot
umount rpi-root

Booting Slackware ARM aarch64

Power off your Raspberry Pi.

poweroff

Remove the USB microSD card reader and swap microSD cards. Power on the Raspberry Pi and boot the microSD card on which you copied the arm64 kernel, modules, and device tree blobs.

The end result

After booting the system with the arm64 kernel, I logged in remotely via SSH as 'root' user. Then I ran the following commands:

login as: root
root@192.168.10.44's password:
Last login: Thu Jul 24 18:41:17 2019 from 192.168.10.10
Linux 5.2.1-v8-aarch64.
root@drie:~# cat /proc/version
Linux version 5.2.1-v8-aarch64 (exaga@torq) (gcc version 9.1.0 (GCC)) #1 SMP Thu Jul 18 18:19:49 BST 2019
exaga@torq:~# uname -a
Linux torq 5.2.1-v8-aarch64 #2 SMP Thu Jul 18 18:19:49 BST 2019 aarch64 GNU/Linux
exaga@torq:~# cat /etc/slackware-version
Slackware 14.2+
exaga@torq:~# cat /proc/device-tree/model
Raspberry Pi 4 Model B Rev 1.1
exaga@torq:~# cat /proc/cpuinfo | grep "Serial" | cut -d':' -f2
 10000000e1d10b41
exaga@torq:~#

Although there's been many issues solved on the road to successfully installing Slackware ARM, there are still many outstanding and some are unsolvable. The VideoCore VI firmware is not compatible with 64-bit ARMv8 architecture. So, no nice video modes. Any other problems that can be fixed will be fixed, as time permits.

Remember, following this guide will result in running software [i.e. ARMv8 kernel 5.2.1 and modules] that is unsupported and substantially untested [as of 24 June 2019]. The efficacy of which may not always satisfy expectations. Please bear in mind this is completely uncharted territory and you will find little or no help or support for the software you have created and/or are running. However, all is not lost.

There's a new SARPi64 Project website which focusses on all things Slackware AArch64 ARM64 ARMv8 related. From here we hope to develop and distribute experimental binary packages and installer disk images for Slackware ARM, amongst other content. The SARPi64 Project website URL is: http://sarpi64.fatdog.eu/

An automated gcc-9.1.0 aarch64 cross-compiler build [bash] script is available here: http://sarpi64.fatdog.eu/files/extra/SARPi64.SlackBuild-aarch64-cc.txt

Thanks for being interested. <3

Sources

# If you need to install any of the software above [* check for updates!]:

ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/a/gawk-5.0.1-arm-1.txz # Slackware ARM current - gawk package.
ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/git-2.22.0-arm-2.txz # Slackware ARM current - git package.
ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/bison-3.4.1-arm-1.txz # Slackware ARM current - bison package.
ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/flex-2.6.4-arm-3.txz # Slackware ARM current - flex package.
https://www.github.com/raspberrypi/ # Raspberry Pi Foundation GitHub repository Linux kernel and boot-firmware source.
https://ftp.gnu.org/gnu/ # gcc, binutils, glibc, gmp, mpc, mpfr package source.
ftp://gcc.gnu.org/pub/gcc/infrastructure # cloog, isl package source.

# Documentation which assisted in this guide:

http://arm.slackware.com/FAQs # Slackware ARM Linux Project Frequently Asked Questions.
http://wiki.osdev.org/GCC_Cross-Compiler # gcc cross-compiler documentation.
Slackware ARM GCC aarch64-linux cross-compiler for the Raspberry Pi.
https://www.raspberrypi.org/documentation/linux/kernel # Raspberry Pi Linux kernel documentation.

* Originally written by Exaga - 2019-07-24 19:28:09 [GMT]


In Other Languages
Translations of this page?:
QR Code
QR Code howtos:hardware:arm:gcc-9.x_aarch64_cross-compiler (generated for current page)