[GUIDE][HOW TO]Compile S5670 kernel with many Features :D

Search This thread

zcop

Senior Member
Nov 17, 2011
282
505
Hanoi
You need linux enviroment to compile kernel.
Suggest: Install Ubuntu 64bit.
Download:http://www.ubuntu.com/download/ubuntu/download
Select Ubuntu 11.10 and 64bit version

Hardware required:
CPU >= 1,5Ghz
Ram >= 2GB
HDD atleast 20GB space left

After complete download Ubuntu. You have 3 choices:
-Install Ubuntu in VMware
-Install Ubuntu like system OS
-Install Ubuntu like a soft in Windows
I recommend the 3rd way.

Extract ISO file with winzip or winra or 7z to a folder.
Go in to that folder run wubi.exe
s1.png

s2.png

s3.png


Restart to complete install ubuntu.

If you want to uninstall Ubuntu: go to Control Panel and uninstall Ubuntu like other soft in windows.

Ubuntu 11.10 come with a wifi problem. Broadcom chip has no driver. Solution:
-Turn on wifi on S5670
-USB tether
-Now you have internet
-Follow pitures to solve problem
s4.png

s5.png

s6.png

s7.png

s8.png
 
Last edited:

zcop

Senior Member
Nov 17, 2011
282
505
Hanoi
Download S5670 Newest Source release

https://opensource.samsung.com/index.jsp


Link Mediafire

Download Toolchain to compile kernel
https://sourcery.mentor.com/sgpp/lite/arm/portal/package8734/public/arm-none-eabi/arm-2011.03-42-arm-none-eabi-i686-pc-linux-gnu.tar.bz2
After download complete follow pitures :p
s9.png

s10.png

s11.png

s12.png

s13.png

s14.png

s15.png

s16.png

s17.png

s18.png

s19.png


After all workplace should like this
s20.png


How to open Terminal
s21.png

s22.png

s23.png

Or use combo key: CTRL+ALT+T

Open Terminal copy command below an paste in Terminal
Code:
sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev valgrind

Now you need a boot.img that you want to modify kernel. Exp: Boot.img from DXKT4 :D
You need tool to unpack, repack boot.img
http://www.mediafire.com/?zdw766gu35o0fb6
Thank to ketut.kumajaya about his useful tool.
Extract to folder android
In Terminal
Code:
cd /home/[COLOR="red"]your username[/COLOR]/android/boot.img-tools
Now copy boot.img to folder called source_img in boot.img-tools folder above
Open Readme.txt
Follow the guide to extract boot.img
============================================================================================
After extract boot.img done
Code:
cd /home/[COLOR="Red"]your username[/COLOR]/android/GT-S5830_kernel/kernel
Code:
gedit Makefile
A text file open
Ctrl+F type: cross_compile
Find:
Code:
CROSS_COMPILE   =../../toolchain/arm-eabi-4.4.3/bin/arm-eabi-
Change to
Code:
CROSS_COMPILE   =../arm-2011.03/bin/arm-none-eabi-
Ctrl+S
Close
Code:
cd /home/[COLOR="Red"]your username[/COLOR]/android/boot.img-tools/boot/lib/modules
Code:
strings fsr.ko | grep vermagic
You'll see something like this
Code:
vermagic=2.6.35.7-perf-[COLOR="Red"]CL783107[/COLOR] preempt mod_unload ARMv6
Go to home/android/GT-S5830_kernel/kernel/arch/arm/configs
Find beni_rev01_defconfig open with gedit( double click to file > Display)
Find line
Code:
CONFIG_LOCALVERSION="-perf"
change to
Code:
CONFIG_LOCALVERSION="-perf-[COLOR="Red"]CL783107[/COLOR]"

The RED depends on your boot.img so it's diffirent the one from mine
 
Last edited:

zcop

Senior Member
Nov 17, 2011
282
505
Hanoi
GUIDE make kernel SUPPORT EXT2,3,4
Open beni_rev01_defconfig
find line "File systems" edit "# CONFIG_EXT3_FS is not set" to "CONFIG_EXT3_FS=y"
Code:
# File systems
#
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
# CONFIG_EXT2_FS_POSIX_ACL is not set
# CONFIG_EXT2_FS_SECURITY is not set
# CONFIG_EXT2_FS_XIP is not set
# CONFIG_EXT3_FS is not set
[COLOR="Blue"]CONFIG_EXT4_FS=y[/COLOR]
CONFIG_EXT4_USE_FOR_EXT23=y
CONFIG_EXT4_FS_XATTR=y
# CONFIG_EXT4_FS_POSIX_ACL is not set
# CONFIG_EXT4_FS_SECURITY is not set
# CONFIG_EXT4_DEBUG is not set
Save and exit
Go to folder where boot.img extracted
Code:
cd /home/your username/android/boot.img-tools/boot/
Open init.rc with Gedit.
We a going to add mount point so system can mount EXT4 partition. By default, system only mount partition with RFS file system.Add red line to init.rc
Code:
# Mounting of /cache
[COLOR="Red"][B]mount ext4 /dev/block/stl14 /cache wait nosuid nodev noatime nodiratime noauto_da_alloc[/B][/COLOR]
mount rfs /dev/stl14 /cache nosuid nodev check=no

# Mounting of system/userdata is moved to 'on emmc' and 'on nand' sections
# We chown/chmod /data again so because mount is run as root + defaults
[COLOR="red"][B]mount ext4 /dev/block/stl13 /data wait nosuid nodev noatime nodiratime noauto_da_alloc[/B][/COLOR]
mount rfs /dev/stl13 /data nosuid nodev check=no

# Mount /system rw first to give the filesystem a chance to save a checkpoint
[COLOR="red"][B]mount ext4 /dev/block/stl12 /system ro wait noatime nodiratime noauto_da_alloc[/B][/COLOR]
mount rfs /dev/stl12 /system ro check=no
 
Last edited:

zcop

Senior Member
Nov 17, 2011
282
505
Hanoi
Add OC and Undervolt Feature to kernel
GO to /home/Your username/android/GT-S5830_kernel/kernel/arch/arm/mach-msm/
Open acpuclock.c with Gedit
Find
Code:
static void acpuclk_set_div

and fix it like this

Code:
static void acpuclk_set_div(const struct clkctl_acpu_speed *hunt_s) 
{
      uint32_t reg_clkctl, reg_clksel, clk_div, src_sel, [B][COLOR="Blue"]a11_div[/COLOR][/B];
      reg_clksel = readl(A11S_CLK_SEL_ADDR);
      /* AHB_CLK_DIV */
      clk_div = (reg_clksel >> 1) & 0x03;
     /* CLK_SEL_SRC1NO */
     src_sel = reg_clksel & 1;
[B] [COLOR="blue"]    a11_div=hunt_s->a11clk_src_div;
     if(hunt_s->a11clk_khz>600000) {
     a11_div=0;
     writel(hunt_s->a11clk_khz/19200, MSM_CLK_CTL_BASE+0x33C);
     udelay(50);
}[/COLOR][/B]
/*
* If the new clock divider is higher than the previous, then
* program the divider before switching the clock
*/
........etc.......

Now find this line
Code:
/* 7x27 normal with GSM capable modem - PLL0 and PLL1 swapped */

Add
Code:
{ 1, 652800, ACPU_PLL_2, 2, 1, 200000, 2, [COLOR="Blue"][B]7[/B][/COLOR], 160000 },
{ 1, 768000, ACPU_PLL_2, 2, 2, 160000, 2, [COLOR="Blue"][B]7[/B][/COLOR], 160000 },
{ 1, 800000, ACPU_PLL_2, 2, 0, 200000, 3, [COLOR="Blue"][B]7[/B][/COLOR], 122880 },
after { 1, 600000, ACPU_PLL_2, 2, 1, 200000, 2, 7, 122880 }, and before { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0, 0}, {0, 0, 0} }

The Blue column is set voltage for cpu. MSM7227 has voltage range from 1.2 to 1.35V as value 1 to 7.

