Jump to content


Photo

Kernel Source for Crescent

- - - - -

  • Please log in to reply
89 replies to this topic

#21
Sebastian404

Sebastian404

    Hardcore

  • Developer Team
  • PipPipPipPipPipPip
  • 2,104 posts
  • Gender:Male
  • Location:Somwhere Near Mountain View, California
  • Devices:lots of them
  • Twitter:@sebastian404

Here's one I compiled using Toms repo with overclocking enabled.

Completely untested as I don't have a Blade2 myself.


I tried this one, and it seemed to work, and wifi is working, I'll have to have a look through you commit history to work that out...

  • 0

#22
flibblesan

flibblesan

    Token Northern bloke

  • Assistant Admin Team
  • PipPipPipPipPipPip
  • 5,641 posts
The wifi lib dhd.ko expects the kernel to be version 2.6.35.7-perf+ (with the +).

The dhd.ko that is built with the kernel should work but needs some firmware files in etc renaming for some bloody reason.

Damn you ZTE!

  • 0

#23
Sebastian404

Sebastian404

    Hardcore

  • Developer Team
  • PipPipPipPipPipPip
  • 2,104 posts
  • Gender:Male
  • Location:Somwhere Near Mountain View, California
  • Devices:lots of them
  • Twitter:@sebastian404

The wifi lib dhd.ko expects the kernel to be version 2.6.35.7-perf+ (with the +).

The dhd.ko that is built with the kernel should work but needs some firmware files in etc renaming for some bloody reason.

Damn you ZTE!


ah yes, I was just looking at dmesg..

<3>[11-29 11:40:57.360000] [204: WifiService]dhd: version magic '2.6.35.7-perf+ preempt mod_unload ARMv6 ' should be '2.6.35.7-perf preempt mod_unload ARMv6 '

and then

E/WifiHW  (  154): insmod failed! module path: /system/lib/dhd.ko, arg: firmware_path=/etc/fw_4330.bin nvram_path=/etc/nv_4330.txt iface_name=wlan0
E/WifiHW  (  154): wifi_load_driver() -

ZTE do have some VERY strange ideas about things

  • 0

#24
flibblesan

flibblesan

    Token Northern bloke

  • Assistant Admin Team
  • PipPipPipPipPipPip
  • 5,641 posts
Yes. Also the dhd.ko that is built from source wants fw_4319 and fw_4329 firmware, not fw_4330 that the Blade2 uses.

I'm getting a bit of a headache already.

  • 0

#25
flibblesan

flibblesan

    Token Northern bloke

  • Assistant Admin Team
  • PipPipPipPipPipPip
  • 5,641 posts
hm.. doesn't help that the kernel source doesn't even have the BCM4330 code in it..

  • 0

#26
t0mm13b

t0mm13b

    Hardcore

  • MoDaCo Silver
  • PipPipPipPipPipPip
  • 1,784 posts
  • Gender:Male
  • Location:Ireland
  • Devices:GT-S8500,Zte Blade,SE ST15i
  • Twitter:@t0mm13b
