Aarch64 linux gnu toolchain

How to install the aarch64 toolchain for armv8 cortex-a53 on Debian?

I’m wanting to start low level programming on ARM chips. I’ve installed qemu and followed a few example programs for hello world type stuff, but now I want to target the latest Raspberry Pi, which has the ARMv8 cortex-a53 and neon-fp-armv8 FPU. I’m currently running Debian:

$ lsb_release -a No LSB modules are available. Distributor ID: BunsenLabs Description: BunsenLabs GNU/Linux 8.5 (Hydrogen) Release: 8.5 Codename: bunsen-hydrogen $ cat /etc/debian_version 8.5 
binutils-arm-none-eabi gcc-arm-none-eabi gdb-arm-none-eabi 

However, when I try to compile with -mcpu=cortex-a53 , I receive the following error: arm-none-eabi-gcc: error: unrecognized argument in option ‘-mcpu=cortex-a53’

$ arm-none-eabi-gcc --version arm-none-eabi-gcc (4.8.4-1+11-1) 4.8.4 20141219 (release) 

I assumed I had an older GCC that did not contain that target CPU, so I tried to download the source for binutils, gcc, and gdb but I am unable to build binutils. It always fails when trying to make all . binutils configuration:

$../../src/binutils-2.26.51/configure \ --target=arm-none-eabi \ --disable-nls 
$make -j4 checking for bison. /home/nathan/development/tools/arm/src/binutils-2.26.51/missing bison -y checking for flex. /home/nathan/development/tools/arm/src/binutils-2.26.51/missing flex checking lex output file root. configure: error: cannot find output from /home/nathan/development/tools/arm/src/binutils-2.26.51/missing flex; giving up Makefile:3545: recipe for target 'configure-binutils' failed make[1]: *** [configure-binutils] Error 1 no checking for bison. /home/nathan/development/tools/arm/src/binutils-2.26.51/missing bison -y checking for flex. /home/nathan/development/tools/arm/src/binutils-2.26.51/missing flex checking lex output file root. configure: error: cannot find output from /home/nathan/development/tools/arm/src/binutils-2.26.51/missing flex; giving up Makefile:4834: recipe for target 'configure-gas' failed make[1]: *** [configure-gas] Error 1 make[1]: Leaving directory '/home/nathan/development/tools/arm/build/binutils-2.26.51' Makefile:844: recipe for target 'all' failed make: *** [all] Error 2 

What are the proper steps I need to take in order to get a toolchain setup to compile for an aarch64 cortex-a53 architecture? Edit 1 Discovered through the comments, I need to install the aarch64 toolchain, not the arm toolchain. Still clueless.

Читайте также:  Сборки linux от lazarus

Источник

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Linaro toolchain for arm64 based kernel

Teamlions/aarch64-linux-gnu-7.3

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

only support cross compile for arm64. They will always be up to date with the latest stable GCC (currently 7.3.x).

Supported operating systems

To use these toolchains, you first need to do a shallow clone (to avoid pulling too much history):

git clone https://github.com/teamlions/aarch64-linux-gnu-7.3/ aarch64-linux-gnu-7.3

Then point your cross compiler to the toolchain. For kernels, you can do the following:

export CROSS_COMPILE=$(pwd)/aarch64-linux-gnu-7.3/bin/prefix>

For kernels, you must have the following four commits:

The last two commits are from Linux upstream. The first is only needed if your version is 3.10.79 or earlier. The second is needed for both 3.10 (3.10.101 or earlier) and 3.18 (3.18.31 or earlier). I do recommend upstreaming your kernels but if you choose not to, just pick that commit.

Compiling these toolchains

If you would like to learn how to compile these toolchains, please give this README a glance.

If you have any questions or issues, please open an issue on this repo or the Teamlions and I’ll do my best to assist you.

Thanks @nathanchance for README Template .

Источник

How To Install gcc-aarch64-linux-gnu on Ubuntu 18.04

In this tutorial we learn how to install gcc-aarch64-linux-gnu on Ubuntu 18.04.

What is gcc-aarch64-linux-gnu

This is the GNU C compiler, a fairly portable optimizing compiler for C.

This is a dependency package providing the default GNU C cross-compiler for the arm64 architecture.

There are three ways to install gcc-aarch64-linux-gnu on Ubuntu 18.04. We can use apt-get , apt and aptitude . In the following sections we will describe each method. You can choose one of them.

Install gcc-aarch64-linux-gnu Using apt-get

Update apt database with apt-get using the following command.

After updating apt database, We can install gcc-aarch64-linux-gnu using apt-get by running the following command:

sudo apt-get -y install gcc-aarch64-linux-gnu 

Install gcc-aarch64-linux-gnu Using apt

Update apt database with apt using the following command.

After updating apt database, We can install gcc-aarch64-linux-gnu using apt by running the following command:

sudo apt -y install gcc-aarch64-linux-gnu 

Install gcc-aarch64-linux-gnu Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

After updating apt database, We can install gcc-aarch64-linux-gnu using aptitude by running the following command:

sudo aptitude -y install gcc-aarch64-linux-gnu 

How To Uninstall gcc-aarch64-linux-gnu on Ubuntu 18.04

To uninstall only the gcc-aarch64-linux-gnu package we can use the following command:

sudo apt-get remove gcc-aarch64-linux-gnu 

Uninstall gcc-aarch64-linux-gnu And Its Dependencies

To uninstall gcc-aarch64-linux-gnu and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove gcc-aarch64-linux-gnu 

Remove gcc-aarch64-linux-gnu Configurations and Data

To remove gcc-aarch64-linux-gnu configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge gcc-aarch64-linux-gnu 

Remove gcc-aarch64-linux-gnu configuration, data, and all of its dependencies

We can use the following command to remove gcc-aarch64-linux-gnu configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge gcc-aarch64-linux-gnu 

References

Summary

In this tutorial we learn how to install gcc-aarch64-linux-gnu package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.

Источник

Оцените статью
Adblock
detector