Here is some Frequency if you 'd like to add more
Code:
{ 1, 652800, ACPU_PLL_2, 2, 1, 200000, 2, 7, 160000 }, 
{ 1, 691200, ACPU_PLL_2, 2, 1, 200000, 2, 7, 160000 }, 
{ 1, 710400, ACPU_PLL_2, 2, 1, 200000, 2, 7, 160000 }, 
{ 1, 729600, ACPU_PLL_2, 2, 1, 200000, 2, 7, 160000 }, 
{ 1, 748800, ACPU_PLL_2, 2, 1, 200000, 2, 7, 160000 }, 
{ 1, 768000, ACPU_PLL_2, 2, 1, 200000, 2, 7, 160000 }, 
{ 1, 787200, ACPU_PLL_2, 2, 2, 160000, 2, 7, 160000 }, 
{ 1, 800000, ACPU_PLL_0, 4, 0, 206400, 3, 7, 122880 },
{ 1, 806400, ACPU_PLL_2, 2, 2, 160000, 2, 7, 160000 }, 
{ 1, 825600, ACPU_PLL_0, 4, 0, 206400, 3, 7, 122880 },
{ 1, 844800, ACPU_PLL_0, 4, 0, 211200, 3, 7, 122880 },
{ 1, 864000, ACPU_PLL_0, 4, 0, 216000, 3, 7, 122880 },

AND another Freq provide by pratyush.creed
Code:
	{ 1, 600000, ACPU_PLL_2, 2, 1, 200000, 2, 7, 122880 },
 	{ 1, 614400, ACPU_PLL_2, 2, 0, 153600, 3, 6, 122880 },
 	{ 1, 672000, ACPU_PLL_2, 2, 0, 168000, 3, 6, 122880 },
 	{ 1, 729600, ACPU_PLL_2, 2, 0, 182400, 3, 7, 122880 },
	{ 1, 800000, ACPU_PLL_2, 2, 0, 200000, 3, 7, 122880 },

Due to some isues about not set default Freq that make phone run at max Freq as default. Here
Open beni_rev01_defconfig find line
Code:
# CONFIG_MSM_CPU_FREQ_SET_MIN_MAX is not set
change to
Code:
CONFIG_MSM_CPU_FREQ_SET_MIN_MAX=y
And add this below CONFIG_MSM_CPU_FRQ_MIN_MAX
Code:
CONFIG_MSM_CPU_FREQ_MAX=600000
CONFIG_MSM_CPU_FREQ_MIN=245000

Orig Thread for help me solve this out
http://xdaforums.com/showthread.php?t=1348951

----------------------------------------------------------------------------------------------------------------------------------------
Add IO Scheduler and CPU Governor Feature to kernel
Download source :http://www.mediafire.com/?o576hx1ei74ah27
Extract zip file to /home/your username/android/GT-S5830_kernel/

Add options to config file
Go to /home/your username/android/GT-S5830_kernel/kernel/arch/arm/configs/
Open beni_rev01_defconfig find line
Code:
IO Schedulers
Add 2 line below under IO Scheduler
Code:
CONFIG_IOSCHED_VR=y
CONFIG_IOSCHED_SIO=y

Now find line
Code:
CPU Power Management
Code:
CONFIG_CPU_FREQ_GOV_BRAZILIANWAX=y
CONFIG_CPU_FREQ_GOV_HOTPLUG=y
CONFIG_CPU_FREQ_GOV_INTERACTIVE=y
CONFIG_CPU_FREQ_GOV_SCARY=y
CONFIG_CPU_FREQ_GOV_LIONHEART=y
CONFIG_CPU_FREQ_GOV_LAZY=y
CONFIG_CPU_FREQ_GOV_SMOOTHASS=y
CONFIG_CPU_FREQ_GOV_SAVAGEDZEN=y
CONFIG_CPU_FREQ_GOV_INTERACTIVEX=y
CONFIG_CPU_FREQ_GOV_LAGFREE=y
CONFIG_CPU_FREQ_GOV_MINMAX=y
CONFIG_CPU_FREQ_GOV_SMARTASS2=y
add them under CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
Save and exit
Recompile your kernel again.
Thank to wilfredcool007 by rush me and give me info :p
 
Last edited:

zcop

Senior Member
Nov 17, 2011
282
505
Hanoi
u just have to edit a few lines in config.

