0

I am facing issues in building the android kernel. I tried the following steps from the following link ( http://source.android.com/source/building-kernels.html )

I donot have the AOSP. I am just trying to compile the kernel

Source: git clone https://android.googlesource.com/kernel/goldfish.git

I placed the tool chain in the following directory

/home/chid/goldfish/prebuilts/gcc/linux-x86/x86/i686-linux-android-4.6/bin

I set the path as follows

export PATH=$(pwd)/prebuilts/gcc/linux-x86/x86/i686-linux-android-4.6/bin:$PATH
pwd: /home/chid/goldfish

set the environment variables as follows.

export ARCH=x86
export SUBARCH=x86
export CROSS_COMPILE=i686-linux-android-

setup the config file as

make arch=x86 goldfish_defconfig

gave make as follows.

make -j6

But it tells me a "cannot find" error.

Error: /home/chid/goldfish/scripts/gcc-version.sh: line 25: /home/chid/goldfish/prebuilts/gcc/linux-x86/x86/i686-linux-android-4.6/bin/i686-linux-android-gcc: No such file or directory

Can you tell me what I am missing? I ensured that the above mentioned file is present and the path is set correctly. Is there something else I need to take care of?

admdrew
  • 3,790
  • 4
  • 27
  • 39
CHID
  • 1,625
  • 4
  • 24
  • 43
  • Try invoking that gcc directly from the command line. How did you install it? Did you move it through a non-unix filesystem or do anything that could have stripped the execute bit? – Chris Stratton Mar 15 '14 at 03:45

1 Answers1

0

You got the toolchain as the following?

$ git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/x86/i686-linux-android-4.6

Have you tried to launch gcc directly?

$ /home/chid/goldfish/prebuilts/gcc/linux-x86/x86/i686-linux-android-4.6/bin/i686-linux-android-gcc

How about ldd?

$ ldd /home/chid/goldfish/prebuilts/gcc/linux-x86/x86/i686-linux-android-4.6/bin/i686-linux-android-gcc

In vagrant precise32 Ubuntu image, no problems at all.

$ ldd i686-linux-android-4.6/bin/i686-linux-android-gcc
linux-gate.so.1 =>  (0xb77c7000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb7619000)
/lib/ld-linux.so.2 (0xb77c8000)

$ i686-linux-android-4.6/bin/i686-linux-android-gcc
i686-linux-android-gcc: fatal error: no input files
compilation terminated.

$ sh goldfish/scripts/gcc-version.sh i686-linux-android-4.6/bin/i686-linux-android-gcc
0406    

You might need to have another Linux environment to execute gcc.

Kazuki Sakamoto
  • 13,929
  • 2
  • 34
  • 96