Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[TOOL] guestekrnL doItYourself STOCK KERNEL BUILDER for dummies - MAKE UR OWN KERNEL!

OP Stefan Gündhör

28th May 2012, 08:19 PM   |  #21  
ghadap's Avatar
Senior Member
Flag Ampang
Thanks Meter: 15
 
195 posts
Join Date:Joined: Jul 2011
More
Well.. i'll try to digest all your explanation.. (start to have headache already.. :what

Anyway, great post..

Sent from my LG-P990 using XDA
28th May 2012, 08:23 PM   |  #22  
Senior Member
Flag Münster
Thanks Meter: 77
 
441 posts
Join Date:Joined: May 2011
3 letters: W-O-W!!!

Gesendet von meinem Optimus 2X mit Tapatalk
28th May 2012, 08:25 PM   |  #23  
Stefan Gündhör's Avatar
OP Senior Member
Flag Austria
Thanks Meter: 5,166
 
1,991 posts
Join Date:Joined: Oct 2011
Donate to Me
More
Quote:
Originally Posted by ghadap

Well.. i'll try to digest all your explanation.. (start to have headache already.. :what

Anyway, great post..

Sent from my LG-P990 using XDA

It's hard to compress everything in one post, but I think I'm done now Just take your time, begin with only compiling the kernel without changes (and try if it boots) and then slowly change more and more stuff, don't change too many things at once, always compile&try the kernel between more changes.

Also take a look at my additional hints, using versioning is very useful for keeping overview over changes and comparing the guestekrnL sources with original stock kernel sources using a diff viewer can help understanding which kernel values/source code custom kernel DEVs change in order to make their custom kernels.
28th May 2012, 08:27 PM   |  #24  
Stefan Gündhör's Avatar
OP Senior Member
Flag Austria
Thanks Meter: 5,166
 
1,991 posts
Join Date:Joined: Oct 2011
Donate to Me
More
Quote:
Originally Posted by TrymHansen

Downloaded from Google Docs and unpacked without incident. Now compiling under VirtualBox, which also worked without any modification.

...and as I was writing this it finished. Whole compilation job took less than 2 mins on a 4-core VM. ;)

Very nice!
29th May 2012, 08:52 AM   |  #25  
Stefan Gündhör's Avatar
OP Senior Member
Flag Austria
Thanks Meter: 5,166
 
1,991 posts
Join Date:Joined: Oct 2011
Donate to Me
More
Explaination of values in the files guestekrnl.c, guestekrnl.h and nvrm_clocks_limits.c:

guestekrnl.c
-------------------------------------
  • GUESTE_USE_FSYNC = 1; -> should fsync be used by default? values 0 or 1
  • NVRM_CPU1_ON_MIN_KHZ = 366000; -> frequency (366MHz) where second core should be turned off when it was running and cpu freq is lower than this freq for a time of 600 milliseconds (NVRM_CPU1_OFF_PENDING_MS)
  • NVRM_CPU1_OFF_MAX_KHZ = 666000; -> frequency (666MHz) where second core should be turned on when it was off and cpu freq is higher than this freq for a time of 2000 milliseconds (NVRM_CPU1_ON_PENDING_MS)
  • NVRM_CPU1_ON_PENDING_MS = 2000; // time for the things above in milliseconds
  • NVRM_CPU1_OFF_PENDING_MS = 600; // time for the things above in milliseconds
  • AUTO_SECONDCORE_LIMITS = 0; // should second core activation values be calculated intelligently by default instead of using the fixed values above? values 0 or 1
  • GUESTE_USE_SECOND_CORE = 1; // should second core be used by default? values 0 or 1
  • LED_BUTTON_BRIGHTNESS = 8; // default value for LED button brightness - values 0-100, but I fear the default is also on another place hard-coded so changes won't help
  • AUTO_BACKLIGHT_BRIGHTNESS = 6; // default step for the auto brightness intensity (this is stock default), dunno if changes here make any difference
  • MAX_SCREENOFF_CPUFREQ = 503000; // max default screenOff cpu frequency (=503 MHz)
  • MAX_CPU_SCALING_FREQ = 1000000; // default maximum cpu frequency (=1000 MHz), if you change this, remove the file Desktop/kernel_source/zipstructure/data/gueste2/oc/maxcpufreq in order to use the default kernel speed right at kernel boot (the file maxcpufreq also contains the value 1000000, this is the value GuesteOC tool will set the kernel to at boot, removing the file means GuesteOC does not change default kernel speed)
  • MIN_CPU_SCALING_FREQ = 216000; // default minimum cpu frequency (=216 MHz)
  • unsigned int STRONG_HAPTIC_VIBRATION = 0; // default value for strong vibration -- values 0 or 1
  • unsigned int STRONG_RINGING_VIBRATION = 1; // default value for incoming call vibration -- values 0 or 1

