[HOW TO] Compile and Deploy a Kernel

Just a quick question: Does anyone use kernel-tool for the kernel development or modify?

Also, i think i have a clue of where the CPU frequency is. It is on the drivers folder of the source right?

Info on cpu frequencies is in /sys/devices/system/cpu. That really doesn't do you a bit of good. Read tegra3_dvfs.c and tegra3_speedo.c in /arch/arm/mach-tegra, as well as /drivers/cpufreq/cpufreq.c, to start to wrap your head around what's going on regarding setting frequencies. Compare stock N7 code to an oc/uv kernel like Motley's. I use the compare function in Eclipse. The DVFS table will drive you nuts until you realize they use (what I think is) a cheap hack -- they have one array of voltages and many arrays of frequencies for the different Tegra devices. The arrays of frequencies are matched to the array of voltages by index. The problem is that if they want to run a device at freq and mV, they have to fill in all the frequencies up to freq. This results in arrays with frequencies repeated in order to fill in all the slots up to i. You'll see exactly what I mean when you look. For example, they may have 520 MHz twice in a row in an array, matched to 850 and 875 mV (I believe it uses the higher voltage for that repeated freq). Well, this looks like crap in a voltage editor like System Tuner -- you'll have to set voltages for the same frequencies several times. There are ways around this. To see what I'm talking about, look at the N7 Bricked-Kernel. Motley uses a simple method to avoid this problem.
 
Info on cpu frequencies is in /sys/devices/system/cpu. That really doesn't do you a bit of good. Read tegra3_dvfs.c and tegra3_speedo.c in /arch/arm/mach-tegra, as well as /drivers/cpufreq/cpufreq.c, to start to wrap your head around what's going on regarding setting frequencies. Compare stock N7 code to an oc/uv kernel like Motley's. I use the compare function in Eclipse. The DVFS table will drive you nuts until you realize they use (what I think is) a cheap hack -- they have one array of voltages and many arrays of frequencies for the different Tegra devices. The arrays of frequencies are matched to the array of voltages by index. The problem is that if they want to run a device at freq and mV, they have to fill in all the frequencies up to freq. This results in arrays with frequencies repeated in order to fill in all the slots up to i. You'll see exactly what I mean when you look. For example, they may have 520 MHz twice in a row in an array, matched to 850 and 875 mV (I believe it uses the higher voltage for that repeated freq). Well, this looks like crap in a voltage editor like System Tuner -- you'll have to set voltages for the same frequencies several times. There are ways around this. To see what I'm talking about, look at the N7 Bricked-Kernel. Motley uses a simple method to avoid this problem.


I chose not to use their OC methods, I did add their VOLTAGE_CONTROL code, most likely wont use it, just wanted to see what it looked like. Their OC code was all over the place, I chose to use my own instead, I don't OC GPU.
 
Nope never heard of it either, I make kernel building scripts, I have been building kernels for a long time, I build my own Linux kernels

vampirefo kernels - Google Search

If the tools you posted works for you, then use them. There is nothing wrong with using a tool if it helps.

I'm just wondering if you used the tool before by any chance :D I'm glad that we have you in the forum :)

Info on cpu frequencies is in /sys/devices/system/cpu. That really doesn't do you a bit of good. Read tegra3_dvfs.c and tegra3_speedo.c in /arch/arm/mach-tegra, as well as /drivers/cpufreq/cpufreq.c, to start to wrap your head around what's going on regarding setting frequencies. Compare stock N7 code to an oc/uv kernel like Motley's. I use the compare function in Eclipse. The DVFS table will drive you nuts until you realize they use (what I think is) a cheap hack -- they have one array of voltages and many arrays of frequencies for the different Tegra devices. The arrays of frequencies are matched to the array of voltages by index. The problem is that if they want to run a device at freq and mV, they have to fill in all the frequencies up to freq. This results in arrays with frequencies repeated in order to fill in all the slots up to i. You'll see exactly what I mean when you look. For example, they may have 520 MHz twice in a row in an array, matched to 850 and 875 mV (I believe it uses the higher voltage for that repeated freq). Well, this looks like crap in a voltage editor like System Tuner -- you'll have to set voltages for the same frequencies several times. There are ways around this. To see what I'm talking about, look at the N7 Bricked-Kernel. Motley uses a simple method to avoid this problem.


Sorry my bad, the /driver/cpufreq is actually for adding Governors...right? but im curious about what other purpose it has because of the name :)

By the way, wow thats exactly what i want to know for the location of the code! Thanks :)


Alright have to thanks you guys again: vampirefo and FloRider, I am getting closer and closer to the kernel modifying now :) It is so difficult to learn from nothing :D
 
Last edited:
I'm just wondering if you used the tool before by any chance :D I'm glad that we have you in the forum :)



Sorry my bad, the /driver/cpufreq is actually for adding Governors...right? but im curious about what other purpose it has because of the name :)

By the way, wow thats exactly what i want to know for the location of the code! Thanks :)


Alright have to thanks you guys again: vampirefo and FloRider, I am getting closer and closer to the kernel modifying now :) It is so difficult to learn from nothing :D

I believe the governors are in that directory as well.

Sent from my IdeaTabA2109A using Tapatalk HD
 
Also, the reason the lower frequencies don't appear in DVFS is that those are handled by the little ninja core, in lp mode. G mode is for the four A7's. At least, that's what I believe based on my work so far.

Sent from my IdeaTabA2109A using Tapatalk HD

And actually they are A9's. They use the ARMv7 instruction set. I don't know if that means the same thing as the A7 instruction set...

Sent from my IdeaTabA2109A using Tapatalk HD
 
And actually they are A9's. They use the ARMv7 instruction set. I don't know if that means the same thing as the A7 instruction set...

Sent from my IdeaTabA2109A using Tapatalk HD

Yeah it kind of confused me before too when i was checking my Galaxy S3's CPU. I got what you meant before :)

I wish my college will teach me something related to the ARMv7 instruction(or maybe just teach me the architecture of relevant CPU? :D)... schools are so outdated in my opinion...
 
Yeah it kind of confused me before too when i was checking my Galaxy S3's CPU. I got what you meant before :)

I wish my college will teach me something related to the ARMv7 instruction(or maybe just teach me the architecture of relevant CPU? :D)... schools are so outdated in my opinion...

The processor-specific code is written in assembler, I believe -- definitely not something you want to mess with.
 
The processor-specific code is written in assembler, I believe -- definitely not something you want to mess with.

Too complicated :(

By the way, just curious any chance that you learned about Micro-controller before :)?
 
Last edited:
ok i have to say that the overclock part is super complicated 0_0

So I am focusing on the governors part right now (because its basically copy and maybe modify the code a little bit :D :D)

I found this github that explain what you should do to add the governors: https://github.com/DooMLoRD/Xperia-...mmit/bec19001ded34077d7776639834a1229b69e5f87
It is for Galaxy S2, the governor code is different, but the method is the same. What do you think FloRider??? :) :)


PS: I really want to throw my computer away because everytime i try to enter the make -j5 commend it always show me error :( :( I feel like i should just reinstall Ubuntu and do everything again!!!!
 
Last edited:
Thanks for the tutorial

just for all clarity

boot.img is just a dd if the LNX partition on the tablet, right?

have a nice day
 
Back
Top