[Q] Trying to understand kernel_galaxyace / arch / arm / mach-msm / acpuclock.c - Galaxy Ace S5830 Android Development

I am new to Kernels and want to understand how OC'ing is done so I can make one for my device. I am looking here:https://github.com/ilarrain/kernel_galaxyace/blob/gingerbread/arch/arm/mach-msm/acpuclock.c and want to understand why the frequencies listed in the table are not available. I think it has something to do with this but could be completely wrong, could someone steer me in the right direction?
Code:
#ifdef CONFIG_CPU_FREQ_MSM
static struct cpufreq_frequency_table freq_table[20];
static void __init cpufreq_table_init(void)
{
unsigned int i;
unsigned int freq_cnt = 0;
/* Construct the freq_table table from acpu_freq_tbl since the
* freq_table values need to match frequencies specified in
* acpu_freq_tbl and acpu_freq_tbl needs to be fixed up during init.
*/
for (i = 0; acpu_freq_tbl[i].a11clk_khz != 0
&& freq_cnt < ARRAY_SIZE(freq_table)-1; i++) {
if (acpu_freq_tbl[i].use_for_scaling) {
freq_table[freq_cnt].index = freq_cnt;
freq_table[freq_cnt].frequency
= acpu_freq_tbl[i].a11clk_khz;
freq_cnt++;
}
}
/* freq_table not big enough to store all usable freqs. */
BUG_ON(acpu_freq_tbl[i].a11clk_khz != 0);
freq_table[freq_cnt].index = freq_cnt;
freq_table[freq_cnt].frequency = CPUFREQ_TABLE_END;
pr_info("%d scaling frequencies supported.\n", freq_cnt);
}
#endif