guestekrnl.h - Explainations will come soon!
-------------------------------------

// Second Core Activation Auto Limits Multiplikator
  • #define G_SECCORE_MULT (6)
// Clocking & Volting
  • #define MAX_OVERCLOCK (1300000)
  • #define MAX_VOLTAGE (1150)
  • #define GUESTE_DDR_FREQ_STATIC (325000)
  • #define GUESTE_EMC_VOLT (1200)
  • #define NVRM_AP20_LOW_CORE_MV (850)
  • #define NVRM_AP20_LOW_CPU_MV (750)
  • #define NVRM_AP20_SUSPEND_CORE_MV (900)
  • #define NVRM_AP20_DDR2_MIN_KHZ (50000)
  • #define NVRM_AP20_LPDDR2_MIN_KHZ (18000)
  • #define GUESTE_AVP_FREQ (280000)
  • #define GUESTE_EMC2_FREQ (660000)
  • #define GUESTE_GPU_FREQ (345000)
  • #define GUESTE_DDR_FREQ (325000)
// Scheduler
  • #define sysctl_sched_latency_default 10000000ULL
  • #define normalized_sysctl_sched_latency_default 10000000ULL
  • #define sysctl_sched_min_granularity_default 2000000ULL
  • #define normalized_sysctl_sched_min_granularity_default 2000000ULL
  • #define sched_nr_latency_default 5
  • #define sysctl_sched_wakeup_granularity_default 2000000UL
  • #define normalized_sysctl_sched_wakeup_granularity_default 2000000UL

Desktop/kernel_source/arch/arm/mach-tegra/nvrm/core/common/nvrm_clocks_limits.c - Explainations will come soon!
-------------------------------------
  • NvU32 FakeShmooVoltages[] = {
    755,
    770,
    800,
    850,
    900,
    1000,
    1050,
    MAX_VOLTAGE,

    };
  • NvRmScaledClkLimits FakepScaledCpuLimits = {
    101, // FakepScaledCpuLimits.HwDeviceId
    0, // FakepScaledCpuLimits.SubClockId
    32, // FakepScaledCpuLimits.MinKHz
    // Clock table
    {
    216000,
    389000,
    503000,
    655000,
    816000,
    1000000,
    1100000,
    MAX_OVERCLOCK,

    }
    };
29th May 2012, 09:12 AM   |  #26  
spica1234's Avatar
Recognized Developer
Flag Gujarat
Thanks Meter: 3,352
 
2,878 posts
Join Date:Joined: Aug 2010
More
Question
Mention where guesete.c and gueste.h came from.
Mention credits to Original Author of OTF

Quote:
Originally Posted by Stefan Gündhör

Explaination of values in the files guestekrnl.c, guestekrnl.h and nvrm_clocks_limits.c:

