5,606,151 Members 34,511 Now Online
XDA Developers Android and Mobile Development Forum

[KERNEL]GT-S5280 Kernel Source and CPU Frequency Scaling... Why not!

Tip us?
 
Doc_cheilvenerdi.org
Old
(Last edited by Doc_cheilvenerdi.org; 22nd December 2013 at 10:00 PM.) Reason: errors correction
#1  
Doc_cheilvenerdi.org's Avatar
Senior Member - OP
Thanks Meter 336
Posts: 123
Join Date: Oct 2011
Location: Ferrara - Ravenna
Angry [KERNEL]GT-S5280 Kernel Source and CPU Frequency Scaling... Why not!

Wait a minute! I'm not writing about Overclock, I simply compiled "Galaxy Star Kernel" from Source...

...for fun...

...with CPU frequency scaling...


Prerequisites:
  • a 64bit Linux Machine with a working build environment
  • a local copy of a Jellybean arm cross toolchain
  • tools to unpack and repack a boot image from a Stock firmware
  • Kernel source downloaded from Samsung Open Source Release Center



How I did it:

First of all I unzip the kernel source into a linux folder and modify one line from
Code:
CROSS_COMPILE ?= /opt/toolchains/arm-eabi-4.4.3/bin/arm-eabi-
to
Code:
CROSS_COMPILE ?= /home/doc/builds/CYANOGENMOD_10.0__4.1.2_JELLYBEAN/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
which is the full local path to my cross prebuilt toolchain previously downloaded from Cyanogenmod repositories...

Then I follow the kernel readme to prepare it for my Galaxy Star:
Code:
doc@saucy:~/tmp/kernel-gt5280$ make mint-vlx-rev03_defconfig
...
doc@saucy:~/tmp/kernel-gt5280$

And finally I simply issue the master command:
Code:
doc@saucy:~/tmp/kernel-gt5280$ make zImage
...

...

...
  LD      vmlinux
  SYSMAP  System.map
  SYSMAP  .tmp_System.map
  OBJCOPY arch/arm/boot/Image
  Kernel: arch/arm/boot/Image is ready
  AS      arch/arm/boot/compressed/head.o
  GZIP    arch/arm/boot/compressed/piggy.gzip
  AS      arch/arm/boot/compressed/piggy.gzip.o
  CC      arch/arm/boot/compressed/misc.o
  CC      arch/arm/boot/compressed/decompress.o
  SHIPPED arch/arm/boot/compressed/lib1funcs.S
  AS      arch/arm/boot/compressed/lib1funcs.o
  LD      arch/arm/boot/compressed/vmlinux
  OBJCOPY arch/arm/boot/zImage
  Kernel: arch/arm/boot/zImage is ready
doc@saucy:~/tmp/kernel-gt5280$
Unfortunately, repacking the Compressed Kernel (zImage 3,5Mb) with the ramdisk into an Odin boot.img leads to a "not booting" system stuck at samsung logo...

Repacking instead the Uncompressed Kernel (Image 7,1 Mb) leads to normal boot with the system up and running (victory ):




Now looking for frequency scaling:

...searching inside Kernel configuration with the command
Code:
doc@saucy:~/tmp/kernel-gt5280$ make menuconfig
I find this menu:
Code:
.config - Linux/arm 3.0.8 Kernel Configuration
 ──────────────────────────────────────────────────────────────────────────────
  ┌───────────────────────── CPU Power Management ──────────────────────────┐
  │  Arrow keys navigate the menu.  <Enter> selects submenus --->.          │  
  │  Highlighted letters are hotkeys.  Pressing <Y> includes, <N> excludes, │  
  │  <M> modularizes features.  Press <Esc><Esc> to exit, <?> for Help, </> │  
  │  for Search.  Legend:[*] built-in  [ ] excluded  <M> module  < >        │  
  │ ┌─────────────────────────────────────────────────────────────────────┐ │  
  │ │        CPU Frequency scaling  --->                                  │ │  
  │ │    [ ] CPUfreq support for Spreadtrum SC8810 CPUs                   │ │  
  │ │    [ ] CPU idle PM support                                          │ │  
  │ │                                                                     │ │  
  │ └─────────────────────────────────────────────────────────────────────┘ │  
  ├─────────────────────────────────────────────────────────────────────────┤  
  │                    <Select>    < Exit >    < Help >                     │  
  └─────────────────────────────────────────────────────────────────────────┘