Yeah, open beni_rev01_defconfig find line "File systems"
Code:
# File systems
#
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
# CONFIG_EXT2_FS_POSIX_ACL is not set
# CONFIG_EXT2_FS_SECURITY is not set
# CONFIG_EXT2_FS_XIP is not set
# CONFIG_EXT3_FS is not set
[COLOR="Red"]CONFIG_EXT4_FS=y[/COLOR]
CONFIG_EXT4_USE_FOR_EXT23=y
CONFIG_EXT4_FS_XATTR=y
# CONFIG_EXT4_FS_POSIX_ACL is not set
# CONFIG_EXT4_FS_SECURITY is not set
# CONFIG_EXT4_DEBUG is not set
CONFIG_JBD2=y
# CONFIG_JBD2_DEBUG is not set
CONFIG_FS_MBCACHE=y
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not set
# CONFIG_FS_POSIX_ACL is not set
# CONFIG_XFS_FS is not set
# CONFIG_GFS2_FS is not set
# CONFIG_OCFS2_FS is not set
# CONFIG_BTRFS_FS is not set
# CONFIG_NILFS2_FS is not set
CONFIG_FILE_LOCKING=y
CONFIG_FSNOTIFY=y
CONFIG_DNOTIFY=y
CONFIG_INOTIFY=y
CONFIG_INOTIFY_USER=y
# CONFIG_QUOTA is not set
# CONFIG_AUTOFS_FS is not set
# CONFIG_AUTOFS4_FS is not set
# CONFIG_FUSE_FS is not set

About OC, i see there 2 options: add module to kernel or change freq table

Good new for all you :)
SC20120130-034340.png

Im success at overclock :D
check page 1 pls.
 
Last edited:
  • Like
Reactions: Feras.Rehman

AldoSebastian

Senior Member
Sep 16, 2011
328
393
Denpasar - Yogyakarta
Yeah, open beni_rev01_defconfig find line "File systems"
Code:
# File systems
#
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
# CONFIG_EXT2_FS_POSIX_ACL is not set
# CONFIG_EXT2_FS_SECURITY is not set
# CONFIG_EXT2_FS_XIP is not set
# CONFIG_EXT3_FS is not set
[COLOR="Red"]CONFIG_EXT4_FS=y[/COLOR]
CONFIG_EXT4_USE_FOR_EXT23=y
CONFIG_EXT4_FS_XATTR=y
# CONFIG_EXT4_FS_POSIX_ACL is not set
# CONFIG_EXT4_FS_SECURITY is not set
# CONFIG_EXT4_DEBUG is not set
CONFIG_JBD2=y
# CONFIG_JBD2_DEBUG is not set
CONFIG_FS_MBCACHE=y
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not set
# CONFIG_FS_POSIX_ACL is not set
# CONFIG_XFS_FS is not set
# CONFIG_GFS2_FS is not set
# CONFIG_OCFS2_FS is not set
# CONFIG_BTRFS_FS is not set
# CONFIG_NILFS2_FS is not set
CONFIG_FILE_LOCKING=y
CONFIG_FSNOTIFY=y
CONFIG_DNOTIFY=y
CONFIG_INOTIFY=y
CONFIG_INOTIFY_USER=y
# CONFIG_QUOTA is not set
# CONFIG_AUTOFS_FS is not set
# CONFIG_AUTOFS4_FS is not set
# CONFIG_FUSE_FS is not set



so to make it support ext4, I just copy the code above n paste it??
 

sakindia123

Inactive Recognized Developer
May 6, 2011
4,043
9,548
Noida
i believe there's a mistake.
Code:
CROSS_COMPILE   =../arm-2011.03/bin/arm-none-eabi-
should be
Code:
CROSS_COMPILE   =../arm-2011.03/bin/arm-none-linux-gnueabi-
 
  • Like
Reactions: zcop

zcop

Senior Member
Nov 17, 2011
282
505
Hanoi
Repack Ramdisk and Compile zImage


Go to /home/android/GT-S5830_kernel/kernel
Double click on make_kernel_GT-S5830.sh> Display
Change
Code:
make cooper_rev03_defconfig
to
Code:
make beni_rev01_defconfig
Save and exit
In Terminal
Code:
cd /home/[COLOR="Red"]your username[/COLOR]/android/GT-S5830_kernel/kernel
Code:
./make_kernel_GT-S5830.sh

take a cup of coffee
(15-20m)
Now you get your kernel. It's zImage
Take zImage from /home/android/GT-S5830_kernel/kernel/arch/arm/boot copy to /home/android/boot.img-tools/unpack
Del old boot.img-zImage

Repack new Ramdisk
Code:
cd /home/[COLOR="Red"]your username[/COLOR]/android/boot.img-tools/
Code:
tools/mkbootfs boot | gzip > unpack/boot.img-ramdisk.gz

Repack boot.img
Code:
 cd /home/[COLOR="Red"]your username[/COLOR]/android/boot.img-tools/
