2

I am cross compiling the Raspbian kernel since it will take about 12 hours for the Pi to do (Raspberry Pi 1).

I have the build tools for ARM and the kernel in two separate folders in /home/gray/Desktop/tmp/

I am following this guide: http://elinux.org/Raspberry_Pi_Kernel_Compilation

My issue is that when I go to compile, it can't find arm-linux-gnueabihf-gcc-4.8.3 which is clearly in the folder I linked when I did export CCPREFIX. Here is what I did:

gray@Rava-Xubuntu:~/Desktop/tmp/linux$ export CCPREFIX=/home/gray/Desktop/tmp/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-

And it returns when I try to build:

gray@Rava-Xubuntu:~/Desktop/tmp/linux$ make ARCH=arm CROSS_COMPILE=${CCPREFIX}
/home/gray/Desktop/tmp/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc: 1: /home/gray/Desktop/tmp/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc: arm-linux-gnueabihf-gcc-4.8.3: not found
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
make[1]: 'include/generated/mach-types.h' is up to date.
  CC      kernel/bounds.s
/home/gray/Desktop/tmp/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc: 1: /home/gray/Desktop/tmp/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc: arm-linux-gnueabihf-gcc-4.8.3: not found
Kbuild:43: recipe for target 'kernel/bounds.s' failed
make[1]: *** [kernel/bounds.s] Error 127
Makefile:990: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2

Even though the file is clearly in there:

Even though the file is clearly in there

Thanks.

Gray
  • 41
  • 3

1 Answers1

2

So I figured it out.

I just grabbed the crossbuild version of gcc (I think that is what it is)

sudo apt-get install crossbuild-essential-armhf

And then my new path is:

export CCPREFIX=/usr/bin/arm-linux-gnueabihf-

And the build works perfectly!

Gray
  • 41
  • 3