[KERNEL][7.x.x][SHAMU] * Simple Kernel * [r2 - 07/05]

Black_Hat01

Senior Member
May 10, 2017
86
123
0
Simple Kernel - Shamu

Simple Kernel is a kernel for Shamu that aims to be just that; a simple kernel. I believe in having too much stuff that really doesn't contribute to a better user experience should not be added into a kernel, and that's the ideology that I built this kernel with. I present Simple Kernel. I hope you enjoy it!

Features:
  • Sourced from latest Shamu kernel release (nougat-mr-1.5) up to July's security patches.
  • Upstreamed to 3.10.107 - Thanks to @The Flash for his guide to upstreaming a kernel
  • Built with vanilla Linaro GCC 7.1.1 - Thanks to The Flash's gcc build tool I used
  • Upstream F2FS support
  • LZO Compressed kernel - fast decompression at boot time
  • Power Suspend power management - Thanks to @faux123 and @Yank555
  • Hotplugs: Intelliplug v4.0 & Mako Hotplug + Stock - Thanks to faux123 and @franciscofranco
  • CPU governors: Nightmare & ElementalX + Stock - Thanks to @Alucard24 and @flar2
  • I/O Schedulers: Zen & Row(just enabled it) + Stock - Thanks to @bbedward
  • Intellithermal v3 - configurable thermal management - Thanks to faux123 Adjustable max temp for stock thermal monitor - Thanks to franciscofranco
  • Simple GPU Algorithm - configurable way to improve stock msm_adreno_tz governor - Thanks to faux123
  • KCAL Color Control - Thanks to @savoca
  • Zen-Tune v4.5 - improves overall responsiveness - Thanks to @frap129
  • Power Efficient Work queues - can save some battery - Thanks to neilbrown
  • Disabled BCL (for now, was causing me issues)
  • No force-encrypt or dm-verity
  • Safe GCC Optimization flags for Shamu - (-O2, -mtune=cortex-a15, -marm, -mfpu=neon-vfp4, -pipe)
  • Some misc fixes and stuff here and there
  • No excess/magical optimizations or patches
  • Look at my commit log for full list for everything in the kernel

Changelog:
Just look at commit log. Make it easy.

Installation:
  1. Download latest build
  2. If on another kernel, flash your ROM's (or stock) boot img in TWRP Recovery. If coming from Simple Kernel, proceed to step 3.
  3. Flash kernel in recovery
  4. Wipe Cache/Dalvik-Cache
  5. Reboot
  6. Done

FAQ:
Q: There was a random reboot or some other issue! What do I do?
A: Pull logs, send them to me. Address issues publicly in thread so everyone can benefit/chip in.
Q: Can you add XYZ feature/patch?
A: Perhaps I can. I am always open to adding things, as long as it maintains the soul of the kernel. Giving me a place to find it also helps. You can also create a pull request on Github if you have the commits.
Q: How do I pull a log that you asked for?
A: I use (play store, free) Kernel Adiutor to pull logs. In KA, go to Settings -> Debugging -> Driver Message & -> Last kmsg. Send me the txt files created in /sdcard. Not doing this when bringing up an issue will result in loss of my support and is not good practice when asking for help.
Q: What is F2FS? How do I convert to it?
A: Googling will do you well, this gives a good overview of what is is. This thread might help you decide if it's right for you. Read my instructions in my TWRP w/F2FS thread to see basic conversion instructions.

Disclaimer:
I am not responsible for anything that happens to your device. Period.

External Thanks:
designapp.io for the logo

Download:
See second post



XDA:DevDB Information
Simple Kernel, Kernel for the Nexus 6

Contributors
Black_Hat01, Contributors listed by-contibution
Source Code: https://github.com/BlackHat01/SimpleKernel-Shamu

Kernel Special Features: F2FS, Linaro Compiled - Smooth, Simple & Stable

Version Information
Status: Stable
Current Stable Version: r2
Stable Release Date: 2017-07-05

