20211128 - Server went through an OS upgrade, sorry for the downtime.

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 revision Previous revision
Next revision
Previous revision
howtos:hardware:arm:gcc-9.x_aarch64_cross-compiler [2019/07/25 19:02 (UTC)]
exaga [Downloading required source and configuration] erour koreekshuns
howtos:hardware:arm:gcc-9.x_aarch64_cross-compiler [2020/02/25 19:07 (UTC)] (current)
exaga updated to gcc-9.2.0
Line 1: Line 1:
-====== Slackware ARM gcc-9.1.x armv8 arm64 aarch64 cross-compiler for the Raspberry Pi 4 ======+====== Slackware ARM gcc-9.2.x armv8 arm64 aarch64 cross-compiler for the Raspberry Pi 4 ======
  
 === Preface === === Preface ===
  
-With the recent congruous updates to [[http://arm.slackware.com|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 gcc-9.1.0 armv8 arm64 aarch64 cross-compiler with the intention of building aarch64-linux binaries from source code and turning them into Slackware packages. +With the recent congruous updates to [[http://arm.slackware.com|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.2.0 arm64 aarch64 cross-compiler with the intention of building aarch64-linux binaries from source code and turning them into Slackware packages. 
  
-Previous [[howtos:hardware:arm:gcc_aarch64_cross-compiler|work in this area]] had already been done in 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.+Previous [[howtos:hardware:arm:gcc_aarch64_cross-compiler|work in this area]] had already been done since 2016/2017. However, this time we'll be compiling with gcc-9.2.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 === === 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.+Slackware ARM current was used on a Raspberry Pi 4 to build and install the gcc-9.2.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. 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.+**NB:** The gcc-9.2.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.2.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 === === Requirements ===
Line 24: Line 24:
 === What's involved === === What's involved ===
 This tutorial will enable you to; 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 required package source(s) in order to build a gcc-9.2.0 cross-compiler on Slackware ARM. \\ 
   * download the Raspberry Pi Linux kernel [[https://www.github.com/raspberrypi/linux|GitHub]] tree rpi-5.2.y development branch. \\    * download the Raspberry Pi Linux kernel [[https://www.github.com/raspberrypi/linux|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. \\ +  * configure, and install, a gcc-9.2.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. \\    * 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.   * successfully boot Slackware ARM current on your Raspberry Pi 4 running an aarch64 (armv8) kernel.
Line 60: Line 60:
  
 When that's done you should see a message that 'origin/rpi-5.2.y' is the current branch. When that's done you should see a message that 'origin/rpi-5.2.y' is the current branch.
 +
 +<note tip>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:
 +
 +<code>
 +git branch -a
 +</code></note>
 +
 +
  
 === Downloading required package source === === 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.+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.2.0 installed and this is adequate for what you need.
  
-So, first move back into the 'build-dir' directory and then download the packages below.+So, first move back into the 'BUILD' directory and then download the packages below.
  
 <code> <code>
Line 71: Line 79:
 wget -nc https://ftp.gnu.org/gnu/binutils/binutils-2.32   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 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/gcc/gcc-9.2.0  
 wget -nc https://ftp.gnu.org/gnu/glibc/glibc-2.29   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 https://ftp.gnu.org/gnu/gmp/gmp-6.1.2  
Line 89: Line 97:
 Once this has completed you can us the '**ls**' command to verify that the directories are present. Once this has completed you can us the '**ls**' command to verify that the directories are present.
  
-=== Creating GCC dependency symlinks ===+=== Creating gcc dependency symlinks ===
  
-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.+Now you are going to create some symbolic links in the gcc-9.2.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.
  
 <code> <code>
-cd gcc-9.1.0+cd gcc-9.2.0
 ln -sf ../cloog-0.18.1 cloog ln -sf ../cloog-0.18.1 cloog
 ln -sf ../gmp-6.1.2 gmp ln -sf ../gmp-6.1.2 gmp
Line 105: Line 113:
  
 <code> <code>
-cd gcc-9.1.0+cd gcc-9.2.0
 ./contrib/download_prerequisites ./contrib/download_prerequisites
 </code> </code>
Line 111: Line 119:
 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. 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  ===+=== Creating gcc-9.2.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. 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.
Line 123: Line 131:
 === Exporting install directory PATH === === 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.+You need to export the installation directory''/binfolder to your user's $PATH. The PATH of your gcc-9.2.0 cross-compiler bin needs to be the __FIRST__ item in the $PATH in order to be successful.
  
 <code> <code>
Line 141: Line 149:
 </code> </code>
  
-==== Building the GCC aarch64 cross-compiler ====+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. Now with all that in place, concentration focuses on building the cross-assembler, cross-disassembler, cross-linker, and other useful tools.
Line 147: Line 157:
 === Building binutils === === Building binutils ===
  
-First move back into the 'build-dir' directory and then create a build directory for binutils. You'll notice the various build options 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. +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. 
  
 <code> <code>
Line 153: Line 163:
 mkdir build-binutils mkdir build-binutils
 cd build-binutils cd build-binutils
-../binutils-2.32/configure --prefix=/tmp/.gcc-cross --target=aarch64-linux --disable-multilib+../binutils-2.32/configure --prefix=/tmp/.gcc-cross --target=aarch64-linux --with-sysroot --disable-multilib
 make -j4  make -j4 
 make install make install
Line 160: Line 170:
 === Installing Linux kernel headers === === 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. +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. 
  
 <code> <code>
Line 169: Line 179:
 === Build gcc C and C++ cross-compilers === === Build gcc C and C++ cross-compilers ===
  
-First move into the 'build-dir' 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++'.+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++'.
  
 <code> <code>
Line 175: Line 185:
 mkdir build-gcc mkdir build-gcc
 cd build-gcc cd build-gcc
-../gcc-9.1.0/configure --prefix=/tmp/.gcc-cross --target=aarch64-linux --enable-languages=c,c++ --disable-multilib+../gcc-9.2.0/configure --prefix=/tmp/.gcc-cross --target=aarch64-linux --enable-languages=c,c++ --disable-multilib
 make -j4 all-gcc make -j4 all-gcc
 make -j4 install-gcc make -j4 install-gcc
Line 182: Line 192:
 === Patching gcc before compiling glibc === === 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.+If you find that compiling glibc is problematic, or crashes every time, and it concerns 'libsantizer asan' you will need to patch gcc-9.2.0 before it will compile successfully.
  
 First, move into your 'BUILD' directory and create the patch file. First, move into your 'BUILD' directory and create the patch file.
Line 213: Line 223:
  
 <code> <code>
-patch -b gcc-9.1.0/libsanitizer/asan/asan_linux.cc asan_linux-cc.patch+patch -b gcc-9.2.0/libsanitizer/asan/asan_linux.cc asan_linux-cc.patch
 </code> </code>
  
 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). 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+NB: The location of the backed up file is: gcc-9.2.0/libsanitizer/asan/asan_linux.cc.orig
  
  
 === Build and install glibc === === Build and install glibc ===
  
-First move into the 'build-dir' 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.+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.
  
 <code> <code>
Line 239: Line 249:
 === Building glibc support library === === Building glibc support library ===
  
-Now move into the 'build-gcc' directory once again and build the GCC cross-compiler support library.+Now move into the 'build-gcc' directory once again and build the gcc cross-compiler support library.
  
 <code> <code>
Line 257: Line 267:
 </code> </code>
  
-=== Finish building GCC C++ library ==+=== Finish building gcc C++ library ==
  
-Move into the 'build-gcc' directory to finish building GCC C++ library and then install it.+Move into the 'build-gcc' directory to finish building gcc C++ library and then install it.
  
 <code> <code>
Line 271: Line 281:
 === Testing the cross-compiler === === Testing the cross-compiler ===
  
-To test/check that your GCC aarch64-linux cross-compiler is working properly run the following command.+To test/check that your gcc aarch64-linux cross-compiler is working properly run the following command.
  
 <code> <code>
Line 284: Line 294:
 Using built-in specs. Using built-in specs.
 COLLECT_GCC=aarch64-linux-gcc COLLECT_GCC=aarch64-linux-gcc
-COLLECT_LTO_WRAPPER=/tmp/.gcc-cross/libexec/gcc/aarch64-linux/9.1.0/lto-wrapper+COLLECT_LTO_WRAPPER=/tmp/.gcc-cross/libexec/gcc/aarch64-linux/9.2.0/lto-wrapper
 Target: aarch64-linux 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+Configured with: ../gcc-9.2.0/configure --prefix=/tmp/.gcc-cross --target=aarch64-linux --enable-languages=c,c++ --disable-multilib : (reconfigured) ../gcc-9.2.0/configure --prefix=/tmp/.gcc-cross --target=aarch64-linux --enable-languages=c,c++ --disable-multilib
 Thread model: posix Thread model: posix
-gcc version 9.1.0 (GCC)+gcc version 9.2.0 (GCC)
  
 </code> </code>
  
-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.+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:  Example export command: 
Line 300: Line 310:
 </code> </code>
  
-The GCC aarch64-linux cross-compiler on your Slackware ARM system is now ready to //rock-n-roll!// +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) ==== ==== 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 options/variables/arguments/switches, commonly known as CFLAGS. In our case, CFLAGS will be used to instruct the GCC cross-compiler to build for the aarch64 (arm64) architecture specifically.+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 === === Creating the arm64 kernel .config ===
  
-First of all, as always, you need to be in the Raspberry Pi Linux kernel source directory which is in the 'build-dirfolder. 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:+First of all, as always, you need to be in the Raspberry Pi Linux kernel source directory which is within your 'BUILDdirectory. 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:
  
 <code> <code>
Line 315: Line 325:
 </code> </code>
  
-<note important>Make a note here of the CFLAGS 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!__</note>+<note important>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!__</note>
  
 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. 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.
Line 363: Line 373:
 === Building the arm64 kernel === === 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 CFLAGS 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:+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:
  
 <code> <code>
Line 396: Line 406:
 === Installing the arm64 modules === === Installing the arm64 modules ===
  
-Once the modules have been built, you have to 'make modules_install' The process will install your kernel modules to '/tmp/lib/modules/5.2.1-v8-aarch64'+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 CFLAGS as before but without any 'LOCALVERSION' set.+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: First you need become '**root**' user and enter a passwd when prompted. To install the aarch64 modules run the following commands:
Line 409: Line 419:
 <note important>You need to be '**root**' user to install the arm64 modules. A normal user does not have the rights to do so!</note> <note important>You need to be '**root**' user to install the arm64 modules. A normal user does not have the rights to do so!</note>
  
-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.+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.
  
 <code> <code>
Line 482: Line 492:
 <code> <code>
 ls -lah rpi-boot/boot/kernel* ls -lah rpi-boot/boot/kernel*
-ls -lah rpi-boot/boot/bcm*-rpi-3-b.dtb +ls -lah rpi-boot/boot/bcm*-rpi-4-b.dtb 
 ls -lah rpi-root/lib/modules/5.2.1-v8* ls -lah rpi-root/lib/modules/5.2.1-v8*
 </code> </code>
Line 519: Line 529:
 Linux 5.2.1-v8-aarch64. Linux 5.2.1-v8-aarch64.
 root@drie:~# cat /proc/version 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+Linux version 5.2.1-v8-aarch64 (exaga@torq) (gcc version 9.2.0 (GCC)) #1 SMP Thu Jul 18 18:19:49 BST 2019
 exaga@torq:~# uname -a exaga@torq:~# uname -a
 Linux torq 5.2.1-v8-aarch64 #2 SMP Thu Jul 18 18:19:49 BST 2019 aarch64 GNU/Linux Linux torq 5.2.1-v8-aarch64 #2 SMP Thu Jul 18 18:19:49 BST 2019 aarch64 GNU/Linux
Line 537: Line 547:
 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/]] 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]]+An automated gcc-9.2.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 Thanks for being interested. <3
  
 ====== Sources ====== ====== Sources ======