where I simply switch on the frequency scaling for the Galaxy CPU:
Code:
.config - Linux/arm 3.0.8 Kernel Configuration
 ──────────────────────────────────────────────────────────────────────────────
  ┌───────────────────────── CPU Power Management ──────────────────────────┐
  │  Arrow keys navigate the menu.  <Enter> selects submenus --->.          │  
  │  Highlighted letters are hotkeys.  Pressing <Y> includes, <N> excludes, │  
  │  <M> modularizes features.  Press <Esc><Esc> to exit, <?> for Help, </> │  
  │  for Search.  Legend:[*] built-in  [ ] excluded  <M> module  < >        │  
  │ ┌─────────────────────────────────────────────────────────────────────┐ │  
  │ │        CPU Frequency scaling  --->                                  │ │  
  │ │    [*] CPUfreq support for Spreadtrum SC8810 CPUs                   │ │  
  │ │    [ ] CPU idle PM support                                          │ │  
  │ │                                                                     │ │  
  │ └─────────────────────────────────────────────────────────────────────┘ │  
  ├─────────────────────────────────────────────────────────────────────────┤  
  │                    <Select>    < Exit >    < Help >                     │  
  └─────────────────────────────────────────────────────────────────────────┘
After another Odin boot.img...

here we are:



Easy Play


Everything shared starting from here: My Google Drive


WARNING: I started from a GT-S5280XXAMF1 Stock Firmware, knowing exactly wat I was doing...
Beware, use my work as you wish but "at your own risk"!



And now what's Next?

...who knows...

...surely I'm not skilled enough to overclock this Kernel source or add governors...

I just made a "one shot compilation" and I was lucky !
The Following 5 Users Say Thank You to Doc_cheilvenerdi.org For This Useful Post: [ Click to Expand ]
 
insomaniacdev
Old
#2  
insomaniacdev's Avatar
Senior Member
Thanks Meter 612
Posts: 444
Join Date: Oct 2013
Location: Behind you!
Can u make another one for gt s5282

Sent from my GT-S5282 using Tapatalk
Hitting Thanks button will not pinch your finger Rahul Singhal
The Following 2 Users Say Thank You to insomaniacdev For This Useful Post: [ Click to Expand ]
 
Doc_cheilvenerdi.org
Old
#3  
Doc_cheilvenerdi.org's Avatar
Senior Member - OP
Thanks Meter 336
Posts: 123
Join Date: Oct 2011
Location: Ferrara - Ravenna
Thumbs up Steps required!

Sure i can!

But, if I can easy handle the Linux side of the job on my PC, I need a step from your phone just before my build action...
...this is true, anyway, only once for a given Kernel Source!


First of All, looking inside Samsung Open Source Release Center I see three Kernel Sources:



I need to choose the right one for the Region of your Phone (or current firmware):
- MEA (Middle East and Africa);
- SEA (South East Asia);
- SWA (South West Asia).


After that, when I prepare the Kernel tree for build (as I briefly described in the first post) with the following command:
Code:
doc@saucy:~/tmp/S5282$ make mint-vlx-rev03_defconfig
...
doc@saucy:~/tmp/S5282$
I have to check (once for all) the resulting configuration file with the one extracted from your running kernel!

You must issue one console command from PC with "adb shell" (difficult to setup) or from a Terminal emulator from the Phone (easy to go) installing, for example, the free App "Terminal Emulator" from Palevich (thanks forever ).

The phone, of course, must be rooted and busyboxed;
Here what to type:
Code:
shell@android:/ $ su
root@android:/ # zcat /proc/config.gz > /data/local/config.txt
root@android:/ #
This command simply creates a text file in the /data/local folder with listed all the configuration options!

I need it to check for differences, just to modify the build tree accordingly.

Ah... of course I need a boot.img file to mod and, maybe, the right PDA code for it... just to prepare an Odin archive with the right naming convention...


After All I'll build the Kernel and prepare two images in my google drive:
- the original boot.img ready for Odin,
- the cpufreq modded boot.img ready for Odin.

What else?
You have to test it!
If it doesn't boot, simply flash back the original image in place.
That's All!
No need to wipe anything before, during and after...
The Following User Says Thank You to Doc_cheilvenerdi.org For This Useful Post: [ Click to Expand ]
 
insomaniacdev
Old
#4  
insomaniacdev's Avatar
Senior Member
Thanks Meter 612
Posts: 444
Join Date: Oct 2013
Location: Behind you!
Quote:
Originally Posted by Doc_cheilvenerdi.org View Post
Sure i can!

But, if I can easy handle the Linux side of the job on my PC, I need a step from your phone just before my build action...
...this is true, anyway, only once for a given Kernel Source!


First of All, looking inside Samsung Open Source Release Center I see three Kernel Sources:



I need to choose the right one for the Region of your Phone (or current firmware):
- MEA (Middle East and Africa);
- SEA (South East Asia);
- SWA (South West Asia).


After that, when I prepare the Kernel tree for build (as I briefly described in the first post) with the following command:
Code:
doc@saucy:~/tmp/S5282$ make mint-vlx-rev03_defconfig
...
doc@saucy:~/tmp/S5282$
I have to check (once for all) the resulting configuration file with the one extracted from your running kernel!

You must issue one console command from PC with "adb shell" (difficult to setup) or from a Terminal emulator from the Phone (easy to go) installing, for example, the free App "Terminal Emulator" from Palevich (thanks forever ).

The phone, of course, must be rooted and busyboxed;
Here what to type:
Code:
shell@android:/ $ su
root@android:/ # zcat /proc/config.gz > /data/local/config.txt
root@android:/ #
This command simply creates a text file in the /data/local folder with listed all the configuration options!

I need it to check for differences, just to modify the build tree accordingly.

Ah... of course I need a boot.img file to mod and, maybe, the right PDA code for it... just to prepare an Odin archive with the right naming convention...


After All I'll build the Kernel and prepare two images in my google drive:
- the original boot.img ready for Odin,
- the cpufreq modded boot.img ready for Odin.

What else?
You have to test it!
If it doesn't boot, simply flash back the original image in place.
That's All!
No need to wipe anything before, during and after...
ok no problem.. plz tell if u can make cwm 6.4.4 for galaxy star bcoz we need ot for our CM 11 project

---------- Post added at 01:29 PM ---------- Previous post was at 01:27 PM ----------

Quote:
Originally Posted by rahulsinghal View Post
ok no problem.. plz tell if u can make cwm 6.4.4 for galaxy star bcoz we need ot for our CM 11 project
bcoz our current focus is on cm and cwm 6.4.4
Hitting Thanks button will not pinch your finger Rahul Singhal
The Following 2 Users Say Thank You to insomaniacdev For This Useful Post: [ Click to Expand ]
 
insomaniacdev
Old
#5  
insomaniacdev's Avatar
Senior Member
Thanks Meter 612
Posts: 444
Join Date: Oct 2013
Location: Behind you!
Quote:
Originally Posted by Doc_cheilvenerdi.org View Post
Sure i can!

But, if I can easy handle the Linux side of the job on my PC, I need a step from your phone just before my build action...
...this is true, anyway, only once for a given Kernel Source!


First of All, looking inside Samsung Open Source Release Center I see three Kernel Sources:



I need to choose the right one for the Region of your Phone (or current firmware):
- MEA (Middle East and Africa);
- SEA (South East Asia);
- SWA (South West Asia).


After that, when I prepare the Kernel tree for build (as I briefly described in the first post) with the following command:
Code:
doc@saucy:~/tmp/S5282$ make mint-vlx-rev03_defconfig
...
doc@saucy:~/tmp/S5282$
I have to check (once for all) the resulting configuration file with the one extracted from your running kernel!

You must issue one console command from PC with "adb shell" (difficult to setup) or from a Terminal emulator from the Phone (easy to go) installing, for example, the free App "Terminal Emulator" from Palevich (thanks forever ).

The phone, of course, must be rooted and busyboxed;
Here what to type:
Code:
shell@android:/ $ su
root@android:/ # zcat /proc/config.gz > /data/local/config.txt
root@android:/ #
This command simply creates a text file in the /data/local folder with listed all the configuration options!

I need it to check for differences, just to modify the build tree accordingly.

Ah... of course I need a boot.img file to mod and, maybe, the right PDA code for it... just to prepare an Odin archive with the right naming convention...


After All I'll build the Kernel and prepare two images in my google drive:
- the original boot.img ready for Odin,
- the cpufreq modded boot.img ready for Odin.

What else?
You have to test it!
If it doesn't boot, simply flash back the original image in place.
That's All!
No need to wipe anything before, during and after...
Bro i will provide that file to you soon bcoz currently I am owning this phone. Plz qait 2-3 dys
Hitting Thanks button will not pinch your finger Rahul Singhal
The Following 2 Users Say Thank You to insomaniacdev For This Useful Post: [ Click to Expand ]
 
cleverior.ipul
Old
#6  
cleverior.ipul's Avatar
Senior Member
Thanks Meter 223
Posts: 286
Join Date: Nov 2012
Location: Bogor
what block partition that can use to flash kernel with cwm ?
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes