[Galaxy S I9000 Android Development] laststufo:
ULTIMATE SUPER OPTIMIZED Kernel

Samsung S5PV210_Rev1.0 Datasheets Are available here http://xdaforums.com/showthread.php?t=859545

GT-I9000_Kernel_4_3_4_OK Sources available here http://www.megaupload.com/?d=H0QFFLJ4

GT-I9000_Kernel_4_4_8_OK Sources available here http://www.megaupload.com/?d=UJM8VASD

GT-I9000_Kernel_4_5_1_OK Sources available here http://www.megaupload.com/?d=Y038C7LT

GT-I9000_Kernel_4_6_1_OK Sources available here http://www.megaupload.com/?d=D9SB31OI

GT-I9000_Kernel_4_7_3_OK Sources available here http://www.megaupload.com/?d=4MZSID83

GT-I9000_Kernel_4_7_7_OK Sources available here http://www.multiupload.com/4J7C7PNX7J

Insanity [ROM] by nitr8 powered by ULTIMATE SUPER OPTIMIZED Kernel !!!!

If you want to disable ramzswap put S_ramzswap_disable.sh from S_scripts.zip into you /etc/init.d directory

If you want to maximize ram performances put S_stock_mem_timings.sh from S_scripts.zip into you /etc/init.d directory

If you want to disable VSF put S_VSF_Disable.sh from S_scripts.zip into you /etc/init.d directory

The file "Customized_freqs.txt" contains a list of usable frequencies, and all of them divisors, for customize first four kernel frequencies.

If someone want ... i added possibility to donate something by paypal on my profile. If you appreciated my work you could give me a little gift.

It works on all stock froyo ROMS !!

Istructions:

Install Kernel :

1- download kernel

2- (Only Odin Version )turn off unzip file and use tar file as pda in odin and flash it

3- (Only CWM Version)go into CWM recovery and select install zip from sdcard, choose kernel CWM zip from sdcard and then install it

Apply Lagfix :

- after you installed kernel go into CWM recovery and select advanced ulk features-->Lagfix option and select your desire method and reboot your device

Apply root :

- Go into CWM recovery and select advanced ulk features-->Install superuser option, select Ext:..... and then select yes. Afther reboot the phone.

This kernel has:

- Works on all stock Froyo ROMs and popular custom ROMs

- Adjusted kernel HZ value to 300

- Adjusted user HZ value to 150

- 340MB of RAM and all features should work e.g. 720P recording & playback (since 4_4) 342MB since 4_5_3

- tun support included inside kernel

- Includes neldar's BackLightNotification 2.2 from https://github.com/project-voodoo/ba...ernel_patches/ (update to v2.3.1 since 4_6)

- sztupy's Universal Lagfix

- Sharpness & color fix for UI, inspired by supercurio's work on Voodoo

- SpeedMod: Replaced kernel jhash2 with jhash3

- Uses BFQ IO scheduler by default

- Updated FS code in kernel

- Added Tiny RCU patch for better speed and efficiency

- FS drivers compiled as external modules and loaded only if used

- OC frequencies (1200-1300-1400-1500-1600) keep attenction !!!!!!

- PDIV values optimized into clock sources

- support for AOSP bootanimation.zip

