Reputation: 2552
I am trying to compile a kernel on my FOX G20 V board. In order to do so, I have to specify the cross compiler in one of the steps arm-linux-gnueabi
. The command is
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- at91-ariag25.dtb
So in order for the compiler to know where the executable of the cross compiler is, I specify it in the path by doing
export PATH=$PATH:/home/path_goes_here/bin
When I do echo $PATH
, I get the right path of the cross compiler. However, now when I do the make of my project, I receive:
make: command not found
But when I don't specify the path of the compiler, the make works but when it reaches the point of the cross compiler, it gives me:
make: arm-linux-gnueabi-gcc: Command not found
I think that my make is not in my system path when I change it to the cross compiler. Therefore, how can I add both the make and the cross compiler to the system path?
EDIT
My cross compiler is actually arm-linux-gnueabi-gcc-4.7
, and not arm-linux-gnueabi-gcc
. Yet when I specify the cross compiler in the make
by doing CROSS_COMPILE=arm-linux-gnueabi-
, I get:
make: arm-linux-gnueabi-gcc: Command not found
Because arm-linux-gnueabi-gcc
isn't the one it should be looking for. Yet when I specify CROSS_COMPILE=arm-linux-gnueabi-gcc-4.7
, it appends gcc
at the end of that and gives me:
make: arm-linux-gnueabi-gcc-4.7gcc: Command not found
EDIT 2
I simply renamed the cross compiler and that seemed to work. But now, I get the error:
arm-linux-gnueabi-gcc: error trying to exec 'cc1': execvp: No such file or directory
Upvotes: 3
Views: 7844
Reputation: 8011
Setting CROSS_COMPILE
is only a shorthand for setting all of CC=$(CROSS_COMPILE)cc
AS=$(CROSS_COMPILE)as
LD=$(CROSS_COMPILE)ld
etc etc (just take a look at the top level Makefile
with less(1)
)
So you should be able to do this
$ export ARCH=arm
$ xc=arm-linux-gnueabi-
$ export CC=$(xc)gcc-4.7
$ export AS=$(xc)as-4.7
$ export LD=$(xc)ld-4.7
etc etc
$ make at91-ariag25.dtb
Upvotes: 2
Reputation: 124
For each of the binaries in your toolchain, you should create symbolic links that obey the naming convention required by your Makefile. The links should point to the respective binary that uses the non-conformant naming scheme.
cd /home/dico/gcc-4.7-arm-linux-gnueabi_4.7.2-1/usr/bin
ln -s arm-linux-gnueabi-gcc-4.7 arm-linux-gnueabi-gcc
Upvotes: 1