[Kernel][GPL] DecaFuct [2.6.29.6][12/22/2010]

Search This thread

Decad3nce

Retired Forum Mod / Inactive Recognized Developer
Feb 19, 2010
2,086
2,761
Hi guys. As you may have noticed around people have been using an 'uncapped' version of Darch's Kernel source. The Kernel inside of the CM6(including nightlies) is capped at 691 as to allow anyone and everyone the ability to boot.

But what if you're a self-proclaimed speed demon whose hero is capable of high frequencies and enjoys insanely high MFLOPS and crazy high Quadrant scores?!

Well guess what!?
This kernel is for you.


ROMS that use this kernel source
(This is so that you don't just flash over something that you are already running, check with the ROM cook to see how up-to-date they are)


DecaFuct. Stable Kernel. In blue.

DecaFuct Kernel Releases (CFS versions)


[email protected] 12/22/2010 *NEW*
  • Commits: https://github.com/Decad3nce/htc-kernel-heroc/commits/heroc
  • NEW Maintenance update. Reverted VM tweaks.
  • Kanged erasmux frequency table. Fixed stepping and QCT CDMA radio fixup
  • Included 06tweaks script that configures kernel and overwrites the overwrite to scaling_governor in CM6
  • Revised a few low level configurations in the script regarding VM
  • All frequencies(except 480mhz) are on the same PLL (PLL 2).
  • A lot of updates to smartass cpu governor from Erasmux
  • Updates on the lowmemorkiller driver from AOSP
  • Backport smd rpcrouter from 2.6.35 to (hopefully) solve problem with Auto-answer mode - Erasmux
  • Reverted every usleep and msleep integration
  • Fixed i2c errors
  • Set smartass cpu governor as default, and renamed kernel (DecaFuct)
  • Changed sleep mode back to HTCs recommendations
Download [email protected] #589 768mhz
Dropbox Mirror
MD5: 0ea00f5af58c84ff40d94bbd1e10657d
Download [email protected] #589 691mhz
Dropbox Mirror
MD5: a6d60ca7c89255e5e66cd1aba36b0f10

Resources for source:

Credits:
  • s0be!!!
  • Phusson for giving us overclock
  • Toastcfh for being like the most awesome kernel developer ever
  • Darchstar for just about everything
  • Ninpo
  • Eran(erasmux)
  • jaybob413
  • The entire CyanogenMod team for their hard work
  • Koush for AnyKernel update.zip!
  • Zenulator for the AnyKernel update.zip for HeroC
  • Collin_ph for ideas regarding msmsdcc and CFS scheduler help
  • Google and HTC
  • AOSP
  • XDA
  • Specific Kernel Contributors via github

KingKang, this is how you give credit and show your source via GPL and on Github.

I'll add in more explanations to things as time progresses and as I merge in more of my commits that I have locally.

How to install:
Place the downloaded update.zip at the root of your sdcard. Then boot to recovery mode, wipe dalvik, and flash it. Your ramdisk will remain intact and unchanged, but your kernel will be replaced.

You MAY need to wipe dalvik cache if you're having strange problems.​

Please nandroid first, that way you always can go back after you hate me.

Older releases:
Code:
[CENTER][INDENT][COLOR="RED"][SIZE="4"][B]BrainFuct Kernel Releases (BFS versions)[/B][/SIZE][/COLOR][/CENTER]
[SIZE="3"][B]BFS Release 11/18/2010[/B][/SIZE]
[LIST]
[*]Commits: [url]http://github.com/Decad3nce/htc-kernel-heroc-BFS/commits/master[/url]
[*] Completely in-line with the Stable(CFS) branch(See on CFS changelog)
[*] Fixed a lot of bugs in sched_bfs.c rooted in my reverting from .330 -> .318
[*] Reverted mutex adaptive spin update from sched_bfs.c
[*] THERE MAY BE A PROBLEM WITH UI LAG. YOU CAN FIX IT BY CHANGING YOUR rr_interval IN /proc/sys/kernel. 
[*] [CODE] echo "1" > /proc/sys/kernel/rr_interval
[/LIST]
Download [email protected] #16 768mhz
MD5: 2a67808019b4de2b739079964f820f5b
Download [email protected] #16 691mhz
MD5: 289749aa06f064112a52731c0439e2e1

BFS Release 11/07/2010
Download [email protected] #15 768mhz
MD5: 9ee656a01503d1aeea43bb2f5ed4b25f
Download [email protected] #15 691mhz
MD5: 4ac17e572155ecf2f753137b16c38eaa

BFS Release 10/27/2010
Download [email protected] #14 768mhz
MD5: 54ff919b8df88b6baee048b293ac124f
Download [email protected] #14 691mhz
MD5: f1f77a1082453fc435efdc4c256ef27c

BFS Release 10/12/2010
  • Commits: http://github.com/Decad3nce/htc-kernel-heroc-BFS/commits/master
  • Fixed camera->gallery->camera bug(hw3d release). Thanks to erasmux/ninpo for the patch and jaybob413/aosp for testing.
  • Backported .32 lowmemorykiller.c. Much more efficient RAM handling.
  • Set up easy to compile for beginners. (defconfig + script)
  • WIPE DALVIK BEFORE/AFTER FLASHING THIS RELEASE.
Download [email protected] #13 768mhz
MD5: 48eef774c094165c95bd35a857da9634
Download [email protected] #13 691mhz
MD5: eded283732647f941e1eb367cd1c39a4
[/INDENT]

BFS Release 10/03/2010
Download [email protected] #12 768mhz
MD5: 54dfeee2d5daf3c8885f9a5210898821
Download [email protected] #12 691mhz
MD5: 669572be0bacdc025dda355f251b6476

BFS Release 09/28/2010

BFS Release 09/26/2010

BFS Release 09/22/2010
 
Last edited:

Decad3nce

Retired Forum Mod / Inactive Recognized Developer
Feb 19, 2010
2,086
2,761
How to compile!
This guide is written for debian based linux
Retrieved and modified from the CM Wiki which can be found here: http://wiki.cyanogenmod.com/index.php?title=Building_Kernel_from_source

Firs things first, you'll need to install the development support packages for 32bit/64bit via aptitude or other method:

Code:
git-core gnupg sun-java6-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev

Then you'll have to retrieve the repo script, move it to /bin and make it executable:
Code:
mkdir -p ~/bin
curl http://android.git.kernel.org/repo > ~/bin/repo
chmod a+x ~/bin/repo
(You'll have to reboot after this step)

Next up, I'd recommend that you repo sync the CM android repository from http://www.github.com/CyanogenMod/android. This massive repository contains the tools necessary for rolling a kernel. (You can also repo sync the AOSP repo, if you want to build Vanilla Android).
Code:
mkdir -p ~/android/system
cd ~/android/system
repo init -u git://github.com/CyanogenMod/android.git -b froyo
repo sync

Then you'll want to export the cross compiling toolchain:
Code:
export CCOMPILER=${HOME}/android/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-

This first process will take around ~1-2 hours for full completion, grab yourself a sandwich or go make fun of aosp or something.

Next up, you'll want to retrieve the htc-kernel-heroc source from git!

You'll need to create a directory so you can keep track of your active kernels, and then you'll begin to clone the repository:

Code:
mkdir android-kernel
cd android-kernel
git clone git://github.com/Decad3nce/htc-kernel-heroc.git
(this might take a few minutes)

You now have the kernel source on your computer! Now we'll quickly run through the basics.

I set up a script for easy compilation, but you'll have to modify it a bit after you clone the repo.

(while in android-kernel)
Code:
cd htc-kernel-heroc
nano make-kernel.sh

You'll want to change the path to the CCOMPILER, to wherever it is on your PC. If you followed this guide, you'd edit the first 2 lines:
From:
Code:
CCOMPILER=~/android-cm/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-
To:
Code:
CCOMPILER=${HOME}/android/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-

Save, close out and we'll begin compiling!

Simply, if you want to compile the kernel with the defconfig, you'll just run
Code:
./make-kernel.sh DC
(This will write the defconfig to .config)

then just:
Code:
./make-kernel.sh K

This might take a good 10 minutes(depending on your set up) but after it's all set and done, you'll have the zImage located in arch/arm/boot/. So we'll grab that, and either throw it in the AnyKernel update.zip OR you might want to couple it with a ramdisk and create a boot.img.

Regardless, if you want directions on splitting a boot.img, look HERE.

Details!
Technical Details

smartass governor - is based on the concept of the interactive governor.
I have always agreed that in theory the way interactive works - by taking over the idle loop - is very attractive. I have never managed to tweak it so it would behave decently in real life. Smartass is a complete rewrite of the code plus more. I think its a success. Performance is on par with the "old" minmax and I think smartass is a bit more responsive. Battery life is hard to quantify precisely but it does spend much more time at the lower frequencies.
Smartass will also cap the max frequency when sleeping to 352Mhz (or if your min frequency is higher than 352 - why?! - it will cap it to your min frequency). Lets take for example the 528/176 kernel, it will sleep at 352/176. No need for sleep profiles any more!

I'm still only maxed out 691!!!!
That means that SOMETHING(probably the ramdisk) is overwriting the scaling_max_freq.
You can manually change it via:
Code:
echo "768000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

MY GPS DOESN'T WORK!!! AHHHH!!!

First, try this: Here

Relax, chances are you've tweaked your CFS, either with the Battery Tweak or manually

Fix it:
Code:
mount -t debugfs none /sys/kernel/debug
echo "NORMALIZED_SLEEPER" > /sys/kernel/debug/sched_features
echo "NEW_FAIR_SLEEPERS" > /sys/kernel/debug/sched_features

How do I change my cpu governor
First, list all the available scaling governors:
Code:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors

Then, echo the name of the governor to scaling_governor:
Code:
echo "nameofgovernor" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

How do I utilize the Diag Function?

  1. install DmService.apk.
  2. Code:
    echo 11>/dev/qct_diag_enable
    it won't show anything on the screen, but adb should stop working for a second or two.
  3. if you're unable to connect with cdma workshop or qpst, reboot and try step 2 again.
-Thanks Hotaru.

What is msmsdcc_fmax ?

The msmsdcc_fmax is literally "The maximum frequency (in Hz) used by the SD controller"(http://www.androidonhtc.com/wiki/Boot_Options)

Killing the powersave also makes it stick to the fmax setting, without having to 'ramp up' over time.


Got a reboot?
Please grab the last_kmsg from the kernel and upload it so I can see what's causing it
Code:
adb remount
adb pull /proc/last_kmsg last_kmesg.txt

What is the 'Interactive' CPU Governor:

This governor is designed for latency sensitive workloads, UI interaction for
example.

Advantages:
+ significantly more responsive to ramp cpu up when required (UI interaction)
+ more consistent ramping, existing governors do their cpu load sampling in a
workqueue context, the 'interactive' governor does this in a timer context, which
gives more consistent cpu load sampling.
+ higher priority for cpu frequency increase, rt_workqueue is used for scaling
up, giving the remaining tasks the cpu performance benefit, unlike existing
governors which schedule rampup work to occur after your performance starved
tasks have completed.

Existing governors sample cpu load at a particular rate, typically
every X ms. Which can lead to under powering UI threads when the user has
interacted with an idle system until the next sample period happns.

The 'interactive' governor has a different approach. Instead of sampling the cpu
at a specified rate, the governor will scale the cpu frequency up when coming
out of idle. When the cpu comes out of idle, a timer is configured to fire
within 1-2 ticks. If the cpu is 100% busy from exiting idle to when the timer
fires then we assume the cpu is underpowered and ramp to MAX speed.

If the cpu was not 100% busy, then the governor evaluates the cpu load over the
last 'min_sample_rate' (default 50000 uS) to determine the cpu speed to ramp down
to.

There is only one tuneable for this governor:
/sys/devices/system/cpu/cpufreq/interactive/min_sample_rate:
The minimum ammount of time to spend at the current frequency before
ramping down. This is to ensure that the governor has seen enough
historic cpu load data to determine the appropriate workload.
Default is 5000 uS.

Signed-off-by: Mike Chan <[email protected]>
Change-Id: I686d2f57b0ed9cbb73217403b7438be5719588d2​

I WANT 490+ on Quadrant Scores!!!!
I don't recommend doing this at all, but if you feel the need to show off:
1. Flash the BFS kernel up top
2. Run this in shell
Code:
adb remount
adb shell
echo "0" > /proc/sys/vm/overcommit_memory
echo "5000" > /proc/sys/kernel/rr_interval
echo "90" > /proc/sys/kernel/iso_cpu
echo "cfq" > /sys/block/mtdblock3/queue/scheduler
echo "10" > /proc/sys/vm/vfs_cache_pressure
3. Overclock yourself to max 768 with oc widget
4. Run Quadrant until you feel that your ego is stroked enough.
5. ????????
6. Profit.






Personal Modded collin_ph BatteryTweak V2
Changes

Download BatteryTweak-DecaMODv2.2
  • MD5: 9c677f0a618e14421053a6ab5b7d4bc3
  • Last Update: 10/24/2010 7:18 CST

Recommended Settings for Tweak:
For BFS Kernel:
  • CPU Governor: Ondemand
  • I/O Scheduler: deadline/cfq
For CFS Kernel:
  • CPU Governor: Interactive
  • I/O Scheduler: deadline/noop
 
Last edited:

pzvv

Senior Member
Jul 27, 2010
182
11
Nice! So this will help speed, stability and battery life. I'm on it.

Sent fopm my Froyo Hero using xda app. Me:1 Sprint: 0
 

Decad3nce

Retired Forum Mod / Inactive Recognized Developer
Feb 19, 2010
2,086
2,761
I'm using the collin batery twrak..xan I atill use this?

Sent from my HERO200 using XDA App

Yep, I've been using Beta7 myself, everything works fine. I might make a tweaked Beta10 with the updated fixes that has presets fro 710 and 768 sometime this week.
 

davec1234

Senior Member
May 22, 2010
1,163
209
My phone doesn't run well @ 768 so I reinstalled setcpu and took it down to 710. Is this ok to do?
I ran linpack at both settings and I barely get over 3, on DD2.7 I was getting around 5. I did notice linpack has been updated since I ran it on DD, maybe that's the difference?
Quadrant is steady @ about 400.
 

Decad3nce

Retired Forum Mod / Inactive Recognized Developer
Feb 19, 2010
2,086
2,761
I put up a GPS friendlier kernel for people who might be having problems with GPS stability.

See post #1 for download, post #2 for explanations
 

stricklerjosh

Senior Member
Mar 4, 2010
2,578
96
High Point
before I flashed CM6-RC1 I was running a rom with a kernel to 710...my phone ran great. Should I DL this kernel and use overclock or setcpu and put it up to 710? any suggestions on settings? I never really use setcpu or overclock before.
Thanks in advance.
 

stinky634

Senior Member
Jan 20, 2010
146
14
before I flashed CM6-RC1 I was running a rom with a kernel to 710...my phone ran great. Should I DL this kernel and use overclock or setcpu and put it up to 710? any suggestions on settings? I never really use setcpu or overclock before.
Thanks in advance.

Doesnt appear so, but you have 2 easy options. Either nandroid before so you can flash back. Or just flash the ROM again and it will replace the kernel.
 

Top Liked Posts