[Q] Kernel compiling

Search This thread

bilbo75

Senior Member
Mar 14, 2011
236
78
Prato
Hello everyone, I'm a noob that want try to learn something more about Android.
I'm trying to compile the Optimus-prime kernel of Demetris, but I'm stuck on an error during compile session.

My steps:
1) git init -u git://github.com/Ntemis/lge-kernel-p880
2) downloaded NDK from google http://dl.google.com/android/ndk/android-ndk-r9c-linux-x86.tar.bz2
(I'm using Slackware 14.1 32 bit)
3) I've used as baseconfig this one : cyanogenmod_x3_defconfig
4) then as toolchain :
Code:
export CROSS_COMPILE=~/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-
5)finally I did
Code:
make -j2 ARCH=arm SUBARCH=arm

Now the error:
Code:
  CC      arch/arm/mach-tegra/lge/x3/board-x3-i2c-dev.o
arch/arm/mach-tegra/lge/x3/board-x3-i2c-dev.c:58:27: fatal error: board-lge-nfc.h: No such file or directory
compilation terminated.
make[2]: *** [arch/arm/mach-tegra/lge/x3/board-x3-i2c-dev.o] Errore 1
make[1]: *** [arch/arm/mach-tegra/lge/x3] Errore 2
make: *** [arch/arm/mach-tegra] Errore 2

The include file board-lge-nfc.h is present in the same folder of board-x3-i2c-dev.c

Where is the error?
 
Last edited:

Rudjgaard

Senior Member
Jun 11, 2012
879
411
are you sure the cross compile path points to the correct directory?
try using doomlord toolchain, kernel compiling is quite tricky and most toolchains give errors

Poi se vuoi se ne parla in pvt ;)
 
  • Like
Reactions: bilbo75

bilbo75

Senior Member
Mar 14, 2011
236
78
Prato
are you sure the cross compile path points to the correct directory?
try using doomlord toolchain, kernel compiling is quite tricky and most toolchains give errors

Poi se vuoi se ne parla in pvt ;)

Hi,
I have only the official NDK on my machine. Anyway I'll try also that doomlord toolchain
Thx for the hint. :good:
 

bilbo75

Senior Member
Mar 14, 2011
236
78
Prato
I've tried DoomLord's toolchain,but I have the same problem.
So I've tried to download Iodak's sources and I'm been able to compile it without any problem.
Is there a problem with Optimus Prime sources?Is there some special trick?:confused:
 

bilbo75

Senior Member
Mar 14, 2011
236
78
Prato
Well, I've found a solution....
It looks like there is some problem with include path.I've moved the "board-lge-nfc.h" file inside the include folder in the main root of the kernel sources and it worked.
Now I'm stuck with tspdrv. Same story: missing files when they are there instead. I did the same trick with another include file and it worked again, but now I have other missing files.
I'm sure there is something wrong in my setup/sources ...:(:confused:
 

laufersteppenwolf

Inactive Recognized Developer / Retired Forum Mod
Jul 1, 2012
2,840
6,964
Baden-Württemberg
droideveloper.com
Well, I've found a solution....
It looks like there is some problem with include path.I've moved the "board-lge-nfc.h" file inside the include folder in the main root of the kernel sources and it worked.
Now I'm stuck with tspdrv. Same story: missing files when they are there instead. I did the same trick with another include file and it worked again, but now I have other missing files.
I'm sure there is something wrong in my setup/sources ...:(:confused:

Simply just cherry-pick this commit and you'll be fine ;)
https://github.com/laufersteppenwolf/lge-kernel-p880/commit/c2e57252398ded9520beb9382f538da53f9a0199
 
  • Like
Reactions: bilbo75

Top Liked Posts