yashsingh1/xdaforums huggingface dataset:
[Samsung Epic 4G Touch] garwynn:
GA10 will get a repack at some point but FL24 is more pressing as it's now the official.

In the meantime the FL16 repack seems to work just fine.

Hopefully they'll decide on an OTA for JB soon and we'll get source.

Would greatly simplify the process...
[Samsung Epic 4G Touch] garwynn:
Repos set up for Virgin FL26 and Boost FL24.

Virgin FL26:

https://github.com/garwynn/D710VMUB_FL26_Kernel

Boost FL24:

https://github.com/garwynn/D710BST_FL24_Kernel

New threads started for each.

Sprint FL24 updated by Agat enough that it warranted a recompile!

We're now on 0.4.0 and have governors!
[Samsung Epic 4G Touch] MoHoGalore:
(Bump for reference for self)
[Samsung Epic 4G Touch] Mattix724:
Bump up to the top. Same purpose.
[Samsung Epic 4G Touch] SweetwaterBurns:
Thank you for passing on the message. I checked the github repository and it looks like the lib/modules directory didn't get uploaded in the initramfs. I'll try putting a placeholder file there and will update it when I get home tonight.
[Samsung Epic 4G Touch] xlGmanlx:
So this is just the kernel no? If yes, how do you go about compiling your recovery of choice?
[Samsung Epic 4G Touch] agat63:
You would take a recovery.rc of your choice and put it into initramfs folder and script will put it into your zImage
[Samsung Epic 4G Touch] SweetwaterBurns:
Are you up to pushing towards a performance branch of the kernel? Not sure the best way to approach having multiple kernel versions(I'm picturing stock, performance, and powersave variants.) Maybe I could use repo and separate repositories for each kernel, but that might be to complex, to fast as I'm still figuring out git.

As for j4fs not building make sure there aren't any conflicts with dependencies of the governor you are adding. I'll try to look into it when I have time.
[Samsung Epic 4G Touch] SweetwaterBurns:
Preferably, create a directory under xda-base/initramfs and call it from the command line with build.sh that way you have a clean base to compare or revert to, if you wish.
[Samsung Epic 4G Touch] dtm_stretch:
I forked your repo, im going to make my changes and experiment. If I have success, I'll make a pull request and you can merge them. I'm leaning towards a powersave kernel.

Or, you could just maintain the 100% working stock base with cwm and su. Really it's up to you.
[Samsung Epic 4G Touch] SweetwaterBurns:
Yeah, that's why I figured having different branches would be handy; different people, different goals. I almost think that I should just set up a different directory for each kernel type, but that would make the initial download huge. I'm looking into git's submodules, but that seems clear as mud at the moment and repo still looks like the best option for the future. I'll set up some branches for now and push them in a few minutes.
[Samsung Epic 4G Touch] SweetwaterBurns:
All right.

There are now branches for powersave, performance, and stock. Once you have cloned the repo you can select which one to use by typing

git checkout powersave

or whatever. The only difference between the repos at the moment is that I renamed the kernel source directory to match the branch name and edited the build.sh to build the respective variants by default. If anyone has any requests for other branches, let me know.

I also added a check to the build.sh to ensure that there is a lib/module directory in the initramfs that modules can be copied into.
[Samsung Epic 4G Touch] MikeC84:
Any one figure out how to add governors, io schedulers, etc?

I tried adding and defaulting IO scheduler to bfq - j4fs will not compile

I tried adding smartass / V2 governors - j4fs will not compile

Seems like when ever I edit the defconfig file to enable a feature, j4fs.ko will not compile...

At least I got OC/UC working right lol
[Samsung Epic 4G Touch] SweetwaterBurns:
Are you editing by hand? Try running 'make your_defconfig' and 'make menuconfig' instead. If a feature becomes unavailable because of a change it will no longer be selectable and you know there are some dependency issues that need to be resolved. Once you have it working, copy .config to arch/arm/configs/your_defconfig to set them up as your new default.

Also, what patches are you using to add the governors? Might make it easier to help you debug.
[Samsung Epic 4G Touch] dtm_stretch:
Branches is probably a better idea since this is a community effort. I am still learning github(and in fact all of this is relatively new).

Honestly, you are way ahead of me. I did some googling yesterday and really couldn't find much in regards to kernel modifications; any chance you could point me in the right direction? I have been checking out other kernels github's to get some ideas.
[Samsung Epic 4G Touch] agat63:
I'm not sure how far are those governors are phone specific but you should check out this thread to include them into kernel source:

http://xdaforums.com/showthread.php?t=1242323

and here is an example of smartass cpufrec_smartass2.c for 2.6.35 kernel and how to:

https://github.com/erasmux/hero-kernel-2.6.35/commit/2ade635b0607acc1ab0ec7f4d274855a9487af57
[Samsung Epic 4G Touch] dtm_stretch:
Are the branches not supposed to include the kernel_source(kernels directory) when you check them out?
[Samsung Epic 4G Touch] MikeC84:
Yea I am editing by hand. I am using this as a reference and enabling it in c1_rev05_na_spr_defconfig by adding:

CONFIG_CPU_FREQ_GOV_SMARTASS=y

CONFIG_CPU_FREQ_GOV_SMARTASS2=y

Problem is any time I edit the defconfig, j4fs.ko does not compile.
[Samsung Epic 4G Touch] agat63:
But you should have that cpufreq_smartassV2.c somewhere in your kernel source so it will be compiled and included in your zImage.
[Samsung Epic 4G Touch] MikeC84:
I do. If you look at what I referenced you will see... I added smartass.c, smartass2.c, edited the makefile and kconfig file and cpufreq.h file. They are not enabled so they are not "usable".

I tried using make menuconfig and enabled them in their but wasn't sure how to use that config file or if it even the correct config file..

I just been using other githubs as a reference..
[Samsung Epic 4G Touch] agat63:
And still doesn't compile or compiled with errors?
[Samsung Epic 4G Touch] SweetwaterBurns:
Umm, no. let me figure out what I did wrong.

Ok, forgot to add the renamed directories to the git index before I commited, I think. I'm doing that now and we'll see what happens.
[Samsung Epic 4G Touch] MikeC84:
From what I gathered on github, you have to enable the governors by editing the defconfig file. There no way of selecting the governors if they are not enabled.

Any time I edit the defconfig file, j4fs.ko will not compile.

Also the other governors have a corresponding .o file that is supposed to be built by the config I just don't know how to enable the governors without j4fs not compiling and get the corresponding .o file.

Here what I just tried but something errors..

michaelc@michaelc-iMac:~/Desktop/SPH-D710_SPR_Kernel$ make menucinfig
make: /opt/toolchains/arm-2009q3/bin/arm-none-linux-gnueabi-gcc: Command not found
make: *** No rule to make target `menucinfig'. Stop.
michaelc@michaelc-iMac:~/Desktop/SPH-D710_SPR_Kernel$ make menuconfig
scripts/kconfig/mconf arch/arm/Kconfig

*** End of Linux kernel configuration.
*** Execute 'make' to build the kernel or try 'make help'.

michaelc@michaelc-iMac:~/Desktop/SPH-D710_SPR_Kernel$ export CROSS_COMPILE=/home/michaelc/Desktop/arm-2009q3/bin/arm-none-eabi-
michaelc@michaelc-iMac:~/Desktop/SPH-D710_SPR_Kernel$ make
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
GEN usr/initramfs_data.cpio
AS usr/initramfs_data.o
LD usr/built-in.o
CC drivers/cpufreq/cpufreq_smartass.o
drivers/cpufreq/cpufreq_smartass.c: In function 'cpufreq_smartass_freq_change_time_work':
drivers/cpufreq/cpufreq_smartass.c:272: error: incompatible type for argument 2 of 'cpumask_next'
include/linux/cpumask.h:169: note: expected 'const struct cpumask *' but argument is of type 'cpumask_t'
make[2]: *** [drivers/cpufreq/cpufreq_smartass.o] Error 1
make[1]: *** [drivers/cpufreq] Error 2
make: *** [drivers] Error 2
[Samsung Epic 4G Touch] SweetwaterBurns:
The Kconfig file adds the options for menuconfig, xconfig, etc so you should be able to enable disable them with those tools.

I would download working kernel source from one of the other Galaxy S II phones(to make sure the sleep/awake freqs for smartass,etc are compatible and don't melt your phone) and use this guide to make a patch with a clean(unmodified) kernel of the drivers/cpufreq directory and include/linux/cpufreq.h

Apply the patch to your working source, use menuconfig and see if that works.
[Samsung Epic 4G Touch] MikeC84:
How do these guys get away with just editing the defconfig file and adding the necessary files?

https://github.com/gtg465x/android_...mmit/801a1d99b124ff27cfbbbbe643893fa3419e04a6

https://github.com/bedwa/Infusion-GB/commit/84e0b9a2697dbfb602f066416bc51ad92736eff1
[Samsung Epic 4G Touch] SweetwaterBurns:
Redid the the branch for powersave because I screwed up the first ones. Finishing up the others now.

Edit: and they're up
[Samsung Epic 4G Touch] dtm_stretch:
I don't know if you want to add this to the OP but after you clone the repo, you have to configure the remotes, like below, then you can checkout the branch.

$ cd xda-base
$ git remote add upstream git://github.com/SweetwaterBurns/xda-base.git
$ git fetch upstream
$ git checkout whateveryouwant
[Samsung Epic 4G Touch] SweetwaterBurns:
Not sure. I know I've used the patching method successfully in the past, so that's what I tend to rely on for porting changes. My guess is that you're missing something and with the patch being a sort of catch all solution, that should help with those sorts of errors...

Here's some patches I made (using the exact steps in the guide) to try made from siyahkernel on the international GSII. Copy them to xda-base/kernels (assuming the kernel you're working on is located there) change to the kernel directory and apply them with

patch -p1 < ../cpufreq.patch
patch -p1 < ../cpufreq.h.patch

I've glanced through them and they seem ok(I'm not exactly an expert) and they show up in menuconfig but haven't built with them. Let me know if you they work for you or what you do to get it working.
[Samsung Epic 4G Touch] SweetwaterBurns:
Thanks, I'll go through and make sure everything works right on a fresh sync tomorrow, but I need to get to bed so I can work in a few short hours.
[Samsung Epic 4G Touch] agat63:
Tried to apply patches.

Even thou those files are in my Kernel folder and I cd'd to that folder I'm getting:

bash: ../cpufreq.patch No such file or directory
[Samsung Epic 4G Touch] SweetwaterBurns:
Sorry, I could have been more clear in explaining that. I like to copy the patches to the directory above the kernel source so I can use them to patch another kernel without wondering where I hid them. If you have them copied in to your source directory, replace the .. with a . and it should work correctly.
[Samsung Epic 4G Touch] SweetwaterBurns:
Ok, so my patches don't compile. I'm in the process of reinstalling Ubuntu on my desktop now that it's out of storage, but my wife might want me to take a break at some point tonight. I'll take a look and see if there is a cleaner way to port the schedulers over if no one else figures out what we're doing wrong first.
[Samsung Epic 4G Touch] agat63:
That's on my to do list as soon as I get home after work.

Beeing married for over 27 years. Not to many plans for Valentines day.:D

Edit: After 2 days of trying I've got to admit that I failed miserably and wasn't able to add any of the governors to kernel source.

If have tried patch files posted here and 2 or 3 other files from other sources. Never been able to compile a kernel after applying the patch.
[Samsung Epic 4G Touch] agat63:
Thanks for instructions and guide.

Worked like a charm.

Running kernel with smartassv2 governor for 2 hours. Everything looks fine so far.

I saw those reject files but didn't know what to do with them.

Thanks for explanations.
[Samsung Epic 4G Touch] Dozenboy0012:
are you considering sbs?
[Samsung Epic 4G Touch] agat63:
Did you ask me?

If yes, what is sbs?
[Samsung Epic 4G Touch] MikeC84:
Superior battery charging aka sbc.

It is still unknown if this is bad for batteries. Some say it is while other say it not because of battery explosions.

Imo I wouldnt add it to a kernel.
[Samsung Epic 4G Touch] agat63:
Never heard of it thus not planning to add it to kernel.

I'm looking for good way to undervolt it.

In my roms and kernels I'm more concerned with battery life than with quadrant or linpack scores.

My Samsung Moment was running over 2 days with lite to moderate use on my rom/kernel combo.

I wanna try to extend battery life as much as possible.
[Samsung Epic 4G Touch] Dozenboy0012:
thats fine jus asking used it on my evo was great having it on 100 for an hour b4 dropping maybe you could could do one for others under their own descesion i ran it for 2 yrs same battery;)
[Samsung Epic 4G Touch] MikeC84:
Some interesting reads about sbc:

http://www.ziggy471.com/2011/01/02/overcharging-batteries/

http://www.talkandroid.com/39650-are-sbc-kernels-worth-it/#.Tz2AlJ9Bez8

And then there's these:

http://xdaforums.com/showthread.php?t=890448

http://xdaforums.com/showthread.php?t=904577
[Samsung Epic 4G Touch] SweetwaterBurns:
Ok, apperently I did run into some issues with the upgrade to 2.6.35.14 so I'm going to hold off pushing it. For some reason the processer frequencies were set to max out at 528 mhz. The best part was I ran it all day and didn't even think anything of it until I tried to play some games and noticed the lag. Battery life was great, though.

Starting over from clean sources to make sure I don't mess it up again.
[Samsung Epic 4G Touch] MikeC84:
I figured out how to add governors without patching!! SweetwaterBurns, feel free to put this in the OP!

1. First you want to add the necessary .c files for the governor you are adding.

2. Edit drivers/kconfig

3. Edit drivers/MakeFile

4. Edit include/linux/cpufreq.h

Used this git as a reference. Thanks Cayniarb!

make menuconfig

From there scroll down to cpu power management options and hit enter. Scroll down till you see the governor you just added and hit "y" when highlighted. Make sure it added a "x" or check mark next to the governor.

When you are done scroll to the bottom and select save an alternative configuration file. Name it what ever you feel like naming it just make sure you put _defconfig at the end. Mine looks like:

sph_d710_defconfig

Now to compile. When you compile make sure to use your newly created defconfig file instead of the c1_rev05...... when loading the defconfig
[Samsung Epic 4G Touch] interloper:
Yay! Just checking in so I get emails. This is the sweetest thread. Cheers all and happy kernel'ing.
[Samsung Epic 4G Touch] interloper:
SBC is an HTC kernel option. I like it, but the reason it became popular with HTC devices isn't a real issue with Samsung devices. The battery level doesn't drop 10-20% as soon as you unplug the charger. I used SBC on my EVO, but never noticed my battery lasting longer, nor did it get hot and die either...I could probably be ported, but the gains would be minimal. I am going to (have some already) work on porting the 3.X CPU power management system into 2.X kernels, deep sleep, better low speed voltage regulation is where it's at IMO. Looking at the device, and how it's used, most of the time these devices are sleeping or jamming, in between is less significant. I'd like to see a kernel operate on one core 100mhz and jump to 1.6ghz dualcore like a wildcat. That would be sweet.

---------- Post added at 10:15 AM ---------- Previous post was at 10:10 AM ----------

the defconfig, or menu/gui config all pick up on the contents of the kconfig files found everywhere else by the build system. If the defconfig has the proper settings already, the kconfig doesn't need it. However, if you want the options to show up in menu/gui config, they must be implemented through the proper kconfigs.
[Samsung Epic 4G Touch] MikeC84:
Yea I figured it out and added it with menuconfig. See my last post
[Samsung Epic 4G Touch] interloper:
Cool, I'm just getting caught up on the thread. Haven't read back all the way, I keep getting sidetracked with doing the stuff I see.
[Samsung Epic 4G Touch] dtm_stretch:
Glad to see you guys making some significant progress, I need to get back in this but I have been really busy.

Side note: Has anyone thought about pulling the zimage out of the FB09 leak unpacking it and repacking it with CWM/SU? The xda-base includes the unpacking script and there is a repacking script around here somewhere.
[Samsung Epic 4G Touch] MikeC84:
Yea I been messing with it a little today. I removed savagedzen and interactivex governors and replaced them with smartassV2 and LagFree governors.

I have one that I just made that has BFQ scheduler defaulted and now Im gonna add in BFS and CFS schedulers.

EDIT: Added SLQB Memory Allocator
[Samsung Epic 4G Touch] rujelus22:
Is anyone having issues with the powersave governor? Any time I switch to it, it will lock the phone up when the screen goes off.

I thought it was something that I was doing but I just re-downloaded everything and made one without changing anything, and still had the same issue.

I get the same issue if I add the lazy or smartass govonors as well. Anyone have any ideas?
[Samsung Epic 4G Touch] MikeC84:
You have to make sure what ever git you are referencing from is 2.6.35 or else it will not work properly. That is what happened with me when I started. Use one of Cayniarb git as a reference for 2.6.35. git is a little more confusing as it only shows the changes in patch form but you will get the hang of it...

He has helped me with the governors and IO now my kernel has some basic features....

- Rogue Recovery

- OC up to 1.704 MHz

- Uv

- LagFree Governor

- SmartassV2 Governor - Defaulted

- BFQ IO Scheduler - Defaulted

- SLQB Memory Allocator - Enabled

BTW you cant just edit the defconfig file, it will not compile correctly.

You need to:

make menuconfig

This is where you enable the governors and IO's and when your done it will build a new defconfig. Make sure you have _defconfig at the end of the file name.

Use that defconfig for next compile.

EDIT: I do this all from my desktop . I dont use git, not yet at least..
[Samsung Epic 4G Touch] rujelus22:
I will take a look at that git. I have been using the git from the OP. where are you getting your governor files? I have been using the make menuconfig, I have SLQB turned on and it set sio. Just could not figure out the powersave. especially since I did not change anything and it would not work.
[Samsung Epic 4G Touch] MikeC84:
Isn't powersave already on the kernel by default? I got them from that git link I just posted. Like I said, just make sure you are referencing the same kernel version as the one you are building.
[Samsung Epic 4G Touch] rujelus22:
Yes it is in there that is what I am saying. If I choose it then turn off the screen I can not turn it back on. Smartass, and Lazy also do it if I add them in.

Edit:Started with a new git and got powersave and the others working now. Thanks for the help
[Samsung Epic 4G Touch] interloper:
MikeC84, are you talking about messing with the FB09 leak, or the GB kernel?
[Samsung Epic 4G Touch] MikeC84:
Yes the 2.6.35 kernel. Can't do anything to ics kernel till source is released.
[Samsung Epic 4G Touch] interloper:
If you use IRC hit me up on freenode #evervolv in two hours if no one has help you already. One question I have now is: If you are building a completely stock kernel, why are you pulling parts from another build. The CRC error is caused by a mismatch in the build numbers/versions/machines. But by the cursory glance I gave this, the WIFI modules seem to be loading properly according to dmesg. Also, is the dmesg taken immediately after trying to perform whatever function? And, are you referring to the built in WIFI tether/AP or the APK from google.code?
[Samsung Epic 4G Touch] agat63:
I won't pretend that I understand everyting you have in your logcat but here is a thought.

If I understand you correctly you are talking about Hotspot hack.

Hotspot hack in latest ICS leaks we have for Sprint E4GT and before that in all our GB roms was in framework and not in the kernel.

May be you should take a look at framework changes.

There were modifications done to framework.jar and services.jar.

In latest ICS builds we don't have kernel source but we still have hotspot hack and we can use native hotspot app for tethering.
[Samsung Epic 4G Touch] droidroidz:
This is for stock us cellular sgs2 not the epic touch from sprint.

I simply extracted the initramfs from our default kernel sent on a stock sgs2. I think maybe uscc might have updated the wifi modules before they shipped out the device. The dmesg was taken right after the error launching stock AP mobile hotspot app, not the toogle tether. On uscc the mobile hotspot AP has always worked even without paying for the service. I'm not near a PC now or I could go into greater detail.
[Samsung Epic 4G Touch] interloper:
The android build system applies the CRC sums at build time, so what you suggest could only be possible if uscc spoofed the sums somehow. Whatever you do you MUST use modules from the same release and only if CRC settings are relaxed in the .config. E4GT has settings that allow the use of modules from a different initramfs only if the same android version is used and if the settings are right. I'm also not at my build machine or I could tell you exactly. I can get back to you on it though in a bit. The best way to do what you want is to build the entire thing from the same source.
[Samsung Epic 4G Touch] droidroidz:
I guess where I am confused is, i am using the initramfs extracted from USCCs stock kernel. I thought i was building it straight from source doing it this way but I guess I just don't know how to build the initramfs from source? I am moving the modules that are compiled from the first make over to the initramfs/lib/modules so they have to be from the same version of android i would presume? What do you suggest i try next to get a successful build?
[Samsung Epic 4G Touch] interloper:
If you have the stock kernel source it will build the initramfs also. If you are attempting to make a kernel with a custom recovery you must have the files for it but make the modules for it using the stock source build system while incorporating the custom recovery/initramfs. What this thread does is show how this is done for the e4gt GB source. What I suggest, if you want an ALL stock kernel is simply find the correct def_config for your device in */arch/arm/configs and use "make that_def_config -j#" where #=the available cpu cores+1. You will have to make sure your toolchains are referenced correctly by makefile. This will make the modules, the intramfs and the kernel producing a final zImage with everything compressed. The kernel build tools will also create a boot.img is you use "make boot.img that_def_config -j#" I hope that helps. Cheers!
[Samsung Epic 4G Touch] droidroidz:
Ok now if I don't use the command:

make -j3 CONFIG_INITRAMFS_SOURCE=/home/me/ANDROID/initramfs_stock

and just make -j3

I get a Kernel size of only 3.6mb? I am guessing that the initramfs was not built? How do I tell it to create the initramfs without pointing it to any files? In the guide in the thread you guys point to a custom initramfs, which works for me also but the built in wifi AP doesn't work. I guess how can i create a custom initramfs that i can add root, bb etc too in the future as this is ultimately my goal.
[Samsung Epic 4G Touch] interloper:
I've seen full kernels that size. The default config command should do it all. Try unpacking it to see if everything is present.
[Samsung Epic 4G Touch] droidroidz:
Ok, I unpacked it and it did create a initramfs but there is only 1 file and 1 folder in it /initramfs/dev and initramfs/root. What do i need to do to take the initramfs you guys are using and customize it for our device? I thought i had everything, the only thing is the wifi ap that wont load.