[Help] Making N5 Kernels - Nexus 5 Q&A, Help & Troubleshooting

I've been trying to find the best way to compile. I found a guide on youtube "http://www.youtube.com/watch?v=IV4jhXWc7AE", but it is a little outdated and I'm having some trouble following him. The kernel source that he has has a lot of folders and the only kernel source I've found for the N5 has 2 files. So I'm missing something in finding the kernel source it seems.
It would be awesome if I could get some help and maybe pointed in the right direction. The only problem is that I'm a auditory and kinesthetic learner.
I have Ubuntu installed and ready to go, I also have the lastest NDK, and I have the AnyKernel.zip.

Related

Compiling Android + Kernel from Source.

Hi there,
Now, I understand that there's a thread or two and a few web pages directed at compiling Android and its kernel from source.
However, the thread in question is months old, and didn't fully explain the process.
As for the web pages, they are mostly outdated and don't include enough information, not to mention desire specific instructions.
I think that, properly explained, building Android shouldn't be daunting, and everyone should be able to attempt it, if they wanted to.
So, I hope to compose a comprehensive guide on how to do just that.
The problem is that I myself have not been able to put enough instructions together to be able to complete a build. And there is no point digging up old threads.
So, If anyone who knows the ropes (that is, compiling android and a kernel from source) would be willing to lead the way, I'd happily turn it into an easy to understand guide.
Josh.
fllash said:
Hi there,
Now, I understand that there's a thread or two and a few web pages directed at compiling Android and its kernel from source.
However, the thread in question is months old, and didn't fully explain the process.
As for the web pages, they are mostly outdated and don't include enough information, not to mention desire specific instructions.
I think that, properly explained, building Android shouldn't be daunting, and everyone should be able to attempt it, if they wanted to.
So, I hope to compose a comprehensive guide on how to do just that.
The problem is that I myself have not been able to put enough instructions together to be able to complete a build. And there is no point digging up old threads.
So, If anyone who knows the ropes (that is, compiling android and a kernel from source) would be willing to lead the way, I'd happily turn it into an easy to understand guide.
Josh.
Click to expand...
Click to collapse
I followed this guide here and successfully compiled a modified HTC Kernel and I had very little Linux and Android experience.
Obviously instead of cloning the Cyanogen git, you just use the gits you wish to compile
Mekrel said:
I followed this guide here and successfully compiled a modified HTC Kernel and I had very little Linux and Android experience.
Obviously instead of cloning the Cyanogen git, you just use the gits you wish to compile
Click to expand...
Click to collapse
Thanks for the link
Though i don't fully understand the whole 'git' thing. Where do i find them? And how to i know which ones are the ones i want to use?
Josh
EDIT: Also, how do you 'edit' the kernel (i imagine it is somewhat like make menuconfig?). Also:
- Are these sense kernels?
- How do you add modules like OC and UV?
fllash said:
Thanks for the link
Though i don't fully understand the whole 'git' thing. Where do i find them? And how to i know which ones are the ones i want to use?
Josh
EDIT: Also, how do you 'edit' the kernel (i imagine it is somewhat like make menuconfig?). Also:
- Are these sense kernels?
- How do you add modules like OC and UV?
Click to expand...
Click to collapse
A git is a repository for source code, developers upload their source code there and can commit changes. The commit can allow descriptions of what was changed and also details the files changed.
The git system allows other people to add to the source if they have permission, or allows others to read the changes and download the source code.
Git links are usually posted by people who release software, as Android is GPL licensed so people have to release their source code if they're distributing their work.
Editing the kernel, take a look into the git and the commits and it will show you which files were changed and how exactly they were changed. That will give you the best understanding.
UV/OC is done by changing the acpu table in the architectures files and changing the minimum/maximum voltage figures in the board_bravo.c file.
The Cyanogen kernels are not Sense kernels no, it's a modified Google Kernel.
Thanks for the explanation. I followed the guide and built the rom, and it works (always a plus )
Now, the next thing is the kernel. How do I build a kernel with the CM tweaks integrated? I understand that all i would be doing is rebuilding the same one that is already installed, but im doing it to learn.
So, if i synced the GIT, does that include the CyanogenMOD kernel source? If it does, where is it and how do i rebuild it. If not, where do i find it?
Thanks,
Josh.

