[Q] Issues Compiling Droid Incredible Kernel

tcberg2010

Senior Member
Apr 12, 2010
553
17
0
North Carolina
Evening All,

I am attempting to compile a kernel for my droid incredible and am running into a problem. I successfully compiled one a few weeks ago, but am trying to refresh so i can learn more. I am using instructions found at:
http://wiki.cyanogenmod.com/index.php?title=Building_from_source,
only changing commands when necessary. I have pulled a working .config from Skyraider 2.2, created the backup and was able to edit it to my liking. For this I decided to leave everything as stock, as my intention was to just compile the stock kernel to help myself learn. When I enter
Code:
make ARCH=arm CROSS_COMPILE=$CCOMPILER
,
I receive the following error:
Code:
[email protected]:~/androkern/incredible$ make ARCH=arm CROSS_COMPILE=$CCOMPILER 
scripts/kconfig/conf -s arch/arm/Kconfig
  CHK     include/linux/version.h
  UPD     include/linux/version.h
  Generating include/asm-arm/mach-types.h
  CHK     include/linux/utsrelease.h
  UPD     include/linux/utsrelease.h
  SYMLINK include/asm -> include/asm-arm
  CC      kernel/bounds.s
cc1: error: unrecognized command line option "-mlittle-endian"
cc1: error: unrecognized command line option "-mapcs"
cc1: error: unrecognized command line option "-mno-sched-prolog"
cc1: error: unrecognized command line option "-mno-thumb-interwork"
kernel/bounds.c:1: error: unknown ABI (aapcs-linux) for -mabi= switch
kernel/bounds.c:1: error: bad value (armv5t) for -march= switch
kernel/bounds.c:1: error: bad value (armv5t) for -mtune= switch
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2
Being new to compiling would anyone be able to help me understand what this error means. I have not found anything so far that could help me. I was not expecting any issues since I was essential just compiling the Stock Kernel for my own use.

Would someone be able to help me learn what is causing this? Thank you.
 

invisiblek

Recognized Developer
Feb 24, 2010
1,584
5,894
0
Minnesota
www.invisiblek.org
Evening All,

I am attempting to compile a kernel for my droid incredible and am running into a problem. I successfully compiled one a few weeks ago, but am trying to refresh so i can learn more. I am using instructions found at:
http://wiki.cyanogenmod.com/index.php?title=Building_from_source,
only changing commands when necessary. I have pulled a working .config from Skyraider 2.2, created the backup and was able to edit it to my liking. For this I decided to leave everything as stock, as my intention was to just compile the stock kernel to help myself learn. When I enter
Code:
make ARCH=arm CROSS_COMPILE=$CCOMPILER
,
I receive the following error:
Code:
[email protected]:~/androkern/incredible$ make ARCH=arm CROSS_COMPILE=$CCOMPILER 
scripts/kconfig/conf -s arch/arm/Kconfig
  CHK     include/linux/version.h
  UPD     include/linux/version.h
  Generating include/asm-arm/mach-types.h
  CHK     include/linux/utsrelease.h
  UPD     include/linux/utsrelease.h
  SYMLINK include/asm -> include/asm-arm
  CC      kernel/bounds.s
cc1: error: unrecognized command line option "-mlittle-endian"
cc1: error: unrecognized command line option "-mapcs"
cc1: error: unrecognized command line option "-mno-sched-prolog"
cc1: error: unrecognized command line option "-mno-thumb-interwork"
kernel/bounds.c:1: error: unknown ABI (aapcs-linux) for -mabi= switch
kernel/bounds.c:1: error: bad value (armv5t) for -march= switch
kernel/bounds.c:1: error: bad value (armv5t) for -mtune= switch
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2
Being new to compiling would anyone be able to help me understand what this error means. I have not found anything so far that could help me. I was not expecting any issues since I was essential just compiling the Stock Kernel for my own use.

Would someone be able to help me learn what is causing this? Thank you.
you need to do:
export CCOMPILER=${HOME}/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-

(assuming you pulled everything down in ~/mydroid , otherwise change it to where it is)
then you should be able to compile it
 

tcberg2010

Senior Member
Apr 12, 2010
553
17
0
North Carolina
That command did work for me. I was able to compile it. What I would still like to know is what exactly I did when i ran that command? I don't really enjoy mashing in commands when i don't know what they mean.
 

mattwood2000

Senior Member
May 4, 2010
254
14
48
Basically you created an environmental variable called CCOMPILER that is equal to the location of the cross compiler binaries.

This command would do the same thing:

make ARCH=arm CROSS_COMPILE=${HOME}/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-

You are just pointing the make file to the location of the cross compiler so that it doesn't use the host compiler by default
 
  • Like
Reactions: alurysharad

jermaine151

Senior Member
Jun 19, 2010
4,237
3,690
0
Columbus, Ohio
Basically you created an environmental variable called CCOMPILER that is equal to the location of the cross compiler binaries.

This command would do the same thing:

make ARCH=arm CROSS_COMPILE=${HOME}/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-

You are just pointing the make file to the location of the cross compiler so that it doesn't use the host compiler by default
+1 Whenever you "export" you're setting an environment variable to something. Then you can verify it by typing: "echo $CCOMPILER" (without quotes) and it should spit that path back at you.
 
Last edited:
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone