[Q] Kernel Development for The Sprint Note 2 - Sprint Samsung Galaxy Note II

Hello Guys,
I am a developer of windows apps and I also do some web development stuff. I have also for the last couple of weeks been playing around with the android SDK and building apps for my phone. I have wanted to get into kernel development for my device, but I have had trouble finding a good place to start. I know I can follow the google directions and build a kernel, but that may not be specific to my device.
I was first wondering is there a kernel (Perferably AOSP like Cyanogenmod) that i can compile just get used to the build process. I belive I have already found that, it being this kernel right here:
https://github.com/CyanogenMod/android_kernel_samsung_smdk4412"]https://github.com/CyanogenMod/android_kernel_samsung_smdk4412
(Sorry, Im under ten posts.)
But this is where the confusion starts for me. I see this as a base of a lot of kernels for the note 2, but I notice the kernel is for the Galaxy S3. So in short, is there a good way to start learning how to build and modify android kernels for my Note 2? If so, do you have any recommendations on what kernel to base of of, or any tips or tricks, or etc?
PS: I am a "Newbie" by the forum standards so i can't post in the dev section.

R3liant said:
Hello Guys,
I am a developer of windows apps and I also do some web development stuff. I have also for the last couple of weeks been playing around with the android SDK and building apps for my phone. I have wanted to get into kernel development for my device, but I have had trouble finding a good place to start. I know I can follow the google directions and build a kernel, but that may not be specific to my device.
I was first wondering is there a kernel (Perferably AOSP like Cyanogenmod) that i can compile just get used to the build process. I belive I have already found that, it being this kernel right here:
https://github.com/CyanogenMod/android_kernel_samsung_smdk4412"]https://github.com/CyanogenMod/android_kernel_samsung_smdk4412
(Sorry, Im under ten posts.)
But this is where the confusion starts for me. I see this as a base of a lot of kernels for the note 2, but I notice the kernel is for the Galaxy S3. So in short, is there a good way to start learning how to build and modify android kernels for my Note 2? If so, do you have any recommendations on what kernel to base of of, or any tips or tricks, or etc?
PS: I am a "Newbie" by the forum standards so i can't post in the dev section.
Click to expand...
Click to collapse
You might want to start here http://forum.xda-developers.com/forumdisplay.php?f=1896
Check the Matrix thread, devil kernel and Garwyn's experimental kernel thread. These might give you some ideas

davidh59 said:
You might want to start here http://forum.xda-developers.com/forumdisplay.php?f=1896
Check the Matrix thread, devil kernel and Garwyn's experimental kernel thread. These might give you some ideas
Click to expand...
Click to collapse
Thanks! I have been testing around, but two problems have come up,
I have searched multiple threads and got as many dependencies as I could, but I still needed the toolchain. I got the android NDK, and used this guide:
http://xda-university.com/as-a-developer/getting-started-building-a-kernel-from-source
I used the arm-linux-androideabi- toolchain, is that ok? Even if it is, is there a better or recommended tool chain?
Another problem I had is when compiling the source I got a "error unknown pseudo-op .arch_extension" when it was compiling the devices section of the kernel.
Any thoughts and help would be appreciated.
Cheers,
R3liant

Related

Information regarding creation of a custom ROM

