[WIP][Thinktank][DEV]Kernel 3.4.x

Search This thread

nickholtus

Senior Member
Aug 26, 2011
2,407
2,469
Hello,

As most threads are full of thanks posts or non development related posts, I am making a new one.

A note to everyone: This is a DEV thread, every post not related to this project will be removed!

What is the current status?

Currently the kernel is booting, but touchscreen isn't working.

What's working:

Booting into Android
Screen (Showing things, not touch)
Sound

What's not working or not tested because of touchscreen:

Everything else

Sources:

https://github.com/nickholtus/msm7x30-3.4.x-nAa


Credits:

NobodyAtAll for the initial source
MikeNG for a lot of fixes
DooMLoRD For giving me the device and a lot of work on the source
Mikeioannina A lot of work on the sources


Again: Please keep this thread development related!


If I helped you, please press thanks or consider donating to me!
 
Last edited:

DooMLoRD

Inactive Recognized Developer
Jul 27, 2010
13,187
39,710
Pune
I've posted even full bugreport from zImage(4), wich i think is latest test version. I'll copy paste dmesg from there and attach it here

ok so here is what i see from the dmesg:

Code:
<6>[    5.784790] synaptics_touchpad: product 1, firmware revision 13, bootloader date 2011-02-16
<6>[    5.785827] input: synaptics_touchpad as /devices/virtual/input/input4
<6>[    5.786254] synaptics_touchpad 4-0020: synaptics_touchpad_set_power: powered 1, activated 0, users 0, standby 0
<7>[    5.786834] CY8CTMA300_TOUCH: V0.9b-mt built Jan 14 2014 22:15:21
<7>[    5.787200] CY8CTMA300_TOUCH: SPI setup (requesting 1000000Hz) OK
...
<6>[    5.949859] CY8CTMA300_TOUCH: TP_REG_FW 0x00
<6>[    6.109924] CY8CTMA300_TOUCH: Bootloader  FW Ver 0.0
<6>[    6.129882] CY8CTMA300_TOUCH: Application FW Ver 0.0
<6>[    6.149902] CY8CTMA300_TOUCH: Silicon Revision E
<6>[    6.169891] CY8CTMA300_TOUCH: Customer ID 0
<6>[    6.189880] CY8CTMA300_TOUCH: old FW version, applying reset workarounds
<6>[    6.330108] input: cy8ctma300_touch as /devices/platform/spi_qsd.0/spi_master/spi0/spi0.0/input/input5
<6>[    6.334136] CY8CTMA300_TOUCH: invalid data?

then...

Code:
<6>[   33.252838] CY8CTMA300_TOUCH: invalid data?
<6>[   33.651550] CY8CTMA300_TOUCH: invalid data?
<6>[   34.024230] synaptics_touchpad 4-0020: synaptics_touchpad_set_power: powered 0, activated 0, users 1, standby 0
...
<6>[   34.026611] synaptics_touchpad 4-0020: synaptics_touchpad_set_power: powered 0, activated 0, users 0, standby 0
<6>[   34.027099] synaptics_touchpad 4-0020: synaptics_touchpad_set_power: powered 0, activated 0, users 1, standby 0
<6>[   34.027130] synaptics_touchpad 4-0020: synaptics_touchpad_set_power: powered 0, activated 0, users 0, standby 0
<6>[   34.050384] CY8CTMA300_TOUCH: invalid data?
<6>[   34.491516] CY8CTMA300_TOUCH: invalid data?
<6>[   34.890441] CY8CTMA300_TOUCH: invalid data?

see that the "set_power" is powered 0... something is powering down the touchpad, may be due to "invalid data?"

can u give me exact time stamp from bootup when the touchscreen stops working? post the corresponding dmesg...
 

Bakisha

Senior Member
May 4, 2011
973
535
see that the "set_power" is powered 0... something is powering down the touchpad, may be due to "invalid data?"

can u give me exact time stamp from bootup when the touchscreen stops working? post the corresponding dmesg...

I;ll attach dmesg that i just made, but i don't think that lines have something to do with touchscreen because line with that "powered 0" is even in dmesg logs of GB and ICS kernels for Play (i've checked on Lupus kernels for GB and ICS and on those touchpads and touchscreen works normally)

But i noticed difference in next lines:

Code:
<7>[    5.525909] CY8CTMA300_TOUCH: V0.9b-mt built Jan 14 2014 22:15:21
<7>[    5.526306] CY8CTMA300_TOUCH: SPI setup (requesting 1000000Hz) OK
<6>[    5.584747] Charging with 0mA current
<6>[    5.584960] entering into lpm
<6>[    5.585144] msm_otg_suspend: Turn on phy comparators
<6>[    5.585449] msm_otg_suspend: usb in low power mode
<6>[    5.685119] CY8CTMA300_TOUCH: TP_REG_FW 0x00
<6>[    5.845153] CY8CTMA300_TOUCH: Bootloader  FW Ver 0.0
<6>[    5.865142] CY8CTMA300_TOUCH: Application FW Ver 0.0
<6>[    5.885192] CY8CTMA300_TOUCH: Silicon Revision E
<6>[    5.905181] CY8CTMA300_TOUCH: Customer ID 0
<6>[    5.925170] CY8CTMA300_TOUCH: old FW version, applying reset workarounds
<6>[    6.065368] input: cy8ctma300_touch as /devices/platform/spi_qsd.0/spi_master/spi0/spi0.0/input/input5
<6>[    6.071472] CY8CTMA300_TOUCH: invalid data?
<6>[    6.084808] CY8CTMA300_TOUCH: Device registered OK