-# If you need to install any of the packages above [* check for updates!]:+# 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/a/gawk-5.0.1-arm-1.txz]]  # Slackware ARM current - gawk package. \\
Line 548: Line 558:
 [[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/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. \\  [[ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/flex-2.6.4-arm-3.txz]] # Slackware ARM current - flex package. \\ 
-[[http://arm.slackware.com/FAQs]] # Slackware ARM Linux Project Frequently Asked Questions. \\  +[[https://www.github.com/raspberrypi/]] # Raspberry Pi Foundation GitHub repository Linux kernel and boot-firmware source. \\ 
-[[http://wiki.osdev.org/GCC_Cross-Compiler]] # GCC cross-compiler documentation. \\ +[[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: 
 + 
 +[[slackwarearm:faq|http://arm.slackware.com/FAQs]] # Slackware ARM Linux Project Frequently Asked Questions. \\  
 +[[http://wiki.osdev.org/GCC_Cross-Compiler]] # gcc cross-compiler documentation. \\  
 +[[howtos:hardware:arm:gcc_aarch64_cross-compiler|Slackware ARM GCC aarch64-linux cross-compiler]] for the Raspberry Pi. \\
 [[https://www.raspberrypi.org/documentation/linux/kernel]] # Raspberry Pi Linux kernel documentation. \\  [[https://www.raspberrypi.org/documentation/linux/kernel]] # Raspberry Pi Linux kernel documentation. \\ 
-[[https://www.github.com/raspberrypi/]] # Raspberry Pi Foundation GitHub repository Linux kernel, bootloader/GPU firmware. \\ 
-[[https://ftp.gnu.org/gnu/]] # GCC, binutils, glibc, gmp, mpc, mpfr package source \\  
-[[ftp://gcc.gnu.org/pub/gcc/infrastructure]] # cloog, isl package source 
  
 <!-- If you are copying information from another source, then specify that source --> <!-- If you are copying information from another source, then specify that source -->
 <!-- * Original source: [[http://some.website.org/some/page.html]] --> <!-- * Original source: [[http://some.website.org/some/page.html]] -->
 <!-- Authors are allowed to give credit to themselves! --> <!-- Authors are allowed to give credit to themselves! -->
-  * Originally written by [[wiki:user:exaga | Exaga]] - 2019-07-24 19:28:09 [GMT] 
 <!-- * Contributions by [[wiki:user:yyy | User Y]] --> <!-- * Contributions by [[wiki:user:yyy | User Y]] -->
 +
 +* Originally written by [[wiki:user:exaga | Exaga]] - 2019-07-24 19:28:09 [GMT]
  
 <!-- Please do not modify anything below, except adding new tags.--> <!-- Please do not modify anything below, except adding new tags.-->
 <!-- You must remove the tag-word "template" below before saving your new page --> <!-- You must remove the tag-word "template" below before saving your new page -->
-{{tag>howtos raspberry pi aarch64 arm64 armv8 cross-compile author_exaga}}+{{tag>howtos slackware raspberry pi arm aarch64 arm64 armv8 cross-compile author_exaga}}
  

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