Hey, new to the forums, recently purchased a GSM Hero.
I have done some development for free software (think freedom, not price) projects, and have become accustomed to git repositories and structured development.
Upon entering the world of custom Android ROMs (at least Hero ROMs) I have been sorely disappointed with the development practices going on, releases on file sharing sites and the like.
On top of this, none of the ROMs available suit my needs.
This is all fine, as I'm not developing those ROMs.
I have decided that I need to start working on my own custom ROM, however guides and documentation regarding this process are in short supply.
It would be much appreciated if someone could link me to some guides to starting my own custom ROM.
I intend it to be a light vanilla ROM, with none of the bloat that seems to perpetuate other ROMs, I'm aware other such ROMs do exist, however none of them support all features, and even those that claim to do so, often require me to FC
naivemonarch said:
I'm aware other such ROMs do exist, however none of them support all features, and even those that claim to do so, often require me to FC
Click to expand...
Click to collapse
Have you tried this one ? >[2.1] aychteesees-vanilla-cupcake< NOT the [3.0.1]verison ..this is still @dev
http://android.modaco.com/content/h...96/3-0-1-aychteesees-vanilla-cupcake-rom-gsm/
Give it a try [2.1] ! and tell us how it went ...
Yeah I tried that one, it claims to have full functionality, however I frequently had to FC various applications.
I'm downloading 3.0.1 as we speak, however I'd still like some resources on making my own ROM.
I'm interested on this documentation too....thanks
naivemonarch said:
Yeah I tried that one, it claims to have full functionality, however I frequently had to FC various applications.
Click to expand...
Click to collapse
That's weird , I have used almost everything ( apps ) with that ROM [2.1] ... and never get FC's
Did you flashed from Zero .. I mean with all he possible wiping . inlcuding SD ext partition wipe
???
That is a MUST ..!
Before this gets too off-topic, I too would like to concur with what OP is saying. I'd love some info on where to begin with custom ROMs, and I think it would be great if we could create a community repo for code for a custom ROM.
This leads me to another question: all these custom ROMs that we see available for download -- are they free/open source? Like, do they have source code available? I certainly don't think they do, but if they don't, then aren't they violating the terms of the GPL by not providing source code?
FunkTrooper said:
Before this gets too off-topic, I too would like to concur with what OP is saying. I'd love some info on where to begin with custom ROMs, and I think it would be great if we could create a community repo for code for a custom ROM.
This leads me to another question: all these custom ROMs that we see available for download -- are they free/open source? Like, do they have source code available? I certainly don't think they do, but if they don't, then aren't they violating the terms of the GPL by not providing source code?
Click to expand...
Click to collapse
There's Paul's (modaco) online kitchen, but if you want to compile by yourself, there's a plethora of gits on github (cyanogen, lokx, kiall to mention just a few).
Good question. Yeah it would be nice if there was a 'Cooking Class' thread on this forum like in some of the other forums. There is a decent tutorial however at HTCpedia.com under the HTC Hero ROM Development section, it's in the stickies there. However, I still have questions and that forum is not visited as much as xda.
Link to cooking thread:
http://htcpedia.com/forum/showthread.php?t=1404
FunkTrooper said:
Before this gets too off-topic, I too would like to concur with what OP is saying. I'd love some info on where to begin with custom ROMs, and I think it would be great if we could create a community repo for code for a custom ROM.
Click to expand...
Click to collapse
As a start, I would read that thread I just linked above. Once you can dump the contents inside the system.img and then combine it with the boot.img to build an update.zip, then you are already halfway there - that's actually fairly easy. But knowing how to add custom kernels to the update.zip, making the custom ROM rooted, etc. are all stuff that I'm still working on. There's supposed to be a lot of info in the Dream/Magic forums, so I'll keep reading.
Android is still fairly new and very few people know how to use Linux, thus there's less support and less interest in wanting to cook for one's own Android device.
BTW, that thread I linked above is also found here.. Doh!
http://forum.xda-developers.com/showthread.php?t=551711
Thanks for the link, a good read.
Anyone know what the process is for using a custom kernel? There are a few things I'l like to enable that aren't in the HTC kernel (like FUSE).
naivemonarch said:
Thanks for the link, a good read.
Anyone know what the process is for using a custom kernel? There are a few things I'l like to enable that aren't in the HTC kernel (like FUSE).
Click to expand...
Click to collapse
If I eventually manage to find out I will post it here. My most important concern is making a rooted ROM from those shipped ROMs, as some people have been doing here.

Need sense kernel with loop enabled

