Little help getting started with kernel development - Android Q&A, Help & Troubleshooting

Hi, We are finally getting to the point where we can start to push out some new kernels for the Atrix 2 (sort of got the bootloader bypassed). I was hoping someone could give me some good resources for getting started with kernel development. I am very computer knowledgeable, and I know a fair amount of c++ and java, but I still cannot find very many good online guides to getting into this stuff. I am very serious about learning, but we all have to start somewhere, so it would be great if someone could get me off in the right direction.

There's a great post in here with all the necessary tool chains, also RootzWiki is a great forum for kernel and aosp building
Sent from my Nexus S4G using Tapatalk 2

I worked on a kernel for the evo4g. Here is the source. At the time there were a few different setups of roms. I created a script to build 12 different variants. All flashable via recovery. If you are interested I could walk ya through the script or make the edits needed for your kernel source. Least until you fully understand the process.
https://github.com/lithid/Htc-Sense-Freedom-Kernel
Sent from my Nexus S 4G using xda premium

Related

ROM Development... Where to get satarted?

Hey I looked around on Google and here and couldn't find a naice all in one guide on creating your own ROM/ROM Development.
I'm very new to all this but want to learn more about it and maybe see if I can throw my own personal twist to my phone.
Many Thanks!
Sent from my Desire HD using xda premium
Do you want to start from basic or wanna learn in brief?
Sent from my HTC Wildfire using xda premium
also interested. have ubuntu 10.04 and win 7 on dual boot. should i be looking to build aosp from source or start by dissecting (so to speak) a custom rom?
Sent from my PC36100 using XDA App
desertegl said:
also interested. have ubuntu 10.04 and win 7 on dual boot. should i be looking to build aosp from source or start by dissecting (so to speak) a custom rom?
Sent from my PC36100 using XDA App
Click to expand...
Click to collapse
ubuntu is not at all necessary cause its mostly meant for kernels and btw if u wish to become a developer first learn themeing and thn proceed to ROM makin.... wen u hav excelled in theming its easy to make ROM's....
Ok I'm trying to get as basic as possible. Learning from the ground up. Ill start with themes first untilled I got that down. Thanks for the advice.
Any good links you could recommend?
Sent from my HTC Inspire
here u go with a ton of knowledge on android..
http://forum.xda-developers.com/showthread.php?t=667298
Thanks man ill take a look. Is it difficult to get started theme development even if Ive never had any exp in any sort of computer language? ie code and commands.
BeGrateful said:
Thanks man ill take a look. Is it difficult to get started theme development even if Ive never had any exp in any sort of computer language? ie code and commands.
Click to expand...
Click to collapse
Basics are XML editing and image editing with Photoshop and the tool to make .9.pangs from the ask. That is for the basic themes. Not hard but not easy either
OK I have stared messing around with web design to get familiar with some code. Now I'm thinking app development would be a good first step into the android firmware. (Hope I'm using that right)
If you have suggestions were to get started let me know but I'm sure to find everything I need to know on Google. Thanks again.
Sent from my HTC Inspire
Ok so I've started doing research in XML format and its not much different from HTML so I feel pretty confident that a can for sure write the code structure properly. The only thing I'm missing is how to take it from a web browsers standpoint to the android platform. Is this all found in the Google developers kit or an outside source?
And on different note what XML editor do you use?
Sent from my Desire HD using Tapatalk

Not S-Off, Coders for Wifi Drivers!

Listen up, please don't post useless comments. And if people do, don't flame them for 5 pages because of it!​
I am not an expert, but this is what I have pieced together. I know this is rather long but this will roughly explain Kernels, S-Off, and why Development is lacking.
Here is the way I see community android development. There are themers, Rom chefs, kernel builders, and coders. Themers make most of the visual changes. Rom chefs take a little of everyones efforts and actually puts the Roms together. Kernel builders make the custom kernels for sense, aosp, and miui. The coders are the ones who really understand the code and make the complicated things work (S-off/Root Access/Incomplete drivers/new bootloaders/things like that). Now really everyone works together and there is some crossover in people's abilities but a community really needs all of these in order to fully develop.
Kernels/Drivers:
Think of it this way, the hardware talks to the drivers/kernel and the drivers/kernel talks to the Os. The drivers/kernels are like the translator between two different languages. The problem is that our current kernel made by Htc only knows how to translate from our hardware to Sense. We have to make custom kernels that can translate from our hardware to Aosp Gb, Aosp Ics, or Miui.
The problem:
Faux is extremely talented but here is what he has stated as the problem in making these custom kernels:
Amaze WiFi driver is a modified TI WiFi driver. The major problem is we don't know what HTC did to the WiFi driver for the Amaze.
Click to expand...
Click to collapse
Now I have talked to Htc and they said that they won't be releasing the full source code that includes the wifi drivers because of proprietary issues. My guess is that TI is the company that owns the original drivers and they don't want them released. Faux:
TI drivers are designed to work with OMAP Chipsets not Qualcomm chipsets, so HTC had to do some major hacks to make it work with Qualcomm chipset. It is NOT IMPOSSIBLE to reverse engineer what HTC did, it's very time consuming and tedious.
Click to expand...
Click to collapse
The Solution
I don't have a solution but that is what this thread is for. We need to brainstorm ideas to make this happen.
Here is a link to Htc Dev if you would like to bug them about it (though I'm not sure this would help)
http://htcdev.com/contact
The other solution is to focus on Coders that can reverse engineer the Wifi drivers. We don't need S-OFF yet! S-Off simply allows users to flash things like a kernel and radio directly to the phone through recovery. THAT IS ALL! It will not help bring Aosp faster! Here is Faux's opinion:
IMHO, S-Off at this stage does very little if at all at this moment. Having a working WiFi source is far more important and will increase development for Amaze than S-Off... S-On is just a minor annoyance...
Click to expand...
Click to collapse
I hope that this helps to clear up why development is so slow. We don't have anyone that wants to jump in and build the Wifi drivers so that Faux and Xboarder can make the Kernels for the Aosp Roms to run upon. Xboarder is still at work hacking and slashing at the code to get it working but I think we need someone with years of experience and knowledge to join the efforts. Xboarder is extremely talented but he isn't a code guru yet. Go to the forums of previous phones you have had and look around for people who have re engineered Lib files and phone drivers. Talk to some of the other Kernel builders to see if they are interested in building the driver. This is where we need to focus effort and money in order to stimulate development.
Wifi Driver
From Squish099:
@htcdev Amaze 4G needs missing wifi driver from /platform//hardware/ti/wlan/wl1283 and /wl1283_softAP. Both are missing from Amaze source.
Found it in an old tweet faux sent to htc just after thanksgiving.
Click to expand...
Click to collapse
craigtut said:
Listen up, please don't post useless comments. And if people do, don't flame them for 5 pages because of it!​
I am not an expert, but this is what I have pieced together. I know this is rather long but this will roughly explain Kernels, S-Off, and why Development is lacking.
Here is the way I see community android development. There are themers, Rom chefs, kernel builders, and coders. Themers make most of the visual changes. Rom chefs take a little of everyones efforts and actually puts the Roms together. Kernel builders make the custom kernels for sense, aosp, and miui. The coders are the ones who really understand the code and make the complicated things work (S-off/Root Access/Incomplete drivers/new bootloaders/things like that). Now really everyone works together and there is some crossover in people's abilities but a community really needs all of these in order to fully develop.
Kernels/Drivers:
Think of it this way, the hardware talks to the drivers/kernel and the drivers/kernel talks to the Os. The drivers/kernels are like the translator between two different languages. The problem is that our current kernel made by Htc only knows how to translate from our hardware to Sense. We have to make custom kernels that can translate from our hardware to Aosp Gb, Aosp Ics, or Miui.
The problem:
Faux is extremely talented but here is what he has stated as the problem in making these custom kernels:
Now I have talked to Htc and they said that they won't be releasing the full source code because of proprietary issues. My guess is that TI is the company that owns the original drivers and they don't want them released. Faux:
The Solution
I don't have a solution but that is what this thread is for. We need to brainstorm ideas to make this happen.
Here is a link to Htc Dev if you would like to bug them about it (though I'm not sure this would help)
http://htcdev.com/contact
The other solution is to focus on Coders that can reverse engineer the Wifi drivers. We don't need S-OFF yet! S-Off simply allows users to flash things like a kernel and radio directly to the phone through recovery. THAT IS ALL! It will not help bring Aosp faster! Here is Faux's opinion:
I hope that this helps to clear up why development is so slow. We don't have anyone that wants to jump in and build the Wifi drivers so that Faux and Xboarder can make the Kernels for the Aosp Roms to run upon. Xboarder is still at work hacking and slashing at the code to get it working but I think we need someone with years of experience and knowledge to join the efforts. Xboarder is extremely talented but he isn't a code guru yet. Go to the forums of previous phones you have had and look around for people who have re engineered Lib files and phone drivers. Talk to some of the other Kernel builders to see if they are interested in building the driver. This is where we need to focus effort and money in order to stimulate development.
Click to expand...
Click to collapse
Good post lots of info, s-off really isn't that much of a big deal. Interesting. The WiFi drivers really are important sucks how HTC handled the amaze, I'm really hoping they're more open with the HTC one thanks for the info.
Sent from my HTC_Amaze_4G using xda premium
I was able to flash kernel through recovery?
Sent from my HTC_Amaze_4G using XDA
knifeproz said:
I was able to flash kernel through recovery?
Sent from my HTC_Amaze_4G using XDA
Click to expand...
Click to collapse
Uhh no...?
Sent from my NRGized Amaze...
via xda premium
HTC really messed up, and they call them self dev friendly,
same people that has got s-off on the sensation had tried to do for the amaze but they backed off,
but as you made a point s-off isnt really the problem here, the problem seems to be the drivers that htc wont realease
really the only person we have working hard on this device is Xboarder and binary100100 is doing what he can.
and he has done a really good job, and noobs had got on his nerves. We can not afford to lose him.
i really wish this phone have more developers working on getting things right, like that saying says two brains is better than one
i really love my phone but in the other hand i love roms. and as this phone its not a worldwide phone like the sensation i can understand the lack of developers
as you all know that the sensation have 40+ roms,themes,radios,kernerls,tweaks
sometimes i regret of getting rid of it, but specks says this is a better one,
had you guys ever though about asking for help on the android development forum? we might get lucky and find somebody that is willing to help.
but anyways thank you for saying it like it is and get us understand more of the situation, and me as i think all of you, would do anything to help..
I'm no dev, but i have done something
I HAVE PMED TWO KERNEL DEVELOPERS , TO LOOK INTO THIS THREAD TO GIVE A GLANCE , IF THEY CAN GIVE ANY INPUT ABOUT IT..
If there is any reply from them , i'll let the community know..
I think this is one of the important thread, we should probably have it in Development section and should be made sticky.
Mafioso said:
I think this is one of the important thread, we should probably have it in Development section and should be made sticky.
Click to expand...
Click to collapse
Lol good luck finding an active moderator to do anything in this Amaze forum besides handing out infractions. Binary bounced
Sent from my Energized HTC Ruby using XDA-Premium or Tapatalk
glacierguy said:
Lol good luck finding an active moderator to do anything in this Amaze forum besides handing out infractions. Binary bounced
Sent from my Energized HTC Ruby using XDA-Premium or Tapatalk
Click to expand...
Click to collapse
yeah, you will have more luck if you are looking for trolls flaming moderators indeed
Anyway,we cant stick everything in development, but i will see what i can do
Edit: oké, i will make a sticky collection thread.
So we will have less thread's sticked.
One or two sticked with all important info
This thread should be priority one in the Amaze forum.
Max Krivonos has Wifi working on his CM9 build for Amaze. Once he gets everything else working (which is limited to the rest of the radios, camera, and USB charge detection), I imagine the source will be released for use.
Accophox said:
Max Krivonos has Wifi working on his CM9 build for Amaze. Once he gets everything else working (which is limited to the rest of the radios, camera, and USB charge detection), I imagine the source will be released for use.
Click to expand...
Click to collapse
agreed. football usually drops a leak well ahead of the time ota goes live. either way, once we get the ics kernel, im rocking cm9 for good
mrmako777 said:
agreed. football usually drops a leak well ahead of the time ota goes live. either way, once we get the ics kernel, im rocking cm9 for good
Click to expand...
Click to collapse
Official ota will help but I don't think it will work for aosp. It will still only work with the sense until faux does some of his magic to it.
Sent from my HTC_Amaze_4G using XDA
Once cm9 comes out ill use it till aosp is out. I wasn't a huge fan of cm9 for hd2 but might change for this device!
Sent from my HTC_Amaze_4G using XDA
craigtut said:
Official ota will help but I don't think it will work for aosp. It will still only work with the sense until faux does some of his magic to it.
Sent from my HTC_Amaze_4G using XDA
Click to expand...
Click to collapse
dont quote me, but i think max said once he got a hold of the ics leak, he could use the wifi drivers from there...or something to that effect
he already have wifi working on cm9, but not calls, and he wont take any help. this once used to be a family in devs working together trying to get things right but now its just a race on who release it first, same thing happened on the sensation
gypsy214 said:
he already have wifi working on cm9, but not calls, and he wont take any help. this once used to be a family in devs working together trying to get things right but now its just a race on who release it first, same thing happened on the sensation
Click to expand...
Click to collapse
If I was a Dev I would take any help I could get =\
Sent from my HTC Amaze 4G using XDA
Xxxpachaxxx is a kernel developer for dhd..he is looking into it but he wants to know what is the driver number for HTC amaze ...
Can some1 pleease tell me what it is ASAP!!
Is it bcm4329 ?? Fast please
Sent from my HTC_Amaze_4G using xda premium
dullhunk said:
Xxxpachaxxx is a kernel developer for dhd..he is looking into it but he wants to know what is the driver number for HTC amaze ...
Can some1 pleease tell me what it is ASAP!!
Is it bcm4329 ?? Fast please
Sent from my HTC_Amaze_4G using xda premium
Click to expand...
Click to collapse
I don't know what it is but you could pm Faux123 for the info.
gypsy214 said:
he already have wifi working on cm9, but not calls, and he wont take any help. this once used to be a family in devs working together trying to get things right but now its just a race on who release it first, same thing happened on the sensation
Click to expand...
Click to collapse
He's working with a dozen other CM devs on MSM 8x60 devices. He just doesn't care for XDA. And with what this forum is turning into, I don't blame him.
Sent from my HTC Amaze 4G using xda premium

AOSP/CM/AOKP Kernal Dev Needed Desperately

I'm just hoping that there may be a dev to start some tinkering with aosp kernal development on the HTC DNA. I'm missing cpu/gpu overclocks and such. Just throwing it out there. As you were people....
There's already quite a bit going on with AOSP kernel development. I know of at least three top shelf developers working on kernel development right now.
once the "stock" kernel is to the point of being the foundation they are happy with you will start seeing builds published.
It definitely doesn't hurt that Chad has the experience and background in kernels that he does when he makes dev decisions with CM10.1
Sent from my HTC6435LVW using Tapatalk 2
CharliesTheMan said:
I know of at least three top shelf developers working on kernel development right now.
Click to expand...
Click to collapse
I like your analogy to liquor vis-a-vis top shelf.
I never would have guessed this forum needed an aosp dev. I'll get started on it now
Sent from my HTC6435LVW using Tapatalk 2

KitKat - any interest/talent left?

I know, I know... the droid x2 is a lost cause, but i have to make it last a little while longer and I have 2 of them so...
Is anyone interested or talented enough to try to get CM11 (kitkat) ported over to this device? I know @kev1nMark has been "talking" to dragonzkiller about getting into it, but anyone else have resources to contribute? I've never worked on the device at such a low level before, but I have written apps for it as well as know a thing or two about code. I'm happy to contribute whatever i can, even if its as simple as running up tests on my spare device.
Thoughts?
smallzfsu said:
I know, I know... the droid x2 is a lost cause, but i have to make it last a little while longer and I have 2 of them so...
Is anyone interested or talented enough to try to get CM11 (kitkat) ported over to this device? I know @kev1nMark has been "talking" to dragonzkiller about getting into it, but anyone else have resources to contribute? I've never worked on the device at such a low level before, but I have written apps for it as well as know a thing or two about code. I'm happy to contribute whatever i can, even if its as simple as running up tests on my spare device.
Thoughts?
Click to expand...
Click to collapse
I am considering it. This devices is a royal pain to work with though. I will see what i can do.
I'm certainly willing to test any builds that may come up, I'll have to locate a wall charger though..
Sent from my LG-LS970 using xda app-developers app
smallzfsu said:
I've never worked on the device at such a low level before, but I have written apps for it as well as know a thing or two about code. I'm happy to contribute whatever i can, even if its as simple as running up tests on my spare device.
Click to expand...
Click to collapse
In the same situation. It's looking like a good deal of work and might be a task I just simply don't have the skill for at this point. Still, I really want to have a useful old phone. Gingerbread makes me sad. Jelly Bean is just a resource hog. I've always wanted to learn a little more about the ROM build process and this might be a decent way to do it.
How does one go about porting KitKat to the X2?
markrulesallnow said:
How does one go about porting KitKat to the X2?
Click to expand...
Click to collapse
This is where I'm starting also w/ dragonzkiller's CM10 repos. http://wiki.cyanogenmod.org/w/Doc:_porting_intro
EDIT: Perhaps it's better to start building an updated CM10 just to get everything building correctly? With my lack of experience diving right into CM11 seems a bit bold.
One can simply put cm11 framework on a cm10 base but that's not what we want.
Sent from my XT907 using XDA Premium 4 mobile app
AKShotgun said:
One can simply put cm11 framework on a cm10 base but that's not what we want.
Sent from my XT907 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Not what we want, but it may be our only option.
Sent from my SCH-I535 using xda app-developers app
Should anyone decide to take on this herculean task, I'll be more than happy to be a test bunny. My X2 is presently a glorified paperweight.
-blu
I have a Milestone X2 running under the ACS Alaska carrier. My device is rooted and I've used every ROM that Larson Thorpe has put in his MX2 collection. The ICS and JB roms did work, but had too many issues/crashes/reboots/etc so I just stuck with Eclipse 2.3 which is based on Gingerbread.
This phone is just... hard to deal with sometimes, and we all know it's mostly due to the amount of RAM. KitKat seems to take care of a ton of memory issues in Android (tested on my N7.) People have said that KitKat won't actually improve older devices by much, but any improvement would be amazing!
I'm totally down to fully test any builds anyone comes up with. I wish I could help build/develop for this phone, but I'm a web developer and have absolutely no skill with ROM building or kernels or anything like that.
Here's to hoping!
I can get everything set up and running (as in, ready to compile) but the compile errors are truly a mess to debug.
Is anyone willing to make a "how to" thread that describes how to make a basic rom, specific to this phone?
I think enough people are still interested, but I think we'd get further if we helped to educate each other.
LaserChicken said:
Is anyone willing to make a "how to" thread that describes how to make a basic rom, specific to this phone?
I think enough people are still interested, but I think we'd get further if we helped to educate each other.
Click to expand...
Click to collapse
This is about the closest thing I have seen, thanks Kevin for pointing it out already:
http://wiki.cyanogenmod.org/w/Doc:_porting_intro
Maybe once it gets put on more devices and development starts up again. You could ask nitroglycerin if he would be willing to update eclipse. But being a 512mb device this would be huge.
Sent from my GT-N5110 using XDA Premium HD app
Since we don't have a unlocked bootloader we can't just download the source and compile it, it takes a lot of skill. That's why we have a low development rate
Sent from my XT907 using XDA Premium 4 mobile app
AKShotgun said:
Since we don't have a unlocked bootloader we can't just download the source and compile it, it takes a lot of skill. That's why we have a low development rate
Sent from my XT907 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Well, actually, you can have CM compile around a pre-compiled kernel (what we have) but there's more to it than that.
One, we already have graphics issues...and KitKat forces you to have newer drivers or else you get black artifacting
This is due to OpenGL 3 not being supported by the vendor blobs
Our blobs don't even have ICS support...
Another nightmare is, yes, getting CM to take the precompiled kernel
If I got my hands on the source that the cm10.1 rom is based off of, we could start work
I would aim to start with 10.2, then maybe add in cm11 features but keep the old system
It would make things easier, keep radios, wifi, storage and display working...hopefully
Also, being as I'm on cm10, could anyone link me the patched recovery?
I'm glad to see I'm not the only one on the ol' X2, this would be so awesome if we got a KitKat ROM
Sent from my MB870 using xda app-developers app
optimusprimeuya said:
I'm glad to see I'm not the only one on the ol' X2, this would be so awesome if we got a KitKat ROM
Sent from my MB870 using xda app-developers app
Click to expand...
Click to collapse
I'm literally ready to start working on it now
But I need our device stuff and I'm waiting for a reply to a PM for it
---------- Post added at 09:47 AM ---------- Previous post was at 09:45 AM ----------
Kevin M said:
I can get everything set up and running (as in, ready to compile) but the compile errors are truly a mess to debug.
Click to expand...
Click to collapse
You have the device tree?
That's all I really need to get started
I want to do this soooo badly
Hell...I'm willing to do this Nexus Image style: hacking the files into a precompiled image to get it working
---------- Post added at 10:04 AM ---------- Previous post was at 09:47 AM ----------
Found the sources
smallzfsu said:
I know, I know... the droid x2 is a lost cause, but i have to make it last a little while longer and I have 2 of them so...
Is anyone interested or talented enough to try to get CM11 (kitkat) ported over to this device? I know @kev1nMark has been "talking" to dragonzkiller about getting into it, but anyone else have resources to contribute? I've never worked on the device at such a low level before, but I have written apps for it as well as know a thing or two about code. I'm happy to contribute whatever i can, even if its as simple as running up tests on my spare device.
Thoughts?
Click to expand...
Click to collapse
I am willing to test. My programming skills are certainly not up to this task, but I would like to learn. Any way to get started?
polymath257 said:
I am willing to test. My programming skills are certainly not up to this task, but I would like to learn. Any way to get started?
Click to expand...
Click to collapse
I'm about to go work on it now
Maybe we'll have it in two weeks? No? Probably not...
I'll try building CM11, but don't expect the graphics to work
At all

Trying to build a kernel from 4.3 source

Hello, fellow Evo LTE brethren. I have grown weary and quite impatient in waiting for different things to be released (in this case, a custom Sense kernel), so I am going to pick up the torch and try to figure this one out for myself.
Currently, I am updating my Ubuntu base with the required packages, and possibly even a few more that aren't needed or outdated. I'm doing my required readings to learn the ins and outs, and also about the different rules and regulations regarding cherry picking, kanging, tweaking, and the sort.
Any advice/assistance/direction is appreciated, and I will request this thread to be moved to the Dev section when/if it is finally ready for the public, or I might make a new thread, depending on the size of this one.
Just a heads up you will need to fix some stuff to get it to compile. I compiled it and got it booting on sense 6 just need to see if I can get sound and cam working. Will keep you guys up to date with my fixes.
Sent from my SPH-L900 using Tapatalk
they released it already
http://www.htcdev.com/devcenter/downloads
liljthatbol said:
they released it already
http://www.htcdev.com/devcenter/downloads
Click to expand...
Click to collapse
I believe he is talking about building a custom kernel.
Sent from my EVO using XDA Free mobile app
gstanke said:
I believe he is talking about building a custom kernel.
Sent from my EVO using XDA Free mobile app
Click to expand...
Click to collapse
Indeed, I was. It is noted in the OP as well.
aarsyl said:
I have grown weary and quite impatient in waiting for different things to be released (in this case, a custom Sense kernel)...
Click to expand...
Click to collapse
Just a quick update. Kernel building is a lot of reading! I finally got my file paths to straighten out, and I am making progress in building my first kernel. It will only be stock...I need to get it to boot first, then I will worry about other things later.
*Currently trying to understand github.

Categories

Resources