Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
howtos:hardware:arm:gcc-9.x_aarch64_cross-compiler [2019/07/25 19:31 (UTC)] – [Downloading required source and configuration] updated notes exaga | howtos:hardware:arm:gcc-9.x_aarch64_cross-compiler [2019/08/01 10:08 (UTC)] – [Copying the arm64 kernel, modules, and device tree blobs (DTB)] error correction in filename exaga |
---|
=== 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.1.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.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 === | === Notes === |
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. |
| |
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: | <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> | <code> |
git branch -a | git branch -a |
</code> | </code></note> |
| |
| |
=== 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 CFLAGS as before but without any 'LOCALVERSION' set. |
<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> |
| |
====== 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. \\ |
[[slackwarearm:faq|http://arm.slackware.com/FAQs]] # Slackware ARM Linux Project Frequently Asked Questions. \\ | [[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. \\ | [[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. \\ |
| |
<!-- 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 slackware raspberry pi arm aarch64 arm64 armv8 cross-compile author_exaga}} | {{tag>howtos slackware raspberry pi arm aarch64 arm64 armv8 cross-compile author_exaga}} |
| |
| |