Jump to content


* * * * * 17 votes

Leankernel: Minimalistic Kernel (3.7.0, 5/20/12)


  • Please log in to reply

#1 imoseyon (OP)

imoseyon

    Developer

  • 1,244 posts

Posted 26 December 2011 - 09:35 AM


View Source
Mod Type: KernelDifficulty: Very EasyMod Status: StableMod Base: Carrier:
Requires Root: YesApply In: CWM RecoveryOptional: Optional: Android Version:

This is a minimalistic Galaxy Nexus kernel. My philosophy is to keep the kernel as lean and stable as possible, at the same time to keep the kernel as modern and close to latest mainstream linux as possible. You will see that my kernels will lack a lot of the bells and whistles from other kernels.

Download If you lost su/root on Axiom read here: http://rootzwiki.com...100#entry597694.
Feature requests? Post it here: http://www.imoseyon....l-features.html

Three Builds
  • 1) stable
  • 2) experimental 180mhz: 180mhz to 1.65ghz
  • 3) experimental 230mhz: 230mhz to 1.65ghz
  • Note experimental builds will have the following features in addition to the extra freq slots: notrim + vibe control + SIO scheduler default + tcp_veno default + hotplugx optimization for high freqs.
FEATURES
  • Patched to latest in Linux 3.0.x branch: 3.0.31.
  • All unnecessary kernel components removed to make kernel lean and fast!
  • OC to 1.35Ghz (stable, 1.65ghz for exp). Boot speed is maxed at 1.2ghz within kernel (in addition to ramdisk) for stability.
  • User voltage control (Michael Huang, fixed and enhanced by me).
  • InteractiveX V2 (screen-off hotplug of cpu1) added. Select it using setcpu if you want to use it.
  • Ramdisk tweaks (sysctl, vm, filesystem speed, etc.)
  • SWAP & zram (next generation compcache) support. Run "zram enable" in terminal.
  • init.d support in ramdisk.
  • HotplugX governor (Hotplug optimized and modified for screen-off suspend).
  • cpufreq backport from Linux 3.4rc
  • rcu code backport from Linux 3.3
  • wakelock tweaks for wlan and lte modem
  • other linux 3.2/3.3 backports: dm, futex, voltage regulator, memory compaction, etc.
  • Undervolted by default (1.35ghz/1325, 1.2ghz/1300, 920mhz/1250, 700mhz/1150, 350mhz/950)
  • lkflash - script to flash latest versions of leanKernel from Terminal (type "su" without quotes, hit enter, then type "lkflash" without quotes and then hit enter)
  • checkv - voltage checking script (for custom undervolting) - detailed at bottom of this post.
  • checkt - script that displays 1) your current temp, 2) # of times you were throttled due to temp "recently", 3) CPU trim type, and 4) CPU silicon type. (sample output)
  • Fast USB charge (by chad0982) and "ffc" toggle script by me. (Open terminal, and type "ffc" without quotes then enter)
  • ColorControl from both CM9 and Ezekeel (compatible with all ROMs). Helpful posts: 1and 2.
  • TempControl - sysfs interface to control the CPU temp threshold. Read these two posts: 1 and 2.
  • Variable GPU OC - sysfs interface to select GPU max speed between 307MHz (stock), 384MHz and 512Mhz. The changes take effect immediately. Check FAQ for more info and how to use it.
  • Custom SR Tuning - override kernel default minimum voltage for SR calibration. More info here and here.
  • SoundControl
  • Gamma Control
