Android OS Forum banner
1 - 19 of 19 Posts

·
Kernel Haxor
Joined
·
1,416 Posts
NOTICE: This is COMPATIBLE with ALL Amaze (AKA Ruby) Rooted Stock and Custom ROMs

For frequency control and voltage adjustments use SystemTuner by 3C or FauxClock app by Romanbb :D

Just a statement regarding kernel source: The Kernel Source is of course covered under GPL version 2. Free software does NOT mean no work or time was spent working on it. I have donated a large sum of my free time to hack this kernel. If you use my modified kernel source in parts or in its entirety, I kindly ask you mention its origins and to send me a github pull request or PM whenever you find bugs or think you can help improve my kernel hack further. This way the entire community will truly benefit from the spirit of open source. Thank you :cool:


Hi XDA members and fellow Amaze users:

This is my twelfths kernel hack. I want to thank xboarder56, and several others I cannot recall for inspiring me to venture into this unfamiliar territory for me.

What is a Kernel? The Kernel is the Foundation in which everything else builds upon in any software system.
[Car Analogy]: Kernel is like the Engine, Electrical system and the Transmission to a car. The Library, Framework and the Apps [AKA ROM] are the body frame and the rest of the Car.


THIS KERNEL is BASED ON HTC Source Code. So it is COMPATIBLE ONLY WITH HTC Gingerbread Amaze Builds.

Please DO NOT use any task killers, they DO NOT improve performance nor battery life. They INTERFERE with your phone's stability (more crashes) and App compatibilities (Forced Close).


CleanCache (via ZCache backend)

ZCACHE is a new technology I introduced to Sensation Kernel. ZCACHE is a compressed cache similar to ZRAM but the similarity ends there. ZCache is meant to provide as many "cleancache" pages (non-dirty or untouched "virgin" memory) to apps that request for new memory. CleanCache is very easy to allocate and no additional penalty are required to hand them out, so having more CleanCache pages will improve performance. Under heavy memory pressure, often times the kernel will NOT have enough CleanCache pages, so the kernel has to do EXTRA work to reclaim dirty cache pages and clean them for the new apps that's requesting for them. The described process creates a performance hit for the kernel and the app, so the idea is to use compression to create more CleanCache pages available for use. Of course there's a penalty to pay for using compression, but the trade-off between compression penalty and the penalty for reclaiming dirty cache pages and allocating them after cleaning is smaller for compression, so in the end, CleanCache should add more performance.

ZRAM (aka CompCache aka RAMZSwap)

ZRAM is an updated version formally known as CompCache and RAMZSwap. It was originally designed for 2.6.38.xx kernels, I have backported to our 2.6.35.xx kernel. ZRAM allows real-time compression of memory objects in RAM thus reducing memory pressure for the Linux kernel and can keep more apps in memory longer (more apps in RAM == better performance, less fetching from slower MMC or SDCard). Compression, however, is not Free. Some CPU cycles are required to do the compress/decompression, so there's a slight penalty for it. The original CompCache / RAMZSwap required a user space binary to control its behavior which adds additional penalty to performance, but the new version ZRAM eliminated the need for a separate dedicated daemon, thus reducing the overhead and increased performance from the old CompCache by 20%. Therefore, with the newer implementation of ZRAM interface, the performance penalty is almost negligible. :D

Joe's RCU (Optimized for Small SMP systems)

Joe Korty has created an RCU for small SMP systems (> 32 cores). His approach is to isolate all the Garbage Collection (GC, a slow time consuming but necessary processing) to a single core, thus allowing other cores to ONLY work on real required processing. This will allow the additional cores to complete their assigned tasks as fast as possible (not bogged down by GC) then immediately go back to a suspended state (saving battery).

NoHz RCU (Optimized for SMP operations)

Fast NoHz is an optimized version of the traditional Tree RCU. Many new kernels are using the Tickless NoHz design. This RCU is tailored and designed to work with the new NoHz kernel system.

SmartAssV2 Governor (Balanced)

This governor has a built-in "profile" similar to SetCPU, so screen off will use lower clock rate thus conserve more battery, but it also has a fast wake up feature so that user interaction will not see the lag when switching from Sleep to Wake state.... (So SetCPU Profiles are sorta redundant when using this governor, you can still use SetCPU to OC to higher than default Clock frequency).

Interactive Governor (Performance)

This governor is designed to put more priority to User Interface (UI aka Apps) tasks, therefore appears more responsive then the traditional OnDemand governor. So if you want the smoothest UI interaction, this governor is for you...