Created 2017-07-02
Last Updated 2017-07-05
 

espionage724

Senior Member
Feb 8, 2010
2,747
678
0
realmofespionage.xyz
About the LZO compressed kernel, I was under the impression that the boot would be faster if the kernel wasn't compressed at all. I don't know how large the uncompressed kernel is, but since it gets decompressed at boot anyway, perhaps it'd be better to just have it uncompressed to begin with?
 
  • Like
Reactions: Black_Hat01

Black_Hat01

Senior Member
May 10, 2017
86
123
0
About the LZO compressed kernel, I was under the impression that the boot would be faster if the kernel wasn't compressed at all. I don't know how large the uncompressed kernel is, but since it gets decompressed at boot anyway, perhaps it'd be better to just have it uncompressed to begin with?
An uncompressed kernel image would probably boot faster in our case since our CPU/RAM is fast enough to handle an operation as such. Only issue however is the uncompressed kernel sizes in at about 20 mb in our case, and is too large for our device's boot partition (I think around 16 mb), and won't be able to be installed to the device at all, producing an error saying the image is larger than the boot partition.
EDIT:
Also by "faster", I am comparing it to other popular compression methods such as xz.
 
Last edited:

apophis9283

Forum Moderator /Inactive Recognized Developer
Staff member
Dec 19, 2011
12,169
15,228
263
37
Somewhere in the static of the Universe
An uncompressed kernel image would probably boot faster in our case since our CPU/RAM is fast enough to handle an operation as such. Only issue however is the uncompressed kernel sizes in at about 20 mb in our case, and is too large for our device's boot partition (I think around 16 mb), and won't be able to be installed to the device at all, producing an error saying the image is larger than the boot partition.
EDIT:
Also by "faster", I am comparing it to other popular compression methods such as xz.
LZO is going to be the best available. Also, Intellithermal is outdated. I would stay away from it. May I ask what issues you had with BCl. I always had it disabled in my kernel, I believe it to be the cause of early shutdowns that people report (especially when the power draw it too much).
 
  • Like
Reactions: duttyend

Black_Hat01

Senior Member
May 10, 2017
86
123
0
Also, Intellithermal is outdated. I would stay away from it.
Agreed. I decided to just give it a shot because I wanted to see if I could add some more options for as far as thermal drivers goes but it just doesn't do anything better than stock thermal throttling + Franco's userspace temperature adjustment patch, and like you said, was not updated since it's initial port to qcom devices by faux. Decided to squash it from here out.

May I ask what issues you had with BCl. I always had it disabled in my kernel, I believe it to be the cause of early shutdowns that people report (especially when the power draw it too much).
This is actually a good point. I believe as of now, I will bring it back in the near future. I had some rebooting issues, and I *thought* BCL was the cause, but it now seems it is due to RQ Affinity (still working on getting it ironed out). Once I figure out the real cause of my very sparse reboots, I will most likely bring it back, as the upsides seem to outweigh its seemingly negatives(never really figured these out :confused: ), especially with Franco's BCL modifications.
 
  • Like
Reactions: duttyend

apophis9283

Forum Moderator /Inactive Recognized Developer
Staff member
Dec 19, 2011
12,169
15,228
263
37
Somewhere in the static of the Universe
Agreed. I decided to just give it a shot because I wanted to see if I could add some more options for as far as thermal drivers goes but it just doesn't do anything better than stock thermal throttling + Franco's userspace temperature adjustment patch, and like you said, was not updated since it's initial port to qcom devices by faux. Decided to squash it from here out.


This is actually a good point. I believe as of now, I will bring it back in the near future. I had some rebooting issues, and I *thought* BCL was the cause, but it now seems it is due to RQ Affinity (still working on getting it ironed out). Once I figure out the real cause of my very sparse reboots, I will most likely bring it back, as the upsides seem to outweigh its seemingly negatives(never really figured these out :confused:), especially with Franco's BCL modifications.
I had a toggle for BCL on mine. My source for it is since lost but that may have been added when Yoinx was part of my team. I had it off by default but people could toggle it on. Do you have it set to off? (RQ Affinity)? I started this on my PC but Ill upload screenshot of what I have going on.
 

Black_Hat01

Senior Member
May 10, 2017
86
123
0
I had a toggle for BCL on mine. My source for it is since lost but that may have been added when Yoinx was part of my team. I had it off by default but people could toggle it on. Do you have it set to off? (RQ Affinity)? I started this on my PC but Ill upload screenshot of what I have going on.
I seem to not run into any rebooting with it set to 0 (so off). A BCL toggle would be great. If I could get that into my kernel that will guarantee BCL's return.
EDIT:
Looking at your setup, mine is quite similar, except of course the BCL switches. And currently affinity at 0 for testing.
 

apophis9283

Forum Moderator /Inactive Recognized Developer
Staff member
Dec 19, 2011
12,169
15,228
263
37
Somewhere in the static of the Universe
I seem to not run into any rebooting with it set to 0 (so off). A BCL toggle would be great. If I could get that into my kernel that will guarantee BCL's return.
This is blackbird kernels source with some of my commits and Ill link you to really old source of my kernel that Yoinx had. I had bad issues setting that to 0. Use RQ Affinity 1 and see if they don't stop. Trust me, I made a kernel for this device for the longest time. If there was a mistake to make I made it. Over a year, 2 version of Android. M and N. If you want..... Get me a log at the next reboot and I would be happy to help

https://github.com/B14CKB1RD-Kernel...2a3c94a/drivers/power/battery_current_limit.c

https://github.com/yoinx/Singularit...a36e6e1/drivers/power/battery_current_limit.c
 
Last edited:

Black_Hat01

Senior Member
May 10, 2017
86
123
0
This is blackbird kernels source with some of my commits and Ill link you to really old source of my kernel that Yoinx had. I had bad issues setting that to 0. Use RQ Affinity 1 and see if they don't stop. Trust me, I made a kernel for this device for the longest time. If there was a mistake to make I made it. Over a year, 2 version of Android. M and N. If you want..... Get me a log at the next reboot and I would be happy to help
Almost laughed. Got a reboot while reading this. Anyways, I appreciate your willingness to help. Not by any means an expert here, and still new at making use of my own logs, so I'll take all I can get. Here's my kmsg from last reboot. This was with affinity 0, so affinity is ruled out as the cause of the reboots at least (had them with 1 too)

Thank you so much for this. Will look into it tomorrow when I get on my PC.

EDIT:
Heading off to bed in a bit. Got work and classes tomorrow. Will read what you have to say in the morning. Thank you again.
 

Attachments

Last edited:

apophis9283

Forum Moderator /Inactive Recognized Developer
Staff member
Dec 19, 2011
12,169
15,228
263
37
Somewhere in the static of the Universe
Almost laughed. Got a reboot while reading this. Anyways, I appreciate your willingness to help. Not by any means an expert here, and still new at making use of my own logs, so I'll take all I can get. Here's my kmsg from last reboot. This was with affinity 0, so affinity is ruled out as the cause of the reboots at least (had them with 1 too)


Thank you so much for this. Will look into it tomorrow when I get on my PC.

EDIT:
Heading off to bed in a bit. Got work and classes tomorrow. Will read what you have to say in the morning. Thank you again.
Im gonna look at it in a second. In the mean time here is my BCL file


Edit: Do the reboots only happen when using certain apps? I expected to see a watchdog bite for IRQ and I didnt.
 

Attachments

Last edited:

Black_Hat01

Senior Member
May 10, 2017
86
123
0
Im gonna look at it in a second. In the mean time here is my BCL file


Edit: Do the reboots only happen when using certain apps? I expected to see a watchdog bite for IRQ and I didnt.
Thanks. They seem to random, however, the apps that I can remember reboots occuring in are FX File Explorer, Clash of Clans(yes I play this ancient game), Google Camera(video), XDA Labs, and once while suspended.