[Q][EASY $30] Need to compile Android kernel - Help wanted

Hey guys,
After two weeks of research and trying myself, I have decided I need someone to help this linux noobie out.
What I am looking for is to change 1 value which is in 1 file in the kernel source.
I've found which file it is. The problem is that with all the tutorials I've read and kernels I tried to compile,
they don't seem to be working with the source code I need to compile.
Details:
Source code I need to compile is for Samsung Tablet 2 10.1 - GT-P5110
Source code can be found @ samsung's open source site (can't post link here ) ... search for "GT-P5110_ICS_Opensource.zip"
Value I need to change is in the company layer of kernel.
I have been able to compile this kernel and get a zImage and some modules.
But I fear this isn't enough, I think I need a system.img?!
In any case, is there anyone who can help me out?
Do I need something else, patch/boot.img? Maybe I'm overlooking another easy solution?
I'll give you $30 on your Paypal account, same day!!
***Please note that $30 is only for the first working solution/person who can help, not for every solution :angel:***

[Question] Kernel Compilation for Modules

First post in the Dev section but this seemed to be the place to talk about kernel compilation and module development.
I have twice now, and am working on my third kernel compilation for the purposes of custom module building for the TF700 and the TF201.
The question I have has to do with the compilation process. Every time I have gone through this with the downloadable Asus Kernel zip I run in to several issues. Either missing references in code or portions that won't compile at all. Is this normal for kernel compilations? I would have thought that it would be fully compilable out of the box ( so to speak). Is it ASUS or just android/Linux in general that works out this way?
Is there a better way to do it? Should I use some generic source with the same version numbers? The current source is just not working at all. I am using an Ubuntu distro. Have the cross compile tools etc... but it just fails. I have already resolved two missing definition references and it just keeps on failing in new places
Hopefully this question doesn't offend developers. I have moved from WinPhone to here and want to better my understanding of how this should all work but need to start with some basics before I can make a meaningful contribution.
Thanks.
P.S... I looked and didn't find a "Compiling android kernels for dummies" book
hx4700 Killer said:
I looked and didn't find a "Compiling android kernels for dummies" book
Click to expand...
Click to collapse
"Dummies" doesn't write a book on kernel dev. Too wrapped up in telling people how to download iTunes.....
Use your "Google". And when you find it, Google XDA University.
There, you will find steps for setting a build environment and kernel and cross arm.
Understand, all kernels are different, but a good place to start. Plus, you learn how to use Google. An added bonus.
Oh... and... as an extra bonus, I will move this to Q & A, as this post has no development work attached. :silly:
MD
My question wasn't HOW to cross compile. I have done it.
My question is WHY are there so many errors that need correcting when compiling the ASUS downloadable kernels and if this is typical of the source from any device or just ASUS?
hx4700 Killer said:
The question I have has to do with the compilation process. Every time I have gone through this with the downloadable Asus Kernel zip I run in to several issues. Either missing references in code or portions that won't compile at all.
Click to expand...
Click to collapse
I had to fix exactly one pair of quotes vs. angle brackets somewhere in the RIL - get the patch pack from my kernel and apply the ril include fix. Then it should compile. If not, you are doing something wrong.
Can you post any links or names of everything ill need to get started on cross compiling a kernel for my tf700t I download the source and get my config.gz and am running a ubuntu distribution but if you could post a link to a tutorial that has detailed instructions that will work for the infinity that would be greatly appreciated thankyou
alexcass4 said:
Can you post any links or names of everything ill need to get started on cross compiling a kernel for my tf700t I download the source and get my config.gz and am running a ubuntu distribution but if you could post a link to a tutorial that has detailed instructions that will work for the infinity that would be greatly appreciated thankyou
Click to expand...
Click to collapse
Step 1: Get a suitable ARM toolchain. I can't help you here with Ubuntu because I'm using Gentoo and their crossdev tool (http://www.gentoo.org/proj/en/base/embedded/handbook/?part=1).
Step 2: Cross-compiling the kernel works just as for native kernels (make menuconfig, make), but you have to pass parameters to each make, e.g. make ARCH="arm" CROSS_COMPILE="arm-gentoo-linux-gnueabi-" (or whatever your toolchain is called)
Step 3: For the TF700-specific blob stuff I have written a detailed tutorial here: http://forum.xda-developers.com/showpost.php?p=36925180&postcount=4

Creating a rom based off CM(Galaxy S4), How ?

A bit of infos before starting this thread. I'm using a Samsung Galaxy S4 Canadian, I have a high end computer(maybe that helps for coding,stuff like that) and I have "medium" knowledge on rooting/flashing,etc. I am a great designer, well for myself, I think i'm good. So I can edit or create icons and themes for new rom!
I say medium, because the only thing I really know about this kind of stuff,is rooting,flashing,installing roms and pretty much that honestly.
I already downloading the Android SDK to test those custom roms i'd like to create. I thought of doing like a couple of guys on here, using the CM Source? and just adding stuff,etc.
--
What i'm looking to do, is creating a rom based of CM for the Galaxy S4 and just in general a little side project for myself and adding some infos in my head; Some may laugh because of the lack of knowledge, but hey! we all started somewhere
I'm asking the community of dev's or just users, do you have some threads or some stuff to download to "Start" this project ?
Some things I should read before, I won't test rom's on my phone as it's a daily phone, i'll use the emulator instead(AVD or SDK) and i'm already searching on how to run it.
If you have any useful youtube videos i'll gladly accept them
I found a tutorial on how to build a rom but for the Nexus 4, I guess it's the same process but different sources ?
I'll search for the sources of Cm for the Galaxy s4 but if anyone reads this thread and knows where to get it, please link me!
Thanks to the community, this may also be useful for other users. Thanks!
Okay, I will help
1st off, let me teach you some basics.
1.) You cannot test roms on the android sdk, the android sdk has nothing to do with roms, its for building apps and java programming. It will not help you with anything if an issue goes wrong in a rom, well only the adb (android debugging bridge) for taking locats.
2.) You cannot compile a rom on windows, only linux, preferably ubuntu. So you need to just download cm11 for your device and extract the rom zip.
I will tell you more later, but its like 1pm here Goodnight