And in other kernels (even in Wedgess's 2.6 kernel for his test release JB4.2) it is like:

Code:
<7>CY8CTMA300_TOUCH: V0.9b-mt built Feb  5 2014 22:14:40
<7>CY8CTMA300_TOUCH: SPI setup (requesting 1000000Hz) OK
<6>CY8CTMA300_TOUCH: TP_REG_FW 0x00
<6>CY8CTMA300_TOUCH: Bootloader  FW Ver 0.1
<6>CY8CTMA300_TOUCH: Application FW Ver 0.114
<6>CY8CTMA300_TOUCH: Silicon Revision E
<6>CY8CTMA300_TOUCH: Customer ID 5
<6>CY8CTMA300_TOUCH: SSD firmware [Project ID 7]
<3>CY8CTMA300_TOUCH: firmware versions match.
<6>input: cy8ctma300_touch as /devices/platform/spi_qsd.0/spi0.0/input/input3
<6>CY8CTMA300_TOUCH: Device registered OK
<6>GPIO Input Driver: Start gpio inputs for keypad-zeus in interrupt mode
<6>GPIO Input Driver: Start gpio inputs for keypad-zeus in interrupt mode
<6>GPIO Input Driver: Start gpio inputs for keypad-zeus in interrupt mode
<6>GPIO Input Driver: Start gpio inputs for keypad-zeus in interrupt mode
<6>GPIO Input Driver: Start gpio inputs for keypad-zeus in interrupt mode
<6>input: keypad-zeus as /devices/virtual/input/input4
 

Attachments

  • 2014-02-11_235913_dmesg.txt
    37.5 KB · Views: 11

smokerman

Inactive Recognized Contributor
Feb 15, 2012
4,411
3,752
Esposende
smokermanxda.blogspot.pt
OnePlus 8
i think probably is touchpad related also..seems like kernel is powering down the touchpads and touchscreen. @nickholtus and if you try kernel like NEOL as the board is the same, but kernel wont look for touchpads..and maybe we can flash on play without touchpads support..just a test,we can flash neol kernel and vice versa..only touchpads and camera inverted..but maybe its possible to make it work.
 

nickholtus

Senior Member
Aug 26, 2011
2,407
2,469
Personally I think the problem is here:

<6>[ 5.845153] CY8CTMA300_TOUCH: Bootloader FW Ver 0.0
<6>[ 5.865142] CY8CTMA300_TOUCH: Application FW Ver 0.0
<6>[ 5.885192] CY8CTMA300_TOUCH: Silicon Revision E
<6>[ 5.905181] CY8CTMA300_TOUCH: Customer ID 0
<6>[ 5.925170] CY8CTMA300_TOUCH: old FW version, applying reset workarounds

Because it can't get the right fw versions, it says old FW version, applying reset workarrounds.
In other kernel this isn't the case.
 

Spizzy01

Senior Member
Nov 20, 2011
1,082
1,410
Personally I think the problem is here:



Because it can't get the right fw versions, it says old FW version, applying reset workarrounds.
In other kernel this isn't the case.
To add to this - it also applies a different file after realizing the FW version doesn't match up.

In Wedgess 2.6 Kernel is uses 'input3':
Code:
cy8ctma300_touch as /devices/platform/spi_qsd.0/spi_master/spi0/spi0.0/input/input3

Whereas in this Kernel is uses 'input5'
Code:
cy8ctma300_touch as /devices/platform/spi_qsd.0/spi_master/spi0/spi0.0/input/input5

I doubt it's as simple as this, but if this is referencing different files why not try copying/renaming 'input3' to 'input5' and trying again?
Edit: Yeah, it doesn't look like it's as simple as this. xD

Either that or try changing the FW versions? Since for some reason they are currently '0.00', we'd just need to somehow change them to:
Code:
<6>CY8CTMA300_TOUCH: Bootloader  FW Ver 0.1
<6>CY8CTMA300_TOUCH: Application FW Ver 0.114

Another thing to note is that 'input3' is identified as 'pm8xxx-keypad'
Code:
<6>[    5.400421] input: pm8xxx-keypad as /devices/platform/msm_ssbi.0/pm8058-core/pm8xxx-keypad/input/input3
Is this the same in the 2.6 Kernel?

@Bakisha - Would you be able to post the dmesg for the 2.6 Kernel please? I don't have the means to get it myself unfortunately - I was going to see if there were any other discrepancies between the two.
 
Last edited:

Bakisha

Senior Member
May 4, 2011
973
535
@Bakisha - Would you be able to post the dmesg for the 2.6 Kernel please? I don't have the means to get it myself unfortunately - I was going to see if there were any other discrepancies between the two.

It's little bit old and it don't have timestamp, but untill i can make new one, it will do. Attaching (it is copy-pasted from previous bugreport i posted in other thread)

As for myself, i'll look in differences in source code between Nick's and Wedgess's kernel, to see if there is any differences
 

Attachments

  • Lupus4.2_2014-01-14_235139_dmesg.txt
    26.4 KB · Views: 14

nickholtus

Senior Member
Aug 26, 2011
2,407
2,469
Hi all,

I hav some news, but it's not directly related to the kernel.
The play I have is going to Achotjan for some time, he is going to develop for it.
We are going to develop together on this kernel. After a while i will get the play back.

So hopefully progress will go a bit faster now we have a new developer.

Regards,

Nick
 

Spizzy01

Senior Member
Nov 20, 2011
1,082
1,410
I'm trying to rebuild my Linux development/kernel environment and compile the Kernel in preparation for helping nick/nAa if required.

Has anyone ever ran into this before

Code:
  CHK     include/generated/utsrelease.h
/home/spizzy/android/msm7x30/scripts/gcc-version.sh: line 25: arm-eabigcc: command not found
/home/spizzy/android/msm7x30/scripts/gcc-version.sh: line 26: arm-eabigcc: command not found
  HOSTCC  scripts/conmakehash
  CC      scripts/mod/empty.o
  Generating include/generated/mach-types.h
arm-eabigcc: No such file or directory
Is your PATH set correctly?
make[2]: *** [scripts/mod/empty.o] Error 2
make[1]: *** [scripts/mod] Error 2
make[1]: *** Waiting for unfinished jobs....
  CC      kernel/bounds.s
arm-eabigcc: No such file or directory
Is your PATH set correctly?
make[1]: *** [kernel/bounds.s] Error 2
make: *** [prepare0] Error 2
make: *** Waiting for unfinished jobs....
make: *** [scripts] Error 2

I'm using nAa's sources and the paths are set correctly... I can't understand why it's saying it's not. Unless I'm missing something else? oO

I'll look into it more tonight if I can't work it out soon, but if anyone can help or if anyone is able to talk me through it that'd be great.. (Y)

Edit: Nvm. Fixed. xD
 
Last edited:

Bakisha

Senior Member
May 4, 2011
973
535
I'm using nAa's sources and the paths are set correctly... I can't understand why it's saying it's not. Unless I'm missing something else? oO

I'll look into it more tonight if I can't work it out soon, but if anyone can help or if anyone is able to talk me through it that'd be great.. (Y)

Wich toolchain are you using to build zImage?

Or post link to source that you are trying to compile and i'll look into it too...
 
  • Like
Reactions: Spizzy01

Spizzy01

Senior Member
Nov 20, 2011
1,082
1,410
Wich toolchain are you using to build zImage?

Or post link to source that you are trying to compile and i'll look into it too...
I fixed that issue now... Had issues with the filesystem/Linux itself lol.

Now I'm getting this though:

Code:
drivers/gpu/msm/adreno.c: In function 'adreno_iommu_setstate':
drivers/gpu/msm/adreno.c:425: warning: the frame size of 1040 bytes is larger than 1024 bytes; see http://go/big_stack_frame
error, forbidden warning: adreno.c:425
make[3]: *** [drivers/gpu/msm/adreno.o] Error 1
make[2]: *** [drivers/gpu/msm] Error 2
make[1]: *** [drivers/gpu] Error 2
make: *** [drivers] Error 2
make: *** Waiting for unfinished jobs....

Hopefully an easy fix.. Working on it now lol.

Oh Linux... Y U DO DIS! O_O

FYI: I'm using this toolchain:
Code:
github.com/AndroidUnited/Android_Toolchains
 
Last edited:

Spizzy01

Senior Member
Nov 20, 2011
1,082
1,410
I changed the toolchain as you suggested... It's building currently, I'll let you know if it gets further :)