Okay i was wrong about that
// Perform overclocking if requested
457 if(hunt_s->a11clk_khz>787200) {
458 // Change the speed of PLL2
459 writel(hunt_s->a11clk_khz/19200, PLLn_L_VAL(2));
460 udelay(50);
The constraint is here... now to find out what exactly it means...

Specifically this....
(hunt_s->a11clk_khz>787200)

i'm not good at C++, but here goes.
1- it means raise the ahb bus clock whenever cpu clock is passing 787200khz (787mhz)
2- frequency that is listed not always enable by default, eg
Code:
{ [B]0[/B], 120000, ACPU_PLL_0, 4, 7, 60000, 1, 3, 61440 },
{ [B]1[/B], 122880, ACPU_PLL_1, 1, 1, 61440, 1, 3, 61440 },
0 means its disable
1 means its enable

I would hit thanks twice if i could!
Sent from my GT-S5830 using xda premium

I think ill try cross compiling something tonight...
Sent from my GT-S5830 using xda premium

-SGA- said:
I think ill try cross compiling something tonight...
Sent from my GT-S5830 using xda premium
Click to expand...
Click to collapse
Mystery......
Herpderp Adreno + Tegra.

Lol. It's a rabbit hole that keeps getting deeper and deeper.
Sent from my GT-S5830 using xda premium

-SGA- said:
Lol. It's a rabbit hole that keeps getting deeper and deeper.
Sent from my GT-S5830 using xda premium
Click to expand...
Click to collapse
beware or u'll be suck in deep

-SGA- said:
Lol. It's a rabbit hole that keeps getting deeper and deeper.
Sent from my GT-S5830 using xda premium
Click to expand...
Click to collapse
Goodluck .
I ran away looking at the bottomless pit !
Herpderp Adreno + Tegra.

After spending a lot of time looking at the CM7 oc kernel and the samsung source code, I wanted to merge some of the features I think are comparable or interesting. I've got the code I want in place using codebench for Arm11, but now have been trying to understand how to make that into a boot.img. I gave up after working on it all night. After reading about using adb to extract the ramdisk from the phone and merging them ect. Can you guys suggest anything?
Sent from my GT-S5830 using xda premium

-SGA- said:
After spending a lot of time looking at the CM7 oc kernel and the samsung source code, I wanted to merge some of the features I think are comparable or interesting. I've got the code I want in place using codebench for Arm11, but now have been trying to understand how to make that into a boot.img. I gave up after working on it all night. After reading about using adb to extract the ramdisk from the phone and merging them ect. Can you guys suggest anything?
Sent from my GT-S5830 using xda premium
Click to expand...
Click to collapse
http://forum.xda-developers.com/search.php?searchid=6840206

-SGA- said:
After spending a lot of time looking at the CM7 oc kernel and the samsung source code, I wanted to merge some of the features I think are comparable or interesting. I've got the code I want in place using codebench for Arm11, but now have been trying to understand how to make that into a boot.img. I gave up after working on it all night. After reading about using adb to extract the ramdisk from the phone and merging them ect. Can you guys suggest anything?
Sent from my GT-S5830 using xda premium
Click to expand...
Click to collapse
u dont need to touch adb to extract ramdisk.
just extract it from stock kernel. read this thread
http://forum.xda-developers.com/showthread.php?t=1173427

ketut.kumajaya said:
http://forum.xda-developers.com/search.php?searchid=6840206
Click to expand...
Click to collapse
I mean, all thread started by me
an0nym0us_ said:
u dont need to touch adb to extract ramdisk.
just extract it from stock kernel. read this thread
http://forum.xda-developers.com/showthread.php?t=1173427
Click to expand...
Click to collapse
Better option: http://forum.xda-developers.com/showthread.php?t=1241005, blackhawk-tools have automate script to unpack/repack boot.img .

when i tried ramdisk of stock the things were not working...
things which i did was unpack stock boot.img and replace my build zImage and repack... do i need to do something extra too?
and also while compiling refering .cpio file in makemenu

madman_amit said:
when i tried ramdisk of stock the things were not working...
things which i did was unpack stock boot.img and replace my build zImage and repack... do i need to do something extra too?
Click to expand...
Click to collapse
check module local version and make sure it match with kernel local version in defconfig.
also stock ramdisk doesnt enable init.d by default, so u might have problem if flashing onto rom that need init.d script support.

an0nym0us_ said:
check module local version and make sure it match with kernel local version in defconfig.
also stock ramdisk doesnt enable init.d by default, so u might have problem if flashing onto rom that need init.d script support.
Click to expand...
Click to collapse
i made local version changes as you said in historical post too...
and about init.d support i was flashing it on stock so that shouldn't have that problem

madman_amit said:
i made local version changes as you said in historical post too...
and about init.d support i was flashing it on stock so that shouldn't have that problem
Click to expand...
Click to collapse
if its stock rom with stock rfs filesystem u shouldnt have problem. wierd that u had problem
in general this is what need to be done.
1- unpack stock kernel ramdisk
2- cd into module dir in unpacked ramdisk dir, check its local version
3- modify kernel defconfig so its local version matches module local version
4- compile kernel
5- repack output zimage with earlier unpacked ramdisk.
if this should be flash into fresh stock rom with stock rfs filesystem, it should boot.

almost tried it 5-6 times with no boot
progress stops at samsung galaxy ace..
will give it another try later.. even if stock kernel boots i can make further modifications to kernel as i am more interested towards kernel programming rather than rom or app making stuff

Try using dsixda's Android Kitchen
Herpderp Adreno + Tegra.

Related

zImage with INCREASED RAM to 384 mb

Has anybody tried latest zImage and modules witch allows us to use 384 mb of RAM and 32 mb of Video Memory?
Kernel and modules are located here: http://oe.netripper.com/files/htcleo_autobuild/
zImage download link: http://oe.netripper.com/files/htcleo_autobuild/zImage-htcleo-increased-ram-latest
modules download link: http://oe.netripper.com/files/htcleo_autobuild/modules-htcleo-increased-ram-latest.tgz
To use this kernel we need to modify this line in STARTUP.TXT:
use ramaddr 0x18000000 (instead of 0x20000000)
you have me confused...are you saying we've been using less than 384MB all along (on Android)?
:O
Kev007 said:
you have me confused...are you saying we've been using less than 384MB all along (on Android)?
:O
Click to expand...
Click to collapse
Yes, at the moment we are using 245 mb of RAM (on Android).
Yeah, all actual builds only use 252MB of ram.
But do not be surprised, the kernel with 384MB misses the latest changes by cotulla (battery, lower power consumption ) because they have not been pushed to git yet.
Sent from my HTC Desire using XDA App
I haven't start with new android img, atm just edit the startup.txt and change zImage, change ramaddres itu 0x180000000, cannot boot into android, just stay at jumping to Kernel.
did I do something wrong here? or I should try with fresh android?
Haret freeze at jumping to kernel point. It doesn't work for me...
hendr1k said:
I haven't start with new android img, atm just edit the startup.txt and change zImage, change ramaddres itu 0x180000000, cannot boot into android, just stay at jumping to Kernel.
did I do something wrong here? or I should try with fresh android?
Click to expand...
Click to collapse
You have to copy provided modules in /system/lib
I added the new zimage and the new moddule but when I try to boot just hangs
at haret boot.
I put both files on the root of the sd card. I remate to zimage and modules I did not change. Also changed the startup text as iunstructed but no go.
DID I need to extract the files elsewhere?? Please advice.
Thanks in advance
if i'm not wrong we need copy the provided modules in /system/lib ( whit the old zimage and a working android system)
after this replace the zimage and edit the STARTUP.TXT whit:
use ramaddr 0x18000000 (instead of 0x20000000)
sea_man said:
if i'm not wrong we need copy the provided modules in /system/lib ( whit the old zimage and a working android system)
after this replace the zimage and edit the STARTUP.TXT whit:
use ramaddr 0x18000000 (instead of 0x20000000)
Click to expand...
Click to collapse
I did just that and got no further along.
but in this kernel gps work?
wifi75 said:
but in this kernel gps work?
Click to expand...
Click to collapse
All the changes Cotulla made over the last weeks are not included as he has not pushed all of his changes to git.
Not working
Sent from my HTC Desire using XDA App
With this over 50% increase in ram would be a significant increase/improvement in performance?
grusy said:
All the changes Cotulla made over the last weeks are not included as he has not pushed all of his changes to git.
Click to expand...
Click to collapse
Sorry to ask but what do you mean 'git', i'm learning fast but still unsure on a few things
elgrego4 said:
Sorry to ask but what do you mean 'git', i'm learning fast but still unsure on a few things
Click to expand...
Click to collapse
git is a source code revision control software that the developers use to store changes to the code...
http://en.wikipedia.org/wiki/Git_(software)
Cheers
Jonas
Yep, something's broken. Doesn't work for me either...
I find this very interesting. Will wait for this to be added in cotulla's public zimage package.
Bump?
10char
Well I got it working. I have more RAM, but a lot of things like Battery charging and other things are missing because Cotulla's code is missing in git.
So it's quite useless now.
PS: I have build my own kernel. It does not work with the autobuild kernel, at least for me.

[ deodex script] deodexerious: all your base are belong to us!

Here's a script I've built for my own ROM cooking purpose
another purpose was to create a very easy to read script, so everyone can understand the magic of deodex
had some hard time figuring all the BOOTCLASSPATH and all the signing magic (if you want to do it manually, the secret is: don't pack and sign!, just add the classes.odex to the original jar or apk...whatever...
or use my script to automagically do all that)
after one brick and jtag reincarnation and a few bootloops
I present to you:
DEODEXERIOUS !! (the only spartan deodex script)
requirements:
Linux
zip
* tested on my Ubuntu 10.10
instructions:
1. extract the included script
2. put the content of system(including the system folder) inside the rom folder
actually you can create a folder named system inside the rom folder and copy framwork and app folder there, it does not require any other files from the rom
3. while in the console inside the extracted script directory execute from the console
Code:
./deodexrom.sh
4. wait and watch the console for errors (there shouldn't be any)
5. when it is done, you should find the deodexed files inside the deodexed folder
* if you want to start over just execute from the same place in the console
Code:
./cleanall.sh
tested and successfully deodexed:
I897 UCKB1
I9088 KP2
I9088 ZNKP5
I9000 XXJPY
I9000 XWJS3
I9000 XWJS5
I9000 ZSJPG
I9000 XWJV1 2.3.2, except email.apk
it does not support already deodexed rom's!!! (why should it?)
if you test other raw versions (even captivate ones) please inform the result, or problems found, I'll do my best to help
careful
the script is a very initial version
it does inform errors human readable so watch the console for them
oh! almost forgot , here's the script:
http://dl.dropbox.com/u/3595341/deodexerious/deodexerious_03.zip
change log:
04/03/2011 - deodexerius_03
added gingerbread XWJV1 2.3.2 - custom classpaths
smali and baksmali 1.2.6
case insensitive classpath helpers
note:
deodexerius can deodex all XWJV1 2.3.2, except email.apk
27/02/2011 - deodexerius_02
better support for the additional files in kp5 and kp2
good luck!!
To Be Continued
If someone could come up with one of these for windows they would be my hero
Sent from my GT-I9000 using XDA App
rob989_69 said:
If someone could come up with one of these for windows they would be my hero
Sent from my GT-I9000 using XDA App
Click to expand...
Click to collapse
kind of like this one?
http://forum.xda-developers.com/showthread.php?t=700904
omg
You saved my life man... thanks a billion! And add a donate link, I know I'd like to send a few bucks your way
Pirateghost said:
kind of like this one?
http://forum.xda-developers.com/showthread.php?t=700904
Click to expand...
Click to collapse
If this works you are my hero!!! LOL. I've found a number of different ones, either they don't work or I'm not using them correctly but this one is new to me. Thanks.
rob989_69 said:
If someone could come up with one of these for windows they would be my hero
Click to expand...
Click to collapse
sorry man no windows version.
ytt3r said:
You saved my life man... thanks a billion! And add a donate link, I know I'd like to send a few bucks your way
Click to expand...
Click to collapse
your'e welcome.
rob989_69 said:
If this works you are my hero!!! LOL. I've found a number of different ones, either they don't work or I'm not using them correctly but this one is new to me. Thanks.
Click to expand...
Click to collapse
oh it works....
Just used this on KP2, works great, thanks!
existz said:
Just used this on KP2, works great, thanks!
Click to expand...
Click to collapse
great news!
works great with xwjs3
This is great. Works on the new KB1.
I keep seeing this while the script is running
Compiling classes.dex from rom/system/framework/framework-tests
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.raiseBoundsError(libgcj.so.11)
at java.util.ArrayList.checkBoundExclusive(libgcj.so.11)
at java.util.ArrayList.get(libgcj.so.11)
at org.jf.dexlib.DexFile$2.placeAt(DexFile.java:783)
at org.jf.dexlib.DexFile.place(DexFile.java:659)
at org.jf.smali.main.fixInstructions(main.java:255)
at org.jf.smali.main.main(main.java:203)
Packing
Cleaning up
Done.
Cleaning up
Do I have to worry? I am going to try it again when it all completes, just want to make sure I am not missing anything
|OP|
it does not support already deodexed rom's!!! (why should it?)
Click to expand...
Click to collapse
what if you wanted to deodex a single new app? just redo the whole thing?
Trusselo said:
what if you wanted to deodex a single new app? just redo the whole thing?
Click to expand...
Click to collapse
To deodex a single app, you need to keep the deodexed framework files around. Then you can just do that app by pulling the code bits out of the framework.
Sent from my SAMSUNG-SGH-I897 using XDA App
Trusselo said:
what if you wanted to deodex a single new app? just redo the whole thing?
Click to expand...
Click to collapse
baksmali/smali + about 6 or 7 framework jars + cmd prompt = win!
How can I verify that the Deodex worked? I ran the script a couple times last night just to see what happens and then dropped the files in on my phone. Everything is working fine, just wanted to know how I can verify its deodexed.
nakedninja42 said:
How can I verify that the Deodex worked? I ran the script a couple times last night just to see what happens and then dropped the files in on my phone. Everything is working fine, just wanted to know how I can verify its deodexed.
Click to expand...
Click to collapse
do you see any .odex files named the same as your apks?
nakedninja42 said:
How can I verify that the Deodex worked? I ran the script a couple times last night just to see what happens and then dropped the files in on my phone. Everything is working fine, just wanted to know how I can verify its deodexed.
Click to expand...
Click to collapse
if you don't see errors like the one quoted bellow, then you should be fine.
nakedninja42 said:
I keep seeing this while the script is running
Compiling classes.dex from rom/system/framework/framework-tests
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.raiseBoundsError(libgcj.so.11)
at java.util.ArrayList.checkBoundExclusive(libgcj.so.11)
at java.util.ArrayList.get(libgcj.so.11)
at org.jf.dexlib.DexFile$2.placeAt(DexFile.java:783)
at org.jf.dexlib.DexFile.place(DexFile.java:659)
at org.jf.smali.main.fixInstructions(main.java:255)
at org.jf.smali.main.main(main.java:203)
Packing
Cleaning up
Done.
Cleaning up
Do I have to worry? I am going to try it again when it all completes, just want to make sure I am not missing anything
Click to expand...
Click to collapse
actually this is an error, it means it failed to deodex this file
please provide more information, the reason can be many things:
java version
base rom
did you provide the full rom or only the file you mentioned?
provide more information and ill see what can be done.
ih4ckback said:
This is great. Works on the new KB1.
Click to expand...
Click to collapse
awesome.
marcelo.waisman said:
if you don't see errors like the one quoted bellow, then you should be fine.
actually this is an error, it means it failed to deodex this file
please provide more information, the reason can be many things:
java version
base rom
did you provide the full rom or only the file you mentioned?
provide more information and ill see what can be done.
awesome.
Click to expand...
Click to collapse
I am use the same KB1 that hit the forums yesterday that i4ackback stated that works for him. I installed Ubuntu 10.10 and installed Java from the software manager, not sure if its the right one. I started copying the full system folder but ended up only extracting just app and framework just like the OP states. That message appears throughout the process but I end up with everything in the deodexed folder.
Sent from my SAMSUNG-SGH-I897 using XDA App

[DEV] Compiling ICS for Cooper

Hello all,
due to the fact, that there are already activities to compile ICS for a lot of other devices, i have taken the liberty to open a thread for all Dev's and those who are interested in getting ICS to work on cooper. Hope that this is ok...
Meanwhile i could 'partly' compile ICS by using koljas configuration files. But i have to say, that i removed some libraries for compilation because i couldn't find solutions to successfully compile them. First 'goal' should be to have an image which boots. So we have a start. Compilation; without the 'error' libraries; completely succeeded here now. But creation of a first otapackage failed. This is my actual response of 'make otapackage'. I alreday tried to google this problem, but couldn't find a solution..
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.1
TARGET_PRODUCT=cooper
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv5te-vfp
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=ITL41D
============================================
build/core/main.mk:324: implicitly installing apns-conf_sdk.xml
No private recovery resources for TARGET_DEVICE cooper
Package OTA: out/target/product/cooper/cooper-ota-eng.lagloose.zip
unzipping target target-files...
running: unzip -o -q out/target/product/cooper/obj/PACKAGING/target_files_intermediates/cooper-target_files-eng.lagloose.zip -d /tmp/targetfiles-8iaaXh
Traceback (most recent call last):
File "./build/tools/releasetools/ota_from_target_files", line 839, in <module>
main(sys.argv[1:])
File "./build/tools/releasetools/ota_from_target_files", line 791, in main
OPTIONS.info_dict = common.LoadInfoDict(input_zip)
File "/home/lagloose/WORKING_DIRECTORY/build/tools/releasetools/common.py", line 144, in LoadInfoDict
d["fstab"] = LoadRecoveryFSTab(zip)
File "/home/lagloose/WORKING_DIRECTORY/build/tools/releasetools/common.py", line 163, in LoadRecoveryFSTab
raise ValueError("malformed recovery.fstab line: \"%s\"" % (line,))
ValueError: malformed recovery.fstab line: "/boot bml boot NULL NULL NULL NULL"
make: *** [out/target/product/cooper/cooper-ota-eng.lagloose.zip] Fehler 1
Any ideas ?
thx, lagloose
Hi! I think that at the moment trying to make aosp from android 4 source waste of time! More wisely to try to build android 4 from sorce code with the changes cyanogenmod9)
I changed a few config files for cm9.
And build a lot of libs to lipng and dalvic
Can you help me with config files?
P.S. add armv6-vfp.mk from gingerbread to android_build/core/combo/arch/arm
P.P.S. configs will be on my github's account tomorrow
Axel2033 said:
Hi! I think that at the moment trying to make aosp from android 4 source waste of time! More wisely to try to build android 4 from sorce code with the changes cyanogenmod9)
I changed a few config files for cm9.
And build a lot of libs to lipng and dalvic
Can you help me with config files?
P.S. add armv6-vfp.mk from gingerbread to android_build/core/combo/arch/arm
P.P.S. configs will be on my github's account tomorrow
Click to expand...
Click to collapse
Sounds good...
leave a message here when you're files are at github...
Did you install all the required packages ?
Sent from my GT-S5830 using XDA App
EmoBoiix3 said:
Did you install all the required packages ?
Sent from my GT-S5830 using XDA App
Click to expand...
Click to collapse
Yep. I think it is a more a problem with the config files. Anyway, i will follow Axels idea, and give a try to the Cyanogen Sources ...
Sent from my GT-S5830 using Tapatalk
lagloose said:
Yep. I think it is a more a problem with the config files. Anyway, i will follow Axels idea, and give a try to the Cyanogen Sources ...
Sent from my GT-S5830 using Tapatalk
Click to expand...
Click to collapse
To think the AOSP sync is such an ass .
Sent from my GT-S5830 using XDA App
I dont know much about python, but looking at the stacktrace the problem is in main(sys.argv[1:]), of course you know that, mind checking that line "File "./build/tools/releasetools/ota_from_target_files", line 839"
When you set this line TARGET_PRODUCT=cooper, does it try to config the files for it? Just trying to help here.
traduz said:
I dont know much about python, but looking at the stacktrace the problem is in main(sys.argv[1:]), of course you know that, mind checking that line "File "./build/tools/releasetools/ota_from_target_files", line 839"
When you set this line TARGET_PRODUCT=cooper, does it try to config the files for it? Just trying to help here.
Click to expand...
Click to collapse
Thanx for reply....
i already found the problem. The file 'recovery.fstab' was malformed...
Generally it seems to me, that Kolja took the Config from ZTE Blade and changed only the most important things. But as i alreday said, i'll stop now on AOSP and try the Canogenmod Sources. They are almost updated hourly at the moment.
PS: It would be nice, if all people who tried to compile ICS for our device could give a short information on how far they already got...
Greetz, lagloose
Hi.
First of all i would not consider myself noob and i would like to help out, but right now i have no idea where to start. any pointers or howtos to get started? would love to see ICS on ace
What stage of the development are u guys at and what problems are u currently facing?
lagloose said:
Thanx for reply....
i already found the problem. The file 'recovery.fstab' was malformed...
Generally it seems to me, that Kolja took the Config from ZTE Blade and changed only the most important things. But as i alreday said, i'll stop now on AOSP and try the Canogenmod Sources. They are almost updated hourly at the moment.
PS: It would be nice, if all people who tried to compile ICS for our device could give a short information on how far they already got...
Greetz, lagloose
Click to expand...
Click to collapse
You can use my android_device_samsung_cooper
http://github.com/EmoBoiix3/android_device_samsung_cooper
Sent from my GT-S5830 using XDA App
I'm sorry I was very busy(
Today will be config on git)
making a fork... if you have a site to make documentation should be great!
https://github.com/axel2033/device_cooper_cm9
Thanks for sharing... I'm busy this Weekend. So can't do anything before Monday....
Sent from my GT-S5830 using Tapatalk
Updated coolya kernel https://github.com/teamhacksung/android_kernel_samsung_msm/tree/merge
Good luck for the dev's.I will help for testing , debugging and bug reporting.
Axel2033 said:
https://github.com/axel2033/device_cooper_cm9
Click to expand...
Click to collapse
Great, now we have 3 devs working for it
Great to see work in progress, stares at github with confused look
Sent from my GT-S5830 using xda premium
Guys, please stop posting here except you are a developer or know how to help ...
Sent from my GT-S5830 using XDA App

[HOW-TO] Remove the FPS limit on stock-ROMs

Huawei decided to put a FPS limit on its stock-ROMs, and this limit makes a stock-rom jerky and unsuitable for gaming.
I have looked for a script that was able to remove this FPS limit but the only one i found was not working correctly.
Then i found a really useful script that disables the VSYNC (enabled by default in the kernel).
I have tested this script on my u8800pro (stock 2.3.5 + root + CWM recovery + kernel .35 by genokolar) and it works really well. The rom now is really smoot, like CM7, and fast.
I haven't noticed any lag.
This is how to remove the FPS limit:
download this file http://sourceforge.net/projects/matteof93.u/files/69uncapfps/download
put it in your sdcard
download the app "script manager" from the market
open the script with script manager (remember to select run as root and run at boot)
after running the script for the 1st time, reboot the phone
To check if the script works, use an app like Neocore (i get 55FPS).
This script should work with both u8800 and u8800pro. I don't know if it works with the stock kernel.
First you say it doesn't remove the limit but disables the vsync, then later you say how to remove the FPS limit and the topic also states that.
What's it gonna be?
Ok, the script simply edits a system file to disable the vsync...
Code:
#!/system/bin/sh
#zdzihu: uncap fps
mount -t debugfs debugfs /sys/kernel/debug
echo '0' > /sys/kernel/debug/msm_fb/0/vsync_enable
umount /sys/kernel/debug
Nice move, but it's not cool to just tell people to run some script from "megaupload" or whatever...
VuDuCuRSe said:
First you say it doesn't remove the limit but disables the vsync, then later you say how to remove the FPS limit and the topic also states that.
What's it gonna be?
Click to expand...
Click to collapse
it removes the FPS limit disabling the vsync. it's ok now?
Can confirm it works.
Tested using Droid2DTest and LagTest.
comfim it works
Thank you very much
I have u8800 and got 55,1fps with this script
Druida69 said:
I have u8800 and got 55,1fps with this script
Click to expand...
Click to collapse
this is my same score
This works on stock GB kernel. The screen is super smooth, thanks a lot!
It works well on 2.3.5 with OC Kernel from Genokolar.
doesn't work
EDIT: it works but my phone recognizes my finger every 5 pixel
Sent from my U8800 using xda premium
alex1301 said:
doesn't work
EDIT: it works but my phone recognizes my finger every 5 pixel
Sent from my U8800 using xda premium
Click to expand...
Click to collapse
which kernel do you use?
genos
Sent from my U8800 using xda premium
excelent
Works great on u8800-51 (entelpcs chile) with stock rom 2.2.2
Thank you very much sir.
alex1301 said:
genos
Sent from my U8800 using xda premium
Click to expand...
Click to collapse
are you using the u8800 or the u8800pro? 2.2.2 or 2.3.5?
the normal one with 2.3
Sent from my U8800 using xda premium
Thank you.
I wanted to do this.
Working great here on MIUI!
thanks.
afigienas said:
hate when need to post 10 post to be able to post something in developers section! stupid rule.. now i have to spam just to be able to post one answer there.
Click to expand...
Click to collapse
do spam and will get sanction for sure
2.6 All members are expected to read and adhere to the XDA rules.
Click to expand...
Click to collapse
doesn't have anyone a solution? i've also started a thread.

