5,597,762 Members 36,386 Now Online
XDA Developers Android and Mobile Development Forum

Kernel Compiling Problem

Tip us?
 
ChunkFlip
Old
(Last edited by ChunkFlip; 9th December 2013 at 06:03 PM.) Reason: Additional information
#1  
ChunkFlip's Avatar
Member - OP
Thanks Meter 17
Posts: 90
Join Date: Dec 2011
Location: Constanta
Cool Kernel Compiling Problem

Hello!

I need to say this first : i'm a newbie at development but i want to learn.

I succesfully managed to compile CM9 from CyanogenMod sources but i have some problems trying to compile mike's cm10.1 kernel.I followed his tutorial changing smultron to zeus in terminal,it gave me something about trying dependecies only and then moved on(tried with smultron too and same message) .It compiles for about half hour and then it says :
Code:
host StaticLib: libLLVMCore (/home/filip/android/system/out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMCore_intermediates/libLLVMCore.a)
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/home/filip/android/system/kernel/semc/msm7x30'
make: *** [TARGET_KERNEL_BINARIES] Error 2
make: *** Waiting for unfinished jobs....
filip@vaio:~/android/system$
The changes I have made to the kernel where to change the input drivers from him with the input drivers from DoomLord 3.4 kernel for msm7x30 zeus branch , but I don't think this is the main reason of this error.

EDIT: Compiled succesfully with the input folder from mike's sources.Any idea how to resolve the problem with the input folder from DoomLord ? in his git he says the the touchscreen problem is resolved.

EDIT 2: New error:
Code:
scripts/kconfig/conf --silentoldconfig Kconfig
  GEN     /home/filip/android/system/out/target/product/zeus/obj/KERNEL_OBJ/Makefile
  CHK     include/linux/version.h
  Using /home/filip/android/system/kernel/semc/msm7x30 as source for kernel
  CHK     include/generated/utsrelease.h
