0

I download source of android kernel with these commands:
git clone https://android.googlesource.com/kernel/goldfish.git git checkout -t origin/android-goldfish-2.6.29 -b goldfish

then, I make some conf with these commands in goldfish directory
export CROSS_COMPILE=arm-eabi- export ARCH=arm export SUBARCH=arm make goldfish_defconfig # configure the kernel make -j2 # build it

but after that i got these text on terminal:

make: arm-eabi-gcc: Command not found scripts/kconfig/conf -s arch/arm/Kconfig make: arm-eabi-gcc: Command not found CHK include/linux/version.h SYMLINK include/asm -> include/asm-arm ... make[1]: [kernel/bounds.s] Error 127 Makefile:974: recipe for target 'prepare0' failed make: [prepare0] Error 2


and i tried to install arm-eabi-gcc with these commands:
sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa sudo apt-get update sudo apt-get install gcc-arm-embedded but nothing changes and got the make: arm-eabi-gcc: Command not found error again.

so do someone know how to fix this problem? (i do this things on my ubuntu 17.04)

now that i use arm-none-eabi-gcc i got this error after i used make -j2 command: scripts/kconfig/conf -s arch/arm/Kconfig ... include/linux/compiler-gcc.h:86:30: fatal error: linux/compiler-gcc6.h: No such file or directory #include gcc_header(__GNUC__) ... HOSTLD scripts/mod/modpost

then i downgrade my gcc version to gcc version 4.7.4 (Ubuntu/Linaro 4.7.4-3ubuntu12) but still get error include/linux/compiler-gcc.h:86:30: fatal error: linux/compiler-gcc6.h: No such file or directory #include gcc_header(__GNUC__) ! can someone help?

1 Answers1

0

The compiler binary in the gcc-arm-ebedded package is called arm-none-eabi-gcc, so you should set CROSS_COMPILE=arm-none-eabi-.

Florian Weimer
  • 32,022
  • 3
  • 48
  • 92
  • do you know how to install arm-eabi-gcc on ubunutu 17.04? –  Jul 23 '17 at 16:04
  • Have you tried using `arm-none-eabi-gcc` instead? Why can't you use that compiler? Which ARM ABI variant do you need? – Florian Weimer Jul 23 '17 at 16:13
  • 1
    Actually i don't know their deffrence. I just follow this link: [link](https://android.googlesource.com/platform/external/qemu/+/refs/heads/master/docs/ANDROID-KERNEL.TXT) i update the question as you said. please see the question again. –  Jul 24 '17 at 08:09