Code:
tools/mkbootimg --kernel unpack/zImage --ramdisk unpack/boot.img-ramdisk.gz -o target_img/boot.img --base `cat unpack/boot.img-base`

If you want flash boot.img through download mode
Code:
cd /home/[COLOR="Red"]your username[/COLOR]/android/boot.img-tools/target_img
Code:
tar cvf boot.tar boot.img

Or you can make CWM zip

Now taste your work:
SC20120127-235107.png
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 23
    You need linux enviroment to compile kernel.
    Suggest: Install Ubuntu 64bit.
    Download:http://www.ubuntu.com/download/ubuntu/download
    Select Ubuntu 11.10 and 64bit version

    Hardware required:
    CPU >= 1,5Ghz
    Ram >= 2GB
    HDD atleast 20GB space left

    After complete download Ubuntu. You have 3 choices:
    -Install Ubuntu in VMware
    -Install Ubuntu like system OS
    -Install Ubuntu like a soft in Windows
    I recommend the 3rd way.

    Extract ISO file with winzip or winra or 7z to a folder.
    Go in to that folder run wubi.exe
    s1.png

    s2.png

    s3.png


    Restart to complete install ubuntu.

    If you want to uninstall Ubuntu: go to Control Panel and uninstall Ubuntu like other soft in windows.

    Ubuntu 11.10 come with a wifi problem. Broadcom chip has no driver. Solution:
    -Turn on wifi on S5670
    -USB tether
    -Now you have internet
    -Follow pitures to solve problem
    s4.png

    s5.png

    s6.png

    s7.png

    s8.png
    15
    Download S5670 Newest Source release

    https://opensource.samsung.com/index.jsp


    Link Mediafire

    Download Toolchain to compile kernel
    https://sourcery.mentor.com/sgpp/lite/arm/portal/package8734/public/arm-none-eabi/arm-2011.03-42-arm-none-eabi-i686-pc-linux-gnu.tar.bz2
    After download complete follow pitures :p
    s9.png

    s10.png

    s11.png

    s12.png

    s13.png

    s14.png

    s15.png

    s16.png

    s17.png

    s18.png

    s19.png


    After all workplace should like this
    s20.png


    How to open Terminal
    s21.png

    s22.png

    s23.png

    Or use combo key: CTRL+ALT+T

    Open Terminal copy command below an paste in Terminal
    Code:
    sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev valgrind

    Now you need a boot.img that you want to modify kernel. Exp: Boot.img from DXKT4 :D
    You need tool to unpack, repack boot.img
    http://www.mediafire.com/?zdw766gu35o0fb6
    Thank to ketut.kumajaya about his useful tool.
    Extract to folder android
    In Terminal
    Code:
    cd /home/[COLOR="red"]your username[/COLOR]/android/boot.img-tools
    Now copy boot.img to folder called source_img in boot.img-tools folder above
    Open Readme.txt
    Follow the guide to extract boot.img
    ============================================================================================
    After extract boot.img done
    Code:
    cd /home/[COLOR="Red"]your username[/COLOR]/android/GT-S5830_kernel/kernel
    Code:
    gedit Makefile
    A text file open
    Ctrl+F type: cross_compile
    Find:
    Code:
    CROSS_COMPILE   =../../toolchain/arm-eabi-4.4.3/bin/arm-eabi-
    Change to
    Code:
    CROSS_COMPILE   =../arm-2011.03/bin/arm-none-eabi-
    Ctrl+S
    Close
    Code:
    cd /home/[COLOR="Red"]your username[/COLOR]/android/boot.img-tools/boot/lib/modules
    Code:
    strings fsr.ko | grep vermagic
    You'll see something like this
    Code:
    vermagic=2.6.35.7-perf-[COLOR="Red"]CL783107[/COLOR] preempt mod_unload ARMv6
    Go to home/android/GT-S5830_kernel/kernel/arch/arm/configs
    Find beni_rev01_defconfig open with gedit( double click to file > Display)
    Find line
    Code:
    CONFIG_LOCALVERSION="-perf"
    change to
    Code:
    CONFIG_LOCALVERSION="-perf-[COLOR="Red"]CL783107[/COLOR]"

    The RED depends on your boot.img so it's diffirent the one from mine
    10
    GUIDE make kernel SUPPORT EXT2,3,4
    Open beni_rev01_defconfig
    find line "File systems" edit "# CONFIG_EXT3_FS is not set" to "CONFIG_EXT3_FS=y"
    Code:
    # File systems
    #
    CONFIG_EXT2_FS=y
    CONFIG_EXT2_FS_XATTR=y
    # CONFIG_EXT2_FS_POSIX_ACL is not set
    # CONFIG_EXT2_FS_SECURITY is not set
    # CONFIG_EXT2_FS_XIP is not set
    # CONFIG_EXT3_FS is not set
    [COLOR="Blue"]CONFIG_EXT4_FS=y[/COLOR]
    CONFIG_EXT4_USE_FOR_EXT23=y
    CONFIG_EXT4_FS_XATTR=y
    # CONFIG_EXT4_FS_POSIX_ACL is not set
    # CONFIG_EXT4_FS_SECURITY is not set
    # CONFIG_EXT4_DEBUG is not set
    Save and exit
    Go to folder where boot.img extracted
    Code:
    cd /home/your username/android/boot.img-tools/boot/
    Open init.rc with Gedit.
    We a going to add mount point so system can mount EXT4 partition. By default, system only mount partition with RFS file system.Add red line to init.rc
    Code:
    # Mounting of /cache
    [COLOR="Red"][B]mount ext4 /dev/block/stl14 /cache wait nosuid nodev noatime nodiratime noauto_da_alloc[/B][/COLOR]
    mount rfs /dev/stl14 /cache nosuid nodev check=no
    
    # Mounting of system/userdata is moved to 'on emmc' and 'on nand' sections
    # We chown/chmod /data again so because mount is run as root + defaults
    [COLOR="red"][B]mount ext4 /dev/block/stl13 /data wait nosuid nodev noatime nodiratime noauto_da_alloc[/B][/COLOR]
    mount rfs /dev/stl13 /data nosuid nodev check=no
    
    # Mount /system rw first to give the filesystem a chance to save a checkpoint
    [COLOR="red"][B]mount ext4 /dev/block/stl12 /system ro wait noatime nodiratime noauto_da_alloc[/B][/COLOR]
    mount rfs /dev/stl12 /system ro check=no
    10
    Add OC and Undervolt Feature to kernel
    GO to /home/Your username/android/GT-S5830_kernel/kernel/arch/arm/mach-msm/
    Open acpuclock.c with Gedit
    Find
    Code:
    static void acpuclk_set_div

    and fix it like this

    Code:
    static void acpuclk_set_div(const struct clkctl_acpu_speed *hunt_s) 
    {
          uint32_t reg_clkctl, reg_clksel, clk_div, src_sel, [B][COLOR="Blue"]a11_div[/COLOR][/B];
          reg_clksel = readl(A11S_CLK_SEL_ADDR);
          /* AHB_CLK_DIV */
          clk_div = (reg_clksel >> 1) & 0x03;
         /* CLK_SEL_SRC1NO */
         src_sel = reg_clksel & 1;
    [B] [COLOR="blue"]    a11_div=hunt_s->a11clk_src_div;
         if(hunt_s->a11clk_khz>600000) {
         a11_div=0;
         writel(hunt_s->a11clk_khz/19200, MSM_CLK_CTL_BASE+0x33C);
         udelay(50);
    }[/COLOR][/B]
    /*
    * If the new clock divider is higher than the previous, then
    * program the divider before switching the clock
    */
    ........etc.......

    Now find this line
    Code:
    /* 7x27 normal with GSM capable modem - PLL0 and PLL1 swapped */

    Add
    Code:
    { 1, 652800, ACPU_PLL_2, 2, 1, 200000, 2, [COLOR="Blue"][B]7[/B][/COLOR], 160000 },
    { 1, 768000, ACPU_PLL_2, 2, 2, 160000, 2, [COLOR="Blue"][B]7[/B][/COLOR], 160000 },
    { 1, 800000, ACPU_PLL_2, 2, 0, 200000, 3, [COLOR="Blue"][B]7[/B][/COLOR], 122880 },
    after { 1, 600000, ACPU_PLL_2, 2, 1, 200000, 2, 7, 122880 }, and before { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0, 0}, {0, 0, 0} }

    The Blue column is set voltage for cpu. MSM7227 has voltage range from 1.2 to 1.35V as value 1 to 7.

    Here is some Frequency if you 'd like to add more
    Code:
    { 1, 652800, ACPU_PLL_2, 2, 1, 200000, 2, 7, 160000 }, 
    { 1, 691200, ACPU_PLL_2, 2, 1, 200000, 2, 7, 160000 }, 
    { 1, 710400, ACPU_PLL_2, 2, 1, 200000, 2, 7, 160000 }, 
    { 1, 729600, ACPU_PLL_2, 2, 1, 200000, 2, 7, 160000 }, 
    { 1, 748800, ACPU_PLL_2, 2, 1, 200000, 2, 7, 160000 }, 
    { 1, 768000, ACPU_PLL_2, 2, 1, 200000, 2, 7, 160000 }, 
    { 1, 787200, ACPU_PLL_2, 2, 2, 160000, 2, 7, 160000 }, 
    { 1, 800000, ACPU_PLL_0, 4, 0, 206400, 3, 7, 122880 },
    { 1, 806400, ACPU_PLL_2, 2, 2, 160000, 2, 7, 160000 }, 
    { 1, 825600, ACPU_PLL_0, 4, 0, 206400, 3, 7, 122880 },
    { 1, 844800, ACPU_PLL_0, 4, 0, 211200, 3, 7, 122880 },
    { 1, 864000, ACPU_PLL_0, 4, 0, 216000, 3, 7, 122880 },

    AND another Freq provide by pratyush.creed
    Code:
    	{ 1, 600000, ACPU_PLL_2, 2, 1, 200000, 2, 7, 122880 },
     	{ 1, 614400, ACPU_PLL_2, 2, 0, 153600, 3, 6, 122880 },
     	{ 1, 672000, ACPU_PLL_2, 2, 0, 168000, 3, 6, 122880 },
     	{ 1, 729600, ACPU_PLL_2, 2, 0, 182400, 3, 7, 122880 },
    	{ 1, 800000, ACPU_PLL_2, 2, 0, 200000, 3, 7, 122880 },

    Due to some isues about not set default Freq that make phone run at max Freq as default. Here
    Open beni_rev01_defconfig find line
    Code:
    # CONFIG_MSM_CPU_FREQ_SET_MIN_MAX is not set
    change to
    Code:
    CONFIG_MSM_CPU_FREQ_SET_MIN_MAX=y
    And add this below CONFIG_MSM_CPU_FRQ_MIN_MAX
    Code:
    CONFIG_MSM_CPU_FREQ_MAX=600000
    CONFIG_MSM_CPU_FREQ_MIN=245000

    Orig Thread for help me solve this out
    http://xdaforums.com/showthread.php?t=1348951

    ----------------------------------------------------------------------------------------------------------------------------------------
    Add IO Scheduler and CPU Governor Feature to kernel
    Download source :http://www.mediafire.com/?o576hx1ei74ah27
    Extract zip file to /home/your username/android/GT-S5830_kernel/

    Add options to config file
    Go to /home/your username/android/GT-S5830_kernel/kernel/arch/arm/configs/
    Open beni_rev01_defconfig find line
    Code:
    IO Schedulers
    Add 2 line below under IO Scheduler
    Code:
    CONFIG_IOSCHED_VR=y
    CONFIG_IOSCHED_SIO=y

    Now find line
    Code:
    CPU Power Management
    Code:
    CONFIG_CPU_FREQ_GOV_BRAZILIANWAX=y
    CONFIG_CPU_FREQ_GOV_HOTPLUG=y
    CONFIG_CPU_FREQ_GOV_INTERACTIVE=y
    CONFIG_CPU_FREQ_GOV_SCARY=y
    CONFIG_CPU_FREQ_GOV_LIONHEART=y
    CONFIG_CPU_FREQ_GOV_LAZY=y
    CONFIG_CPU_FREQ_GOV_SMOOTHASS=y
    CONFIG_CPU_FREQ_GOV_SAVAGEDZEN=y
    CONFIG_CPU_FREQ_GOV_INTERACTIVEX=y
    CONFIG_CPU_FREQ_GOV_LAGFREE=y
    CONFIG_CPU_FREQ_GOV_MINMAX=y
    CONFIG_CPU_FREQ_GOV_SMARTASS2=y
    add them under CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
    Save and exit
    Recompile your kernel again.
    Thank to wilfredcool007 by rush me and give me info :p