arm-eabi-gcc: cannot execute binary file: Exec format error

1,171 views
Skip to first unread message

Gomesh Singh

unread,
Mar 22, 2016, 4:34:23 PM3/22/16
to Android Linux Kernel Development
I am getting  cannot execute binary file: Exec format error in Cygwin while making kernel image for HTC Desire U T327W device. 

I have downloaded android toolchain for this device with below mentioned link:

and kernel source code:

i putted kernel source code and prebuilt tool chain in Android folder and set path with below mentioned command:

export PATH=$HOME/android/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin:$PATH

when i ran command "make clean" i am getting output like this:

/home/gs/android/primominids-ics-3.0.16-17d3a9d/scripts/gcc-version.sh: line 25: /home/gs/android/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc: cannot execute binary file: Exec format error
/home/gs/android/primominids-ics-3.0.16-17d3a9d/scripts/gcc-version.sh: line 26: /home/gs/android/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc: cannot execute binary file: Exec format error
/home/gs/android/primominids-ics-3.0.16-17d3a9d/scripts/gcc-version.sh: line 25: /home/gs/android/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc: cannot execute binary file: Exec format error
/home/gs/android/primominids-ics-3.0.16-17d3a9d/scripts/gcc-version.sh: line 26: /home/gs/android/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc: cannot execute binary file: Exec format error

I have followed steps and required packages as mentioned in one of xda forum but not workes for me. please have a look and let me know correct steps and required things to build kernel with this source code and prebuilt.

br.
Gomesh
Readme.txt

Rob Patershuk

unread,
Apr 5, 2016, 7:27:43 PM4/5/16
to Android Linux Kernel Development
You are using a toolchain built for a linux machine, it will not work with cygwin for linux. Though there have been rare cases where toolchains built for cygwin/arm cross compilation, it is very difficult, time-consuming, and unnecessary to attempt kernel building with cygwin.

If you must build on a windows machine, a virtual machine is your only realistic option. However I recommend using linux.
Reply all
Reply to author
Forward
0 new messages