[GUIDE] How to Compile Your Own CM11/CM12/AOSP Kernel

Hi guys, long time no post. I have updated this guide on how to build kernels for Falcon so that anyone can learn! It's pretty simple once you get the hang of it. So yeah, here we go!
Prerequisites:
- You must have a Linux firmware running on your computer (I suggest Builduntu because you can skip the next one [build environment setup])
- Build environment setup (Put the this in terminal and follow instructions)
- Patience and a heart willing to learn
- You need to know the languages C, C++, Java, Ruby, Python... NOT! You don't need to know ANY coding languages.
[MOTIVATIONAL SPEECH]
Truth be told, when I first started out developing, I knew NO coding languages except for HTML and a little bit of Java. Both have nothing to do with kernels! I actually learned how to do this when I suffered from a concussion. So if you really want to learn how to kernel dev and you give up halfway, just know that a 14/15 year old kid could do it..
[/MOTIVATIONAL SPEECH]
Click to expand...
Click to collapse
WARNING: I am not responsible for any damages to your phone or computer or pet unicorn. When you modify the wrong partitions, set too many jobs for your compiler, break your keyboard out of frustration etc., that is not anyone's fault but yours. Or your pet unicorn.
Your Personal Handbook to the Following:
- Anything inside "CODE" boxes, type it into your terminal. If you can't find terminal, then press CTRL, ALT, t.
- If I were you, I would write these by hand instead of copying and pasting it because after a certain amount of times, you will remember the linux commands and it will be easier for you to compile more kernels for different devices
- Use this thread as a "Help Me" button. Ask for help!
Click to expand...
Click to collapse
A New Beginning:
Let's start out with something simple, getting the actual code:
Code:
git clone https://github.com/cyanogenmod/android_kernel_motorola_msm8226
This could range from 3 minutes to 2 hours!
Once that's done, open up your file manager and rename the folder (should be android_kernel_motorola_msm8226) to whatever you want. I will refer it as "mykernel".
Click to expand...
Click to collapse
Pokemon!
For this tutorial, we will be using a Sabermod 4.7 toolchain to compile. I WOULD teach you how to compile with 4.8+, but it creates errors that will take even longer for me to write about sooooooooo :fingers-crossed:. Now to get the toolchain:
Code:
git clone https://github.com/SaberMod/android_prebuilts_gcc_linux-x86_arm_sabermod-arm-eabi-4.7
Rename this to whatever you like, but I will be referring this as "toolchain"
Now go into you folder where the kernel source is stored...
Code:
cd mykernel
Click to expand...
Click to collapse
You're Almost There!:
Time to set-up the compiler!
Code:
export CROSS_COMPILE=/home/(insert linux home name here)/toolchain/bin/arm-eabi-
This tells the toolchain that "OK, we want to make ALL this code here into a kernel".
This next line tells it that your defconfig (the toolchain's manual for compiling the kernel) that it's in the arch/arm/configs folder.
Code:
export ARCH=arm
Now to tell the it what the defconfig is!
Code:
make falcon_defconfig
Hehe, now to the hardest part of all...
MuHAHHAHAHa
Click to expand...
Click to collapse
THE HARD (coding) PART
You ready for this? HERE IT IS! TIME TO BUILD THE KERNEL!
Code:
make -j4
Now sit back, relax, and watch the code! Or you could read a book, watch ****, count your fingers, play with your toes...
If you have an error during the waterfall of code, find the part where it actually says *error* (you'll probably have to scroll upwards) and search it on Google or post it here.
Click to expand...
Click to collapse
THE BEST PART
If you manage to get something that says "the kernel zImage is ready" or something like that, that means you've made it!
You have officially compiled your own kernel from source! Now you need to put it in a flashable zip.
Download this file and open it up, but DON'T EXTRACT IT.
Now go to your kernel source then "CTRL + F" and search for "zimage-dtb".
Find it and put it in the "kernel" folder of "FalconKernel - Signed.zip". Then "CTRL + F" and search ".ko".
Copy radio-iris-transport.ko and put it in the system/lib/modules (not pronto) of the zip.
Then find wlan.ko and rename it to pronto_wlan.ko. Copy and paste it in system/lib/modules/pronto of the zip.
Click to expand...
Click to collapse
Now you can put it on your phone and flash it! ​
I will update this in a bit. What feature would you guys want in your kernel? The most votes in the POLL above will be the one I teach you here!
Here I will walk you through on how to add the intelliplug feature made by @faux123
First, fetch my Green Machine kernel source (go into your kernel folder in terminal):
Code:
git fetch https://github.com/YoshiShaPow/green_machine_falcon
Then you could cherry-pick (basically copy) all my cherry picks for intelliplug from my source.
If you do check my source out, you can see there's a little link to a history of commits near the middle of the screen, right above the files/folders. You can see at this page of my features history, you'll see a bunch of commits for intelliplug. I will use those commits and copy it to your own kernel.
This copies the initial coding/first commit of intelliplug!
Code:
git cherry-pick 01a850f
This cherry-picks the remaining commits so that your newly added intelliplug is updated.
Code:
git cherry-pick 6623f2f^..4e1ece7
One more thing though, you need to add the line to compile intelliplug!
Almost all things compiled along with the zImage are in a file called defconfig. What a defconfig does, is tell your machine to build certain modules, kernel objects, drivers, governors, etc.etc.etc.. Now, all of them are found in the folder
arch/arm/configs
Click to expand...
Click to collapse
As stated in the OP, you have to modify the defconfig you use. (CM11 Kernel is falcon_defconfig, Gummy Kernel is msm8226_mmi_defconfig). Open up the corresponding defconfig and add this to ANY line anywhere.
Code:
CONFIG_INTELLI_PLUG=m
Now, for those who are familiar with "y=yes/n=no/m=maybe", you'll see that I specifically told you to put the "m=maybe" one. That's because when you compile the kernel again, right after you're about to start your build. Since you put that "m", the terminal will prompt you with a "y=yes/n=no" question on whether or not you would like to add the following feature. Since you would like to add the feature, put in "y". Later on when you feel more comfortable with adding features to your kernel, you can go back into the defconfig and put it as
Code:
CONFIG_INTELLI_PLUG=y
So that it will compile it without asking, since you have given it an answer.
Now you have officially compiled a "Custom Kernel" and with the knowledge you know, you could create a feature packed one by just kanging (copying one's work/features).
Always remember to
Code:
make clean && make mrproper
after every build to prevent errors and such!
Click to expand...
Click to collapse
I will use this to teach you how to make your own Bash Building scripts (and save time) to make it easier for your development life to flourish... eventually....
Any guide on adding governors or hotplug driver??
Sent from my Moto G using XDA Free mobile app
Best guide but how to add features likes s2w,dt2w etc
Flashhhh said:
Any guide on adding governors or hotplug driver??
Sent from my Moto G using XDA Free mobile app
Click to expand...
Click to collapse
Vote in the poll above! I will make a guide for one or more of the top chosen picks!
Brawn_Sg said:
Best guide but how to add features likes s2w,dt2w etc
Click to expand...
Click to collapse
DT2W and S2W are more complex. They require a few other things (ex. Powersuspend). I'll wait a bit and see what feedback I get before moving forward to something a bit more complex like DT2W, or GPU Overclock.
Can i use make menuconfig?
Krizthian said:
Can i use make menuconfig?
Click to expand...
Click to collapse
Yes you can. Normally when using "make menuconfig", you use the command after making the kernel's defconfig (falcon_defconfig).
Build using Docker
If you're on Linux, take a look at this approach which uses Docker for building CyanogenMod 12.0:
http://forum.xda-developers.com/showthread.php?t=2650345
(Disclaimer: It's written by me)
YoshiShaPow said:
Hi guys, long time no post. I have updated this guide on how to build kernels for Falcon so that anyone can learn! It's pretty simple once you get the hang of it. So yeah, here we go!
WARNING: I am not responsible for any damages to your phone or computer or pet unicorn. When you modify the wrong partitions, set too many jobs for your compiler, break your keyboard out of frustration etc., that is not anyone's fault but yours. Or your pet unicorn.
Now you can put it on your phone and flash it! ​
Click to expand...
Click to collapse
when i was trying to flash cm12 rom in cwm recovery it says error in zip and getting status 1 error , installation aborted ,
pls help im using moto g gpe and when trying to flash from twrp it says error executing updater binary in zip ,
no idea what to do pls help me out
karthik432 said:
when i was trying to flash cm12 rom in cwm recovery it says error in zip and getting status 1 error , installation aborted ,
pls help im using moto g gpe and when trying to flash from twrp it says error executing updater binary in zip ,
no idea what to do pls help me out
Click to expand...
Click to collapse
When you downloaded the anykernel zip, you aren't supposed to extract it. The best way to put the kernel in the zip is to just drag and drop it while IN LINUX. It will not work for windows! Or you could try signing the zip in TWRP (I think there's an option for that somewhere).
YoshiShaPow said:
When you downloaded the anykernel zip, you aren't supposed to extract it. The best way to put the kernel in the zip is to just drag and drop it while IN LINUX. It will not work for windows! Or you could try signing the zip in TWRP (I think there's an option for that somewhere).
Click to expand...
Click to collapse
im not extracting anything , i just downloaded the official cm12 nightly and flashed but didn't workout ,any ideas
karthik432 said:
im not extracting anything , i just downloaded the official cm12 nightly and flashed but didn't workout ,any ideas
Click to expand...
Click to collapse
That has nothing to do with this thread :silly:. You probably have to sign the zip again.
@YoshiShaPow.... i need some help
i compile a kernel for my device and it booted fine but no display....
can you help me in this....
sorry for posting here..my device is Redmi 1s
Luffy.d said:
@YoshiShaPow.... i need some help
i compile a kernel for my device and it booted fine but no display....
can you help me in this....
sorry for posting here..my device is Redmi 1s
Click to expand...
Click to collapse
No problem, I welcome anyone with kernel development questions here! When booted, what do you mean? And if there's no display, how do you know it booted? Also, did you use my anykernel zip? I may be wrong but I don't think it is compatible with all phones.
YoshiShaPow said:
No problem, I welcome anyone with kernel development questions here! When booted, what do you mean? And if there's no display, how do you know it booted? Also, did you use my anykernel zip? I may be wrong but I don't think it is compatible with all phones.
Click to expand...
Click to collapse
yeah it booted bro....i can hear lock unlock sound and even i can hear incoming call ring
i was trying to fix this from a week and found out it not kernel it rom problem ...
my device is build using prebuilt kernel so any compile kernel wont work...but now they are build with this kernel source so compile kernel work
thanks bro...
and one thing bro... i m new to kernel development so how can i optimize kernel
i know about and can add governors and use custom toolchain but i don't know about o2 or o3 optimization etc and all
sorry if i m being too much
great I start today
Luffy.d said:
yeah it booted bro....i can hear lock unlock sound and even i can hear incoming call ring
i was trying to fix this from a week and found out it not kernel it rom problem ...
my device is build using prebuilt kernel so any compile kernel wont work...but now they are build with this kernel source so compile kernel work
thanks bro...
and one thing bro... i m new to kernel development so how can i optimize kernel
i know about and can add governors and use custom toolchain but i don't know about o2 or o3 optimization etc and all
sorry if i m being too much
Click to expand...
Click to collapse
Those changes are a bit more advanced because it will bring build errors. The kernel is already preoptimized with o2 changes. The errors are fixable though. I don't think I'll be able to add an explanation for those in this thread, maybe through pm?
YoshiShaPow said:
Those changes are a bit more advanced because it will bring build errors. The kernel is already preoptimized with o2 changes. The errors are fixable though. I don't think I'll be able to add an explanation for those in this thread, maybe through pm?
Click to expand...
Click to collapse
thanks bro...will pm you when i finish setuping my git
etvtaglios said:
great I start today
Click to expand...
Click to collapse
Go for it bro!!

Categories

Resources