Brain F*ck Scheduler - (BFS)

This scheduler is designed to be simple and speedy tailor specifically for user interface type systems such as desktop/smart phone devices where user interaction is MORE important than serving 1 million web requests (CFS, the default scheduler) at the same time (think of nimble desktop workstations vs large corporate servers).

SLQB - (SLAB allocator with Queue)

This memory allocator is designed for small number of CPUs system (such as desktop or smart phone devices). This allocator is design to be simple and it is optimized for using order-0 pages as much as possible (order-0 pages are the simplest therefore quickest type of memory in a Linux system to allocate). Not all kernels are using SLQB including CM7 main line...

Fair Budget Queue (BFQ I/O scheduler)

This I/O scheduler is an improvement on top of Completely Fair Queue (CFQ). CFQ is fair in terms of time but not in terms of throughput / bandwidth, so BFQ make sure that both time and throughput / bandwidth are balanced across all requests.


Installation Instructions:

Here's a step by step instruction to install this kernel:

************************** Ice Cream Sandwich (S-OFF ONLY) **************************
[ CFS ] (Ultimate Edition - should work with most phones but NOT GUARANTEED!)
The File ==> Amaze ICS Kernel <==
MD5SUM ==> <==

************************** Gingerbread **************************
[ CFS ] (Ultimate Edition - should work with most phones but NOT GUARANTEED!)
The File ==> Amaze Kernel <==
MD5SUM ==> <==

CWM Flash Instructions: (NO LONGER SUPPORTING CWM METHOD DUE TO HTC's STUPID S-ON UNLOCK!!!)

1. Copy file to SDcard
2. Reboot to CWM recovery
3. Flash the Zip file (if you noticed an error, Flash the same file the 2nd time)
4. Reboot, Done!


Easy Kernel Flasher Instructions:

1. download the above file (via phone directly or to a PC)
2. unzip to a folder then depends on PC or Linux
[ Windows ] open command prompt window and type Flash.bat
[ Linux ] open terminal window and type ./Flash.sh (make sure permission is set to 755 for the Flash.sh)
3. Let the script complete!


NOTE: Because the previous kernel included a Secured RAM Disk, so you may need to run the script twice. (Once this is done, then any subsequent flash should complete on the first time)

Note: After FLASHING, the first reboot may take longer than usual, please be patient... After the first reboot, it may lag during initial load (let everything finish loading). Once everything is loaded and phone is ready for use, reboot the phone a 2nd time and the lag will be gone and everything should be silky smooth...

[ Optional: ]

NOTE: if you come from a ROM with my kernel pre-installed, you DO NOT NEED to flash the reset kernels from above!

[ For Kernel Devlopers ONLY: ]


Optional Under voltage: Version 0.0.x+ ONLY

Code:
<br />
[ to over volt ALL frequencies by 25000 uv (microvolts) ]<br />
echo "+25000" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels<br />
[ to under volt ALL frequencies by 25000 uv (microvolts) ]<br />
echo "-25000" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels<br />
<br />
[ to set a specific frequency (ie 1.18 GHz)<br />
  with a specific voltage (ie 1.0875 volts) ]<br />
echo "1188000 1087500" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels<br />
CPU Frequency Voltage Table Example
Code:
<br />
  192000:   812500<br />
  310500:   812500<br />
  384000:   812500<br />
  432000:   812500<br />
  486000:   837500<br />
  540000:   850000<br />
  594000:   862500<br />
  648000:   875000<br />
  702000:   900000<br />
  756000:   925000<br />
  810000:   937500<br />
  864000:   962500<br />
  918000:   962500<br />
  972000:   962500<br />
1026000:   975000<br />
1080000:   987500<br />
1134000:  1000000<br />
1188000:  1012500<br />
1242000:  1025000<br />
1296000:  1050000<br />
1350000:  1075000<br />
1404000:  1100000<br />
1458000:  1112500<br />
1512000:  1125000<br />
1566000:  1150000<br />
Optional: Stock Clock Frequencies for Dual CPUs
Code:
su<br />
echo 192000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq<br />
echo 1188000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq<br />
<br />
echo 1 > /sys/devices/system/cpu/cpu1/cpufreq/online<br />
echo 192000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq<br />
echo 1188000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq<br />
Low Voltage - Under Volt the processor, therefore uses Less Battery, but NOT ALL CHIPS can handle Under Volt.. If you experience instability, try the Stock Voltage Version.

Stock Voltage - Uses the voltage values from ORIGINAL HTC Kernel Source.

There are NO PERFORMANCE DIFFERENCE between the Under Volted and Stock Voltage versions!


NEWS BULLETIN:

Version 022 is OUT!

Please don't hesitate to talk among yourselves and help each other out... The XDA community is what inspired me to hack kernels for everyone since everyone here is nice and helpful to each other... Keep helping each other.... Famous proverb: It's better to give than to receive...

BUGS:

Not All CHIPS ARE CREATED EQUAL

TO DO:

version 1.x.x -- Haven't thought about it yet...

History:

See Post below...

Standard Disclaimer: Not responsible for bricking your phone, voiding your warranty, or any other pain or suffering you may feel as result of using this kernel!!!

My github Complying with GPL and XDA rulez :D

Follow me on :

If you find this Kernel useful, feel free to hit the [Thanks] button below
 

·
Kernel Haxor
Joined
·
1,416 Posts
History (Ice Cream Sandwich)

Version 001
Optimized Memcpy
Optimized SHA1
Enable Just-In-Time netfilters (better TCP netfiltering performance)
Optimize lib for /proc/stat
Merge with Android-Common Kernel (Google's kernel patches)
Linux 3.5+ Scheduler/Memory Management backports / fixes
Linux 3.5+ Android Low Memory Killer
Patched to Linux 3.0.36

Version 002
CPU Overclock to 1.728 GHz
GPU Overclock to 320 MHz
USB Fast Charge
Patched to Linux 3.0.37

Version 003
Enable CPU timing stats

Version 004
Patched to Linux 3.0.38

Version 005
Updated Bluetooth drivers

Version 006
Updated WiFi drivers

Version 007
Reduced dmesg log spam from debugging options
added early suspend drivers for cpufreq to save more battery
adjusted Ondemand for better performance and battery
reduced LED brightness from 40ma to 25ma and enabled dynamic brightness controls
reduced LED Flash light battery limit from 15% to 5%
Fixed a minor coding error for HTC battery core driver

Version 008
Revert to factory BT drivers (FFFFFFFFFFFFFFFFUUUUUUUUUUU HTC for no BT source
)

Version 009
Revert to factory BT and WLAN drivers (FFFFFFFFFFFFFFFFUUUUUUUUUUU HTC for no BT/WLAN source
)

Version 010
Move Video FB/KGSL/SDIO/SDIO_NET/Audio DPS back to their original CAF structures
Updated SDIO drivers from CAF
Updated Audio DSP drivers from CAF
Lowered default brightness
Fixed CPU screen off cap

Version 011
Updated to Linux 3.0.39 (many MM enhancements backported from Linux 3.5+)

Version 012
Added 2 bug fixes from Linux 3.5+ for scheduler
Added Optimized ARM AES/SHA1 crypto interface (better VPN throughput)
Binary Hacked thermald(umb) to fix max freq issues
raise minimum temp throttle limits in /etc/thermad.conf

Version 013
Tweaked deadline I/O scheduler for better Android Performance
Updated to Linux 3.0.40

Version 014
Added Enhanced LZO algorithms (up to 2x performance over old versions)

Version 015
Added Google's TCP proportional rate reduction algorithm (from Linux 3.2)
Switched to Westwood+ TCP congestion algorithm (supposedly better for Cell/Wifi lossy connections)

Version 016
Updated to Linux 3.0.41

Version 017
Added BFQ v4 I/O scheduler

Version 018
Updated to Linux 3.0.42
 

·
Registered
Joined
·
115 Posts
Loaded v006 before lunch and noticed that my bt connected in my car automatically - which I had issues with on the earlier 004 kernel. Great job! Loaded v007 after lunch.... Very exciting developments!
 

·
Registered
Joined
·
115 Posts
Hey, faux, trying to get 0010... But its only around 4mb. Your other kernels have been ~12mb. I've tried it multiple times with the same result. I have not tried flashing it yet due to the size difference.
 

·
Registered
Joined
·
115 Posts
Hey, faux, trying to get 0010... But its only around 4mb. Your other kernels have been ~12mb. I've tried it multiple times with the same result. I have not tried flashing it yet due to the size difference.
Nvm. Just saw your post at the other Site advising to flash 009 then 010.
 

·
Developer
Joined
·
735 Posts
Why is the amaze 4g in legacy forums dah fuck?
 
1 - 19 of 19 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top