[Hero, G2 Touch Android Development] erasmux:
FlyKernel is an overclockable kernel for the Hero GSM, aimed to improve stability, battery life and performance (generally in that order).

The Hero GSM now also has a newer .35 kernel "Las Venturas" you should also check that one out. At the time of writing these lines, the newest version of Las Venturax is found on the second post of the above thread (my post ;)) - you should check which post is more up-to-date on that thread.

Download and instructions are on this post.

FAQ and advanced subjects are on the second post.

Change log and previous versions are on the third post.

WARNING: Please make sure to have an up-to-date backup before you flash this kernel!

FlyKernel-13 (#253)

FlyKernel 13 - Desean

FlyKernel 13 - Mediafire

FlyKernel 13 - Multiupload

This is a post-LasVenturas update for FlyKernel, after quite some time without any updates.

Although I currently have a bit of a personal preference for Las Venturas, I believe that it is even better to have two excellent kernels for the hero (internally totally different :D), so that the users can choose whichever works best for them. Possibly, on some of the older ROMs this kernel might work better. This should also help isolate kernel issues vs. ROM issues.

SmartassV2 (informal description and comparison with the first smartass)

SmartassV2 is a governor (controls the frequency of the CPU at each give moment) which like the first smartass is generally based on the implementation of interactive with some major changes and the addition of a built in sleep profile (behaves a bit differently when screen is off vs. on).

The smartassV2 improves the very naive scheme which the first smartass had: The first smartass (with the values I set for the hero), would cap the max frequency at 352Mhz for sleep and when screen is on, would do the opposite and keep the frequency at 518Mhz or above. For sleep this was very effective but a bit crude and unclean, and there could be some cases where you would need processing power even when screen is off (something is updating and music is playing and etc.). For screen on, smartass1 was too quick to jump to the max available frequency and again would never go below the 518Mhz, so in a nutshell its was using "too high" frequencies.

SmartassV2, introduce (internally) an "ideal" frequency which is the frequency we are "aiming" for, in some sense. The way I see it is that the "ideal" frequency is a hint to the governor what is a good balance between performance and battery life. Now when screen is on, I set (on the hero) the ideal frequency to 518Mhz which will ensure nice responsiveness but limit unnecessary use of higher frequencies when they are not needed. When screen is off, I set the ideal frequency to 352Mhz (0 will disable the screen state tracking all together). From my testing this will "convince" the governor to spend most of the its time during sleep at the lowest available frequencies. Note, that both during sleep and when awake the entire frequency range (as defined by the "user" - i.e. selected with SetCPU) is used by smartassV2. For example, when the CPU is loaded heavily, the highest available frequency will be used regardless if screen is on or off.

Boot OC and optional tweaks

Optionally, you can rename the update file before you flash to change bootup frequencies and other options.

If you don't rename the file and flash "FlyKernel-13.zip" you will get the default tweaks and the min/max frequencies will remain as they where before.

For example, to set the max/min frequencies on boot to 614/176, rename "FlyKernel-13.zip" to "FlyKernel-13-M614-m176.zip".

Supported "flags" are:

Notice, all flags are case sensitive.

-MXXX - set max frequency to XXX

-mYYY - set min frequency to YYY

Supported max frequencies:

518 576 614 633 652 672 691 710 729 748

Supported min frequencies:

19 176 264 352 518 576 614 633 652 672 691 710 729 748

Default behavior, if these flags aren't given, is not to change your current settings.

For frequency recommendations and more info see FAQ #5.

Technical details: max/min frequencies are set in the kernel's ramdisk init.hero.rc file. Previous settings will be replaced. Furthermore, if one of your init.d script sets the max/min frequencies, these lines will be removed.

If you have SetCPU or other program changing the speed at boot, their change will take effect and overwrite this setting as soon as the ROM completes to boot.

-nologo - Don't show boot animation.

-logo - Show boot animation.

Default behaviour, if no flag is given, is not to change your current settings.

-noatime - Mount all partitions with -noatime to improve IO.

-atime - Mount no partition with -noatime.

Assuming, your ROM did not mount any partition with noatime, then the -atime option should undo the -noatime option perfectly. Unfortunately, it seems some ROMs (i.e. VR12) mount only some of the partitions with -noatime. It seems that in some cases, changing the noatime configuration causes boot problems.

Therefore, I highly recommend you make a backup before trying the -noatime flag - this is the only full proof way to go back if it messes something up.

Notice, this does not effect the ext partition as it is not mounted in the ramdisk init.rc. As far as I know, all ROMs mount the ext partition with noatime.

-notweak

By default, the updater will remove scheduler tweaks which exists in the ramdisk init.rc script, in order for the scheduler default compiled into the kernel to apply. This flag will disable this behavior.

More techinical information for developers about the smart update package has been updated in my github wiki.

Limitations and known bugs:

- This kernel will not make you coffee (I hope)!

Integrating kernel in a custom ROM (for ROM developers)

You can use my from above:

http://floyo.desean.net/FlyKernel-13-Floyo.zip

This file has a regular boot.img with a ramdisk compatible with Floyo 1.4, boots at 576/352 (smartassV2) and has all the kernel modules unpacked.

If you need to edit the ramdisk, you can either unpack the above boot.img as explained here. Or you can get the kernel binary file from my smart update package, under tmp/flykernel/kernel. The kernel modules are package in the smart update package under tmp/flykernel/syslibs.tar.

Kernel Sources

My sources with all my updates and changes are found on github:

http://github.com/erasmux/hero-2.6.29-flykernel

Use hero_defconfig for the regular version and hero-bfs_defconfig for the BFS version.

See the wiki for more information about building the kernel and more.

Please feel free to contact me regarding my sources and kernel development.

Using my Kernel Sources

Feel free to use my kernel sources, fully or partially in any (legal) way you see fit.

If you modify the sources, I urge you to share your changes with the community (as GPL obliges you to do), preferably using github. You can fork my sources on github, and this will make it easier for you to grab new changes from me and also allow you to fill pull requests so I can pull your changes back to my kernel.

GPL

Yes I am GPL complaint, all is included inside the sources, including the GPL license itself.

Thanks

Huge thanks to Desean for giving me file hosting that makes my life easier :D

Many thanks to all the Kernel/ROM developers here, especially those with open source kernels on github - LoxK, Cyanogen, Ninpo, Radu and especially Decad3nce.

Big thanks to all those who helped test the pre versions and reported bugs, specifically also to my long time testers (moonshield and floomat)

Donations are always welcome and accepted but are in no way required.