- ramzswap (http://code.google.com/p/compcache/) for better ram usage.

- sched patch : automated per tty task groups (system more smooth and responsive) (v3(since 4_3) and v4(since 4_4))

- (since 4_4) Applied patches to FS sources to maximize throughtput

- UV Support using VoltageControl version >= 2.0

- System FS Corruption patch applied

- (since 4_4) Frequencies over 1.2 ghz are overvolted. If you want you can find the more stable voltage for your phone

- (since 4_4) new sysfs table to disable selective frequencies

/sys/devices/system/cpu/cpu0/cpufreq/states_enabled_table Into this file there is an 0 or an 1 for each frequency from the higher to the lower (Es. "1 1 1 1 0 1 1 0 .....")

If value is set to zero relative frequency will not be used.

to use execute : echo "1 1 1 1 0 1 1 0 ....." > /sys/devices/system/cpu/cpu0/cpufreq/states_enabled_table

- (since 4_4) new sysfs table to read default voltage value and UV value fro each frequency

/sys/devices/system/cpu/cpu0/cpufreq/frequency_voltage_table

in each row the fisrt parameter is the frequency (mhz), the second the default voltage, the third the voltage with UV applied.

there's a row for each frequency

- (since 4_4_2) CIFS driver

- (since 4_4_6) SDCard FAT check on start-up

- (since 4_4_7) safe ro system mount & safe ext4 stl{} blocks mount at start up

- (since 4_4_7) two new sysfs files in "/sys/devices/system/cpu/cpu0/cpufreq" to change memory timings (AC_timing_data_registers,AC_timing_row_registers). Read datasheets and use at own risk.

- (since 4_4_9) JPU/JPX Drivers used now

- (since 4_4_9) JPU/JPX Memory config

- (since 4_4_9) Add tune2fs for ext4 into initramfs

- (since 4_6) JPX Kernel Aligned

- (since 4_6_4) Voodoo kernel sound patches included

- (since 4_6_6) Possibility to apply lagfixes with ext2,ext3,ext4,ext4nj,jfs with or without binds.

- (since 4_6_6) /system conversion to ext4 or jfs

- (since 4_6_6) Ext4 mount options

- (since 4_6_9) Voodoo sound 2

- (since 4_6_9) VSF (Variable Screen Frequency)

- (since 4_7_0) Enabled Color Gain Screen Functions

- (since 4_7_0) Add IPV6 privacy and enabled it by default

- (since 4_7_0) Disable printk for better performances and battery usage

Frequency voltages Table :

1600000, 1500

1500000, 1500

1400000, 1500

1300000, 1500

1200000, 1300

1120000, 1300

1000000, 1275

900000, 1275

800000, 1200

600000, 1175

400000, 1050

200000, 950

100000, 950

Good UV Values :

1600000 -150

1500000 -150

1400000 -175

1300000 -175

1200000 -25

1120000 -25

1000000 -50

900000 -50

800000 -50

600000 -50

400000 -75

200000 -75

100000 -75

Version 4_0 STABLE (2010-11-10)(Full working 3G call and 720 video recording & playback)

- BLN 2.2 :

For BLN 2.2 you MUST:

- Users of old BLN versions need to boot to Recovery Menu, then Turn Off & Turn On BLN again

- Install the latest version of BLN app by neldar from http://xdaforums.com/showthread.php?t=823922​

- FS mount tweak options inserted into init script

- Only OC Version : Use xan's app if you dont want to disable it (VoltageControl >= 1.98) - here

Version 4_1 STABLE (2010-11-15)(Full working 3G call and 720 video recording & playback)

- Some little bug fixes

- Add support for AOSP bootanimation.zip

The custom bootanimation.zip should be placed in either /data/local/ or /system/media/.

If the file bootanimation.zip does not exist in either /data/local/ or /system/media/, the default Samsung boot animation will play.​

Version 4_2 STABLE (2010-11-19)(Full working 3G call and 720 video recording & playback)

- No more deadsleep problems

- Add TINY_RCU from kernel > 2.33 (less memory and battery usage)

- Add ramzswap (http://code.google.com/p/compcache/) for better ram usage.

It creates a compressed swap file into memory.​

Important : disable data loop or use lagfix without binds. It could cause problems with ramzswap !!!​

- All FS structure align with lastest patches.

Version 4_3(2010-11-25)(Full working 3G call and 720 video recording & playback)

- Make ramzswap work better

- Update Sourgery G++ compiler to the lastest one available for download

- Add more compire optimizations options

- Add 600-904-1120-1304-1400 frequencies (system set 1000000 mhz by default at startup)

- use VoltageControl version >= 2.0 to raise frequency or UV settings

- More little fixes to improve battery drain

- add [RFC/RFT PATCH v3] sched: automated per tty task groups (system more smooth and responsive)

- FS Corruption patch applied

Version 4_3_FIX(2010-11-26)(Full working 3G call and 720 video recording & playback)

- Fix Recovery mode hang problems

Version 4_3_2_FIX(2010-11-27)(Full working 3G call and 720 video recording & playback)

- Fix UV Settings Hang problems on some configurations

Version 4_3_3_FIX(2010-11-27)(Full working 3G call and 720 video recording & playback)

- More Fixes for UV Settings Hang problems on some configurations

Version 4_3_4_FIX STABLE (2010-11-27)(Full working 3G call and 720 video recording & playback)

- Ultimate Fix for UV Settings Hang problems on some configurations

Version 4_4(2010-12-01)(Full working 3G call and 720 video recording & playback)

- add [RFC/RFT PATCH updated to v4] sched: automated per tty task groups (system more smooth and responsive)

- FS Compiled as external modules and load only if used

- Voltage reset ad stock values

- Frequencies over 1.2 ghz are overvolted. If you want you can find the more stable voltage for your phone

- new sysfs table to disable selective frequencies

/sys/devices/system/cpu/cpu0/cpufreq/states_enabled_table Into this file there is an 0 or an 1 for each frequency from the higher to the lower (Es. "1 1 1 1 0 1 1 0 .....")

If value is set to zero relative frequency will not be used.

to use execute : echo "1 1 1 1 0 1 1 0 ....." > /sys/devices/system/cpu/cpu0/cpufreq/states_enabled_table

- new sysfs table to read default voltage value and UV value fro each frequency

/sys/devices/system/cpu/cpu0/cpufreq/frequency_voltage_table

in each row the fisrt parameter is the frequency (mhz), the second the default voltage, the third the voltage with UV applied.

there's a row for each frequency

- Applied patches to FS sources to maximize throughtput

Version 4_4_FIX(2010-12-01)(Full working 3G call and 720 video recording & playback)

- fix frequency_voltage_table voltages missmatch

- minor change to make phone a bit smoother

Version 4_4_2_FIX(2010-12-02)(Full working 3G call and 720 video recording & playback)

- Some fixes for CWM hangs (it hangs only if you stay for a long time on main menu)

- CIFS driver added

- Some minor patches

Version 4_4_6_FIX(2010-12-06)(Full working 3G call and 720 video recording & playback)

- all bugs fixed

- better battery usage

- SDCard FAT check on start-up

Version 4_4_7 (2010-12-07)(Full working 3G call and 720 video recording & playback)

- OC stability fixes

- safe ro system mount at startup

- safe ext4 stl{} blocks mount at start up

- two new sysfs files in "/sys/devices/system/cpu/cpu0/cpufreq" to change memory timings (AC_timing_data_registers,AC_timing_row_registers). Read datasheets and use at own risk.

Version 4_4_8 STABLE (2010-12-08)(Full working 3G call and 720 video recording & playback)

- reduce voltage manager latency to remove last UV stability problems

- minor smooth enhancement

Version 4_4_9 (2010-12-12)(Full working 3G call and 720 video recording & playback)

- JPU/JPX Drivers used now

- JPU/JPX Memory config

- WiFi works now

- add tune2fs for ext4 into initramfs

- OC stability fixes

- Quadrant works now

Version 4_5 (2010-12-14)(Full working 3G call and 720 video recording & playback)

- USB SDCard mount problem fixed

- Performances enhancement

- Frequencies wrong values fixed

Version 4_5_1 (2010-12-18)(Full working 3G call and 720 video recording & playback)

- FS Performances increased

- Little stability fix

- Fix enabled_states (now work)

- Better scheduler init parameters

- fixed a problem for 1500 and 1600 frequencies.

Version 4_5_2 STABLE (2010-12-20)(Full working 3G call and 720 video recording & playback)

- Ramzswap fixes on free-notify

- Update tune2fs executable

- fixed a stability problem for 1120 Mhz frequency

- fixed a stability problem with ext4 mount on dbdata partition

- fixed start-up hang problem

Version 4_5_3 STABLE (2010-12-21)(Full working 3G call and 720 video recording & playback)

- 342 MB free at start-up

Version 4_6 STABLE (2010-12-28)(Full working 3G call and 720 video recording & playback)

- JPX Kernel Aligned

- Minor memory tweaks.

- BlackLigthNotificaion updated to v2.3.1

- Fixed a bug with external SD Mount

- Since this release the first four frequencies are completely user configurable :

There are four new sysfs files with this structure ARMCLK,MDIV,PDIV,SDIV,DIVA2M,DIVHCLKM,DIVPCLKM,DIVG2D,DIVMFC,DIVG3D

- /sys/devices/system/cpu/cpu0/cpufreq/user_free_freq_values_table_L0 original values (1600,400,6,1,7,7,1,4,4,4)

- /sys/devices/system/cpu/cpu0/cpufreq/user_free_freq_values_table_L1 original values (1500,375,6,1,7,7,1,4,4,4)

- /sys/devices/system/cpu/cpu0/cpufreq/user_free_freq_values_table_L2 original values (1400,350,6,1,7,7,1,3,3,3)

- /sys/devices/system/cpu/cpu0/cpufreq/user_free_freq_values_table_L3 original values (1300,325,6,1,7,7,1,3,3,3)

ARMCLK is the final CPU freq(Mhz) and it is a calculated value so do not set it as you want. It's value have to be calculate as follow :

ARMCLK = MDIV X 24 / (PDIV × 2power(SDIV-1)

where, MDIV, PDIV, SDIV must meet the following conditions :

PDIV: 1 = PDIV = 63

MDIV: 64 = MDIV = 1023

SDIV: 1 = SDIV = 5

(25/ PDIV): 1MHz <= (24/ PDIV) <= 12MHz

Es. ARMCLK = 400 X 24 / (6 × 2power(1-1) = 1600(Mhz)

DIVHCLKM is the divisor for main system frequency.

HCLK_MSYS(main system frequency in Mhz) = ARMCLK / (DIVHCLKM + 1)

Es(1600). HCLK_MSYS = 1600 / (7 + 1) = 200(Mhz)

HCLK_MSYS must be <= 200 (Mhz)

DIVPCLKM is the divisor for perimetral devices frequency.

PCLK_MSYS(perimetral devices frequency in Mhz) = HCLK_MSYS / (DIVPCLKM + 1)

Es(1600). PCLK_MSYS = 200 / (1 + 1) = 100(Mhz)

PCLK_MSYS must be <= 100 (Mhz)

DIVA2M is the divisor for 2d and 3d subsystem frequency.

SCLKA2M( 2d and 3d subsystem frequency in Mhz) = ARMCLK / (DIVA2M + 1)

Es(1600). SCLKA2M = 1600 / (7 + 1) = 200(Mhz)

SCLKA2M must be <= 400 (Mhz)

DIVG2D is the divisor for 2d graphic subsystem.

DIVG3D is the divisor for 3d graphic subsystem.

DIVMFC is the divisor for Multi-Format Codec.

these values must be calculate as follow :

SCLKG2D= SCLKA2M / (DIVG2D + 1)

SCLKG3D= SCLKA2M / (DIVG3D + 1)

SCLKMFC= SCLKA2M / (DIVMFC + 1)

Es(1600).

SCLKG2D(Mhz)= 200 / (4 + 1) = 40(Mhz)

SCLKG3D(Mhz)= 200 / (4 + 1) = 40(Mhz)

SCLKMFC(Mhz)= 200 / (4 + 1) = 40(Mhz)

Just to try by your self the values for 1200 and 1000 are (1200,300,6,1,6,6,1,3,3,3) and (1000,250,6,1,4,4,1,3,3,3).

To set your values at start-up crete a S_xxxxxx.sh script file as follow :

#!/system/bin/sh

echo "1600 400 6 1 7 7 1 4 4 4" > /sys/devices/system/cpu/cpu0/cpufreq/user_free_freq_values_table_L0

echo "1500 375 6 1 7 7 1 4 4 4" > /sys/devices/system/cpu/cpu0/cpufreq/user_free_freq_values_table_L1

echo "1400 350 6 1 7 7 1 3 3 3" > /sys/devices/system/cpu/cpu0/cpufreq/user_free_freq_values_table_L2

echo "1300 325 6 1 7 7 1 3 3 3" > /sys/devices/system/cpu/cpu0/cpufreq/user_free_freq_values_table_L3
​

Good work to all.:)

​

Version 4_6_1 STABLE (2010-12-29)(Full working 3G call and 720 video recording & playback)

- Fix a bug into memory timing change routine

- Remove useless kernel overhead disabling CONFIG_OABI_COMPAT from .config File

- Add "S_stock_mem_timings.sh" into S_scripts.zip to set memory timing a bit better as in datasheets specs to maximize its performances in a safe manner

Version 4_6_2 STABLE (2011-01-05)(Full working 3G call and 720 video recording & playback)

- Remove an useless line from post-init.sh

- Add laptop mode with misc tweaks enabled under Recovery

- Change property windowsmgr.set_max_events_per_sec to 60 to maximize UI smooth.

Version 4_6_3 STABLE (2011-01-11)(Full working 3G call and 720 video recording & playback)

- Add a patch to optimized cache flush

- Add Armv7 optimized memset version

Version 4_6_4 STABLE (2011-01-11)(Full working 3G call and 720 video recording & playback)

- Add voodoo kernel sound patches :p

Version 4_6_5 STABLE (2011-01-13)(Full working 3G call and 720 video recording & playback)

- Removed Armv7 optimized memset version

- Rear speaker volume increased +1 for media

- Light sensor polling interval changed to 2s instead of 0.5s

(saves battery, more stable brightness levels)

- Light sensor sensitivity adjusted so that the screen doesn't turn bright so easily

(saves battery and reduces screen burn)

- Adjustments to IO scheduler Tweak

Version 4_6_6(2011-01-15)(Full working 3G call and 720 video recording & playback)

- Battery polling decreased from 5s to 30s (better battery usage)

- Better display light usage (better battery usage)

- Wifi scanning interval increased to 60s (better battery usage)

- Since this version my kernel have its own CWM (from speedmod one) :

Possibility to apply lagfixes with ext2,ext3,ext4,ext4nj,jfs with or without binds.

/system conversion to ext4 or jfs

Ext4 mount options
​

Version 4_6_7 STABLE (2011-01-17)(Full working 3G call and 720 video recording & playback)

- Change light usage

- Add Custom kernel version

- Fix recovery lagfix bug

- Fix mic gain

Version 4_6_8 STABLE (2011-01-18)(Full working 3G call and 720 video recording & playback)

- Fix ROM Manager BUG (now updates work) (tnx nitr8 !!!)

Version 4_6_9 STABLE (2011-01-24)(Full working 3G call and 720 video recording & playback)

- Wifi driver battery drain fix

- Mic gain fix

- Voodoo sound 2

- VSF (Variable Screen Frequency) : Screen frequency go from 60hz (stock frequency) down to 25hz to maximize battery life. Frequency return to 60hz after a button/screen press or CPU load are more than or equal to 1ghz. Frequency return down to 60hz after 800ms.

Version 4_7_0 STABLE (2011-01-26)(Full working 3G call and 720 video recording & playback)

- Enabled Color Gain Screen Functions

- Add IPV6 privacy and enabled it by default

- Disable printk for better performances and battery usage

- Better VSF Settings.

- Add 7 sysfs files into "/sys/devices/platform/s3cfb" directory :

VSF_enable (to enable "1" or disable "2" VSF)

VSF_min_cpu_freq_to_change_screen_freq (To specify A CPU freq : - When CPU <= VSF is Enabled - When CPU > VSF is Disabled)

VSF_min_screen_freq (Min screen frequency)

VSF_timer_interval & VSF_timer_iterations_until_change (Screen set to lower freq after (VSF_timer_iterations_until_change) * (VSF_timer_interval in milliseconds))

LCD_color_gain & LCD_color_gain_low (see example script)
​

- Add 3 new script files to S_script.zip within default kernel values:

S_VSF_Disable.sh

S_VSF_Settings.sh

S_LCD_Color_Gain.sh
​

Version 4_7_1 (2011-01-27)

- Added support for voice calls through headphones

- Enable color gain only on video sync (better battery usage)

- Fix a "Color Gain" Bug

- New sysfs file :

LCD_max_screen_freq (Max screen frequency on normal use)

​

Version 4_7_2 STABLE (2011-01-29)

- Fix camera/video bug

Version 4_7_3(2011-01-31)

- VSF now is very user_friendly

- VSF changes :

Screen go to upper freq when volume key is pressed

Better color gain routine

Screen go to upper freq when accelerometer returned a value >= 0.3g (customizable using VSF_gforce in sysfs/devices/platform/s3cfb)

Screen min freq changed to 40hz from 25hz

Cpu min freq for VSF change to 600mhz from 800mhz
​

- Voodoo sound patched 4

Version 4_7_4 (2011-02-02)

- Fix the ext2 lagfix bug

- Optimal conservative governor settings (save a lot of battery)

- VSF changes :

MFC : When you see a video VSF will be disabled

Camera : When you use Camera VSF will be disabled

JPEG Decode/Encode : When you Encode Decode a Jpeg VSF will be disabled

​

Version 4_7_5 (2011-02-08)

- VSF is disable by default when you play a game

- Better governor settings (a bit lower battery usage)

- Cifs module compile and included as external one (some applications had some problems to probe it inside the kernel)

- Hz change to 400 and USER_HZ to 200. Better performances and user experience.

Version 4_7_6 (2011-02-10)

- Headphones Call work fully now

- Some little bug fix

Version 4_7_7 (2011-02-16)

- VSF now Disabled during battery charging

- Better screen Sharpness

- New sysfs file, /sys/devices/system/cpu/cpu0/cpufreq/cpu_thres_table, to change cpu threshold values

- New script, S_set_cpu_thres_table.sh, inside S_scripts.zip file as an example to how change cpu threshold values

Version 4_7_8 (2011-02-20)

- Better Sharpness Again

- Added Bonus scaling on conservative governor :

Every two scaling up events a bonus up jump on upper freq is made to get more smooth

Every two scaling down events a bonus down jump on lower freq is made to get better power usage

​

Version 4_7_9 (2011-02-24)

- Fix a bug that hangs phone when you disable the cpu state before the maximum

- Add ext2 for System FS. IT DO NOT WORKS AT ALL. IS THE FS TYPE IS NOT SUPPORTED BY THE PHONE IN SOME WAY??

- Change down Bonus scaling on conservative governor

Now every THREE scaling down events a bonus down jump on lower freq is made to get better power usage and better system response time
​

Version 4_8_0 (2011-02-27)

- Fixed usb TV OUT reboot bug

- Go back to RCUTREE for better speed and stability

- Set VSF CPU limit to 800000 from 600000 from optimal usage

Version 4_8_1 (2011-02-28)

- VSF Disabled by DEFAULT

- Laptop Mode Disabled by DEFAULT

- RAMZSWAP Disabled by DEFAULT

- New options under Recovery Menu/Tweaks Options

Enable VSF

Enable Laptop Mode

Enable RAMZSWAP

Enable Memory Enhange Settings
​

Version 4_8_2 (2011-03-03)

- Better VSF screen adjustment algorithm. Less invasive.

- Add Kernel SuperSpeed option under Recovery Menu/Tweaks for a full speed kernel. High battery Usage !!!

- Remove Ext4nj from FS lagfix list but add under Recovery Menu/Tweaks these Options :

Disable EXT4 Journal on System

Disable EXT4 Journal on Cache

Disable EXT4 Journal on Data
​

Version 4_8_3 (2011-03-18)

- Little VSF adjustments

- Voodoo Sound V. 5

- Now, if you want you can disable journal on EXT4 DBData.