[KERNEL] New Kernel [3.4.112] [KCAL][4.03-CM-13.0]

jgcaap

Senior Member
Sep 22, 2009
9,910
19,227
263
Porto
hello everyone. Some weeks ago i've started to build Roms, but somehow felt incomplete to get the experience I desired. Today i finally was able to finish compiling my first kernel which i'll share with you.



Features:
Voltage Control
Schedulers :CFQ/BFQ/DEADLINE/NOOP
Govenors: INTERACTIVE/ONDEMAMD/PERFORMANCE/POWERSAVE
TCP Congestions: WESTWOOD, CUBIC, RENO, BIC, HTCP
Fast Charge
Sound Control
Low memory optimizations from Motorola
Krait optimization code
HARD NEON
Linaro Optimizations
LCD KCAL by @savoca
Arch Power
Gentle Fair Sleepers
Crypto Sha Neon
Added improved glibc libs and many others which provide a more efficient kernel work.
Many patches added from the upstream kernel.
Fsync
Optimized ARM RWSEM algorithm
Optimized Random from the upstream code.
Compiled with a special toolchain for krait.
More to come


To control Kernel, flash this on recovery.
and install Synapse from the play store.

There are two branches:
Stable - which has all proven and tested development
Beta - new features introductions. Remember if your chip fries... Was done with very good intentions.

To build this kernel i have to give a very big thank you to great dev @savoca as had alot of patience and shared his knowledge to build a kernel with a step by step guide, as also explaining what's each stuff for.
@ak @andi79 @franciscofranco @faux123 for commits of their kernels, as made life easier.
@DerRomtester to provide a example of how to create boot.img script.

All credits go to CyanogenMod team.



Source code
OnePlus Thread
 
Last edited:

jgcaap

Senior Member
Sep 22, 2009
9,910
19,227
263
Porto
Changelog:

26/12/2015
Very summarised to what was done on kernel:
full rebased where was removed all commits not related to Krait but cortex-A15
Reverted back to CAF cpu boost
changed intereactive configuration to be more battery friendly
Using only aligned access for best performance and stability, as unalignment has it's own bad costs. Read more here: http://www.alexonlinux.com/aligned-v...-memory-access
Added stable ondemand governor from CAF
Updated to latest wifidriver
Optimize kernel cfbfillrect function
Use of ALIGNED_STRUCT_PAGE

22/09/2015
Kernel with MPdecision and bricked hotplug
Alot of patches and enhancements
synced with cm

05/08/2015
Some low memory changes
Synced with CM

Changelog:
updated with Cm stuff
Some changes over low memory killer.
28/06/2015

Improved Low memory killer
Synced with CM code 19/07/2015
Rebased kernel with linux patches until 3.4.108
Improved MMC use
Synced with Kitkat values for battery and charger
While recording video doesn't vibrate

28/06/2015

Optimized toolchain for our chip with GCC 5.1
Optimized values of interactive to kill lag caused by the govenor
Synced with CM code
Alot of patches (180 linux patches)

08/06/2015

Rebased from scratch
NEON is ON
Ext4 bug fixing
Removed inteliplug (soon a proper Hotplug comming)
Alarm Wakelock battery drainer fixed
Removed alot of badstuff from old kernel (learned from my mistakes)

31/05/2015

Reverted mempatch
Reverted all changes with hotplug
Redesigned optimizations of kernel.

25/05/2015

added MSMlimiter
IntelliThermal
Bricked hotplug
MSM hotplug
New touchdriver by neobuddie

20/05/2015

Small important ajustments
Synced with CM 20/05/2015

18/05/2015

much less logs, and reverted firmware update until cm fixes battery drain suggested by @tiny4579
Added Inteliplug hotplug
Improved fairness efficiency
Removed powersuspend for now, until is completely improved battery life and review code of power suspend
synced with CM

28/04/2015