CHANGELOG
(* next to version indicates versions that were general regarded as rock stable)
  • v1.0.0 - Initial release
  • v1.0.1 - Fixed power off charging (only upgrade if you care about that).
  • v1.1.0 - rcu code updated to linux 3.2-rc7, boot speed max forced to 1.2ghz within kernel (stability), hotplug governor should be more stable now, zram enabled including custom enable script (run "zram enable" in terminal), small bug fixed in voltage control code.
  • v1.2.0 - interactiveX V2 with hotplug support, user undervolting works now, and all speeds undervolted by default (clear setcpu settings before flashing), ALSA SoC driver updated to 3.2-rc7
  • v1.2.1 - reverted a dep voltage change I made in 1.2.0. Only update if you're experiencing stability issues in 1.2.0 (if your coming directly from a version prior to 1.2.0 make sure you clear custom voltage settings)
  • v1.3.0 - re-wrote a lot of my user undervolting code (fixed some bugs and probably introduced others - haha), updated dm and futex code to linux 3.2, gpu undervolt at top speed, some code cleanup. (clear setcpu settings before flashing). Oh one more thing: undervolting 1.35ghz and higher is not reliable yet and is not recommended.
  • v1.4.0 - updated to Linux 3.0.15 (small release), voltage regulator driver from Linux 3.2, omap clock data updated from latest official omap source.
  • *v1.5.0 - updated to Linux 3.0.16 (big update), more accurate/reliable user voltage control for frequencies less than 1.35ghz.
  • v1.6.0 - read this post.
  • v1.6.1 - *battery drain - being fixed*, updated to Linux 3.0.17, fixed potential memleak in slub allocator, small omap4 update from android-omap source.
  • v1.6.4 (pulled - stay tuned) - moved some of the features off of 1.6.1 (but kept them in experimental) in order to fix/pinpoint potential source of battery drain possibly introduced in 1.6.1. You do not need to upgrade from 1.6.1 if it's working fine for you. Cpufreq updated to Linux 3.3.
  • v1.6.6 (bd0730ad3f57e050942356b647821256) - Fixed pm_suspend bug introduced by the Linux 3.0.17 patch *this fixes battery drain issue in 1.6.1 and 1.6.4*. Where's 1.6.5?
  • v1.7.0 (a7f3d241d68fd48c9f216e8399226e9d) - a bunch of fixes and updates from android-omap source including the hotplug fix, deadline scheduler updated to linux 3.2.
  • v1.7.1 (c2d0d4c59c198bb3f2281f164442ac0f) - removed some omap patches from 1.7.0 that may have been causing issues.
  • v1.7.3 (049a8ce4be0f0a392d6c0b694de1ad73) - went back to 3.0.16 base as I suspect there were more things in 3.0.17 causing subtle issues in releases newer than 1.5.0. Added a fix to reduce screen unlock lag in interactiveX. Brought back some of the OMAP patches from upstream android-omap source.
  • *v1.7.4 (3619144bee4cd86883692b48971ee5f8) - applied the rest of OMAP patches from android-omap source. Partially updated to 3.0.17. Wireless ADB support (if ROM has built-in support for it).
  • *v1.8.0 (7ddb6ac13d01ceaeed25b83ab13afb8c) - Updated to Linux 3.0.18 (big update - lots of fixes/changes). An omap driver fix. A fix for stalling RCU processing. Ramdisk changes for CM9 (or CM9 based ROMs) compatibility. This version should theoretically be smoother than the previous versions.
  • v1.9.0 (f703a8912d4dd19f82cc4bf17f37f1cd) - detailed log here.
  • *v1.10.0 (e9f2c4f2b458ddddeebfba842bb51756) - updated to Linux 3.0.20, completely modernized memory management compaction/migration code to Linux 3.3-rc3 (which also includes backporting much of the mm code)
  • v2.0.0 (a6a518d0a243c071ef6c02445acf2645) - detailed log here.
  • v2.0.1 (d9457f5fd0d9a74bc1c7fe37e1856907) - custom UV related issues (haptic feedback, volume, etc.) fixed. Custom UV code improved.
  • v2.1.0 (3362b0879e8a11681dc3e78eef38e4aa) - detailed log here.
  • v2.2.0(41296a907dd27cbc25593dbbda0e7fe0) - detailed log here.
  • v2.3.0 (c024897dd55ec4789fb998adb957a855) - detailed log here.
  • v2.4.0 (6e528aa35a51fc526939be2d51b4c295) - detailed log here.
  • v2.4.1 (be8d706f851b2700e035b8bd49abe27c) - detailed log here.
  • *v2.5.0 (793c7be3b35ab35beef3fa1797405378) - ColorControl, TempControl, ext4 optimizations
  • v2.6.0 (dc015f7c87ac5282ed1693063bd8a24a) - detailed log here.
  • v2.7.0 (a0a1b5c5de6ae103ce1cbf852fb8990d) - detailed log here.
  • v2.7.1 (a87b733e31aa9b7a0c447a76f2b5c708) - ColorControl modified to support CM9/AOKP interface as well. (no need to upgrade from 2.7.0 if you don't use colorcontrol)
  • v2.7.2 (e4d355c0e54ac5c3cbf5b9123e12eb9f) - ramdisk modified for better cm9/aokp compatibility, and better init.d support. Also includes "board" script for detailed board/soc info.
  • *v2.8.0 (5b3b31519133cebe67348b76ae349bc8) - detailed change log here.
  • v3.0.0 (0647d8590403eb4921f7f148216841ae) - Merged AOSP 4.0.4 kernel/ramdisk source.
  • v3.1.0 (7064aec889d9ce92d380090d7ed0b3aa) - changelog
  • v3.2.0 (8c41c4de4b0a62cdeee89686405401a5) - changelog
  • v3.2.1 (30190db201f6dcabe318e26c0312c1d2) - reverted omap SR patch that prevented undervolting, interactive (and iX) tuned for extra power saving when screen is off.
  • v3.2.2 (1d6df86cb5fe6c1644f16d847abdbe85) - reverted a few patches from 3.2.1 to address a few cases of instability, a small colorcontrol fix, small timed_gpio fix.
  • *v3.3.0 (137955e83ca267b10d2b74dbdf360f99) - changelog
  • v3.4.0 (9b5f99954de4bbbca01e4701fa04037c) - changelog
  • v3.5.0 (06ceb50e1155293f86bf4c1e4469fc89) - changelog
  • *v3.6.0 (3fa30f43a8c0e2439d32b10a0f10f376) - changelog
  • v3.7.0 (b692a195da6eb929ee9149652528bbf9) - changelog
DIRECTIONS
Uh.... flash the zip in clockworkmod.

FAQ

SOURCE
lk-stable

Thanks to forum member maddler for providing file hosting: http://www.host4droid.com/

Third party mods (not tested by me so use at your own risk) Donate to your favorite charity, or donate to me.

Edited by imoseyon, 20 May 2012 - 08:16 AM.


#2 joshnichols189

joshnichols189

    Android Beginner

  • Members
  • 12 posts

Posted 26 December 2011 - 10:11 AM

About to load this up! Loved your work on the Thunderbolt, glad to see you developing here too!

#3 paratox

paratox

    Member

  • Members
  • 31 posts

Posted 26 December 2011 - 10:53 AM

zImage anykernel format update.zip would be nice!

#4 imoseyon (OP)

imoseyon

    Developer

  • 1,244 posts

Posted 26 December 2011 - 01:57 PM

View Postparatox, on 26 December 2011 - 10:53 AM, said:

zImage anykernel format update.zip would be nice!

I modify my ramdisk pretty heavily actually, so one could extract the zImage from my zip file and make an anykernel version out of it but you wouldn't get the true leankernel experience that way.

#5 GchildT

GchildT

    Average Android

  • Members
  • 8 posts

Posted 27 December 2011 - 06:55 AM

What are the benefits of this...

SWAP & zram (next generation compcache) support. Run "zram enable" in terminal.


on the Galaxy Nexus. Why do we need SWAP/compcache. The device has plenty of memory....

#6 imoseyon (OP)

imoseyon

    Developer

  • 1,244 posts

Posted 27 December 2011 - 08:49 AM

View PostGchildT, on 27 December 2011 - 06:55 AM, said:

What are the benefits of this...

SWAP & zram (next generation compcache) support. Run "zram enable" in terminal.


on the Galaxy Nexus. Why do we need SWAP/compcache. The device has plenty of memory....

Good question. I think the jury's still out whether zram is going to help on the gnexus. I don't think it will hurt. Having zram enabled (by running my script) will definitely keep your apps around in memory longer. If that's the desired effect you should give it a try.

#7 imoseyon (OP)

imoseyon

    Developer

  • 1,244 posts

Posted 27 December 2011 - 08:16 PM

Ok here's exp3: http://cl.ly/Ctvi

This version includes interactiveX V2. It's interactive with early_suspend (screen off) support, and when it suspends it hotplugs out cpu1! In other words, it shuts down the cpu entirely. Then when screen is turned on, cpu1 hotplugs back in.

This should be the best of both worlds between interactive and hotplug, if it's stable.

It's experimental so use it at your own risk.

#8 mdeevee

mdeevee

    Android Beginner

  • 62 posts

Posted 28 December 2011 - 11:39 PM

View Postimoseyon, on 27 December 2011 - 08:16 PM, said:

Ok here's exp3: http://cl.ly/Ctvi

This version includes interactiveX V2. It's interactive with early_suspend (screen off) support, and when it suspends it hotplugs out cpu1! In other words, it shuts down the cpu entirely. Then when screen is turned on, cpu1 hotplugs back in.

This should be the best of both worlds between interactive and hotplug, if it's stable.

It's experimental so use it at your own risk.

Pulling the trigger now, will let you know how it goes!
Galaxy Nexus/LTE
AXIOM Patient Zero w/kernel du jour

#9 Troet

Troet

    Average Android

  • Members
  • 7 posts

Posted 30 December 2011 - 12:42 AM

Hi imoseyon. Thank you for your work on this kernel. Just want to give a little feedback.
I'm running exp3 with interactivex, no OC on AOKP maguro Milestone 1 and up to now everything is stable. Sometimes there might be a slight lag when I unlock the phone. Otherwise the phone is very fast.

#10 TheRealBeesley

TheRealBeesley

    Supporting Member

  • 197 posts

Posted 30 December 2011 - 11:38 PM

Hmm.. My phone locked up and wouldnt finish boot. Tried both new kernels in the OP. :_con: Wiped cache/dalvik. Ruh ro.


Now its boot looping. Anyone else?


Wiped again.. maybe my voltages were too low. didnt seem like it before tho. Anyway, all is well :)

Edited by TheRealBeesley, 30 December 2011 - 11:56 PM.

Posted Image