Reputation: 161
i'm going to compile kernel for my aarch64 based device
kernel sources are ready.
and kernel docs are saying that i should use arm-eabi-4.9 toolchain for ARM EABI for compilation kernel.
but what is it? different type of GCC compiler or what?
is it same as GCC 4.9 ?
why i want to know this because i want to make some modifications into compiler so how can i build arm-eabi-4.9 toolchain for ARM EABI from source ?
i have made some research on the net but i found building process of gcc 4.9 and some info about arm-none-eabi..
i have made modifications originally on top of GCC 4.9 this
can i use this sources and then building GCC 4.9 toolchain for arm,aarch64 ---> and then building kernel with using this toolchain ?
Upvotes: 0
Views: 2116
Reputation: 4875
When compiling gcc, some configuration flags build it as a cross compiler... You can only build gcc binaries for one pair of host/target architectures. When host and target are the same, you get a normal gcc compiler. If not, you get a cross compiler.
To set the target you need to add the --target
option when running ./configure
A toolchain is a gcc crosscompilier for an architecture + some basic libraries (like glibc). You'll need to build those too...
toolchain names go by arch [-vendor] [-os] - eabi
arm-none-eabi, is a crosscompiler for baremetal ARM (no OS).
arm-linux-gnueabi is a crosscompiler for ARM binaries that'll run under a and ARM linux OS using eabi ( Use this for building kernels too).
Also those are arm toolchains, you're looking for aarch64-linux-gnu
Consider looking for a prebuilt toolchain (linaro, embedian), there is some fine tuning required, so it's better to start with a working binary, and running gcc -v
to show how it was built.
Upvotes: 2