[Samsung Epic 4G Touch] SweetwaterBurns:
Oops, forgot a step, give me a second to edit.

Ok, was able to make a patch for smartassv2 and succesfully build a kernel. I didn't test on the phone yet because I just wanted to see if it would compile and not cause issues with j4fs.ko. In

order to get this to properly work someone will need to manually edit smartass2.c to set appropriate frequencies for our phone.

I googled and found the original source for smartass2.

Cloned erasmux's repo.

Used git to create a patch of his smartass2 commit

git format-patch f23844d401b387003727cc065855bb2b6e40c8ee..2ade635b0607acc1ab0ec7f4d274855a9487af57

The long, fun part at the end is a range value. The section before the '..' (f23844...) is the commit BEFORE the commit I want to start creating patches with and the section after (2ade635b...) is the last commit I would like to convert to a patch. in this case a file called 0001-config-set-smartassV2-as-default-governor.patch is created but if the range was longer than one commit you would have one file for each commit numbered in chronological order.

copy the patch file to xda-base/kernels and cd to xda-base/kernels/performance. Run:

patch -p1 < ../0001-config-set-smartassV2-as-default-governor.patch

It will complain about a file not existing(defconfig for the hero), just hit enter and skip, we don't need that anyways. We do need to pay attention to the rejects though. 2 files will be created, include/linux/cpufreq.h.rej and drivers/cpufreq/Makefile.rej. Open cpufreq.h and cpufreq.h.rej in a text editor and go to the line number found in the rej file and start poking around for something that looks like the patch. The lines with the '+' before them need to be added(any lines with a '-' would be deleted) to the file and patch tries to squeeze them in between the lines that are shown. Our problem is that it's looking to place the new stuff after the lines concerning smartass, which we don't have. Just paste it in before the #endif. Repeat that process with drivers/cpufreq/Makefile.rej. (Don't forget to delete each '+')

If you read the comments on github for the commit(Hi, MikeC84) you probably realize that the fact that we don't have smartass is going to cause other issues. Thank you to the commentor, because I imagine that without that we'd be stuck with a non compiling/functional kernel again. Look at the original kernel/sched.c in erasmux's repo for EXPORT_SYMBOL_GPL(nr_running); to get an idea for where to put it in our respective version and copy it there.

Enable the options in your config and build away, just make sure you set up the frequencies correctly before you start flashing to your phone.

I also managed to update the source to 2.6.35.14 from 2.6.35.7 and will upload that to the performance and powersave branches tomorrow. I used the incremental patch's that are released by kernel.org for kernel upgrades and all seemed to go well other then some strangeness with futex.c that's causing build errors. Samsung seems to have backported some things and I've narrowed it down to 4 lines that I just have to figure out what stock linux uses and we should be good. I'm not sure what best practice for kernel upgrades is, any experienced devs following along? Should I start with the source from google's common.git and attempt to port drivers(I suspect this is what cyanogenmod typically does and I've seen how easy that can be for them. :rolleyes:) or is it typically safe to use those incremental files?