Thanks for the replies Bakisha. Much appreciated!

Edit: Sadly it died... And funnily enough, on the touchscreen.

By the way, I haven't modified anything in the source yet. At least, not for this installation. I do however hopefully have a fix which I want to try once I get this working correctly.

Code:
drivers/input/touchscreen/cy8ctma300_touch.c: In function 'cy8ctma300_touch_probe':
drivers/input/touchscreen/cy8ctma300_touch.c:1354:35: error: expected ')' before ';' token
drivers/input/touchscreen/cy8ctma300_touch.c:1382:1: error: expected ')' before '}' token
drivers/input/touchscreen/cy8ctma300_touch.c:1382:1: error: expected ')' before '}' token
drivers/input/touchscreen/cy8ctma300_touch.c:1382:1: error: expected expression before '}' token
drivers/input/touchscreen/cy8ctma300_touch.c:1329:3: error: label 'err_gpio_setup' used but not defined
drivers/input/touchscreen/cy8ctma300_touch.c:1382:1: warning: control reaches end of non-void function [-Wreturn-type]
error, forbidden warning: cy8ctma300_touch.c:1382
make[3]: *** [drivers/input/touchscreen/cy8ctma300_touch.o] Error 1
make[2]: *** [drivers/input/touchscreen] Error 2
make[1]: *** [drivers/input] Error 2
make: *** [drivers] Error 2
make: *** Waiting for unfinished jobs....

Could you by any chance upload your 'cy8ctma300_touch.c' file please? I have a feeling the file I have has been modified somehow... Which makes no sense as it was cloned straight from github... oO

I've found an older file myself, I'll try this one too...

Edit: OK... I'm pretty sure this is the problem...? Can someone try to compile the Kernel again, and select only '2' workers (aka -j2). If I put a large amount of workers then it'll most likely compile as it waits for the rest of the tasks to finish... But in actual fact, the kernel isn't compiling correctly because of the error above...? Unless of course I'm the only one getting this error... But as I said, I've not made any changes yet.

I'm gonna go through the file and see if I can work out what the issue is, most likely it's just a missing expression or something. I'll also try sourcing the file from somewhere else, see if it helps..
 

Attachments

  • cy8ctma300_touch.c
    36.5 KB · Views: 9
Last edited:

Bakisha

Senior Member
May 4, 2011
973
535
By the way, I haven't modified anything in the source yet. At least, not for this installation. I do however hopefully have a fix which I want to try once I get this working correctly.

Code:
drivers/input/touchscreen/cy8ctma300_touch.c: In function 'cy8ctma300_touch_probe':
drivers/input/touchscreen/cy8ctma300_touch.c:1354:35: error: expected ')' before ';' token
drivers/input/touchscreen/cy8ctma300_touch.c:1382:1: error: expected ')' before '}' token
drivers/input/touchscreen/cy8ctma300_touch.c:1382:1: error: expected ')' before '}' token
drivers/input/touchscreen/cy8ctma300_touch.c:1382:1: error: expected expression before '}' token
drivers/input/touchscreen/cy8ctma300_touch.c:1329:3: error: label 'err_gpio_setup' used but not defined
drivers/input/touchscreen/cy8ctma300_touch.c:1382:1: warning: control reaches end of non-void function [-Wreturn-type]
error, forbidden warning: cy8ctma300_touch.c:1382
make[3]: *** [drivers/input/touchscreen/cy8ctma300_touch.o] Error 1
make[2]: *** [drivers/input/touchscreen] Error 2
make[1]: *** [drivers/input] Error 2
make: *** [drivers] Error 2
make: *** Waiting for unfinished jobs....

I found a workaround for that.
To me it looks like number of opened "(" doesn't match with closed ")", so I copied code from Lupus kernel:
Change:

Code:
while (((err = reset_device(this);

to

Code:
	while (((err = reset_device(this)) < 0) && reset_retries--) {
		DEBUG_PRINTK(KERN_DEBUG
			"CY8CTMA300_TOUCH: retrying reset_device()\n");
		msleep(100);
	}

Don't ask why, i don't understand what it does, but for me it fixed problem with compiling (in case few more errors, compare this file with file from lupus jb 2.6 kernel )
 
  • Like
Reactions: Spizzy01

Top Liked Posts

  • There are no posts matching your filters.
  • 49
    Hi community,
    I was finally able to get touch events recorded as they should and the touchscreen to be fully operational.
    Screenshot attached...

    - nAa
    45
    Hello all,

    First, let me thank @raginginferno who was kind enough to send me his play (all the way from Canada). Without the actual device nothing would be done.

    Now, attaching kernel image for zeus

    root@android:/ # uname -a
    Linux localhost 3.4.82-nAa+ #677 PREEMPT Sun Apr 6 01:20:26 EEST 2014 armv7l GNU/Linux
    attachment.php


    Tested only with Android 4.2.2 (mike's latest build):
    http://legacyxperia.basketbuild.com/index.php?dir=main/zeus/cm-10.1/nightlies/

    Note1: there is still some kernel work to be done for full hw support of the zeus board, but I expect it to be fairly trivial from now on (thus I'll leave it to the capable hands of anyone who's interested :p).
    Note2: I will be cleaning up my workspace and pushing changes to github within the day.

    Cheers,
    - nAa
    27
    I got cm11 & new ION kernel to boot, I will open a new thread soon when I fix some more stuff.

    gSaLZOf.png


    Current buildable sources are pushed to LegacyXperia github, kernel branch is zeus-wip but will be merged soon into the main cm-11.0 branch.
    26
    Code is uploaded to github.

    Cheers
    - nAa
    19
    Great news. I'll work on cm10.1/cm10.2 for now since they're pretty stable for the rest of the 2011 devices.
    Or I can work directly on cm11 and the new ION kernel, but that will take some more time.