make[3]: `include/generated/mach-types.h' is up to date.
  CALL    /home/filip/android/system/kernel/semc/msm7x30/scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  GZIP    kernel/config_data.gz
  CHK     kernel/config_data.h
  UPD     kernel/config_data.h
  CC      kernel/configs.o
  CC      drivers/input/touchscreen/cy8ctma300_touch.o
  LD      kernel/built-in.o
/home/filip/android/system/kernel/semc/msm7x30/drivers/input/touchscreen/cy8ctma300_touch.c:185:28: error: expected ')' before 'int'
/home/filip/android/system/kernel/semc/msm7x30/drivers/input/touchscreen/cy8ctma300_touch.c:186:32: error: expected ')' before string constant
/home/filip/android/system/kernel/semc/msm7x30/drivers/input/touchscreen/cy8ctma300_touch.c: In function 'perform_reset':
/home/filip/android/system/kernel/semc/msm7x30/drivers/input/touchscreen/cy8ctma300_touch.c:488:2: error: implicit declaration of function 'gpio_set_value' [-Werror=implicit-function-declaration]
/home/filip/android/system/kernel/semc/msm7x30/drivers/input/touchscreen/cy8ctma300_touch.c:492:2: error: implicit declaration of function 'gpio_get_value' [-Werror=implicit-function-declaration]
/home/filip/android/system/kernel/semc/msm7x30/drivers/input/touchscreen/cy8ctma300_touch.c: At top level:
/home/filip/android/system/kernel/semc/msm7x30/drivers/input/touchscreen/cy8ctma300_touch.c:1104:13: error: 'THIS_MODULE' undeclared here (not in a function)
/home/filip/android/system/kernel/semc/msm7x30/drivers/input/touchscreen/cy8ctma300_touch.c:1106:2: error: unknown field 'ioctl' specified in initializer
/home/filip/android/system/kernel/semc/msm7x30/drivers/input/touchscreen/cy8ctma300_touch.c:1106:2: warning: initialization from incompatible pointer type [enabled by default]
error, forbidden warning: cy8ctma300_touch.c:1106
make[5]: *** [drivers/input/touchscreen/cy8ctma300_touch.o] Error 1
make[4]: *** [drivers/input/touchscreen] Error 2
make[3]: *** [drivers/input] Error 2
make[2]: *** [drivers] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/home/filip/android/system/kernel/semc/msm7x30'
make: *** [TARGET_KERNEL_BINARIES] Error 2
I attached cy8ctma300_touch.c
Attached Files
File Type: c cy8ctma300_touch.c - [Click for QR Code] (36.7 KB, 4 views)
Device: Sony Ericsson Xperia Play
ROM: AuroraPlay
Kernel:Lupus GB v12
It's never lupus.
The Following 3 Users Say Thank You to ChunkFlip For This Useful Post: [ Click to Expand ]
 
saqibkhan
Old
#2  
saqibkhan's Avatar
Senior Member
Thanks Meter 142
Posts: 403
Join Date: Sep 2012
sorry.. of topic.. but thanks.. thanks for Trying .. for yourself and Us.. .. I hope someone can answer that.
Phone: Xperia Play (R800i)
Android version : 4.0.4
Kernel version : Turbo Kernel v3.1
ROM : MIUI v4 3.2.22
Recovery: TWRP


Kernel 3.x Development for Reference for all Dev's
Mike's Thread
Wedgess Thread
DooMLoRD Thread
 
Bakisha
Old
#3  
Bakisha's Avatar
Senior Member
Thanks Meter 418
Posts: 767
Join Date: May 2011
I tried to compile kernel with cy8ctma300_touch.c from Wedgess's 2.6 kernel from
[DEV][WIP][PLAY] cm 10.1 & pac 4.2 [ROM][KERNEL][4.2.2][UPDATED 21-03-13
] and i got exactly same error

As you said, CM10.1 compile without errors with it's own cy8ctma300_touch.c

I'll look into it as much my limited knowledge about linux/kernel things alow me (noob here also, this was my very first rom/kernel compiled from source )
 
saqibkhan
Old
#4  
saqibkhan's Avatar
Senior Member
Thanks Meter 142
Posts: 403
Join Date: Sep 2012
Quote:
Originally Posted by Bakisha View Post
I tried to compile kernel with cy8ctma300_touch.c from Wedgess's 2.6 kernel from
[DEV][WIP][PLAY] cm 10.1 & pac 4.2 [ROM][KERNEL][4.2.2][UPDATED 21-03-13
] and i got exactly same error

As you said, CM10.1 compile without errors with it's own cy8ctma300_touch.c

I'll look into it as much my limited knowledge about linux/kernel things alow me (noob here also, this was my very first rom/kernel compiled from source )
I also want to get into Kernel Compiling.. and ROM compiling of course.. can anyone suggest me is my computer specs enough for compiling and Dual Booting Windows 8 and Ubuntu.. (should I even use Ubuntu ?? or any other distro.. plz recommend) .

My Computer Specs are
4GB Ram
Intel Core 2 Duo CPU T9300 @ 2.50 Ghz
650gb HD
Windows 8 Pro 64 Bit.
Phone: Xperia Play (R800i)
Android version : 4.0.4
Kernel version : Turbo Kernel v3.1
ROM : MIUI v4 3.2.22
Recovery: TWRP


Kernel 3.x Development for Reference for all Dev's
Mike's Thread
Wedgess Thread
DooMLoRD Thread
 
ChunkFlip
Old
#5  
ChunkFlip's Avatar
Member - OP
Thanks Meter 17
Posts: 90
Join Date: Dec 2011
Location: Constanta
yes , it's enough . I don't know if you could resolve anything but you can try . there are a lots of guides on the net about how to do this.
Device: Sony Ericsson Xperia Play
ROM: AuroraPlay
Kernel:Lupus GB v12
It's never lupus.
 
saqibkhan
Old
#6  
saqibkhan's Avatar
Senior Member
Thanks Meter 142
Posts: 403
Join Date: Sep 2012
Quote:
Originally Posted by Bakisha View Post
I tried to compile kernel with cy8ctma300_touch.c from Wedgess's 2.6 kernel from
[DEV][WIP][PLAY] cm 10.1 & pac 4.2 [ROM][KERNEL][4.2.2][UPDATED 21-03-13
] and i got exactly same error

As you said, CM10.1 compile without errors with it's own cy8ctma300_touch.c

I'll look into it as much my limited knowledge about linux/kernel things alow me (noob here also, this was my very first rom/kernel compiled from source )
Quote:
Originally Posted by ChunkFlip View Post
yes , it's enough . I don't know if you could resolve anything but you can try . there are a lots of guides on the net about how to do this.
what distro to use.. lubuntu,, xubuntu.. Ubuntu.. ? which is most stable for android compiling.. and I might start using it as daily driver besides Windows as well.. (don't think so., but maybe.. hehe)
Phone: Xperia Play (R800i)
Android version : 4.0.4
Kernel version : Turbo Kernel v3.1
ROM : MIUI v4 3.2.22
Recovery: TWRP


Kernel 3.x Development for Reference for all Dev's
Mike's Thread
Wedgess Thread
DooMLoRD Thread
 
Bakisha
Old
#7  
Bakisha's Avatar
Senior Member
Thanks Meter 418
Posts: 767
Join Date: May 2011
Quote:
Originally Posted by saqibkhan View Post
what distro to use.. lubuntu,, xubuntu.. Ubuntu.. ? which is most stable for android compiling.. and I might start using it as daily driver besides Windows as well.. (don't think so., but maybe.. hehe)
I'm using Ubuntu 13.10 x64 in Virtualbox. I firstly tried 12.04 LTS but it gave me nothing but trouble in virtualbox.

As in OP, i followed Mike's guide to build from source

As for initial setting up ubuntu i followed this guide and lot of "googling" (basicly, whatever error i get, i copy that text and paste it to google search).
But be warned, source is at least 15GB, it can take some time to download. Plus, compiling time (at least for me) is 3 or 4 hours (if building only kernel, it's shorter, about half an hour)

My progress is very slow, don't have much time for testing, but so far i found that maybe error is not in Mike's cy8ctma300_touch.c but rather difference in kernel between 2.6 and 3.4 . For example, it compile ok if in line 1106 in wedgess cy8ctma300_touch.c i enter ".unlocked_ioctl" instead of just ".ioctl" but touchscreen don't work still. In Mike's kernel there is already line with ".unlocked_ioctl" so it don't give error when compiling.

I still have to try something i found on web, but i don't know will i be able to do it this weekend...
 
saqibkhan
Old
#8  
saqibkhan's Avatar
Senior Member
Thanks Meter 142
Posts: 403
Join Date: Sep 2012
Quote:
Originally Posted by Bakisha View Post
I'm using Ubuntu 13.10 x64 in Virtualbox. I firstly tried 12.04 LTS but it gave me nothing but trouble in virtualbox.

As in OP, i followed Mike's guide to build from source

As for initial setting up ubuntu i followed this guide and lot of "googling" (basicly, whatever error i get, i copy that text and paste it to google search).
But be warned, source is at least 15GB, it can take some time to download. Plus, compiling time (at least for me) is 3 or 4 hours (if building only kernel, it's shorter, about half an hour)

My progress is very slow, don't have much time for testing, but so far i found that maybe error is not in Mike's cy8ctma300_touch.c but rather difference in kernel between 2.6 and 3.4 . For example, it compile ok if in line 1106 in wedgess cy8ctma300_touch.c i enter ".unlocked_ioctl" instead of just ".ioctl" but touchscreen don't work still. In Mike's kernel there is already line with ".unlocked_ioctl" so it don't give error when compiling.

I still have to try something i found on web, but i don't know will i be able to do it this weekend...
I think if Ubuntu is installed as a separate Operating system.. it would take less time to build.. 3-4 hours is tooo long.. anyways.. I am going to install it DUal boot it with Windows 8.. and start compiling then.
Phone: Xperia Play (R800i)
Android version : 4.0.4
Kernel version : Turbo Kernel v3.1
ROM : MIUI v4 3.2.22
Recovery: TWRP


Kernel 3.x Development for Reference for all Dev's
Mike's Thread
Wedgess Thread
DooMLoRD Thread

Tags
kernel
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

Polish Your Custom Themes with Theme Debugger

Creating a custom Android theme from scratch can be quite the laborious task. In addition to … more

Clean Up Your Logcat Code with Lib Cleaner

Some of you may think that writing code is the hardest part of development. It’s not, as the … more

Tweak Your Xperia Device’s Camera App Yourself

We’ve come to expect nearly perfect cameraperformancein our modern day … more