Porting B2G to moto g3

Hi Folks,
I'm trying to port B2G to my moto g3. I was referring to this doc (https://developer.mozilla.org/en-US/docs/Archive/B2G_OS/Porting_B2G_OS/basics). However some of the things mentioned in this doc are not clear to me. Could you please help me with the below issue.
I'd like to build the AndroidKernel from source. So where should I include the below lines? Is it in this file?
https://github.com/LineageOS/android_device_motorola_osprey/blob/cm-14.1/rootdir/etc/init.target.rc
HTML:
on early-init
start ueventd
import /init.b2g.rc
Also if I understood correctly. building the kernel from source doesn't require to unpack , edit the init.rc file and repack the kernel from the device. Could you please confirm this?
Thanks,
Arun
Hi Arun,
I totally understand your frustration with this. You'd like to contribute to the Servonk project but first you need to port B2G to your phone or buy a new phone. Since the only other supported phones are the Z3 compact and Nexus 5, both of which are still relatively expensive secondhand, you want to use your Moto G3 which means first porting B2G to it.
So, I think there are two options you have:
1. Port direct from the AOSP code
2. Port from the CM12 code.
As Gerard said in telegram, porting from CM to B2G was never finalised so may actually require more work. However there may actually be more people here who can help you since people seem more familiar with CM than AOSP (in general, I know some people are very knowledgeable in both).
I see you've posted in the AOSP 7.1.1 kernel thread. Unfortunately, for the Servonk project you currently need a Lollipop based build, so 5.x AOSP kernel or CM12.x.
It might be worth asking a mod to move this thread into one of the development sub-forums.
As you know, this is the limit of my knowledge, but I really hope you find some success, if would be great if you could contribute to the Servonk project.
Your last option is to use the desktop build of Servonk, based on Glutin instead of Gonk, but I understand that you really want to get Servonk working on your phone.
Best of luck

Categories

Resources