guestekrnl.c
-------------------------------------

  • GUESTE_USE_FSYNC = 1; -> should fsync be used by default? values 0 or 1
  • NVRM_CPU1_ON_MIN_KHZ = 366000; -> frequency (366MHz) where second core should be turned off when it was running and cpu freq is lower than this freq for a time of 600 milliseconds (NVRM_CPU1_OFF_PENDING_MS)
  • NVRM_CPU1_OFF_MAX_KHZ = 666000; -> frequency (666MHz) where second core should be turned on when it was off and cpu freq is higher than this freq for a time of 2000 milliseconds (NVRM_CPU1_ON_PENDING_MS)
  • NVRM_CPU1_ON_PENDING_MS = 2000; // time for the things above in milliseconds
  • NVRM_CPU1_OFF_PENDING_MS = 600; // time for the things above in milliseconds
  • AUTO_SECONDCORE_LIMITS = 0; // should second core activation values be calculated intelligently by default instead of using the fixed values above? values 0 or 1
  • GUESTE_USE_SECOND_CORE = 1; // should second core be used by default? values 0 or 1
  • LED_BUTTON_BRIGHTNESS = 8; // default value for LED button brightness - values 0-100, but I fear the default is also on another place hard-coded so changes won't help
  • AUTO_BACKLIGHT_BRIGHTNESS = 6; // default step for the auto brightness intensity (this is stock default), dunno if changes here make any difference
  • MAX_SCREENOFF_CPUFREQ = 503000; // max default screenOff cpu frequency (=503 MHz)
  • MAX_CPU_SCALING_FREQ = 1000000; // default maximum cpu frequency (=1000 MHz), if you change this, remove the file Desktop/kernel_source/zipstructure/data/gueste2/oc/maxcpufreq in order to use the default kernel speed right at kernel boot (the file maxcpufreq also contains the value 1000000, this is the value GuesteOC tool will set the kernel to at boot, removing the file means GuesteOC does not change default kernel speed)
  • MIN_CPU_SCALING_FREQ = 216000; // default minimum cpu frequency (=216 MHz)
  • unsigned int STRONG_HAPTIC_VIBRATION = 0; // default value for strong vibration -- values 0 or 1
  • unsigned int STRONG_RINGING_VIBRATION = 1; // default value for incoming call vibration -- values 0 or 1

guestekrnl.h - Explainations will come soon!
-------------------------------------

// Second Core Activation Auto Limits Multiplikator
  • #define G_SECCORE_MULT (6)
// Clocking & Volting
  • #define MAX_OVERCLOCK (1300000)
  • #define MAX_VOLTAGE (1150)
  • #define GUESTE_DDR_FREQ_STATIC (325000)
  • #define GUESTE_EMC_VOLT (1200)
  • #define NVRM_AP20_LOW_CORE_MV (850)
  • #define NVRM_AP20_LOW_CPU_MV (750)
  • #define NVRM_AP20_SUSPEND_CORE_MV (900)
  • #define NVRM_AP20_DDR2_MIN_KHZ (50000)
  • #define NVRM_AP20_LPDDR2_MIN_KHZ (18000)
  • #define GUESTE_AVP_FREQ (280000)
  • #define GUESTE_EMC2_FREQ (660000)
  • #define GUESTE_GPU_FREQ (345000)
  • #define GUESTE_DDR_FREQ (325000)
// Scheduler
  • #define sysctl_sched_latency_default 10000000ULL
  • #define normalized_sysctl_sched_latency_default 10000000ULL
  • #define sysctl_sched_min_granularity_default 2000000ULL
  • #define normalized_sysctl_sched_min_granularity_default 2000000ULL
  • #define sched_nr_latency_default 5
  • #define sysctl_sched_wakeup_granularity_default 2000000UL
  • #define normalized_sysctl_sched_wakeup_granularity_default 2000000UL

Desktop/kernel_source/arch/arm/mach-tegra/nvrm/core/common/nvrm_clocks_limits.c - Explainations will come soon!
-------------------------------------
  • NvU32 FakeShmooVoltages[] = {
    755,
    770,
    800,
    850,
    900,
    1000,
    1050,
    MAX_VOLTAGE,

    };
  • NvRmScaledClkLimits FakepScaledCpuLimits = {
    101, // FakepScaledCpuLimits.HwDeviceId
    0, // FakepScaledCpuLimits.SubClockId
    32, // FakepScaledCpuLimits.MinKHz
    // Clock table
    {
    216000,
    389000,
    503000,
    655000,
    816000,
    1000000,
    1100000,
    MAX_OVERCLOCK,

    }
    };

29th May 2012, 09:21 AM   |  #27  
Stefan Gündhör's Avatar
OP Senior Member
Flag Austria
Thanks Meter: 5,166
 
1,991 posts
Join Date:Joined: Oct 2011
Donate to Me
More
Quote:
Originally Posted by spica1234

Mention where guesete.c and gueste.h came from.
Mention credits to Original Author of OTF

Not necessary as the credit to OTF has been already given to you during kernel development and in kernel releases multiple times. Everyone already knows you made the 20 lines code for OTF.

Apart from this the things I posted and you quoted are only containing variables and none of your OTF logic. You can't get credit for variables bro
29th May 2012, 09:31 AM   |  #28  
spica1234's Avatar
Recognized Developer
Flag Gujarat
Thanks Meter: 3,352
 
2,878 posts
Join Date:Joined: Aug 2010
More
Question
Quote:
Originally Posted by Stefan Gündhör

Not necessary as the credit to OTF has been already given to you during kernel development and in kernel releases multiple times. Everyone already knows you made the 20 lines code for OTF.

Apart from this the things I posted and you quoted are only containing variables and none of your OTF logic. You can't get credit for variables bro

Yes this public bash you wrote http://forum.xda-developers.com/show...6#post25503366
No offence,
Yes not 20 but 50 liines OTF that you couldnt make because lack of knwoledge of C thats why i had to write as per my C knowledge
Whether it's writing of 50 lines or 10 lines it requires knowledge that you dont have it's not "hi" "how are you" whats up" kind of 50 lines, whether it needs writing of 10-50 or 1 lines it needs knowledge of the same eg. to check grammer mistakes you need to have knowledge of grammer
and Oh my GOD i know you've no knowledsge of C that why you wrote variables. For you everything written is variables cause you know nothing except it.
Bro OTF is written with Structures, Functions, Module init , Module exit, pointers , and variables. and whole kernel codes are made of these. give credits when you use it.
you could only change variables and replace lib/spica.c with lib/gueste.c and lib/spica.h with lib/gueste.h that's it nothing productive you can do
Why I named OTF as HP eXtended project you know because it will be easier for PPL like you with no knowledge to change variables of line 3 and to enhance OTF
Credit goes for 50 lines not line no.3 remove other 49 lines does OTF work? no
Let's have fun can you write only 4 lines of kernel modules which clears console? no you cant obviously admit it man, because it needs basic c knowledge that you dont have. If i will give you written codes then you'll as per your nature bash that it's no big thing only 4 lines codes
Whether it's 50 lines codes like OTF or 1 lines codes, you cant write means you've failed. that's it
By the way you bashed me by OTF by mentioning not my but someone others' work. Wanna know whose work?
http://tldp.org/LDP/lkmpg/2.6/html/lkmpg.html#AEN769 <--kernel module programming. it's nobody's work. It's tutorials that needs understanding of C. So if you want to use my sources than stop bashing me otherwise dont use it if you've any self-respect.
And stop spreading wrong information-unbiased information about my work.
Last edited by spica1234; 29th May 2012 at 10:36 AM.
29th May 2012, 11:57 AM   |  #29  
S0ci0's Avatar
Senior Member
Thanks Meter: 31
 
208 posts
Join Date:Joined: Feb 2011
More
Wow this is usefull, thanks alot!
29th May 2012, 12:42 PM   |  #30  
Stefan Gündhör's Avatar
OP Senior Member
Flag Austria
Thanks Meter: 5,166
 
1,991 posts
Join Date:Joined: Oct 2011
Donate to Me
More
Quote:
Originally Posted by S0ci0

Wow this is usefull, thanks alot!

You are welcome!

Info: I enhanced details about CFlags and toolchain a bit. Still continuing to enhance first posting and the linked postings for easiest use of the information by you all.

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes