• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Kernel Thunderc-Sprint Optimus S OC

Status
Not open for further replies.
Hey zefie lol ya thats me I actually got hook up on a palm pre as a backup just in case I brake this one cuz I can't stop messing with that bleeding edge of technology haha but sweet I tryed out the kernel you posted but it froze at start up but is there something you say on the works that hooks this phone to a rocket lol and one other question is there a way to change or manipulate the hw accel .prop without a pc could I do it off the phone with terminal app? Thanks for the great help and contribution you guys have done for everyone wish I knew more so I could do the same :)

Slow down, I'm the one who gets 30 PM in my inbox if you brick it again :) lol
 
Upvote 0
Ya sorry about the crazy messages I promis ive learned lol im tryimg more to learn more nd I have been flash for while but trying to learn the inner workings and how to do this myself or to help out more if help i could get steired into the right deriction lol :)

well at least you know how to start over again so if you mess up just go back and start over :)

Back on the topic of kernels, my latest test is pretty fast but for some reason lags like there is no tomorrow when its activating or deactivating wifi. Hum.
 
Upvote 0
Edit: Sorry for the double post I meant to hit edit.

1395 with new kernel. not the highest i seen but close. I dont think we are gonna get much higher without bypassing or somehow speed-enhancing the NAND. The NAND is our weak point. 3.5mB/s average WRITE, 7.5mB/s average READ.

What we need to do is find a way to install the ENTIRE SYSTEM on an SD card. If we ran the entire OS from the SD card, and just used the NAND for Boot, Recovery and RADIO, this could fly. Especially with a class 10 microSD!

Most of the speedups I seen for Samsung Galaxy S were from file system improvements. OneNAND is nice and fast, I played with it on the Moment. Sadly though, we only have a crappy Micron NAND.

That and I need to find out why the wireless loading and unloading lags so much.
 
Upvote 0
Zefie great work on turning on the armv6 instruction set on kernel vs the armv5vfp. I used that similar method in userspace but didn't even think of it for kernel. Can you link the commit on the scheduler where you got it from only I want to bring over some of your patch and also use it on other devices so I would like the commits so I can use it seperately instead of an all in one patch.
 
Upvote 0
Another small tip your 98304 is wrong. The pll setup for optimus is

pll0_960_pll1_245_pll2_1200

the one you ganked that from has pll setup of

pll0_196_pll1_960_pll2_1200
Code:
[B]struct[/B] clkctl_acpu_speed {
    [B][COLOR=#445588]unsigned[/COLOR][/B] [B][COLOR=#445588]int[/COLOR][/B]    use_for_scaling;
    [B][COLOR=#445588]unsigned[/COLOR][/B] [B][COLOR=#445588]int[/COLOR][/B]    a11clk_khz;
    [B][COLOR=#445588]int[/COLOR][/B]        pll;
    [B][COLOR=#445588]unsigned[/COLOR][/B] [B][COLOR=#445588]int[/COLOR][/B]    a11clk_src_sel;
    [B][COLOR=#445588]unsigned[/COLOR][/B] [B][COLOR=#445588]int[/COLOR][/B]    a11clk_src_div;
    [B][COLOR=#445588]unsigned[/COLOR][/B] [B][COLOR=#445588]int[/COLOR][/B]    ahbclk_khz;
    [B][COLOR=#445588]unsigned[/COLOR][/B] [B][COLOR=#445588]int[/COLOR][/B]    ahbclk_div;
    [B][COLOR=#445588]int[/COLOR][/B]        vdd;
    [B][COLOR=#445588]unsigned[/COLOR][/B] [B][COLOR=#445588]int[/COLOR][/B]     axiclk_khz;

your entry of
{ 1, 98304, ACPU_PLL_0, 4, 1, 98304, 0, 3, 49152 }

lets label these as
{ 1 a, 98304 b, ACPU_PLL_0 c, 4 d, 1 e, 98304 f, 0 g, 3 h, 49152 i }

a. 1 means make freq scalable ie. basically on. 0 is off

b. 98304 is the freq khz (this is only used for human eyes and in table as its not the actual freq) true cpu_freq is defined in step e

c. acpu_pll_0 is the pll you are using

d. 4 is the src sel which is a11clk_src 4 which is pll 0 whose clk is 960mhz

e. (this line determines the actual freq) 1 is the divider which is x+1 which will mean a divider of 2 against the pllclk you are using in this case pll0 which runs at 960mhz on this phone. So that would be 960/2 = 480mhz or 480000khz

f. the 93804 is the ahbclk (like the bus in pc overclocking) this freq is only for human eyes and doesn't represent the actual value. The actual calculation for it is below

g. divider is 0 so its x+1 which would be a divider of one. With your actual freq of 480000khz your entry in line above is actually 480000khz as being read by machine.

h. the 3 is the vdd level for voltage 3 is min stable voltage it seems. 3-6 are same voltage and 7 is max voltage

below is what they actually mean but they aren't labeled as such in code aurora source.
Code:
[I]Levels 3-6 all correspond to 1.2V, level 7 corresponds to 1.325V. */[/I]
  enum {
          VDD_0 = 0,
          VDD_1 = 1,
          VDD_2 = 2,
          VDD_3 = 3,
          VDD_4 = 3,
          VDD_5 = 3,
          VDD_6 = 3,
          VDD_7 = 7,
          VDD_END
  };

i. the 49152 is the axiclk_freq which max is 200mhz on msm7x27

your entry is actually running an alternate 480mhz with the ahbbus way overclocked and the axiclk too low.

I case you were wondering this line is changing the above divider rules for the overclocking but only at freq above 600mhz.

Code:
a11_div [B]=[/B] hunt_s[B]->[/B]a11clk_src_div;
 
 
    [B]if[/B](hunt_s[B]->[/B]a11clk_khz[B]>[/B][COLOR=#009999]600000[/COLOR]) {
                    a11_div[B]=[/B][COLOR=#009999]0[/COLOR];
                    writel(hunt_s[B]->[/B]a11clk_khz[B]/[/B][COLOR=#009999]19200[/COLOR], PLLn_L_VAL([COLOR=#009999]0[/COLOR]));
                    udelay([COLOR=#009999]50[/COLOR]);
            }

for example
{ 1, 864000, ACPU_PLL_0, 4, 0, 216000, 3, 7, 122880 },

its taking 864000/19200 = 45 and writing 45 using the ACPU_PLL_TCXO clk multiplier which is 19200. This results in underclocking pll0 to 864000khz and dividing it by a11_div=0 which is x+1 so its using pll0 at 8640000/1 instead of using the normal 960000khz/ (divider in freq table) of pll0. Its actually underclocking the pll0 which normally runs at a static 960mhz.
 
Upvote 0
I actually fixed this later on. Now I'm using:

{ 1, 98304, ACPU_PLL_1, 1, 1, 98304, 0, 3, 61440 },

regarding b... I learned that when I failed to overclock the Samsung Moment. Though I had many people believing (including myself for a while) that the little 800mhz processor was running at 1.6ghz lol


Here are the indiviual patches. Not sure what I'm gonna use yet.

http://dl.dropbox.com/u/11516160/Optimus Test Files/patches.7z

Other interesting things to note.. If you enable lzma ramdisk, you can subsitute an lzma compressed ramdisk instead of gzip (install xz). I'm using a custom ramdisk on my phone with the modules on the ramdisk and /system symlinking to them.

Each time I compile a kernel I generate my custom boot.img for me, and the generic update.zip for everyone else. That one does NOT touch your ramdisk. Though the option to use lzma with my kernel is still there.

UBIFS is enabled on my kernel but the msm_nand won't accept ubiformat :(

Just experimenting like hell to speed up the phone. the slow NAND is the weakest point right now.
 
Upvote 0
I actually fixed this later on. Now I'm using:

{ 1, 98304, ACPU_PLL_1, 1, 1, 98304, 0, 3, 61440 },

regarding b... I learned that when I failed to overclock the Samsung Moment. Though I had many people believing (including myself for a while) that the little 800mhz processor was running at 1.6ghz lol

that above is 125mhz there is no way to get 98304mhz with the dividers on 960, 245, 1200. You could underclock pll1 to 196mhz then divide by 2 but that will probably introduce instability on that clock for your device and will require writing similar code to oc patch for it.

pll1 is static clk of 245mhz/ 2 = 122.5mhz cpu_freq and ahb is 122.5mhz too in your code.

I have an archos tablet that uses ubifs and they had to support it in ramdisk and used /system on read-only cramfs so you can't mod /system.

FWIW I think nand does better performance than ubifs.

Its refreshing to see someone other than myself do some work on LG cdma androids. They represent a good value for the money and can be enhanced alot in the dev community.
 
Upvote 0
So what does this do?

{ 1, 96000, ACPU_PLL_0, 1, 9, 48000, 1, 2, 61440 },

Edit: whatever it is, sure is slow!!! i locked it at 96mhz.. it didnt crash persay but it might as well have. UI is non-responsive. shell works, but seems to be ignoring my request to scale back up lol

did manage to recover though :eek:

might be too low, doesnt like to scale up if its under load sometimes
 
Upvote 0
Latest test kernel:
http://dl.dropbox.com/u/11516160/Optimus Test Files/zefie_test_2010-11-30_2.zip

removed 96000/98mhz failed experiments
lowest freq: 122880
readded 844mhz and 864mhz

slub memory
ext2/3/4 readded
ubifs removed
re-added autosched patch
removed bfq
enforced -O3 and -mfpu=vfp and -mfloat-abi=hard
enforced -mtune=arm1136jf-s
new toolchain (codesorcery gcc-4.5.1)
lzma ramdisk support
(wifi module has -Os due to bad code by broadcom)
removed remnant ethernet driver (?? perhaps from LGE's test board???)
COMPLETELY disabled debug in kernel (it wasn't what broken stencils, they work still)

probably more stuff I forgot

Kernel Source Tarball:
http://dl.dropbox.com/u/11516160/Optimus Test Files/thunderc_kernel_2.6.32.26_2010-11-30.tar.xz

(if you get 404, its still uploading, try again in 5 min)

*passes out*
 
Upvote 0
Latest test kernel:
http://dl.dropbox.com/u/11516160/Optimus Test Files/zefie_test_2010-11-30_2.zip

removed 96000/98mhz failed experiments
lowest freq: 122880
readded 844mhz and 864mhz

slub memory
ext2/3/4 readded
ubifs removed
re-added autosched patch
removed bfq
enforced -O3 and -mfpu=vfp and -mfloat-abi=hard
enforced -mtune=arm1136jf-s
new toolchain (codesorcery gcc-4.5.1)
lzma ramdisk support
(wifi module has -Os due to bad code by broadcom)
removed remnant ethernet driver (?? perhaps from LGE's test board???)
COMPLETELY disabled debug in kernel (it wasn't what broken stencils, they work still)

probably more stuff I forgot

Kernel Source Tarball:
http://dl.dropbox.com/u/11516160/Optimus Test Files/thunderc_kernel_2.6.32.26_2010-11-30.tar.xz

(if you get 404, its still uploading, try again in 5 min)

*passes out*

Running this with ThundeROM 1.3. 1255 in quadrent @ 825mhz. Loving it!
 
Upvote 0
New Kernel:

Same as previous one except:
Min freq: 245 as by Qualcomm standard due to no real power saving from 122mhz.
Max freq: 600 in kernel, for those who couldn't boot with my previous ones set to 787.

Everything else is the same.
(You can still overclock manually with SetCPU or a custom ramdisk)

Patch (apply to source released above):
Code:
--- config.old  2010-11-30 16:52:02.000000000 -0500
+++ .config     2010-12-01 09:35:50.000000000 -0500
@@ -319,8 +319,8 @@ CONFIG_MSM_RPC_OEM_RAPI=y
 CONFIG_MSM_RPCSERVER_HANDSET=y
 CONFIG_MSM_RMT_STORAGE_CLIENT=y
 CONFIG_MSM_CPU_FREQ_SET_MIN_MAX=y
-CONFIG_MSM_CPU_FREQ_MAX=787200
-CONFIG_MSM_CPU_FREQ_MIN=122880
+CONFIG_MSM_CPU_FREQ_MAX=600000
+CONFIG_MSM_CPU_FREQ_MIN=245760
 # CONFIG_MSM_HW3D is not set
 CONFIG_MSM_ADSP=y
 CONFIG_ADSP_RPC_VER=0x30002

Kernel:
http://dl.dropbox.com/u/11516160/Optimus Test Files/zefie_test_2010-12-01.zip
 
Upvote 0
(You can still overclock manually with SetCPU or a custom ramdisk)

How do you set your overclock in the ramdisk? Not that I can put the ramdisk into the boot.img correctly anyway, I think I need to configure an offset because it stops after the lg logo every time, I keep trying to set init.rc to mount mmcblk0p2 /sd-ext as ext4 on boot, and then symlink /data to it for speed(I always heard there weren't enough writes to /system to make changing it worthwhile).
 
Upvote 0
How do you set your overclock in the ramdisk? Not that I can put the ramdisk into the boot.img correctly anyway, I think I need to configure an offset because it stops after the lg logo every time, I keep trying to set init.rc to mount mmcblk0p2 /sd-ext as ext4 on boot, and then symlink /data to it for speed(I always heard there weren't enough writes to /system to make changing it worthwhile).
in the root of the ramdisk look for something like init*qcom*sh

I think its like init.qcom.sh or init.rc.qcom.sh but it ends with ".sh" and has "qcom" and "init" in it. the last group in that file is what controls the optimus S, so change the 600000 to your stable max
 
  • Like
Reactions: Joeseph Mother
Upvote 0
Status
Not open for further replies.

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones