[HOWTO] Permanently disable perflock on HTC stock kernel - Desire Android Development

SetCPU 2.0.2 now has perflock disabler support for HTC-kernel 2.6.32.15 which is needed to underclock the CPU because HTC don't want us to mess with the CPU clockspeed on stock kernel. This feature is fine and I use it with JuiceDefender to lock my device to 245 MHz on standby to get slightly more juice. The only drawback is that SetCPU doesn't allow to disable perflock automatically on boot. I found it annoying to disable perflock everytime I reboot, therefore I checked out how SetCPU disables perflock. SetCPU comes with a kernel module that disables the perflock when loaded (it seems to hook into the perflock_notifier_call of the perflock module and resets the settings). I managed to load this module on startup of the device so I can use it with JuiceDefender even without SetCPU installed or enabling it after every reboot. It works great...
SetCPU is a brilliant app like its author coolbho3000 (thank you!).
For this reason I don't post the kernel modules or an update.zip, but share this knowledge in a very loose howto.
So basically this is what to do:
1. Extract the kernel module perflock_disable3215.ko from SetCPU.
Use apktool or just unzip to extract it from the apk.
2. Hexedit the module to change the vermagic string.
The vermagic string have to match the kernel you use. Otherwise, it won't load.
Check the other modules for the correct vermagic.
3. In recovery mode push the module to /system/lib/modules
Maybe you should change the permissions to match the other modules.
4. Load the kernel module with insmod.
For the module to work you have to provide the perflock_notifier_call_addr parameter.
You can get it from /proc/kallsyms. It's a mermory address something like "c443223". Load the kernel module like this:
insmod /system/lib/modules/perflock_disable3215.ko perflock_notifier_call_addr=0xc443223
5. Check if kernel module is loaded.
If insmod doesn't report any errors, check with lsmod if the module is loaded.
If insmod reports errors, you most likely messed up the module while changing the vermagic.
6. Check if perflock is disabled in SetCPU.
If the module is working you should be able to underclock the CPU in SetCPU.
7. Hack a init script to load the module on boot.
The script should rgep the perflock_notifier_call_addr and load module with the correct parameter.
That's it!
If it works for you, buy SetCPU on market!
have fun...

Fantastic,
but a little bit more complicated.

I think you definitely should attach update.zip. But still useful information.
Edit:
Sorry, LeeDroid's mod already has this module. Hypothetically you don't have to change anything regarding that module.

Here is update zip for STOCK ROOTED FROYO ROM. This update will flash modified boot.img (it is necessary, because stock rom at default doesn't execute scripts from /init.d folder during boot..)

Hi,
Anyone who did the update zip for Eclair could upload, please? Would really apreciate.

robto said:
Hi,
Anyone who did the update zip for Eclair could upload, please? Would really apreciate.
Click to expand...
Click to collapse
Has anyone used the update.zip that can confirm it works

There are custom kernel for the Desire Eclair ROMs that aren't perflocked. On what ROMs / devices are you guys?

Ignore....

Hey all,
That procedure seems way too complicated for me
So far, I was using pinky's rom which comes with permanent perflock disabled. I just switched to LeeDroid's rom which doesn't seem to have this feature.
Would there be an easy way to have this done? (like flashing a zip?)
Cheers

http://dl.dropbox.com/u/31174/android/perflock-disabler-2.6.32.15-gf9c0527-signed.zip

ranwej said:
Here is update zip for STOCK ROOTED FROYO ROM. This update will flash modified boot.img (it is necessary, because stock rom at default doesn't execute scripts from /init.d folder during boot..)
Click to expand...
Click to collapse
What's exactly in that boot.img? Could you please post some kind of release notes? I don't like (nor should anyone flash) unknown binaries. Thanks

FloHimself said:
http://dl.dropbox.com/u/31174/android/perflock-disabler-2.6.32.15-gf9c0527-signed.zip
Click to expand...
Click to collapse
Will this work on a stock Froyo (ie HTC) rooted ROM?
EDIT: Did a nandroid and flashed it. Doesn't seem to work... Maybe the stock ROM isn't running the init script as mentioned previously?

FloHimself said:
There are custom kernel for the Desire Eclair ROMs that aren't perflocked. On what ROMs / devices are you guys?
Click to expand...
Click to collapse
HTC Legend with rooted Eclair 2.05.405.2, kernel version 2.6.29-5f084974.

Psych0Chimp said:
Will this work on a stock Froyo (ie HTC) rooted ROM?
EDIT: Did a nandroid and flashed it. Doesn't seem to work... Maybe the stock ROM isn't running the init script as mentioned previously?
Click to expand...
Click to collapse
yes I am just looking for the same to use with the stock HTC kernel ...its on my stock rooted 2.2 Froyo

Psych0Chimp said:
Will this work on a stock Froyo (ie HTC) rooted ROM?
EDIT: Did a nandroid and flashed it. Doesn't seem to work... Maybe the stock ROM isn't running the init script as mentioned previously?
Click to expand...
Click to collapse
playya said:
yes I am just looking for the same to use with the stock HTC kernel ...its on my stock rooted 2.2 Froyo
Click to expand...
Click to collapse
Have you tried the update zip from post 4?

robto said:
HTC Legend with rooted Eclair 2.05.405.2, kernel version 2.6.29-5f084974.
Click to expand...
Click to collapse
This is the .29 kernel and needs the other module from SetCPU...

perflock_disable is now under GPL and source is available upon request...

All kernel modules are automatically under the GPL if they are distributed. It's a legal requirement.

New perflock_disable update.zip for 2.6.32.15-gf9c0527
New signed update.zip to disable perflock for the stock 2.6.32.15-gf9c0527 kernel image:
Mirror: trisk.acm.jhu.edu/perflock_disable-2.6.32.15-gf9c0527-20100831.zip
I updated the init script to handle errors:
Code:
#!/system/bin/sh
#
# Load perflock_disable for htc-kernel
addr=`awk '$3 == "perflock_notifier_call" { print "0x"$1; }' /proc/kallsyms`
if [ -n "$addr" ]; then
insmod /system/lib/modules/perflock_disable3215.ko "perflock_notifier_call_addr=$addr"
if [ $? -eq 0 ]; then
echo "+++ perflock disabled"
exit 0
fi
fi
echo "+++ perflock could not be disabled"
I'll try to obtain the source for perlock_disable, since the author has offered (and is required to) to provide it on request.

teppic74 said:
All kernel modules are automatically under the GPL if they are distributed. It's a legal requirement.
Click to expand...
Click to collapse
Really? Since when? Why then ATI and nVIDIA offer their parts of modules under proprietary licence?

Related

[HACK] (Updated 5/25/10) UNIVERSAL OVERCLOCK for ANY ROM-- Wifi Fixed Version 2.0.1

Update to the universal overclock. I've tested it working on several ROMS... seems to be better than my first one. Based off dumfuq's latest OC kernel for CM5 which is based off the latest cyanogenmod. Instructions are the same as below. Let's set some G1s on fire!
EDIT WIFI FIXED NOW
UNIVERSAL OVERCLOCK VERSION 2.01 WIFI FIXED
This can be flashed right over what you have now
EDIT IT DOES WORK ON 1.5-1.6 ROMS !!!!!
Below you'll find a link to an overclock update.zip ... all you have to do is flash it, regardless of your ROM and use set cpu to tweak your settings. It will allow you to clock the CPU up to 825mhz!!! Anything over 768mhz locks up the phone so you may want to set a max value via userinit.sh. 652mhz seems to be stable for me
WARNING: Overclocking can shorten battery life and kill the PROC on your phone. I'm in no way responsible for your phone getting hotter than the sun and exploding.
NANDROID BEFORE FLASHING THIS
I'm not a DEV... i just like to tinker. All I did was notice this and throw it all together--------CREDIT GOES TO Dumfuq, Koush and Pershoot for making this possible
Instructions:
----------------------
INSTRUCTIONS HAVE BEEN CHANGED
*Download and install setcpu.
*Select auto detect (ensure it is set at 528mhz) make sure "set on boot" and "ondemand" are selected
*Download and flash THIS update.zip up to 652mhz Stable or this stable 576mhz overclock from Pershoot from recovery and reboot
*Go back into setcpu... hit "menu" and select autodetect again ...you'll notice you now have frequencies for up to 825mhz
*Configure min and max frequency to your liking (652mhz seems to be best for me) (you may want to set a sleep profile of 245min/245max since you won't need OC while you aren't using the device)
*Enjoy
TESTED AND WORKING ON Cyangenmod 5.0.7 / KingKlick's ERIS2G1 / ZXHero 1.5 / ZXHero 2.1 / KingKlick's Legend2G1 / NoSense 1.5 / HTC CLay's Superfast / ALL CSDI ROMS !
ive been waiting on something like this thanxxxxxx
but installation aborted it said something like E: kernal
mccurt29 said:
ive been waiting on something like this thanxxxxxx
but installation aborted it said something like E: kernal
Click to expand...
Click to collapse
What ROM are you flashing this on top of?
Agreed, the zip isn't signed correctly. Here's a working version.
Might want to thank Koush and Pershoot for the kernel script too.
This sounds awesome, it could make many sense roms much more usable as a daily!! Will flash and test later tonight when I get home from work. Thanks!
carl2990 said:
i get
E: Wrong digest:
Kernal/zImage
E:Verification failed
using cannon v2.0
Click to expand...
Click to collapse
Sorry for the confusion I did not sign the zip properly. SHOULD BE WORKING NOW.
Would you be willing to talk about how this works and how it can work on any Rom. I would be interested in knowing that.
EDIT ... Actually I found some info in the overclock thread. Thanks.
billquinn1 said:
Would you be willing to talk about how this works and how it can work on any Rom. I would be interested in knowing that.
Click to expand...
Click to collapse
Uses Anykernel.zip created by Koush
updater-script runs and extract the boot.img from your current ROM.
It unpacks the boot.img into kernel and ramdisk.
It repacks newboot.img with the new kernel and the same ramdisk.
It flashes the newly created boot image.
I got the source HERE
infinitybiff said:
Uses Anykernel.zip created by Koush
updater-script runs and extract the boot.img from your current ROM.
It unpacks the boot.img into kernel and ramdisk.
It repacks newboot.img with the new kernel and the same ramdisk.
It flashes the newly created boot image.
I got the source HERE
Click to expand...
Click to collapse
This is very clever. Thanks.
0o koush's anykernel from github nice thinking
sunsean said:
This sounds awesome, it could make many sense roms much more usable as a daily!! Will flash and test later tonight when I get home from work. Thanks!
Click to expand...
Click to collapse
makes Eris2G1 fly!!!!!!!!!!
So if I'm reading this right, your using koush's anykernal method (which pershoot uses on his kernals) with dumfuq's patch. Good ****.
You might want to let people that dumfuqs kernal defaults to 8xx at boot, so a lot of people won't boot if they don't set default boot after flashing. This can be done with userinit.sh or in /system/banner or something like that if u don't have an ext partation w/userinit.sh. its explaind how to push the line in other theard. Id copy and paste here, but I'm driving right now, lol.
You also might want to give pershoot xtra kernal a shot also. It maxes at 576, but also has other optimasations included and if stable on all g1's.
fastludeh22 said:
So if I'm reading this right, your using koush's anykernal method (which pershoot uses on his kernals) with dumfuq's patch. Good ****.
You might want to let people that dumfuqs kernal defaults to 8xx at boot, so a lot of people won't boot if they don't set default boot after flashing. This can be done with userinit.sh or in /system/banner or something like that if u don't have an ext partation w/userinit.sh. its explaind how to push the line in other theard. Id copy and paste here, but I'm driving right now, lol.
You also might want to give pershoot xtra kernal a shot also. It maxes at 576, but also has other optimasations included and if stable on all g1's.
Click to expand...
Click to collapse
Thanks for the heads up. I've edited the instructions to install set cpu first so when they flash the update it will still boot up at 528 and they can change accordingly
Can we use an alternative other than SetCPU?
flexnix said:
Can we use an alternative other than SetCPU?
Click to expand...
Click to collapse
I'm pretty sure you can set the max speed via userinit.sh.... something like
"#!/system/bin/sh
echo 633600 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq"
in other news i just got this to work on a 1.5 sense ROM!!!!!!
Thanks, I'm about to test this out
Thanks bro!
Does anyone know if I can just flash this ota with just my phone? I downloaded the zip ota, and astro shows that it's on my sd card, but when I go to recovery to flash zip, it's not showing up...?
Just impatient to try this cuz it sounds sweet, lol, but I know if I can't do it ota I can do it later tonight at home...
sunsean said:
Does anyone know if I can just flash this ota with just my phone? I downloaded the zip ota, and astro shows that it's on my sd card, but when I go to recovery to flash zip, it's not showing up...?
Just impatient to try this cuz it sounds sweet, lol, but I know if I can't do it ota I can do it later tonight at home...
Click to expand...
Click to collapse
move the file to the root of your sdcard if you downloaded OTA its probably in sdcard/downloads or something

[KERNEL]Toast-godmode OC .29 kernel for DamageControl/based roms

Please Read
This will not change anything on your phone that would prevent you from ever flashing a new rom or nandroiding back to a working one. Everything this update will do can completely be erased with a wipe or nandroid. Also flashing any rom, clean install or not, will preplace the boot.img this update.zip puts on your phone. So dont blame these downloads for your simple user errors of not being able to flash a new rom or nandroiding.
This is an overclocked kernel from toastcfh godmode .29 source. The kernel was actually pulled from Fresh Toast
This works on DamageControl and roms based off of his, it will not effect any of DC mods, including the Dconig app.
UPDATE
6/6/10- This should be working on the newest damagecontrol 2.09. Please report (if overclocking has worked in the past for you) if you have a problem on the newest release.
Click to expand...
Click to collapse
I made an attempt to get compcache to work, so it might or it might not. Someone with more experience might want to double check it.
Both include setcpu.txt for Setcpu OC app.. Select "custom" at the very bottom for device. Do not select hero. Or you can select "Auto Detect" at the top, this does not need the setcpu.txt.
*View attachment damage710v2.zip* THIS IS A TEST KERNEL FOR THE NEWEST DAMAGECONTROL 2.09.. It is the exact same as damage710 but with a newer ramdisk, this is in hope of fixing any problems anyone is having with 2.09 and OC kernel. There might not even be a difference in the new ramdisk between the old one. I didnt have time to check. Sooo ya.
*View attachment damage537.zip* 537mhz is the default.. scalable to 768 if you use an OC'ing app
*View attachment damage768.zip* 768mhz default clock speed -read below
*View attachment damage710.zip* 710mhz default clock speed -read below
Both can be scaled from 19.2 to 768mhz..
DAMAGE710--The damage710 will default 710mhz, you must use an OC app to scale it to 768. Use damage710 if your phone can not boot the 768mhz. And dont scale any higher then 710mhz or your phone might reboot.
DAMAGE768--If your phone can boot the 768mhz then either download will work. But if you dont want to use an OC'ing app then the damage768 will scale to 768mhz.
This IS a flashable update.zip.. This will only replace your boot.img of your phone. So it is not a full rom. This is applied on top of your rom.
ALWAYS MAKE A NANDROID BEFORE FLASHING.
You Do Not Need A Partition On Your Sdcard For Overclocking
THIS IS A MUST FOR SWAP/compcache
To get swap working, you must have an ext partition on your sdcard. This will format you sdcard erasing everything, so do the following. Back up everything from your sdcard to your computer(exp- In a folder on your desktop named Sdcard). In recovery, select partition sdcard, use all default values, 32mb swap, 512mb ext partition, the rest fat32. Then when its finished change ext2 to ext3. Then reboot the phone. And then move all the files you backed up to the computer back to your sdcard.
If thanking me for putting this together. You should also give an even bigger thanks to Toastcfh for this kernel.
Thanks also goes to flipzmode, cuz i pulled the kernel from his boot.img in fresh toast.
Also darchstar for the defaulting clock speed tip.
So does this mean we can get the real AOSP dialer on Damaged's ROM?
mattshaver said:
So does this mean we can get the real AOSP dialer on Damaged's ROM?
Click to expand...
Click to collapse
No.. this just adds overclocking and the few extra things that come along with it in the kernel. Has nothing to do with AOSP.
you rock
10 char
Excuse my ignorance on this topic.
But with Darchdroid, the issue was porting the Eris .29 Kernal to get a full hardware working AOSP Rom (I think) , so what is the difference?
My apologizes for taking up the space with my questions. Just a noob trying to get his facts straight.
If anyone wants to know how to do this, follow this guide starting at Step 8.
Essentially just extract the kernel you want from the right boot.img, extract the ramdisk from the other boot.img, then use mkbootfs and makebootimg to put them back together.
PM me if you need help.
mattshaver said:
Excuse my ignorance on this topic.
But with Darchdroid, the issue was porting the Eris .29 Kernal to get a full hardware working AOSP Rom (I think) , so what is the difference?
My apologizes for taking up the space with my questions. Just a noob trying to get his facts straight.
Click to expand...
Click to collapse
I dont mind, ask anything here. Its how we learn
But that was the issue with all 2.1 roms. Toastchf cracked the code (in a way, not literally). And was able to give us a working source for .29 kernel. That kernel can then be used to work on any cdma hero 2.1 rom. But there are different things you have to do to get it to work on Darchdroid AOSP rom, he has already done that and its in his newest release. This one I posted above is just to work with damagecontrol roms or ones based off of it.
To get the AOSP dialer working you would have to have a rom based on AOSP, which darchdroid is the only rom so far. All the other roms are based on htc framework or just something different then AOSP. But im pretty sure theres AOSP dialers for damagecontrol. Go check the apps and themes section.
EDIT: the dialers are also completely separate from the kernel. Its based on what the rom is.
i'm running ic3rom and in the process testing it out
jeremysterling said:
i'm running ic3rom and in the process testing it out
Click to expand...
Click to collapse
If you downloaded the compcache one, can you go into terminal and type
adb shell
free
Tell me if it says "swap" in what comes up and that it doesnt have all 0's.
ive been running the 2.07.2.3333 with jit enabled for weeks now flawlessly..... will flashing this zip cause the jit to stop working... or will they work in unison like i want? if its a one or the other deal ill just keep jit... thanks for your help
I think I may be confused as to what exactly the kernel's role/job is, as well as to what the drivers role/function are.
a kernel is what tells the hardware how to interact with the software, and drivers are what tell the software how to interact with the hardware? Correct?
So, why would it take a different kernel to run a full AOSP ROM? Why not just write new drivers for the difference of hardware?
On another topic. The framework would be comparable to what CounterStike is to Half-Life. It still uses the underling software, but is modified and branded in its own way as to give such a "proprietary" feel?
I am so confused. (Google here I come)
schmooo said:
ive been running the 2.07.2.3333 with jit enabled for weeks now flawlessly..... will flashing this zip cause the jit to stop working... or will they work in unison like i want? if its a one or the other deal ill just keep jit... thanks for your help
Click to expand...
Click to collapse
It doesnt effect jit at all. It only adds a few files and changes your boot.img.
schmooo said:
ive been running the 2.07.2.3333 with jit enabled for weeks now flawlessly..... will flashing this zip cause the jit to stop working... or will they work in unison like i want? if its a one or the other deal ill just keep jit... thanks for your help
Click to expand...
Click to collapse
JIT is controlled by other variables, namely build.prop and the dalvikvm.so library; it won't hinder those settings at all.
Jus10o said:
If you downloaded the compcache one, can you go into terminal and type
adb shell
free
Tell me if it says "swap" in what comes up and that it doesnt have all 0's.
Click to expand...
Click to collapse
i used adb on my computer (not sure if that makes a difference):
C:\androidsdk\tools>adb shell
# free
free
total used free shared buffers
Mem: 195764 193404 2360 0 7384
Swap: 0 0 0
Total: 195764 193404 2360
#
Re: [KERNEL] Toast-godmode .29 source for DamageControl
So I can flash this and oc icerom? Etc....
-------------------------------------
Sent via the XDA Tapatalk App
mattshaver said:
I think I may be confused as to what exactly the kernel's role/job is, as well as to what the drivers role/function are.
a kernel is what tells the hardware how to interact with the software, and drivers are what tell the software how to interact with the hardware? Correct?
So, why would it take a different kernel to run a full AOSP ROM? Why not just write new drivers for the difference of hardware?
On another topic. The framework would be comparable to what CounterStike is to Half-Life. It still uses the underling software, but is modified and branded in its own way as to give such a "proprietary" feel?
I am so confused. (Google here I come)
Click to expand...
Click to collapse
Haha well you are right sorta on what the kernel does, but all cdma htc heros use the same kernels but it depends on what android version you are using. 1.5 uses .27 kernel, and 2.1 can use a edited .27 kernel but something things wont work, like camera. What toast did was made his own .29 kernel based on other sources and what we already have then we use for our 2.1 roms. The 2.1 roms that come from sprint use a .29 kernel that work, but we cant edited anything within the kernel until they release the source to the kernel. You must have source to the kernel to be able to change anything with in it. You cant download a rom from xda and take the kernel out and change the files and put them back. You have to already have the files to the kernel, change what you want, make your own kernel and then put it on the rom. Cuz once you compile the kernel its not able to be opened back up.
In a boot.img there are 2 parts, the kernel and a ramdisk. The ramdisk CAN be opened back up and changed. But if its trying to call something within the kernel it has to already be there, since you cant add anything to it. If you start with all the kernel files and compile your own like what toast did, then you can add the special things like overclocking frequencies.
I know I really suck at explaining things. I only know the basics of how it all works.
jeremysterling said:
i used adb on my computer (not sure if that makes a difference):
C:\androidsdk\tools>adb shell
# free
free
total used free shared buffers
Mem: 195764 193404 2360 0 7384
Swap: 0 0 0
Total: 195764 193404 2360
#
Click to expand...
Click to collapse
And you have the compcache.. or the newer one i posted?
Jus10o said:
It doesnt effect jit at all. It only adds a few files and changes your boot.img.
Click to expand...
Click to collapse
Decad3nce said:
JIT is controlled by other variables, namely build.prop and the dalvikvm.so library; it won't hinder those settings at all.
Click to expand...
Click to collapse
sweet im gonna give it a try
Jus10o said:
And you have the compcache.. or the newer one i posted?
Click to expand...
Click to collapse
i downloaded and flashed damage1.zip with compcache
jeremysterling said:
i downloaded and flashed damage1.zip with compcache
Click to expand...
Click to collapse
Ok thanks.. yea compcache and swap arent working. Ill work on it.
But overclocking and everything else is. So its not gunna make a noticeable difference.

[Info/brainstorming] Compiling modules for the 2.6.32 beta kernel OBSOLETE

This thread is now obsolete.
Kernel sources for build 5.26.0 have been released:
https://opensource.motorola.com/sf/go/projects.milestone/frs.milestone_source_froyo
I've pushed some new pre-compiled modules to github, though beware, I haven't had time to test all of them on device yet:
https://github.com/nadlabak/android...mmit/b300803348705d3fc5ce76d8c88d57186748a370
As the kernel sources are not yet available from the Motorola's open source project, here is an outline how I compiled the overclock and cpufreq governor modules. (Btw., the overclock module needed a substantial adaptation, see the source here: http://android.doshaska.net/2.6.32oc )
I'm using the sources from this AOSP repo:
Code:
git clone git://android.git.kernel.org/kernel/omap.git
git checkout --track -b android-omap-2.6.32 origin/android-omap-2.6.32
Use the sholes config:
Code:
make sholes_defconfig
flags that need to be disabled:
CONFIG_LOCALVERSION_AUTO
CONFIG_MODVERSIONS
CONFIG_DEBUG_MUTEXES
CONFIG_SCHEDSTATS
CONFIG_SCHED_DEBUG
[updated on 17.01.2011, thanks go to Skrilax_CZ]
At least the ext2 will work without panics when compiled using this config.
For tun, cifs and nfs there is still some additional config mismatch that prevents the modules to work without null pointer dereference oops.
Also, even when no custom kernel module is used, you can get the kernel panic very easily, try to enable wifi and do:
Code:
cat /proc/kallsyms
If you're interested in a more detailed android kernel compilation guide, you can e.g. roughly follow this Droid kernel guide: http://www.droidforums.net/forum/rescue-squad-guides/31452-how-compile-your-own-kernel.html
Thanks for starting this thread kabaldan! It is a great starting point in tackling the issue of adding tun support to the new kernel (tun.ko module). I am not as good as many others in this, but trying won't hurt. Meanwhile if someone else is working on tun support - share experience here!
If kernel seems to be ok, sometimes mounting with new version of busybox won't work.
I used to get kernel panic when use newer version of busybox (not Android kernel but my own embedded linux)
Hey Nadlabak can you add DLNA function of CM6?
same problem using droidx kernel sources. insmod ok, mount reboots the phone
yantz
I tried droid2 kernel module - doesn't work either
I noticed OpenVPN included in CM6 also relies on this kernel module. Hence doesn't work. I guess we won't (ever) see kernel sources for that leaked kernel we are now using. I assume Motorola will release the sources sooner or later, but not before official Froyo layout. The waiting is killing me! kabaldan, can't you try to do some magic as you did with the overclock module? The beer is from me!!!
Can you test this attached tun.ko?
Insmod is OK, but I currently don't have time for any further tests...
EDIT: don't bother, kernel panic as usual
Module loads fine, but when attempt to use it, phone reboots, just like with the module compiled from DroidX sources..
leobg said:
Module loads fine, but when attempt to use it, phone reboots, just like with the module compiled from DroidX sources..
Click to expand...
Click to collapse
So, I got it loaded - insmod works just great, just like it did on the 2.1 kernel.
I'm trying to use the CM6 built-in OVPN settings, but I can't find any documentation on the setup. How did you get it set up?
I have
/sdcard/openvpn/
cert.crt
ca.crt
config.conf
config.ovpn
pem.key
I realize that config.conf and config.ovpn are the same file- but I use this VPN on windows and on Mac, and I wasn't sure the requirements on Linux.
If I can't find some documentation I'll try downloading the OpenVPN settings app from the market and playing with that.
Also, I don't know if it's true or not, but I heard the Milestone2 source compiled driver could work.
Are you trying the module kabaldan provided? It doesn't seem to work, at least for me. Loads fine, but phone crashes when setting up tun interface. I couldn't get OpenVPN in CM6 0.3 to work so far. I am testing the tun.ko with the cisco vpn package (which worked great on the old kernel with CM6 0.2) vpnc. When I initiate the connection, phone reboots if the attached here tun.ko is used. I also tried with tun.ko compiled from DroidX sources - same thing - phone reboots. I am not sure where did kabaldan take/compile this module from.
Sent from my Milestone using Tapatalk
I was using the same one, I was thinking maybe he could use the info from more than one phone. I'll try get-a-robot or OpenVPN Installer, but I won't hold my breathe. I was just hoping to use the built-in functionality of the ROM.
*edit* Just saw he removed it because it doesn't work yet, oh well.
the kernel doesnt seem to like any other fs not built into it. i've tried several, ext2, ext3, ext4, cifs, jffs, reiserfs etc. all modules would load without a problem but system will reboot during mount. heck i even tried creating logical volume on the partition. volume created fine, but when time to mount, it reboot
i ended up using a 2nd vfat partition for apps2vfat, on top of native froyo move to sd. moved my debian arm there and manually, yes manually, replace many symlinks in libs to copied files
hopefully next froyo release for other regions would provide a different kernel
yantz
hey kabaldan wondering if you've had another chance to look at an updated tun.ko
Finally some breakthrough. The great Skrilax_CZ has made some hard debugging and one very good guess:
CONFIG_DEBUG_MUTEXES must be disabled in the kernel config.
At least the ext2 module compiled this way is working without panics now.
Congrats to Skrilax!
EDIT: Tun nor nfs not tested yet..., cifs unfortunately still not working.
kabaldan said:
Finally some breakthrough. The great Skrilax_CZ has made some hard debugging and one very good guess:
CONFIG_DEBUG_MUTEXES must be disabled in the kernel config.
At least the ext2 module compiled this way is working without panics now.
Congrats to Skrilax!
EDIT: Tun nor nfs not tested yet..., cifs unfortunately still not working.
Click to expand...
Click to collapse
This means that now the app2ext work?
Where are the modules for we test?!
Thanks for the news!
Modules for testing:
ext2 - http://code.google.com/p/cyanogenmod4milestone/issues/detail?id=197#c19
tun - http://code.google.com/p/cyanogenmod4milestone/issues/detail?id=222#c4
Hi sort of a newbie here... So does this mean that data2ext will work?
Sent from my Milestone using XDA App
Hi Nadlabak...maybe you already know.
For the cifs module, how about slow-work is made available as a module.
as is done at this link
http://forum.xda-developers.com/showpost.php?p=9271775&postcount=4
after further testing:
ext2 mounting now works, reading from ext2 partition too, but writing still causes panic
tun causes panic too
Let's hope for a soon kernel source release, as it looks like we won't get much further without it.
edowar: thanks for the link
@kabaldan
Could it be possible to create a swap module for milestone ?
It seems that running kernels does not have this feature yet and i'm not sure motorola to implement it for next 2.2 release so .... well just wondering !

[KERNEL] OC/UV Kernel (test)

Hi,
avetny asked me to take a look at the g2x kernel to add OC/UV, so i did build a kernel with oc/uv added. You can read more about the kernel on the o2x thread. With this kernel you should be able to use Pimp My Cpu to manage cpuspeed/voltages on the fly.
I do not own a g2x device so i could not test this kernel, try at your own risk.
g2x-kernel-2.6.32.9-fakeShmoo-cpasjuste.5.zip : db7a11365e8520424f1ed579b666623f
EDIT :
Since i do not have the device, if someone wants to continue the work (fix wifi/bt) you'll find the sources and changes here : https://github.com/Cpasjuste/android_kernel_lg_p999/commits/fakeShmoo
Note that you NEED to add "init.d" support to the kernel initramfs :
Add at the end of the init.rc script :
Code:
# Execute files in /etc/init.d before booting
service sysinit /system/bin/logwrapper /system/xbin/busybox run-parts /system/etc/init.d
disabled
oneshot
And maybe the "99complete" script to "/system/etc/init.d" :
Code:
#!/system/bin/sh
sync;
setprop mcr.filesystem.ready 1;
Thanks a lot for this. Look forward to giving it a go
Kernel boots fine, however,it breaks wifi. Will continue testing and see how everything else it
jlevy73 said:
Kernel boots fine, however,it breaks wifi. Will continue testing and see how everything else it
Click to expand...
Click to collapse
Arg that's strange, i don't see why wifi would be broken :/
Cpasjuste said:
Arg that's strange, i don't see why wifi would be broken :/
Click to expand...
Click to collapse
It is...when I flashed I say the wifi modules loading.
But wow, this kernel is fast. Smartbench just shot through the roof.
jlevy73 said:
It is...when I flashed I say the wifi modules loading.
But wow, this kernel is fast. Smartbench just shot through the roof.
Click to expand...
Click to collapse
Note that it's not OC by default. Could you try Pimp My Cpu on it to see if it work ? Thanks
For the wifi module, i'll wait for "avetny" if he knows anything.
Cpasjuste said:
Note that it's not OC by default. Could you try Pimp My Cpu on it to see if it work ? Thanks
For the wifi module, i'll wait for "avetny" if he knows anything.
Click to expand...
Click to collapse
That's what I mean by wow it's fast. I installed pimp my cpu and have it running @ 1200/300 while I do some benchmarking. Pimp my cpu is working very well.
jlevy73 said:
That's what I mean by wow it's fast. I installed pimp my cpu and have it running @ 1200/300 while I do some benchmarking. Pimp my cpu is working very well.
Click to expand...
Click to collapse
Ha that's very cool. Many thanks for the "bravery"
Just need to fix wifi now :x
I won't be able to do so myself without a device to test so some help will be required. The recovery install script just copy the "drivers/net/wireless/bcm4329/wireless.ko" module to "/system/lib/modules/wireless.ko" on the device. Maybe on the g2x the modules are located somewhere else.
Cpasjuste said:
Ha that's very cool. Many thanks for the "bravery"
Just need to fix wifi now :x
I won't be able to do so myself without a device to test so some help will be required. The recovery install script just copy the "drivers/net/wireless/bcm4329/wireless.ko" module to "/system/lib/modules/wireless.ko" on the device. Maybe on the g2x the modules are located somewhere else.
Click to expand...
Click to collapse
Let me check to see where the drivers are located.
jlevy73 said:
Let me check to see where the drivers are located.
Click to expand...
Click to collapse
Update: Yep it's located in /system/lib/modules
Upon quick look it appears as though the permissions for the .ko file might be incorrect. Let me try something to see if it helps.
jlevy73 said:
Update: Yep it's located in /system/lib/modules
Upon quick look it appears as though the permissions for the .ko file might be incorrect. Let me try something to see if it helps.
Click to expand...
Click to collapse
Your right, this could maybe be the problem.
jlevy73 said:
Kernel boots fine, however,it breaks wifi. Will continue testing and see how everything else it
Click to expand...
Click to collapse
Getting the same wifi problem.
But besides that everything seems to be working fine.
Tried playing around with the permissions but that didn't seem to help. Also BT appears to be break with this kernel.
Also confirmed wifi is broken with this kernel.
flak0 said:
Also confirmed wifi is broken with this kernel.
Click to expand...
Click to collapse
Can you try turning on BT and seeing if that's broken for you as well? Thanks
Is dmesg spitting out anything of interest?
Confirmed. I wonder if we push the original wireless.ko if.it will work?
Since i do not have the device, if someone wants to continue the work you'll find the sources and changes here : https://github.com/Cpasjuste/android_kernel_lg_p999/commits/fakeShmoo
Note that you NEED to add "init.d" support to the kernel initramfs :
Add at the end of the init.rc script :
Code:
# Execute files in /etc/init.d before booting
service sysinit /system/bin/logwrapper /system/xbin/busybox run-parts /system/etc/init.d
disabled
oneshot
And maybe the "99complete" script to "/system/etc/init.d" :
Code:
#!/system/bin/sh
sync;
setprop mcr.filesystem.ready 1;
Checking dmsg now
I can also confirm that the kernel works well with OC/UV but WiFi does not work. Bluetooth isn't working for me either.

[KERNEL][FROYO][8-07-11] PeanutButta Jelly Time

Here is the initial release of my kernel. I'd like to have some other stuff fixed/working, but for now, this is it. I've made a lot of changes and I tried to list them all below, but I know there is stuff that I missed. Currently, the only issue that I know of is that the boot animation will be out of sync and may skip on boot. I have currently retained the stock boot animation, but custom boot animations are also possible if people would like them.
Also, while this kernel can work for recovery, I currently have not tested it, so recovery will remain what it is (ie. jt1134's CWM). I plan on testing recovery soon and releasing an updated Odin for it, as well as just having the kernel zip re-flash recovery.
Installation Instructions:
1. Download zip
2. Transfer to SDCard
3. Reboot into recovery, you'll need to have CWM if you don't already
4. Install zip from SDCard and select the zip you downloaded.
5. Reboot and enjoy
0807
Make logcat an option that can be turned on/off
-From root shell, run "logcat-enable" to turn logcat on, "logcat-disable" to turn it off
Make /preinstall partition swap space
Fix problem with rooting phone on boot
Fix fix_permissions in recovery
Update to recovery
0731
Fix mount USB storage in recovery
0730
Custom boot animation support
Updated recovery
0710
Voodoo Sound V10
Updated CWM Recovery
0602
Voodoo Sound fixed - Thanks supercurio
Removed OnDemand
Added FIFO and BFQ IO Schedulers
Added tun.ko and cifs.ko
0531
Initial release, built from source
Undervolted
Voodoo lagfix available - Thanks supercurio
Updated compiler flags
Linaro Toolchain for cross-compiling
Battery hack to allow for non-OEM Batteries - courtesy of SirGatez
init.d support
SDCard speed tweak (via init.d script)
Upstream EXT4 Patches
VFAT Patch
TCP and CFS Tweaks to help data/performance
V(R) IO Scheduler
Auto-root on boot
Maybe missing some other stuff, check Github for full changes
TODO (somewhat in order of importance):
Test CWM and flash recovery partition
Smooth out boot animation
Get an overclocking kernel out
NOTES:
If you are experiencing problems, I need detailed info to be able to fix it or help you out. Failure to provide detailed info will mean I'm just going to ignore your problem as user error. Details would be something such as which kernel you are flashing (filename) and steps to reproduce the issue. Also, if you used any other kernels that had the same problem or didn't have the problem.
DISCLAIMER
By downloading and using the kernels, this signifies that you have read this full post and the FAQ before reporting an issue. You also take all responsibility if your phone breaks or your warranty becomes void (which, if you're flashing this, it already is). I offer no guarantees as to anything working, though I try not to release broken stuff, it happens sometimes.
Legend
voodoo/novoodoo - voodoo has the lagfix, novoodoo doesn't (I hope this was obvious)
Frequently Asked Questions
How do I install this?
You flash this in CWM. If you need CWM, you can find it here
Can I use ROM Manager to flash this?
If you didn't use Odin to flash CWM, this will not work. Also, ROM Manager is not compatible with CWM when it fully replaces stock recovery.
Can I install this over another Voodoo Lagfix kernel?
Yes. Any kernel that use's supercurio's lagfix can be flashed over any other kernel that uses it.
How do I disable Voodoo Lagfix?
Create a file on the SDCard named disable-lagfix within the voodoo folder (/sdcard/voodoo/disable-lagfix). You can also use the option in the Voodoo Control app (from the market) or the option in CWM Recovery to disable the lagfix.
How do I know if it is installed?
Go to Settings > About Phone and the kernel version should read:
Code:
2.6.32.9
[email protected] #1
Will this work with xxx ROM?
This will work with any currently available ROM that is posted here.
Can I overclock with this kernel?
No. Currently overclocking is not supported. I do plan on looking into implementing this in a future version though.
Can I use SetCPU with this kernel?
You can use SetCPU with this, but do not use profiles. If you have problems and are using profiles, I'm not going to try to fix them as profiles do not work properly on any SGS phone that I've seen.
Does this kernel include xxx feature?
If it is not listed in the first post, probably not. To be sure, check the commits to the source on Github.
Can you add/implement xxx feature?
If you can link to what you want added/changed, I can look into doing so. If you just say something like "I want bigger quadz!" with no information about what you want or where to find it, I'll just disregard your request.
I am having xxx issue, can you fix it?
See the NOTES section above. Failure to provide any steps to reproduce your error, or a log of the issue as it is occurring will not get your problem fixed. I need the output from logcat and/or dmesg to be able to fix problems. Use the following to obtain a log (easiest with ADB).
Code:
adb shell dmesg > dmesg.txt
adb logcat > logcat.txt
Enter one of the commands and attempt to recreate your issue. Logcat will run constantly until you stop it (disconnect the phone, or ctrl+c). Dmesg will dump the current buffer and end. Try to get a logcat first as it will be easier to capture the error. PM me the files once you've collected them and I will look into it. DO NOT POST THEM IN THE FORUM. Logcat and dmesg may both contain identifying information (like your phone number or email address) so PMing them to me will prevent everyone from seeing this info. If you need help, ask or join IRC.
If you would like something added to the FAQ, please post it in the following format:
Code:
[PLAIN][b]Put the question here[/b]
Put the answer here[/PLAIN]
Flash in cwm.
Sent from my SCH-I510 using XDA Premium App
papi92 said:
Flash in cwm.
Sent from my SCH-I510 using XDA Premium App
Click to expand...
Click to collapse
Yes, added installation instructions to OP
So if we already have voodoo lagfix installed based on other kernel do we try the non lagfix ver or is it ok to install the new file with lagfix included?
Sent from my SCH-I510 using XDA Premium App
Blanco954 said:
So if we already have voodoo lagfix installed based on other kernel do we try the non lagfix ver or is it ok to install the new file with lagfix included?
Sent from my SCH-I510 using XDA Premium App
Click to expand...
Click to collapse
If you have lagfix enabled you just flash the voodoo kernel, or disable lagfix and flash non-voodoo kernel if you want RFS file system
Thanks Hopper. I will give this a try.
Sent from my SCH-I510 using XDA Premium App
Worked like a champ for me...thank you!
Sent from my SCH-I510 using Tapatalk
Do we disable the lagfix the same way as we do with jts?
Sent from my SCH-I510 using XDA Premium App
Flash, flashed!
Thanks again, imnuts!
confirming my noob status again:
I can just use CWM and install this right over your debloat and JT's kernel? OR, do I need to go back to non-voodoo ED1?
papi92 said:
Do we disable the lagfix the same way as we do with jts?
Sent from my SCH-I510 using XDA Premium App
Click to expand...
Click to collapse
We currently have only one cwm which is jt's, so I don't quite understand what you mean.
froodyo said:
confirming my noob status again:
I can just use CWM and install this right over your debloat and JT's kernel? OR, do I need to go back to non-voodoo ED1?
Click to expand...
Click to collapse
If you currently have lag fix enabled, you can only flash the voodoo kernel. If you do not have lagfix enabled, you can flash either kernel.
You do not need to go back to ed1. Just flash the appropriate kernel.
hoppermi said:
If you currently have lag fix enabled, you can only flash the voodoo kernel. If you do not have lagfix enabled, you can flash either kernel.
You do not need to go back to ed1. Just flash the appropriate kernel.
Click to expand...
Click to collapse
Thank you very much.
papi92 said:
Do we disable the lagfix the same way as we do with jts?
Click to expand...
Click to collapse
Yes, lagfix is disabled the same way with any kernel that uses supercurio's Voodoo Lagfix.
froodyo said:
I can just use CWM and install this right over your debloat and JT's kernel? OR, do I need to go back to non-voodoo ED1?
Click to expand...
Click to collapse
Kernels are almost always independent of the ROM, so yes, you can install this regardless of what ROM you are running (Stock, debloated, something else). If/When we get a non-TouchWiz based ROM, this may change, but for now, you can use this with anything currently available.
hoppermi said:
If you currently have lag fix enabled, you can only flash the voodoo kernel. If you do not have lagfix enabled, you can flash either kernel.
Click to expand...
Click to collapse
I set up novoodoo to try and avoid issues, so if you were on voodoo and didn't disable, the novoodoo should still work, but why risk it if you don't have to?
So I flashed the voodoo kernel and now my charge keeps randomly freezing and rebooting
Manjews said:
So I flashed the voodoo kernel and now my charge keeps randomly freezing and rebooting
Click to expand...
Click to collapse
Are you doing any under clocking? I had this problem before the new kernel trying to under clock with the screen off.
hey i come from the fascinate and i love your work can't wait until you get voodoo sound working
i will be rooting a friends droid charge soon and then i will set him up with JT cwm voodoo and your kernel
glad to see some devs i already know working on the droid charge
khanfuze said:
Are you doing any under clocking? I had this problem before the new kernel trying to under clock with the screen off.
Click to expand...
Click to collapse
No but I think it might be set cpu related issue. I had the scaling set to on demand. I turned it off and so far it's running smooth with no issues.
Manjews said:
No but I think it might be set cpu related issue. I had the scaling set to on demand. I turned it off and so far it's running smooth with no issues.
Click to expand...
Click to collapse
Good to hear Samsung released broken cpu governors again

Categories

Resources