What about CONFIG_MODVERSIONS being switched off? :(

  • 0
try{ not_laugh; }catch{ FAIL; }finally{ laugh; }

#27
kallt_kaffe

kallt_kaffe

    Hardcore

  • Developer Team
  • PipPipPipPipPipPip
  • 1,185 posts
  • Gender:Male
  • Devices:Nexus 4 + 10 + Asus Fonepad

The wifi lib dhd.ko expects the kernel to be version 2.6.35.7-perf+ (with the +).

The dhd.ko that is built with the kernel should work but needs some firmware files in etc renaming for some bloody reason.

Damn you ZTE!

I used the configuration supplied with the source as I do not not have a phone. Perhaps you loose the "+" when using an extracted config.

But if everything else fails, just hexedit the module.

  • 0
Blog - App

#28
flibblesan

flibblesan

    Token Northern bloke

  • Assistant Admin Team
  • PipPipPipPipPipPip
  • 5,641 posts

I used the configuration supplied with the source as I do not not have a phone. Perhaps you loose the "+" when using an extracted config.

But if everything else fails, just hexedit the module.


hex editing didn't work for me, but adding the + to the end of -perf in the config helped. Kernel source works fine and I've also used Tom G's kernel code without any issues too thanks to your blade2 additions.

Now we just need BCM4330 adding to the code so we can build our own wifi libs! For some reason the current source builds for an older chipset.

  • 0

#29
kallt_kaffe

kallt_kaffe

    Hardcore

  • Developer Team
  • PipPipPipPipPipPip
  • 1,185 posts
  • Gender:Male
  • Devices:Nexus 4 + 10 + Asus Fonepad
Now that you are overclocking... Very likely the GPU will overclock with the CPU overclocking so you will be limited either by the GPU or the CPU. This is the same for the Skate but not true for the Blade and the V9.

From what I've seen the GPU is tied to PLL2 which is what is used to overclock the Skate and the Blade2 (for some, yet unknown reason, using PLL0 did not work). On the Blade/v9 PLL2 is almost at it's maximum setting allready when running at 600MHz so therefor PLL0 is used. Using PLL2 to overclock the Blade/V9 actually underclocks the GPU.

For the Skate and the Blade2 this is mostly good as you also get a 3D performance boost, but the drawback is that you may be limited by the GPU but still have more overclocking potential in the CPU.

If I ever get a Blade2 or a Skate I might try again to use a different PLL because that would make it possible to invidually control CPU and GPU clock.

  • 0
Blog - App

#30
Adam Cable

Adam Cable

    Regular

  • MoDaCo Silver
  • PipPip
  • 51 posts
kallt_kaffe - overclock kernel works well, thanks once again :)

Adam

  • 0

#31
admanirv

admanirv

    Diehard

  • MoDaCo Silver
  • PipPipPipPip
  • 417 posts
  • Gender:Male
  • Location:UK
  • Devices:Galaxy S3
Any quadrant before and after values, I know quadrant isnt the best but it gives an idea.

What speed have you tried?

Cheers

  • 0

#32
Sebastian404

Sebastian404

    Hardcore

  • Developer Team
  • PipPipPipPipPipPip
  • 2,104 posts
  • Gender:Male
  • Location:Somwhere Near Mountain View, California
  • Devices:lots of them
  • Twitter:@sebastian404

Now that you are overclocking... Very likely the GPU will overclock with the CPU overclocking so you will be limited either by the GPU or the CPU. This is the same for the Skate but not true for the Blade and the V9.

From what I've seen the GPU is tied to PLL2 which is what is used to overclock the Skate and the Blade2 (for some, yet unknown reason, using PLL0 did not work). On the Blade/v9 PLL2 is almost at it's maximum setting allready when running at 600MHz so therefor PLL0 is used. Using PLL2 to overclock the Blade/V9 actually underclocks the GPU.

For the Skate and the Blade2 this is mostly good as you also get a 3D performance boost, but the drawback is that you may be limited by the GPU but still have more overclocking potential in the CPU.

If I ever get a Blade2 or a Skate I might try again to use a different PLL because that would make it possible to invidually control CPU and GPU clock.


I'd like your view on something...

as I mentioned I got sick of messing about with the patches and built a kernel from the original source, but added in the extra speeds into acpuclock.c and that worked fine for me.. I had it maxed out at 1036MHz for a good hour or so..

however when I tried your build to get the Wifi working, it would not last more than 5 minutes before rebooting...

wondering if something was up with the device, I reverted to my built kernel and its been up for about an hour now, without any issues......

I know every device is different and all... but I was wondering if you have any ideas...

  • 0

#33
kallt_kaffe

kallt_kaffe

    Hardcore

  • Developer Team
  • PipPipPipPipPipPip
  • 1,185 posts
  • Gender:Male
  • Devices:Nexus 4 + 10 + Asus Fonepad

I'd like your view on something...

as I mentioned I got sick of messing about with the patches and built a kernel from the original source, but added in the extra speeds into acpuclock.c and that worked fine for me.. I had it maxed out at 1036MHz for a good hour or so..

however when I tried your build to get the Wifi working, it would not last more than 5 minutes before rebooting...

wondering if something was up with the device, I reverted to my built kernel and its been up for about an hour now, without any issues......

I know every device is different and all... but I was wondering if you have any ideas...

If you just added extra lines to the frequency table without the other code present then you did a classic "cosmetic overclocking". If so, then you are not the first and likely not the last. You can put 2GHz in there if you want. It will happily show you are running at 2GHz and it will be rock solid.

Here's how it works.

There are three PLLs running at different speeds, 245, 960 and 800 unless I remember it wrong. In the frequency table you tell it what PLL it should use and what divider it should use. For example PLL0 (960MHz) with divider 2 makes the 480MHz speed. For the Skate and the Blade2 PLL2 is 800MHz and uses divider 1 (dividers are always set as (divider - 1) in the table.

Actually you should be able to overclock the skate and the Blade2 with just changing the frequency table by using PLL0 and divider 1 (0 in the table). That would create a 960MHz frequency and leaving the GPU clock (and all other clocks intact).

However, we want options, so what we can do is to change the speed of PLL2. The PLLs are configured by using multipliers and it can be configured up to 63*19200kHz. So what the code (that you are propably missing) does is that for speeds above 787200kHz it modifies the multiplier of PLL2 and when it comes down to 787200 or lower it restores it's original value again. This is also why this way of overclocking affects the GPU. On the Blade and the V9 I know that the GPU is tied to the PLL2 as 3D speeds went down when CPU speed went up when I used PLL2 for overclocking. That is why the Blade and the V9 uses PLL0 instead. PLL0 on the other hand is connected to the camera so overclocking does underclock the camera and can cause some (acceptable) issues. Most likely the GPU is tied to PLL2 on the Skate and the Blade2 aswell but using a different divider and on the Skate and the Blade2 PLL2 starts on 800MHz so we have 50% to go. On the Blade and the V9 it starts at 1190MHz and we can only increase it from multiplier 62 to multplier 63 (which I also do) to get a tiny bit extra out of the GPU.

  • 0
Blog - App

#34
Sebastian404

Sebastian404

    Hardcore

  • Developer Team
  • PipPipPipPipPipPip
  • 2,104 posts
  • Gender:Male
  • Location:Somwhere Near Mountain View, California
  • Devices:lots of them
  • Twitter:@sebastian404

If you just added extra lines to the frequency table without the other code present then you did a classic "cosmetic overclocking". If so, then you are not the first and likely not the last. You can put 2GHz in there if you want. It will happily show you are running at 2GHz and it will be rock solid.

Here's how it works.

There are three PLLs running at different speeds, 245, 960 and 800 unless I remember it wrong. In the frequency table you tell it what PLL it should use and what divider it should use. For example PLL0 (960MHz) with divider 2 makes the 480MHz speed. For the Skate and the Blade2 PLL2 is 800MHz and uses divider 1 (dividers are always set as (divider - 1) in the table.

Actually you should be able to overclock the skate and the Blade2 with just changing the frequency table by using PLL0 and divider 1 (0 in the table). That would create a 960MHz frequency and leaving the GPU clock (and all other clocks intact).

However, we want options, so what we can do is to change the speed of PLL2. The PLLs are configured by using multipliers and it can be configured up to 63*19200kHz. So what the code (that you are propably missing) does is that for speeds above 787200kHz it modifies the multiplier of PLL2 and when it comes down to 787200 or lower it restores it's original value again. This is also why this way of overclocking affects the GPU. On the Blade and the V9 I know that the GPU is tied to the PLL2 as 3D speeds went down when CPU speed went up when I used PLL2 for overclocking. That is why the Blade and the V9 uses PLL0 instead. PLL0 on the other hand is connected to the camera so overclocking does underclock the camera and can cause some (acceptable) issues. Most likely the GPU is tied to PLL2 on the Skate and the Blade2 aswell but using a different divider and on the Skate and the Blade2 PLL2 starts on 800MHz so we have 50% to go. On the Blade and the V9 it starts at 1190MHz and we can only increase it from multiplier 62 to multplier 63 (which I also do) to get a tiny bit extra out of the GPU.



ahh, that would explain a lot :) I'm not really a fan of overclocking something that most people carry around with them.. for some reason.. but I'm always keen to learn... thanks for the explanation :)


Does the extra code you refer to live in drivers/cpufreq/freq_table.c?

I found some posts and some documents from you back in the old Blade days about over clocking and that was the two files that you messed with.

  • 0

#35
kallt_kaffe

kallt_kaffe

    Hardcore

  • Developer Team
  • PipPipPipPipPipPip
  • 1,185 posts
  • Gender:Male
  • Devices:Nexus 4 + 10 + Asus Fonepad

Does the extra code you refer to live in drivers/cpufreq/freq_table.c?

No, that was set det default to 600MHz before I knew of the MIN MAX settings. No, it's in another part of acpuclock.c.

All needed changes is in acpuclock.c. CM7 also need some changes in cpufreq.c but for SetCPU that is not needed.

EDIT:
Look at the code starting at line 542 and 571 here: https://github.com/T...msm/acpuclock.c
That's the code that reprograms PLL2.

  • 0
Blog - App

#36
Adam Cable

Adam Cable

    Regular

  • MoDaCo Silver
  • PipPip
  • 51 posts
Looks as though the kernel has caused touchscreen issues and loss of using the front camera on my SF2.
What's the easiest way for me to put the stock kernel back on - is there a link around?

Adam

  • 0

#37
flibblesan

flibblesan

    Token Northern bloke

  • Assistant Admin Team
  • PipPipPipPipPipPip
  • 5,641 posts

Looks as though the kernel has caused touchscreen issues and loss of using the front camera on my SF2.
What's the easiest way for me to put the stock kernel back on - is there a link around?

Adam


Confirmed. My kernel I built from Tom_G's repo has missing front camera and touchscreen is slightly off. I'll rebuild using the blade2 source and see if that works ok.

Update: Still the same with the blade2 kernel code. I think ZTE haven't shared the correct code again!

Adam: Link to stock kernel on my custom ROM thread. It'll work for both OSF2 and Vivacity

  • 0

#38
flibblesan

flibblesan

    Token Northern bloke

  • Assistant Admin Team
  • PipPipPipPipPipPip
  • 5,641 posts
Update on this. To enable the front camera we need to add support for the OVM7690 sensor. This is the VGA front camera sensor, the rear being the OV5640 5MP unit that apparently supports 720P recording...

The stock kernel config has both of these enabled:

CONFIG_OV5640=y
CONFIG_OV5640_GLOBALOPTICS=y
CONFIG_OVM7690=y
CONFIG_OVM7690_GLOBALOPTICS=y


I try to build a kernel using the same config but I find that, for some reason, the OVM7690 is being removed.. it's likely that the code we have doesn't even have any support for this. I need to keep looking.

  • 0

#39
Adam Cable

Adam Cable

    Regular

  • MoDaCo Silver
  • PipPip
  • 51 posts

Confirmed. My kernel I built from Tom_G's repo has missing front camera and touchscreen is slightly off. I'll rebuild using the blade2 source and see if that works ok.

Update: Still the same with the blade2 kernel code. I think ZTE haven't shared the correct code again!

Adam: Link to stock kernel on my custom ROM thread. It'll work for both OSF2 and Vivacity



Cheers - will d/l the kernel now #legend

  • 0

#40
Adam Cable

Adam Cable

    Regular

  • MoDaCo Silver
  • PipPip
  • 51 posts
Seems as though stock kernel still gives me a slight issue with the touchscreen, although less pronounced than without the o/c kernel. Could the screen widths of the SF2 and Vivacity be slightly different?

Front camera back in action though! :)

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users