I am in need of a kernel with loop enabled. I am in the newest OTA, if one doesn't exist I could use some help compiling one from the newest source, I have everything I need to do it on my Linux machine I am stuck trying to find which makefile to edit and where the .config file containing CONFIG_DEV_BLK_LOOP is located.
If it matters at all I would much rather compile my own kernel so I can learn something new.
Thanks for any help guys!
Sent from my White Evo 4G
Really!? I am not lazy or dumb, I have gone through a lot of kernel threads and it is not stated wether or not loop is enabled, all I am looking for is a kernel close to stock with loop enabled, come on guys I know someone here knows of one, if not is ANYONE willing to work with me while I learn to make one?
matthewjulian said:
Really!?
Click to expand...
Click to collapse
LOL. I'm on the more technical side, program for a living and have compiled a share of Linux kernels in my life, and I'm not quite sure what you are referring to. Sadly most of the sharper devs pretty much handle these forums in a one-way manner, they put out stuff, but they rarely read other people's posts. There are plenty of people that like to help out, but most of those folks aren't going to know anything about compilation.
The makefile you need to edit is in the root of the kernel source. The very first one that you see.
I am referring to loop devices support, this enables me to boot ubuntu on my Evo, it is one line of code that needs to be un-commented and changed to "CONFIG_DEV_BLK_LOOP=y
I am just lost,I was following this tut here http://htcevohacks.com/htc-evo-hacks/how-to-build-your-own-htc-evo-4g-android-kernel/
but the directions seriously slack off from step 11 onward, any ideas?
Do you by chance want to install Ubuntu on your phone? I think I saw something pertaining to that in some instructions I browsed over a while back.
lithid-cm said:
Grab the latest HTC source code:
edit the makefile:
Code:
CONFIG_DEV_BLK_LOOP=y
Then compile the kernel. There are plenty of how tos for kernel compiling. Let me know if you need more direction.
Click to expand...
Click to collapse
I have all the files I need, I was following the tut at htcevohacks.com but the instructions seriously slack off & there are numerous makefiles in multiple folders on top of that I can't seem to find what file contains the line config_dev_blk_loop, could you point me to a more complete walk-through please, oh and I am on the latest OTA with the newest kernel and radios.
Bump for desperation,chewed up almost 3 days of my time...
Sent from my White Evo 4G
Bump for this simp
Ok, well I guess I am gonna just have to PM each Dev individually about each individual kernel, damn all I need is a how-to or tut on kernel compiling (which the search function apparently can't find) or someone that knows of a 2.2 kernel with loop devices enabled. Oh well.
I'm pretty sure netarchy kernels are loop back enabled. Ask around there maybe.
Sent from my PC36100 using XDA App
nukedukem said:
I'm pretty sure netarchy kernels are loop back enabled. Ask around there maybe.
Sent from my PC36100 using XDA App
Click to expand...
Click to collapse
YAAY! LMFAO, I will ask there, sorry I'm excited but I have been trying to get this working for a while; I would much rather learn to build it myself but I will take what I can get for now.
IF ANYONE knows where there is an in-depth tutorial on how to compile a kernel from the newest source I would be extremely appreciative, THANKS
Did you ever find or get your Complie to work? I tried for a while to compile the stock Kernel, then gave up. I took a stab in the dark and flashed a stable netarchy kernel. unfortunatly that Kernel didn't have Loop devices enabled (Pulled Config file and Unzipped it) I like the Kernel I am running but need to find a way to get ubuntu running.
Netarchy does have loop enabled, I am running Netarchy ___(will find which version later can't remember) but yeah I am running Lakia Linux
now(network security testing, think Backtrack 3) as well as another new Linux image from a guy here, anyways I think you need Netarchy universal cfs havs less no sbc 4.2.2
Sent from my White RLS5 Evo

[DEV][DEV-ONLY] Honeycomb Progress

[This is not the place to say "this is awesome" or "thanks!"]
[DEVS ONLY]
I want to start this thread to keep up the progress on the port.
the bad news is that the SDK is incomplete for now, so (like other devices)
we will have to write our own code for the OS, the nook community
has done a wonderful job writing their own libraries and stuffs, so we will have to do the same.
Instead of pursuing different goals, let's focus on one thing at a time.
since GSM and CDMA versions are already out, it seems we suffer the same bugs, so for now let's unite strength and knowledge to overcome these.
I propose that the first goal to fix is the SurfaceFlinger, so we could at least see the apps, the buttons and the notifications.
it is currently throwing this:
04-06 22:01:35.495: ERROR/Surface(2960): dequeueBuffer failed (Out of memory)
this could lead us that it might coudln't start because of some malloc malfunction or something.
also that pvrsrvinit bugs me a lot.
update:
8/APR/2011
since DiP7 could fix SurfaceFlinger and other things using a different build from the GSM kernel, we have to dig deeper
======================================
CURRENT GOAL
Rebuild Kernel
======================================​
Current approaches:
*none
Post any finding, guessing or anything, and please, please don't be afraid to ask anything you have a doubt, as a Dev you should not know everything, so we can help us each other
------------------------------------------
Google Easter egg:
while searching some info about the android.mk file , I put it on the chrome bar to search for that term, but instead I went to
http://android.mk
an easter egg web page from google lol
******TOOLS*********
How to send text and Keystrokes via ADB
http://bradchow.blogspot.com/2011/02/send-intent-and-key-event-by-adb.html
use DroidExplorer to easily access your device from your computer and makes changes from it
http://de.codeplex.com/
The Android Boot Process
http://www.androidenea.com/2009/06/android-boot-process-from-power-on.html
---Kernel Tools----
CPU Datasheet
http://forum.xda-developers.com/showthread.php?t=745877
Samsung GIT
http://android.git.kernel.org/?p=kernel/samsung.git;a=summary
PowerVR SDK
http://www.imgtec.com/powervr/insider/powervr-sdk.asp
Source code of samsung firmwares(keep and eye on this)
http://opensource.samsung.com/
Asus pad honeycomb Kernel Source
http://forum.xda-developers.com/showthread.php?t=1026528
ellokomen said:
======================================
CURRENT GOAL
Find why SurfaceFlinger is not working
======================================​
Click to expand...
Click to collapse
Mmmk.. Let me tell you a story.
A long time ago in a galaxy far away... No, that will take too long. In a nutshell, one third of the answer is here, another third is here and the rest is here. I'm not trying to be intentionally vague, I just haven't figured out how these three fit together yet.
Of course, there could also be some bit of code that I missed... some telling line in a debug log that I overlooked or some driver or library that I could have decompiled to sift through its juicy secrets. There could easily be a fix that would take seconds to add and make the whole thing fall in line...
Or we might have to work it from the ground up.
Either way it will happen. It's just a matter of whether it will happen next week, or next month.
(Watch it be a misplaced semi-colon, or a bad symlink... that's how these things go.)
updated approaches and new tools have been added
spacemoose1 said:
Mmmk.. Let me tell you a story.
A long time ago in a galaxy far away... No, that will take too long. In a nutshell, one third of the answer is here, another third is here and the rest is here. I'm not trying to be intentionally vague, I just haven't figured out how these three fit together yet.
Of course, there could also be some bit of code that I missed... some telling line in a debug log that I overlooked or some driver or library that I could have decompiled to sift through its juicy secrets. There could easily be a fix that would take seconds to add and make the whole thing fall in line...
Or we might have to work it from the ground up.
Either way it will happen. It's just a matter of whether it will happen next week, or next month.
(Watch it be a misplaced semi-colon, or a bad symlink... that's how these things go.)
Click to expand...
Click to collapse
The kernel source that you have linked to is 2.6.35.7 for the Nexus S gingerbread and is not fully maintained by samsung but rather by google.
However I do not think you are wrong that there is a problem somewhere in the kernel. The kernel that has been released for the galaxy tab is a mess of horrid code, I have had to re-write parts of kernel drivers just to get them to work under linux, I would not be surprised if similar patches are needed for honeycomb
lilstevie said:
The kernel source that you have linked to is 2.6.35.7 for the Nexus S gingerbread and is not fully maintained by samsung but rather by google.
However I do not think you are wrong that there is a problem somewhere in the kernel. The kernel that has been released for the galaxy tab is a mess of horrid code, I have had to re-write parts of kernel drivers just to get them to work under linux, I would not be surprised if similar patches are needed for honeycomb
Click to expand...
Click to collapse
you mean that you made a port of a Linux Distro into the tab?
ellokomen said:
you mean that you made a port of a Linux Distro into the tab?
Click to expand...
Click to collapse
yes click here for the thread on the port of ubuntu
Current kernel source
Do you guys have another link to the current spacemoose kernel source? The download link seems to be corrupted and won't untar. I want to get in on the fun
noobporter said:
Do you guys have another link to the current spacemoose kernel source? The download link seems to be corrupted and won't untar. I want to get in on the fun
Click to expand...
Click to collapse
here it is, bear in mind that this is for CDMA devices
Unfortunatey, we have 4 other honeycomb threads.
Not trying to be rude but spacemoose updates us in the cdma forums AND we have russian rom updates in the gsm forums.
I really dislike the idea of this thread, there is enough clutter amongst the other threads. Do we really need one more place to browse..
The first posts in the roms thread are kept updated by devs.. Is this not enough??
daml said:
Unfortunatey, we have 4 other honeycomb threads.
Not trying to be rude but spacemoose updates us in the cdma forums AND we have russian rom updates in the gsm forums.
I really dislike the idea of this thread, there is enough clutter amongst the other threads. Do we really need one more place to browse..
The first posts in the roms thread are kept updated by devs.. Is this not enough??
Click to expand...
Click to collapse
yeah but we need a place for the other devs to share their milestones, here is a place for technical discussion amongst us, to share the knowledge etc...
the other threads are flooded from non devs messages, so it´s kind of difficult to read 14 pages of information when the 80% is people complaining not making it boot
lilstevie said:
The kernel source that you have linked to is 2.6.35.7 for the Nexus S gingerbread and is not fully maintained by samsung but rather by google.
Click to expand...
Click to collapse
Yes, and it contains some support for our device (s5pc110), and some more that can be added (pvr) and the architecture necessary to fully support HC without patching the build itself. If we work only towards patching the system build to communicate with the hardware, we won't be able to run AOSP hc versions when the source drops without going through the same painstaking process of hacking the system to function (while creating numerous faults causing FCs in the process). If we build a new kernel, we can get the hardware to communicate in the way future android versions want it to and we can then do what we want with ease.
noobporter said:
Do you guys have another link to the current spacemoose kernel source? The download link seems to be corrupted and won't untar. I want to get in on the fun
Click to expand...
Click to collapse
D'oh! Nobody told me, LOL... I'll get another copy up.
spacemoose1 said:
D'oh! Nobody told me, LOL... I'll get another copy up.
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=1026528
hey spacemoose! the first portion of honeycomb source... The kernel source of the Asus EEE Pad Transformer... maybe it helps you with a few kernel issues, even if it's for another device... It's honeycomb!
Flokey said:
http://forum.xda-developers.com/showthread.php?t=1026528
hey spacemoose! the first portion of honeycomb source... The kernel source of the Asus EEE Pad Transformer... maybe it helps you with a few kernel issues, even if it's for another device... It's honeycomb!
Click to expand...
Click to collapse
Digging through it now.
spacemoose1 said:
Yes, and it contains some support for our device (s5pc110), and some more that can be added (pvr) and the architecture necessary to fully support HC without patching the build itself. If we work only towards patching the system build to communicate with the hardware, we won't be able to run AOSP hc versions when the source drops without going through the same painstaking process of hacking the system to function (while creating numerous faults causing FCs in the process). If we build a new kernel, we can get the hardware to communicate in the way future android versions want it to and we can then do what we want with ease.
Click to expand...
Click to collapse
Not enough really, PVR kernel module sources have been released from samsung for our device, and is available in update1 zip.
The kernel panics and we have no framebuffer from the nexus s, believe me that is the kernel I want to be running for my project, it is cleaner nicer and things are implemented overall better. unless you know of a solution for kernel debuging over usb
lilstevie said:
Not enough really, PVR kernel module sources have been released from samsung for our device, and is available in update1 zip.
The kernel panics and we have no framebuffer from the nexus s, believe me that is the kernel I want to be running for my project, it is cleaner nicer and things are implemented overall better. unless you know of a solution for kernel debuging over usb
Click to expand...
Click to collapse
Kernel debugging over USB = adb shell cat /proc/kmsg
You can make any kernel work for any device as long as you add the **** it needs. Just takes time. Working on it now.
Goal and tools updated*
spacemoose1 said:
Kernel debugging over USB = adb shell cat /proc/kmsg
You can make any kernel work for any device as long as you add the **** it needs. Just takes time. Working on it now.
Click to expand...
Click to collapse
You don't know what a kernel panic is do you?
lilstevie said:
You don't know what a kernel panic is do you?
Click to expand...
Click to collapse
I thought that linux throws a dump log when it makes a kernel panic specifying the memory address and the cause of crash

[Q] Compiling HTC desire roms from AOSP

Hi,
Apolgies if this is in the wrong place, but this is the only forum I would expect to get my answer.
I need someone to point me in the right direction please. I'm thinking of compiling an ASOP for personal use from source. I have looked at the google tutorials and even though Linux isn't my weapon of choice, being an IT systems engineer I do not feel following the tutorial will be too difficult.
However, is there a more specific guide for the desire?
The tutorial builds for the development handsets eg Nexus one. Is it just a case of supplying the correct drivers, RIL and editing the product code, or is there a bit more to it than that?
Any help / direction greatly appreciated.
You could start with building ROMs from Oxygen or CM source. That way you can familiarize yourself with the AOSP project without worrying about drivers etc. (DevNull source is completely stock AOSP with drivers for the Desire etc.)
Later on, when you know how everything works, you can start your own project.
If you want to start building AOSP from Google source, you might want to read the tutorials over at Google for a couple of times + checking the wiki's over at CM. They pretty much explain everything that there's to it.
If you're looking for a guide specific for the HTC Desire, then I think you're out of luck. Most dev's over here start off with the tutorials over at android.com and even with tutorials etc. at CM.
Is DevNull definitely 100% AOSP + drivers? If so, then it would be pointless compiling from source anyway.
I already ran that through dsixda, but the options there are quite limited.
What I had hoped I could do was make a tiny tiny AOSP. DevNull is pretty small though, so maybe it can't get much smaller.
rootSU said:
Hi,
Apolgies if this is in the wrong place, but this is the only forum I would expect to get my answer.
I need someone to point me in the right direction please. I'm thinking of compiling an ASOP for personal use from source. I have looked at the google tutorials and even though Linux isn't my weapon of choice, being an IT systems engineer I do not feel following the tutorial will be too difficult.
However, is there a more specific guide for the desire?
The tutorial builds for the development handsets eg Nexus one. Is it just a case of supplying the correct drivers, RIL and editing the product code, or is there a bit more to it than that?
Any help / direction greatly appreciated.
Click to expand...
Click to collapse
Hi Dan, for a start, the best place to start would be building a Cyanogen Rom from source as per Cyanogen's guide here. This guide is specific for the Desire
My suggestion is to build/modify this source first, since it's actively supported by a community. Once you get a fair idea, you could move on to the vanilla source..
Btw..Linux knowledge isnt crucial for building it, and you can easily follow the guide
Edit: Oops, just reallized that I just mirrored Pyr0wl's advice

[Q] Building AOSP using Kernel source

Hey people!
I was trying to learn how to build AOSP ROMs for my E8 (also called the M8 Ace and basically a plastic shell version of the M8). I tried that sub as well but people aren't much into development there as of now. But as I understand the sources are in more or less the same format and I really needed to understand where what goes. As you may know, the HTC Dev source zip has two zips inside it - the kernel and the platform archive. I read many guides on how people do this in Sony Xperia devices but I found no help on HTC.
I feel kind of lost right now.. I have uploaded the kernel source for the device on to GitHub: [LINK]
Now, I'm sync-ing the AOSP source (from HERE) to my Ubuntu VM (which is a huge download). What do I do next? Will this be enough to build the ROM or will I need other help as well?
Sorry, I've never really done this before. So, I have some really noobish questions.
Thanks!
Just checking, but you've had a peek at this wealth of knowledge?
http://forum.xda-developers.com/chef-central/android
?

Categories

Resources