Fsync
Improved speed I/O
Optimized copy page
ArchPower ON by default
Option to control ArchPower and Gentle Fait Sleepers
Optimized Deadline for performance
Improved CPU use of voltage for better battery life
Avoid to many OOM dirty pages (better memory)
loadavg Moire values for our device (balances workload and keeps cpu cooler without losing performance power)
SELinux fixes and added missing features.
lib/int_sqrt.c: optimize square root algorithm

27/04/2015

New Toolchain Linaro 5.1
Improved Low Memory Killer
Improved powersyspend
Improved Lz4
New KCAL code merged
Synced with CM
Async I/O speed increased by 34%
Optimized for A15 Cortex
Less Logs
Latest linaro patch 3.4.107
Rebased and 5.0+ ready compiler

14/04/2015

Soundcontrol, powersuspend, fixes

11/04/2015

Linaro LT

10/04/2015

Tons of kernel fixes. Memleaks, Optimized ARM RWSEM algorithm, Improved memory access (tested this and worked much better!), frandom support, F2FS support 3.4 (latest patch will come on next update), Changed some configurations to improve on kernel resource handling and increased battery life while keeping MPDecision, Missing linux patches from 3.4.105 included, Removed entropy changes, as was proven to create more lags and consuming more resources.

07/04/2015

Alot of fixes: scheduler, fixed memory leaks, info leak, entropy depleting, sleep fixes, data loss fixes. Synced with CM : prima: Update to LA.BF.1.1.1_rb1.17 . Included linux patches from 3.4.105. selinux fixes and code cleanup. Raised entropy levels. Introduction of a new smart scheduler.
05/04/2015 - Linux patches 3.4.106 on a cleaned build based on cm 12.1

Important Notes:
There are two methods to have a kernel done by someone else on our phone. Trying not to complicate and to make you understand, when you create a kernel there are two strategies dev use to share their work.
Most of the devs have on each kernel has its own ram disk and create a boot.img zip file. The advantage is that, the boot.img will exchange the one we have in the phone. The disadvantage is that, it can be incompatible with some updates.
The strategy I use, is same of ak and render. We build kernel with any kernel. Basically the boot.img is created with the boot.img which is currently on you rom while on the recovery.

So now you can understand what happens. If you flash a kernel A, independently of the methods, we'll be using a ram disk not correspondent to the original rom and you'll have changes in ram disk . So while going to kernel B, ram disk is written again. Then going to kernel c ram disk is written again.

Can you tell me the advantage of having each kernel changes in same ram disk? Perhaps spontaneous reboot, to mess up our emotional stress will come in order in case not caring about this. [emoji14]

Now that you understood the importance, remember! !) reflash origin ROM 2)Flash kernel 3) Enjoy :)
 
Last edited:

NuLLV01D

Senior Member
Mar 30, 2013
1,058
605
0
Jodhpur
www.ptmaroct.com
Thanks. I learned quite alot... I. Missed programing. Without git hub would be very hard for me to create this kernel. I own alot of thanks to the great teacher and dev @savoca very soon, I'll be bringing his work to this kernel. He not only is a very smart guy as also a great friend with alot of patience HeHehe.
Yep, I so miss @savoca Furnace Kernel. It was simply to the point and worked just fine! It'll truly be great if you would implement his work! All the very best Mate!
 

DespairFactor

Recognized Developer / Recognized Contributor
Mar 13, 2013
5,786
12,338
0
Toronto
Good job, I personally recommend against using GCC 5 toolchains for the time being as it isn't much better than 4.9 and are not as stable.
 

RenderBroken

Recognized Developer
Sep 14, 2013
4,297
20,083
263
33
/home/renderbroken/android
Good job, I personally recommend against using GCC 5 toolchains for the time being as it isn't much better than 4.9 and are not as stable.
I agree, its cool to play with but could cause unseen issues for people starting out with Kernel Development.
@jgcaap

Its good to see users start a new project! I started out doing Rom work too and found Kernel work to be much more enjoyable. If you run into a build error or have a question, feel free to PM me.

Regards,
Render
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone