[KERNEL] Basic with a Twist SGS4G KJ6 1.1.3

Search This thread

mike-y

Senior Member
Feb 7, 2008
650
149
Los Angeles
still on the 1.0b1, but will probably upgrade after a few days.

Just fyi, with the beta 1 release, everything on my phone has been stable. 1 Day, 17 hrs on this charge and still have 54% battery left.


Like someone posted, I don't use my phone that much because I sit in front of a computer for most of the day. Usually just a few calls a day. Here are some of my battery stats:

Voice Calls - 39%, 1hr 3m
Cell Standby - 28%
phone idle - 12%
Display - 9%
Wifi calling - 2%, Wifi on for 1h 44 mins
 

falcons2

Senior Member
Jun 19, 2011
1,178
150
austintown
my first 2 charges have had great battery life but for some reason this 3rd charge is not doing as well but it's still a great kernel

Sent from my galaxy s 4g using XDA app
 

FBis251

Senior Member
Mar 21, 2011
3,418
3,716
www.fernandobarillas.com
Antonx, I copied your changes over to the teamacid tree under the antonx branch. You should check it out:
https://github.com/teamacid/android_kernel_galaxys4gmtd/tree/antonx

I tried to keep all the changes in separate commits to make it cleaner, you may wanna make a fork of it and continue development on that fork in order to keep the kernel history as Bryan suggested.

Thank you for the code upload! This should make creating patches a lot easier.

EDIT

You may wanna update the build.sh to ask for locations of binaries or to ask you to run envsetup instead of hardcoding it into the scripts:
Code:
make: /home/anton/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc: Command not found

My username isn't anton :D. You get what I mean though
 
Last edited:

AntonX

Senior Member
Nov 9, 2006
432
1,054
Fbis, I went through this branch commit changes, they seems fine, you picked them all. Couple of things I didn't do, like mods to /kernel/module.c and include/linux/kernel_sec_common.h. It's possible they are Bryan's and I pulled even slightly earlier commit than I thought.

I see that I left a few backup and test files, not sure that it's important, but eventually I'll kill them.

I cannot use envsetup, I don't have it. It's not part of the toolchain that is needed for the kernel, and I don't want to download the whole thing - it's way too huge. That's the only reason I had to make my own build.sh, otherwise I'd just use existing one. I may throw and error message from the script telling where to set the path though.

Now - how do I fork only from this branch and not everything else? It seems like the forking wants to bring to the whole repository including all branches. Or is it normal procedure? If it is, then all I'll have to do it to use "-a antonx" switch when doing git clone, correct?
 

m4xm4n

Retired Recognized Developer
Aug 9, 2009
235
1,079
Minneapolis, MN
www.maxfierke.com
Fbis, I went through this branch commit changes, they seems fine, you picked them all. Couple of things I didn't do, like mods to /kernel/module.c and include/linux/kernel_sec_common.h. It's possible they are Bryan's and I pulled even slightly earlier commit than I thought.

I see that I left a few backup and test files, not sure that it's important, but eventually I'll kill them.

I cannot use envsetup, I don't have it. It's not part of the toolchain that is needed for the kernel, and I don't want to download the whole thing - it's way too huge. That's the only reason I had to make my own build.sh, otherwise I'd just use existing one. I may throw and error message from the script telling where to set the path though.

Now - how do I fork only from this branch and not everything else? It seems like the forking wants to bring to the whole repository including all branches. Or is it normal procedure? If it is, then all I'll have to do it to use "-a antonx" switch when doing git clone, correct?

Code:
git clone git://github.com/teamacid/android_kernel_galaxys4gmtd.git -b antonx
 

AntonX

Senior Member
Nov 9, 2006
432
1,054
Yep, it's -b, not -a switch. I will probably still fork it so I use it under my github name, not TeamAcid, which I don't belong to. Would be nice to fork only antonx branch though, not the rest.
 

AntonX

Senior Member
Nov 9, 2006
432
1,054
You could fork the TeamAcid repository and then delete the branches you don't need.
I kinda tried that, didn't work. Commands like 'git branch -d gingerbread' return 'error: branch 'gingerbread' not found.' I must be missing something. It's not that important though, I can live with that.

EDIT: OK, figured it out, needed to use command 'git push origin :gingerbread'. Linux is weird.
 
Last edited:

itzik2sh

Senior Member
Sep 5, 2011
1,518
712
Hi AntonX

Nothing but great work so far.
Can you consider adding direct call recording capabilities to the kernel?
I think we had it on Froyo but Sammy disabled it on GB kernel due to a federal regulation.
It was re-enabled on some SGS2 ROMs and I tried to port it, but too many lib dependencies caused bootloops.

Thanks.

Sent from my SGH-T959V using XDA
 

FBis251

Senior Member
Mar 21, 2011
3,418
3,716
www.fernandobarillas.com
I kinda tried that, didn't work. Commands like 'git branch -d gingerbread' return 'error: branch 'gingerbread' not found.' I must be missing something. It's not that important though, I can live with that.

EDIT: OK, figured it out, needed to use command 'git push origin :gingerbread'. Linux is weird.

This is how I got what was different in your code:
I downloaded the tarball of your source
I did a git checkout on the gingerbread-bml branch of Bryan's kernel and reverted to the 0.0.2 commit
I copied your code over that checkout
Just did a git diff and saw what was different and did a git add, then commit of what was similar

You might want to consider adding more tags as finding the 0.0.2 was WAY easier to do once I went through the tags in the repo
http://learn.github.com/p/tagging.html

Specifically the section called "Tagging later" since you can add tags to specific commits. I think you won't have the history for b1 or b2, but that's fine for now as long as you tag from b3 on.
 

Zombie138

Senior Member
Dec 28, 2011
391
30
Can I flash this thru SGS Kernel Flasher?

Sorry if it's already been asked

Sent from my SGH-T959V using XDA
 

AntonX

Senior Member
Nov 9, 2006
432
1,054
This is how I got what was different in your code:
You might want to consider adding more tags as finding the 0.0.2 was WAY easier to do once I went through the tags in the repo

I see, but Bryan released several 0.0.2 versions, like b, c, d (don't remember), and these are not tagged separately. So you or me could have downloaded slightly different 0.0.2. I actually went by the zImage date that matched the commit date. I think you downloaded earlier branch. But there were no important differences in the code, he probably just modified the config and I have a different one now, so it doesn't matter.
 

FBis251

Senior Member
Mar 21, 2011
3,418
3,716
www.fernandobarillas.com
I see, but Bryan released several 0.0.2 versions, like b, c, d (don't remember), and these are not tagged separately. So you or me could have downloaded slightly different 0.0.2. I actually went by the zImage date that matched the commit date. I think you downloaded earlier branch. But there were no important differences in the code, he probably just modified the config and I have a different one now, so it doesn't matter.

Yeah. In another post he said that b, c, d, etc. were all just initramfs changes, so that works out fine.
 

AntonX

Senior Member
Nov 9, 2006
432
1,054
Yeah. In another post he said that b, c, d, etc. were all just initramfs changes, so that works out fine.

Speaking of initramfs, can you tell me what you do to update busybox? There seems to be a bunch of files in /bin all linked to busybox itself. Do you need to updated the links manually (wonder what's a good way not to miss any) or is there an easier way?
 

FBis251

Senior Member
Mar 21, 2011
3,418
3,716
www.fernandobarillas.com
Speaking of initramfs, can you tell me what you do to update busybox? There seems to be a bunch of files in /bin all linked to busybox itself. Do you need to updated the links manually (wonder what's a good way not to miss any) or is there an easier way?

It's kind of though. I think so far I've just left all the symlinks in there since they're relative symlinks they'll work both on your computer and on the phone afterward.

As far as busybox itself, I've been trying out different binaries. I think the best I've seen so far is from the cm7 build since it's got a working wget implementation and color support too.
 

itzik2sh

Senior Member
Sep 5, 2011
1,518
712
Hi AntonX

Nothing but great work so far.
Can you consider adding direct call recording capabilities to the kernel?
I think we had it on Froyo but Sammy disabled it on GB kernel due to a federal regulation.
It was re-enabled on some SGS2 ROMs and I tried to port it, but too many lib dependencies caused bootloops.

Thanks.

Sent from my SGH-T959V using XDA

FB, Do you know the how's?

Sent from my SGH-T959V using XDA
 

lainvalenajr

Senior Member
Dec 12, 2010
1,363
46
Chula Vista
Wow my battery lasted for a long time. Went to class at 7 listening to music till 4pm and i still have 60%.

Sent from my SGH-T959V using xda premium
 

Top Liked Posts

  • There are no posts matching your filters.
  • 69
    Basic with a Twist SGS4G KJ6 Kernel

    BML, don't flash if you have partitions converted to MTD.

    Use at your own risk, I take no responsibility for anything that may happen to your phone because of this kernel.


    This kernel is for those who don't want to be on the very cutting edge (CM7) but rather want stability without sacrificing too many recent features. It is based mostly on Bryan's 0.0.2d commit that supposedly never had problems with silent reboots. I made some changes to the config to bring it even more to the standard Samsung VibrantPlus in terms of hardware settings, but at the same time to optimize it for speed. I will add only tried and true features to this kernel, the ones that other kernel developers have used successfully.

    Special thanks to bhundven (Bryan), FBis251, TeamAcid.

    Features
    • initramfs from TeamAcid, including CWM5, SuperSU, forced ext4, etc.
    • Usual CIFS, TUN. I didn't include FUSE, if anybody needs it let me know.
    • BLN. Use BLN Control app from market to activate.
    • Voodoo Sound so paid app is not needed. Voodoo Sound app from market is required. Once installed, enable Smart Amplifier, it's the best thing you can do to improve music listening experience with our phone.
    • jhash3 for faster hash calculations. Used widely across the kernel, especially in networking.
    • OC/UV support with extended frequency table. Added 600Mhz, 900Mhz, 1.1Ghz, 1.2 Ghz, 1.3 Ghz, 1.4 Ghz. Use SetCPU or Xan's Voltage Control to enable and control frequency and voltages. Tegrak can be used only with no-OC/UV version.
    • ondemandX and smartassV2 governors. One of these should probably be preferred over stock ondemand. Change with SetCPU or similar.
    • TinyRCU. More lightweight version, it fits better our single CPU system.
    • Swap support, although I don't recommend using it.
    • SIO and BFQ I/O schedulers in addition to noop, deadline, and cfq that we already have.

    Install
    Flash with CWM or SGS Kernel Flasher. ODIN version is available only for OC/UV kernel.

    Download
    CWM:
    v1.1.3
    v1.1.3 (no OC/UV)
    v1.1.2
    v1.1.2 (no OC/UV)
    ODIN:
    v1.1.3
    v1.1.2

    Notes
    * OC/UV version is very conservatively undervolted to -25mV. The preset voltages are still higher than on regular I9000, which has the same CPU. I'm running additional -50mV (total -75mV) for all frequencies without issues, but you may have them, every CPU is different!
    * It is recommended to create a CWM recovery file before modifying voltages. This option is available in both SetCPU and VoltageControl.
    * OC-ing to 1.4 Ghz is not recommended, especially for extended periods of time.
    * Voodoo ext4 conversion, or "lagfix", is enabled and forced by default. There is not way and no need to go back to RFS.

    Source
    www.github.com/AntonX

    Changelog

    1.1.3
    CWM 5.0.2.8 (blue) in initramfs
    Disabled a little more of Samsung debugging

    1.1.2
    Minor changes to initramfs voodoo extension scripts
    More neutral boot logo

    1.1.0
    Initramfs script will not force su update
    Couple of small changes

    1.1rc2
    Few small changes

    1.1rc1
    Added BFQ and SIO I/O schedulers
    Switched to TinyRCU
    Added Swap support
    Small change to Vibetonz

    1.0b5
    Some changes to OC/UV
    Better BLN fix
    Increased write timeout for bad SDHC cards
    Added ondemandX and smartassV2 governors
    Renamed the title, it's becoming less and less Basic...

    1.0b4
    Added native OC/UV support

    1.0b3
    Minor BLN changes
    Replaced jhash.h with jhash3 code
    Updated initramfs with SuperSU 0.88

    1.0b2
    Added BLN, first attempt

    1.0b1
    Original release
    13
    what are the best setting to get the most battery life??

    Turn it off.
    12
    I've decided to keep BLN. I looked at the code, didn't find anything that could cause troubles if BLN if not used. Found the issue with "I2C write error", there were attempted writes to unpowered controller, so I fixed it. Removed some unnecessary debug tracings too.

    Updated jhash to faster jhash3, there can be slight performance boost for data, but probably not easily noticeable.

    Updated initramfs to latest SuperSU. Couldn't figure out how to easily update busybox to 1.20 (it needs to have bunch of links created), any help?

    OP updated to 1.0b3.

    Will try to post code on github today.

    EDIT: Added source code link to OP. Unfortunately because I used a little unorthodox method of getting the old Bryan's commit, I cannot easily and safely attach my modified code to it anymore. So the kernel code it posted as a new repo. If somebody needs to know exactly what's changed, let me know and I'll point to correct files. I was able to fork from the initramfs repo though, there were not too many of my changes.
    11
    Updated OP to version 1.1 rc1 with few more featured for completeness.

    Added two I/O schedulers, SIO and BFQ. You don't have to use them, especially if you don't exactly know what they are.

    Added native swap support (somebody asked), but I don't recommend ever using it. They system will become too unresponsive with it. Native swap doesn't go well with Android memory management, it doesn't work well with slow flash drives, plus you trash your SD card a lot sooner.

    Switched config to smaller faster TinyRCU, seems to be a logical change for one CPU systems.

    Things that didn't make to the kernel:
    Tiny Preempt RCU - it will not make the phone any faster, and it seems that some kernel devs have problems with it.
    zRam (compcache) - I actually added it, it kind of worked, but was sometimes crashing the phone during initialization. It's probably not a good thing to have on our phone anyway. So I took it away.

    Unless somebody comes with an idea what else to add to the kernel, I'm going to freeze the changes, wait few days for bug reports, and name it a release.
    11
    Updated OP to 1.1.0. Didn't see anything wrong with it over last few days, so let's call it a stable release and go from here.

    Small change to VoodooSound to remove ADC oversampling when doing VOIP and recognition. Probably really unnecessary, just a little paranoia.

    Looked at Vibetonz again, but didn't find anything wrong. Looks like MIUI knows about it, tries to use it, but does it incorrectly.

    Removed forced superuser update.

    If you used a OC/UV version prior to a test release that introduced extra frequencies (600, 900, 1100), review and update your voltage table!