Hey guys,
I recently decided I would like to learn how to build for android. Rather than build a new rom however (there are so damn many), I was thinking about building a kernel. See what I can bring to the table.
I did some research and instantly found myself in a sea of information (most of which was outdated or not applicable).
I was wondering if anyone could direct me to some specific sites or pages for:
kernel education
building education (focus on kernels)
galaxy s3 kernel dev (at&t specific for start)
Noobish question, but I figured I would ask the experts and see whats out there.
Thanks in advance!!
I'll post you some links here in a little while, as deceptive as my post count may be, I used to be known as smoothtaste here on XDA (and later on as ahager88, then I went on hiatus when I had my little Junior)
Ultimately the best thing for you to start out is familiarize yourself with Git. Git commands will be essential. Read up on those, and download source from a developer that shares your device tree, faux123 or ktoons would be good, whoever you prefer. Preludedrew used to have a wonderful guide setup on the Evervolv site for building his rom from source, you can read his guide for excellent information regarding getting your environment setup and workable.
Once you have your environment setup and understand how to change variables and build with the make command, you can make small changes as you learn them, such as incorporating different governors into the build, etc, build it, flash it on a rom that the kernel will be compatible with and see your changes.
All of this is nothing in terms of development, however. But it will get you in the swing of things that you'll be doing a lot. If I forget to come back and post the links just pm me, I've got a lot of good reading material bookmarked on my machine at home.
Sent from my SAMSUNG-SGH-I747
---------- Post added at 12:41 PM ---------- Previous post was at 12:35 PM ----------
aeppacher said:
Hey guys,
I recently decided I would like to learn how to build for android. Rather than build a new rom however (there are so damn many), I was thinking about building a kernel. See what I can bring to the table.
I did some research and instantly found myself in a sea of information (most of which was outdated or not applicable).
I was wondering if anyone could direct me to some specific sites or pages for:
kernel education
building education (focus on kernels)
galaxy s3 kernel dev (at&t specific for start)
Noobish question, but I figured I would ask the experts and see whats out there.
Thanks in advance!!
Click to expand...
Click to collapse
https://github.com/Evervolv/android/blob/jellybean/README
Don't jump in and sync the Evervolv source, but everything in that readme pertaining to setting up the environment is a must. He has all the necessary libraries listed right at the top, I guess you could sync Evervolv source just to see how Git works as well, but it won't ultimately help you with our device. Again, I will make a point to provide you with material closer to what you're asking for as soon as I have the chance.
Don't ever be afraid to ask for help around here. You might get some people who are demeaning and think you should already know everything from time to time, but good people come along.
Sent from my SAMSUNG-SGH-I747
---------- Post added at 12:58 PM ---------- Previous post was at 12:41 PM ----------
Be warned, some of this is outdated, I know one source mentions Ubuntu 9.04. I know a few people that use 12.04 still, and some that use 12.10, Ubuntu is the easiest OS to setup with, I have done it with Fedora, and Arch Linux has always been my favorite but you should probably stay away from that. You have to choose the files/libs that are needed for your distribution, and the fetch commands change depending on the OS, as well as of you're doing 32 or 64 bit.
Basic Kernel Material
http://kernelnewbies.org/FAQ
http://www.ibm.com/developerworks/library/l-linux-kernel/
http://en.m.wikipedia.org/wiki/Linux_kernel
http://www.tuxradar.com/content/how-linux-kernel-works
http://www.howtogeek.com/howto/31632/what-is-the-linux-kernel-and-what-does-it-do/
Building/Modifying Kernel Source
http://source.android.com/source/building-kernels.html
http://xda-university.com/as-a-developer/getting-started-building-a-kernel-from-source
http://forum.xda-developers.com/showthread.php?t=1748297
http://simply-android.wikia.com/wiki/Kernel_Development
Att Galaxy S3 Related
At the present I do not know of any guides or materials pertaining to this device solely, though this doesn't mean they aren't out there. Once you get the hang of things working with the source of your choosing, it won't matter anyway.
Sent from my SAMSUNG-SGH-I747
ahagersr said:
I'll post you some links here in a little while, as deceptive as my post count may be, I used to be known as smoothtaste here on XDA (and later on as ahager88, then I went on hiatus when I had my little Junior)
Ultimately the best thing for you to start out is familiarize yourself with Git. Git commands will be essential. Read up on those, and download source from a developer that shares your device tree, faux123 or ktoons would be good, whoever you prefer. Preludedrew used to have a wonderful guide setup on the Evervolv site for building his rom from source, you can read his guide for excellent information regarding getting your environment setup and workable.
Once you have your environment setup and understand how to change variables and build with the make command, you can make small changes as you learn them, such as incorporating different governors into the build, etc, build it, flash it on a rom that the kernel will be compatible with and see your changes.
All of this is nothing in terms of development, however. But it will get you in the swing of things that you'll be doing a lot. If I forget to come back and post the links just pm me, I've got a lot of good reading material bookmarked on my machine at home.
Sent from my SAMSUNG-SGH-I747
---------- Post added at 12:41 PM ---------- Previous post was at 12:35 PM ----------
https://github.com/Evervolv/android/blob/jellybean/README
Don't jump in and sync the Evervolv source, but everything in that readme pertaining to setting up the environment is a must. He has all the necessary libraries listed right at the top, I guess you could sync Evervolv source just to see how Git works as well, but it won't ultimately help you with our device. Again, I will make a point to provide you with material closer to what you're asking for as soon as I have the chance.
Don't ever be afraid to ask for help around here. You might get some people who are demeaning and think you should already know everything from time to time, but good people come along.
Sent from my SAMSUNG-SGH-I747
---------- Post added at 12:58 PM ---------- Previous post was at 12:41 PM ----------
Be warned, some of this is outdated, I know one source mentions Ubuntu 9.04. I know a few people that use 12.04 still, and some that use 12.10, Ubuntu is the easiest OS to setup with, I have done it with Fedora, and Arch Linux has always been my favorite but you should probably stay away from that. You have to choose the files/libs that are needed for your distribution, and the fetch commands change depending on the OS, as well as of you're doing 32 or 64 bit.
Basic Kernel Material
http://kernelnewbies.org/FAQ
http://www.ibm.com/developerworks/library/l-linux-kernel/
http://en.m.wikipedia.org/wiki/Linux_kernel
http://www.tuxradar.com/content/how-linux-kernel-works
http://www.howtogeek.com/howto/31632/what-is-the-linux-kernel-and-what-does-it-do/
Building/Modifying Kernel Source
http://source.android.com/source/building-kernels.html
http://xda-university.com/as-a-developer/getting-started-building-a-kernel-from-source
http://forum.xda-developers.com/showthread.php?t=1748297
http://simply-android.wikia.com/wiki/Kernel_Development
Att Galaxy S3 Related
At the present I do not know of any guides or materials pertaining to this device solely, though this doesn't mean they aren't out there. Once you get the hang of things working with the source of your choosing, it won't matter anyway.
Sent from my SAMSUNG-SGH-I747
Click to expand...
Click to collapse
You Sir are a scholar and gentleman! This is exactly what I needed! I will definitely bookmark this thread and be back to ask you questions later on. I totally get what you mean by the people who treat you like you should know everything. Thats actually the reason I am here. Got tired of a dev treating people like he was too good to care so I decided why not learn myself and provide something to the community. Thank you so much man. I actually figured I would need Linux and so I tried to install it last night. Unfortunately Ubuntu 12.04 wouldn't install. I think it has to do with my Intel 4000 graphics card is disabled (by my oem) and my nvidia cards aren't working with it. I couldn't even get into command line because it was so small I couldn't read what I was typing. In the end I managed to get 13.04 to work but I realize I will have to install 12.04 on top of it for compatibility.
Quick question now, any recommendation on 32 bit or 64 bit? My rig can easily handle the 64 but I understand with Linux things can get finicky in terms of compatibility
aeppacher said:
You Sir are a scholar and gentleman! This is exactly what I needed! I will definitely bookmark this thread and be back to ask you questions later on. I totally get what you mean by the people who treat you like you should know everything. Thats actually the reason I am here. Got tired of a dev treating people like he was too good to care so I decided why not learn myself and provide something to the community. Thank you so much man. I actually figured I would need Linux and so I tried to install it last night. Unfortunately Ubuntu 12.04 wouldn't install. I think it has to do with my Intel 4000 graphics card is disabled (by my oem) and my nvidia cards aren't working with it. I couldn't even get into command line because it was so small I couldn't read what I was typing. In the end I managed to get 13.04 to work but I realize I will have to install 12.04 on top of it for compatibility.
Quick question now, any recommendation on 32 bit or 64 bit? My rig can easily handle the 64 but I understand with Linux things can get finicky in terms of compatibility
Click to expand...
Click to collapse
Where's my thanks???? Wahhhh!
But seriously, I've never had an environment setup on a 32 bit distribution, I don't have a bad ass computer my any means, but it runs 64-bit so that's what I do. You can run 32-bit on a 64-bit environment, but you can't make a 32-bit environment run 64.
As it happens, I have a fresh Ubuntu 13.04 installation on my machine, the only thing setup in it is the Android SDK. I was planning on playing but I hadn't gotten around to it. I'll setup an environment on mine, and Git Clone klin1344's kernel sources for his bleeding edge 4.2.2 kernel and if you haven't done it by then, I'll write out everything I had to do to get 13.04 working. Honestly, it should be pretty much an exact copy past of the apt get commands for 12.04 as long as all the proper repositories are in order, there might be a hiccup or two but nothing bad.
I've been wanting to play with klin1344's source anyways, he uses the Linaro tool chain, and I've only ever used Arm Eabi, so I'm curious as to how different the environment would have to be, if at all, to make a kernel from his source that's optimized properly. I'll send him a PM and ask him about that.
Sent from my SAMSUNG-SGH-I747
Edit: To clarify, the 32-bit libraries needed to compile android from source aren't technically necessary for kernel development, but they are readily available for 64-bit Ubuntu systems.
Another clarification, there SHOULD be no reason to attempt to install 12.04 "on top" of your existing 13.04, although I might suggest a simple Google search on compiling android from source in 13.04 to see if there are any guides. I can't use 12.04 on my Asus machine. Not without a lot of hassle (I'm too lazy to merge grub/efi fixes and boot-repair into my own live image) due to Secure Boot/EFI/Grub, I can use 12.10 which I know for a fact never gave me problems building unless I made a mistake, but 13.04 (64) is already setup for dual-boot with Windows 8, so that's what I will use. If I can build in Arch Linux, we can build in 13.04.
---------- Post added at 07:40 PM ---------- Previous post was at 07:07 PM ----------
http://forum.xda-developers.com/showthread.php?t=2224142
That's a guide I found for build Android from source on 13.04, although you only plan to do kernels, once your feet are wet you'll end up needing this stuff, most likely.
I'll wait to see what klin1344 says to me about the Linaro tool chain before I set mine up, though I'll probably go ahead and follow the early stages of this guide for my system. I'll get all the libraries, etc, I just won't download the actual source from Google. I don't have time to even try to get a true AOSP rom running lol. Although, if I thought I could do it I would find the time.
It's sad that CM is the closest we get, but at least it's not like CM7. I'm rather fond of the minimal approach they've came back to.
Sent from my SAMSUNG-SGH-I747
ahagersr said:
Where's my thanks???? Wahhhh!
But seriously, I've never had an environment setup on a 32 bit distribution, I don't have a bad ass computer my any means, but it runs 64-bit so that's what I do. You can run 32-bit on a 64-bit environment, but you can't make a 32-bit environment run 64.
As it happens, I have a fresh Ubuntu 13.04 installation on my machine, the only thing setup in it is the Android SDK. I was planning on playing but I hadn't gotten around to it. I'll setup an environment on mine, and Git Clone klin1344's kernel sources for his bleeding edge 4.2.2 kernel and if you haven't done it by then, I'll write out everything I had to do to get 13.04 working. Honestly, it should be pretty much an exact copy past of the apt get commands for 12.04 as long as all the proper repositories are in order, there might be a hiccup or two but nothing bad.
I've been wanting to play with klin1344's source anyways, he uses the Linaro tool chain, and I've only ever used Arm Eabi, so I'm curious as to how different the environment would have to be, if at all, to make a kernel from his source that's optimized properly. I'll send him a PM and ask him about that.
Sent from my SAMSUNG-SGH-I747
Edit: To clarify, the 32-bit libraries needed to compile android from source aren't technically necessary for kernel development, but they are readily available for 64-bit Ubuntu systems.
Another clarification, there SHOULD be no reason to attempt to install 12.04 "on top" of your existing 13.04, although I might suggest a simple Google search on compiling android from source in 13.04 to see if there are any guides. I can't use 12.04 on my Asus machine. Not without a lot of hassle (I'm too lazy to merge grub/efi fixes and boot-repair into my own live image) due to Secure Boot/EFI/Grub, I can use 12.10 which I know for a fact never gave me problems building unless I made a mistake, but 13.04 (64) is already setup for dual-boot with Windows 8, so that's what I will use. If I can build in Arch Linux, we can build in 13.04.
---------- Post added at 07:40 PM ---------- Previous post was at 07:07 PM ----------
http://forum.xda-developers.com/showthread.php?t=2224142
That's a guide I found for build Android from source on 13.04, although you only plan to do kernels, once your feet are wet you'll end up needing this stuff, most likely.
I'll wait to see what klin1344 says to me about the Linaro tool chain before I set mine up, though I'll probably go ahead and follow the early stages of this guide for my system. I'll get all the libraries, etc, I just won't download the actual source from Google. I don't have time to even try to get a true AOSP rom running lol. Although, if I thought I could do it I would find the time.
It's sad that CM is the closest we get, but at least it's not like CM7. I'm rather fond of the minimal approach they've came back to.
Sent from my SAMSUNG-SGH-I747
Click to expand...
Click to collapse
My sincerest apologies. Twice the thanks sent your way. I knew 32 bit could run on 64 bit but I remember having issues in the past with it not working. Must have just been me. I have heard of various toolchains like linaro, bionic and arm but never really knew what they were. I will do some reading on that. In terms of progress I am bummed because I have to send off my laptop for 2 weeks on monday so it will suck but hopefully I make some progress before that.
Why are you recommending pulling another devs link rather than from samsung sources?
Thanks again for all the help. I hope you are patient because you will be my go to guy for now on
aeppacher said:
My sincerest apologies. Twice the thanks sent your way. I knew 32 bit could run on 64 bit but I remember having issues in the past with it not working. Must have just been me. I have heard of various toolchains like linaro, bionic and arm but never really knew what they were. I will do some reading on that. In terms of progress I am bummed because I have to send off my laptop for 2 weeks on monday so it will suck but hopefully I make some progress before that.
Why are you recommending pulling another devs link rather than from samsung sources?
Thanks again for all the help. I hope you are patient because you will be my go to guy for now on
Click to expand...
Click to collapse
I don't know what rom you run on a regular basis, but I run 4.2.2 - CM. Samsung is apparently just as bad as HTC at releasing source. I haven't seen (I could be wrong, I am new to this device) any 4.2.2 roms with a Samsung kernel, everything is pretty much an ENHANCED CM kernel. I was drawn to the Bleeding Edge kernel because klin1344 actually has his source ahead of CyanogenMod. He merges CM commits, but he's also pulling things in from upstream, from other sources, to make his kernel perform the way it does. As it is bleeding edge the upstream merges could always break something you don't anticipate.
In my mind, it makes the most sense to watch his kernel while you learn. That doesn't mean it's what you should do. If it wasn't for the Cyanogen boys, we wouldn't have any 4.2.2 capable kernels that are specific to our device. Those guys put in a lot of work to make it happen. More than you could fathom until you've tried it yourself. Of course, they make it look easy.
klin1344's doing real development on his tree. He's not just cloning CM and renaming it, he's merging stuff from upstream, stuff that hasn't made it through any of the other kernels for nor device yet. In my mind, that's a perfect tree to learn on.
If you like Touchwiz roms, then you can start from Samsung source, no doubt, but the 4.2.2 roms appear to all use kernels that descended from CM's tree. I haven't poked around enough yet to be sure, but that's how it looks to me so far. Whatever kernel source you choose, you should be willing to run a rom that it will support daily. It's the only way you'll ever see what your tinkering is doing for you.
Sent from my SAMSUNG-SGH-I747
aror ersr said:
I don't know what rom you run on a regular basis, but I run 4.2.2 - CM. Samsung is apparently just as bad as HTC at releasing source. I haven't seen (I could be wrong, I am new to this device) any 4.2.2 roms with a Samsung kernel, everything is pretty much an ENHANCED CM kernel. I was drawn to the Bleeding Edge kernel because klin1344 actually has his source ahead of CyanogenMod. He merges CM commits, but he's also pulling things in from upstream, from other sources, to make his kernel perform the way it does. As it is bleeding edge the upstream merges could always break something you don't anticipate.
In my mind, it makes the most sense to watch his kernel while you learn. That doesn't mean it's what you should do. If it wasn't for the Cyanogen boys, we wouldn't have any 4.2.2 capable kernels that are specific to our device. Those guys put in a lot of work to make it happen. More than you could fathom until you've tried it yourself. Of course, they make it look easy.
klin1344's doing real development on his tree. He's not just cloning CM and renaming it, he's merging stuff from upstream, stuff that hasn't made it through any of the other kernels for nor device yet. In my mind, that's a perfect tree to learn on.
If you like Touchwiz roms, then you can start from Samsung source, no doubt, but the 4.2.2 roms appear to all use kernels that descended from CM's tree. I haven't poked around enough yet to be sure, but that's how it looks to me so far. Whatever kernel source you choose, you should be willing to run a rom that it will support daily. It's the only way you'll ever see what your tinkering is doing for you.
Sent from my SAMSUNG-SGH-I747
Click to expand...
Click to collapse
So much for open source. Yeah I guess that will drop once we get the official 4.2.2 touchwiz update (potentially never with how its going). I run carbon rom currently so I definitely would compile a 4.2.2 kernel. I like what you said about building off of klins source but I feel sort of like I would be botching up some original and creative code. I like the idea of taking CMs git and working off of that since it is like working with the most basic version of code. It is a shame that almost all kernels are just a branch off of CMs source, it unfortunately assumes they have the best code, which I don't deny, it's just a shame not to get the OEMs source. Can't believe CM codes the kernels themselves, that sounds so friggin time consuming and technical. And they do it for so many devices!
I am really pumped to build. The more I read the better. I read that a tool chain is like a group of programs that does the compiling for you (dumbed down definition). My question is how does this differ from one toolchain to the other and how does it compile the kernel differently? I am just wondering what the benefit of different compilers would produce.
EDIT: I'm just gonna thank every post in this thread from you btw
aeppacher said:
So much for open source. Yeah I guess that will drop once we get the official 4.2.2 touchwiz update (potentially never with how its going). I run carbon rom currently so I definitely would compile a 4.2.2 kernel. I like what you said about building off of klins source but I feel sort of like I would be botching up some original and creative code. I like the idea of taking CMs git and working off of that since it is like working with the most basic version of code. It is a shame that almost all kernels are just a branch off of CMs source, it unfortunately assumes they have the best code, which I don't deny, it's just a shame not to get the OEMs source. Can't believe CM codes the kernels themselves, that sounds so friggin time consuming and technical. And they do it for so many devices!
I am really pumped to build. The more I read the better. I read that a tool chain is like a group of programs that does the compiling for you (dumbed down definition). My question is how does this differ from one toolchain to the other and how does it compile the kernel differently? I am just wondering what the benefit of different compilers would produce.
EDIT: I'm just gonna thank every post in this thread from you btw
Click to expand...
Click to collapse
That's why I was curious about the Linaro toolchain. I guess I'll have to just look it up, I'm sure klin1344 is pretty busy, he maintains a few different things I believe and I'm sure the dude has a real life haha. I have seen mention of different toolchains being used in kernels before, which I mentioned above, but I've never tried any of these other ones. I do personally notice a significant performance change from Linaro optimized builds, though.
The maintainers that are affiliated with Cyanogen are amazing. Toastcfh, who is primarily on Sprint HTC devices, has always been amazing. I miss being with Sprint honestly, I used to stalk him when he changed phones haha. When Sprint released the Evo Shift 4G him and a handful of other developers actually built the Wimax Drivers (Sprints first 4G network) from the ground up.
The Android source code Google releases comes with a generic kernel, Seen here. That does lay down the ground work for a lot of devices, but getting all of the device specifics put in can be a pain.
I've honestly never built an android kernel from straight AOSP sources and done the fixes myself. I don't know enough about the chipsets to even begin. A little research could go a long way, but between my three little monsters and my inconsistent data reliability during my work travels, I never considered putting in the work. Those Cyanogen guys beat me to even thinking of it haha. I consider doing it and they've got it done.
There's a guide laying around somewhere that details how to pull vendor information and other device specifics from your phone via adb and if I remember correctly it explains how you use those files to start to get a working kernel (and in turn a booting rom.) I believe it was related to building AOSP for a non-aosp device, such as HTC. A lot of HTC devices have kernels that only support AOSP maintained by our community and kernels that are built off of HTC Source for roms that use the Sense UI, and in turn, the Sense framework. Aroma installers have really changed that, I flashed several kernels on HTC devices that were universal, for GSM/CDMA/INT, that were setup to let you pick exactly what you needed for your device right there in recovery, even modifications concerning hotplug, Sweep2Wake etc. It's come a long way since the old Hero CDMA days. It's a lot different from HTC around here though. Not in a bad way, you just get used to certain functions that Samsung simply won't have.
As mentioned above, Google does lay down the ground work for Kernel development, but you always run into hiccups when a new version comes out I. E. 4.3 - It'll boot but wifi will be broken, camera drivers may be missing, bluetooth is always a problem. Yadda Yadda. That's where our community really thrives. With HTC devices we usually had completely stable versions of Android running months upon months before HTC got around to releasing source, let alone actually pushing an update. I used to joke that they leak their updates so the XDA guys can get ahold of them and fix the problems. Probably a little truth to that. Haha.
Movie time!
Sent from my SAMSUNG-SGH-I747
ahagersr said:
That's why I was curious about the Linaro toolchain. I guess I'll have to just look it up, I'm sure klin1344 is pretty busy, he maintains a few different things I believe and I'm sure the dude has a real life haha. I have seen mention of different toolchains being used in kernels before, which I mentioned above, but I've never tried any of these other ones. I do personally notice a significant performance change from Linaro optimized builds, though.
The maintainers that are affiliated with Cyanogen are amazing. Toastcfh, who is primarily on Sprint HTC devices, has always been amazing. I miss being with Sprint honestly, I used to stalk him when he changed phones haha. When Sprint released the Evo Shift 4G him and a handful of other developers actually built the Wimax Drivers (Sprints first 4G network) from the ground up.
The Android source code Google releases comes with a generic kernel, Seen here. That does lay down the ground work for a lot of devices, but getting all of the device specifics put in can be a pain.
I've honestly never built an android kernel from straight AOSP sources and done the fixes myself. I don't know enough about the chipsets to even begin. A little research could go a long way, but between my three little monsters and my inconsistent data reliability during my work travels, I never considered putting in the work. Those Cyanogen guys beat me to even thinking of it haha. I consider doing it and they've got it done.
There's a guide laying around somewhere that details how to pull vendor information and other device specifics from your phone via adb and if I remember correctly it explains how you use those files to start to get a working kernel (and in turn a booting rom.) I believe it was related to building AOSP for a non-aosp device, such as HTC. A lot of HTC devices have kernels that only support AOSP maintained by our community and kernels that are built off of HTC Source for roms that use the Sense UI, and in turn, the Sense framework. Aroma installers have really changed that, I flashed several kernels on HTC devices that were universal, for GSM/CDMA/INT, that were setup to let you pick exactly what you needed for your device right there in recovery, even modifications concerning hotplug, Sweep2Wake etc. It's come a long way since the old Hero CDMA days. It's a lot different from HTC around here though. Not in a bad way, you just get used to certain functions that Samsung simply won't have.
As mentioned above, Google does lay down the ground work for Kernel development, but you always run into hiccups when a new version comes out I. E. 4.3 - It'll boot but wifi will be broken, camera drivers may be missing, bluetooth is always a problem. Yadda Yadda. That's where our community really thrives. With HTC devices we usually had completely stable versions of Android running months upon months before HTC got around to releasing source, let alone actually pushing an update. I used to joke that they leak their updates so the XDA guys can get ahold of them and fix the problems. Probably a little truth to that. Haha.
Movie time!
Sent from my SAMSUNG-SGH-I747
Click to expand...
Click to collapse
okay so I set up a git account, and set up a basic linux toolchain (android NDK r7). I pretty much have it all set up so that all I need to do is to actually pick a git account to pull from and then start tinkering. Since this will be my first attempt, I think I will just try taking it easy and simply by just building and seeing how it goes. I am pumped!
Yeah the gf had an htc evo 4G so I know just how annoying wimax was and the idea that they wrote a driver to make wimax compatible blows my mind. I wish one day I can be as great as these guys. Yeah HTC seems like a pain when it comes to source and development but that may just be my opinion. Rooting my gfs evo took me 3 hours of just commandlines and junk. My sgs3 took all of like 2 minutes.
I am a little unsure of how to pull the source from git for a specific kernel but I think I am going to look that up right now.
Wish me luck!
Hope the movie was good and thanks for all the thanks!
EDIT: okay so it was a little messy getting the source from git (noob here). I wanted to get just the source for the cm kernel, but I couldn't find a way to do that. I ended up trying getting the source for cm10.1 and dear god did that take long. I guess I will call it a night for now and hopefully you can show me how to properly and neatly get the source to do this.
For reference, I used this guide: http://xda-university.com/as-a-developer/getting-started-building-a-kernel-from-source
and I got to step 3 Setting up kernel parameters
aeppacher said:
okay so I set up a git account, and set up a basic linux toolchain (android NDK r7). I pretty much have it all set up so that all I need to do is to actually pick a git account to pull from and then start tinkering. Since this will be my first attempt, I think I will just try taking it easy and simply by just building and seeing how it goes. I am pumped!
Yeah the gf had an htc evo 4G so I know just how annoying wimax was and the idea that they wrote a driver to make wimax compatible blows my mind. I wish one day I can be as great as these guys. Yeah HTC seems like a pain when it comes to source and development but that may just be my opinion. Rooting my gfs evo took me 3 hours of just commandlines and junk. My sgs3 took all of like 2 minutes.
I am a little unsure of how to pull the source from git for a specific kernel but I think I am going to look that up right now.
Wish me luck!
Hope the movie was good and thanks for all the thanks!
EDIT: okay so it was a little messy getting the source from git (noob here). I wanted to get just the source for the cm kernel, but I couldn't find a way to do that. I ended up trying getting the source for cm10.1 and dear god did that take long. I guess I will call it a night for now and hopefully you can show me how to properly and neatly get the source to do this.
For reference, I used this guide: http://xda-university.com/as-a-developer/getting-started-building-a-kernel-from-source
and I got to step 3 Setting up kernel parameters
Click to expand...
Click to collapse
I'm stumbling around eating a microwave burrito and I decided to dig a little bit for you. Behold, a guide does truly exist for EXACTLY what you wish to do.
http://forum.xda-developers.com/showthread.php?t=2169607
Sent from my SAMSUNG-SGH-I747
ahagersr said:
I'm stumbling around eating a microwave burrito and I decided to dig a little bit for you. Behold, a guide does truly exist for EXACTLY what you wish to do.
http://forum.xda-developers.com/showthread.php?t=2169607
Sent from my SAMSUNG-SGH-I747
Click to expand...
Click to collapse
Geez at the rate you are helping me, I will owe you my first born soon. I'll try this when I get home from work tonight. I will let you know how it goes and any progress.
Thanks man
ahagersr said:
I'm stumbling around eating a microwave burrito and I decided to dig a little bit for you. Behold, a guide does truly exist for EXACTLY what you wish to do.
http://forum.xda-developers.com/showthread.php?t=2169607
Sent from my SAMSUNG-SGH-I747
Click to expand...
Click to collapse
Okay so the source was a god send, now I am having some issues when it comes to the defconfig. When I try to set up my tree by using the commandline below, it starts to compile but ultimately fails due to an error which I posted below that
Code:
make ARCH=arm CROSS_COMPILE=arm-linux-androideabi- cyanogen_d2att_defconfig
Code:
OSS_COMPILE=arm-linux-androedeabi- cyanogen_d2att_defconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
drivers/media/video/msm/Kconfig:123:warning: choice value used outside its choice group
drivers/media/video/msm/Kconfig:128:warning: choice value used outside its choice group
KCONFIG_SELINUX((null))
KCONFIG_LOG_SELINUX((null))
KCONFIG_VARIANT((null))
***
*** You must specify VARIANT_DEFCONFIG !
***
make[1]: *** [cyanogen_d2att_defconfig] Error 1
make: *** [cyanogen_d2att_defconfig] Error 2
I have been looking a bit but haven't found a solution that fixes my problem. In other threads people suggested that this might be due to the toolchain not being set up properly, but I added the path to the end of .bashrc
I shall keep looking but let me know if you have any ideas
aeppacher said:
Okay so the source was a god send, now I am having some issues when it comes to the defconfig. When I try to set up my tree by using the commandline below, it starts to compile but ultimately fails due to an error which I posted below that
Code:
make ARCH=arm CROSS_COMPILE=arm-linux-androideabi- cyanogen_d2att_defconfig
Code:
OSS_COMPILE=arm-linux-androedeabi- cyanogen_d2att_defconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
drivers/media/video/msm/Kconfig:123:warning: choice value used outside its choice group
drivers/media/video/msm/Kconfig:128:warning: choice value used outside its choice group
KCONFIG_SELINUX((null))
KCONFIG_LOG_SELINUX((null))
KCONFIG_VARIANT((null))
***
*** You must specify VARIANT_DEFCONFIG !
***
make[1]: *** [cyanogen_d2att_defconfig] Error 1
make: *** [cyanogen_d2att_defconfig] Error 2
I have been looking a bit but haven't found a solution that fixes my problem. In other threads people suggested that this might be due to the toolchain not being set up properly, but I added the path to the end of .bashrc
I shall keep looking but let me know if you have any ideas
Click to expand...
Click to collapse
I'm not sure. I still haven't had time to set mine up I will try to get around to it tomorrow and see if I run into the same error.
Let me know if it's something simple.
Sent from my SAMSUNG-SGH-I747
ahagersr said:
I'm not sure. I still haven't had time to set mine up I will try to get around to it tomorrow and see if I run into the same error.
Let me know if it's something simple.
Sent from my SAMSUNG-SGH-I747
Click to expand...
Click to collapse
okay after a lot of troubleshooting I may have found the issue, i think it had to do with improper pathing of my toolchain, I fixed this and now when I type
Code:
make VARIANT_DEFCONFIG=cyanogen_d2att_defconfig
I get a long compiling process that ultimately fails at
Code:
drivers/mfd/pm8921-core.c:218: error: resources_pwrkey causes a section type conflict
drivers/mfd/pm8921-core.c:218: error: resources_pwrkey causes a section type conflict
drivers/mfd/pm8921-core.c:172: error: adc_cell_resources causes a section type conflict
drivers/mfd/pm8921-core.c:172: error: adc_cell_resources causes a section type conflict
make[2]: *** [drivers/mfd/pm8921-core.o] Error 1
make[1]: *** [drivers/mfd] Error 2
Sorry for being so nooby
EDIT: Fixed by switching toolchains and compiling with 4.6 instead of 4.4.3 - when I figure out how to get past incompatibilities I will be compiling with 4.8
UP AND RUNNING, let the tweaking begin!!!!!!!!!!!!
ahagersr said:
I'm not sure. I still haven't had time to set mine up I will try to get around to it tomorrow and see if I run into the same error.
Let me know if it's something simple.
Sent from my SAMSUNG-SGH-I747
Click to expand...
Click to collapse
Okay so I finally got to build and fixed wifi not working. So far the kernel is stable cm basically. I was wondering what would be the best educational source for modifications. Like I would like to change the name of the kernel and the boot splash since when I flash this it still has the information from the previous kernel under the About Phone setting. I don't want to bother you for every tiny thing, so far I have just been looking through random files.
aeppacher said:
Okay so I finally got to build and fixed wifi not working. So far the kernel is stable cm basically. I was wondering what would be the best educational source for modifications. Like I would like to change the name of the kernel and the boot splash since when I flash this it still has the information from the previous kernel under the About Phone setting. I don't want to bother you for every tiny thing, so far I have just been looking through random files.
Click to expand...
Click to collapse
Edit your defconfig file for d2att. There's a line in there that's says something along the lines of:
kbuild_build_version
Something like that, it'll have the name of the kernel present. I believe you can also adjust it prior to building if you are running the make menuconfig command, there's a slew of stuff there, I just haven't seen it in quite a while.
Boot splashes I'm not familiar with as they didn't flash with kernels on HTC devices.
As far as an actual source, I know there are several guides specific to android here on XDA. But I've got my wife and kids at grandpa's for some old fashioned barbecue.
I'm glad to see you're making progress!
Sent from my SAMSUNG-SGH-I747
ahagersr said:
Edit your defconfig file for d2att. There's a line in there that's says something along the lines of:
kbuild_build_version
Something like that, it'll have the name of the kernel present. I believe you can also adjust it prior to building if you are running the make menuconfig command, there's a slew of stuff there, I just haven't seen it in quite a while.
Boot splashes I'm not familiar with as they didn't flash with kernels on HTC devices.
As far as an actual source, I know there are several guides specific to android here on XDA. But I've got my wife and kids at grandpa's for some old fashioned barbecue.
I'm glad to see you're making progress!
Sent from my SAMSUNG-SGH-I747
Click to expand...
Click to collapse
Thanks man. Barbeque? I'm jelly. Have fun
WELP, released my first build. Nothing to interesting, but hey its a start. The thread is here if you want to check it out (I gave you a shout out) http://forum.xda-developers.com/showthread.php?p=44179380#post44179380
Next thing is learning how to build a boot.img instead of using the zImage and kousch's AnyKernel. If I can figure out how to pack a boot.img then I can change the boot splash. There are so many threads out there but they are all device specific, have a million download requirements, or don't end up working out
aeppacher said:
WELP, released my first build. Nothing to interesting, but hey its a start. The thread is here if you want to check it out (I gave you a shout out) http://forum.xda-developers.com/showthread.php?p=44179380#post44179380
Next thing is learning how to build a boot.img instead of using the zImage and kousch's AnyKernel. If I can figure out how to pack a boot.img then I can change the boot splash. There are so many threads out there but they are all device specific, have a million download requirements, or don't end up working out
Click to expand...
Click to collapse
If you are in a hurry to pack a boot.img you can use the kitchen. It will compile a boot.img from zImage and ramdisk. I know you want to do it yourself, but it's a start.
Sent from my SAMSUNG-SGH-I747 using xda premium
stratatak7 said:
If you are in a hurry to pack a boot.img you can use the kitchen. It will compile a boot.img from zImage and ramdisk. I know you want to do it yourself, but it's a start.
Sent from my SAMSUNG-SGH-I747 using xda premium
Click to expand...
Click to collapse
Okay, i have a question for you. How do I get a ram disk. I am a little confused with the whole packaging process. All I do is I build a zImage and then get it into a flashable form using Koush's anykernel
Code:
wget http://invisiblek.org/AnyKernel_samsung-d2.zip
unzip AnyKernel_samsung-d2.zip -d AnyKernel/
cp android_kernel_samsung_d2/arch/arm/boot/zImage AnyKernel/kernel/
cp `find android_kernel_samsung_d2 -name "*.ko"` AnyKernel/modules/
cd AnyKernel
zip ../MyAwesomeKernel.zip -r *
Sorry I am so nooby to all this. It doesn't help that I don't code in C (don't worry I bought a textbook and am already reading up). Thanks for the help, I appreciate it
Had anybody noticed this? Maybe some dev willing to work with it? Below it is the link. Just search for can will do =)
http://consumer.huawei.com/en/opens...Type=openSourceSoftware&pageSize=10&curPage=1
From what I can tell there is really no difference in the kernel sources. I can use a kernel built on CAN-L01-11 source when I run LOS, but my device is AL10, I would guess it works the other way around also. Maybe someone with more time can compare the original sources released for both and see if anything is different. If not, hopefully LOS 14 will come to life soon for our device.
I am in the middle of switching jobs (very time consuming as a foreign resident in China). Good news is I will be making more money and will be able to build a build machine in the next few months.
wangdaning said:
From what I can tell there is really no difference in the kernel sources. I can use a kernel built on CAN-L01-11 source when I run LOS, but my device is AL10, I would guess it works the other way around also. Maybe someone with more time can compare the original sources released for both and see if anything is different. If not, hopefully LOS 14 will come to life soon for our device.
I am in the middle of switching jobs (very time consuming as a foreign resident in China). Good news is I will be making more money and will be able to build a build machine in the next few months.
Click to expand...
Click to collapse
I really think that there is no difference too, as we already tested with @#Henkate builds. I just specified the models to be precise, but my device (caz-tl10) would probably be able to run a LOS (or derivative) ROM built for these models I mentioned. Maybe, the thing to be aware is the partition size for our models, but as system probably has the same size, it wouldn't be a major thing.
I really want to learn and to build, but I don't have enough storage for sources and will have to wait a bit. It would be really nice to have a LOS/AOSP build with updated software
Would be nice to see Slim on the Huawei, I bought the thing simply because of the size being close to the Nexus 5. Loved that thing, but has been given to my son (he is 2 and a half, so no wifi or calling, but it runs the games he wants).
Vinnom said:
I really think that there is no difference too, as we already tested with @#Henkate builds. I just specified the models to be precise, but my device (caz-tl10) would probably be able to run a LOS (or derivative) ROM built for these models I mentioned. Maybe, the thing to be aware is the partition size for our models, but as system probably has the same size, it wouldn't be a major thing.
I really want to learn and to build, but I don't have enough storage for sources and will have to wait a bit. It would be really nice to have a LOS/AOSP build with updated software
Click to expand...
Click to collapse
Well, there must be differences in the kernel source between CAZ-TL10 and CAN-L11/L01 since those models aren't mentioned at CAZ's source on huawei's website. For example, at the source code of EMUI 4.1, both L01 and L11 are mentioned, so they use the same kernel.
Last night I've updated the defconfig by looking at a commit from Moto G4 Play (harpia), at the defconfigs of Xiaomi Redmi Note 4 (mido), Moto G5 Plus (potter) and of course, the defconfig from CAZ-TL10. You can see the commit here. Other changes might be needed too, but I'll see about that later.
You can use Google Cloud Platform for building, as I'm doing now. You only need a credit card and 1$ (which they'll give back in 1 day or so).
wangdaning said:
Would be nice to see Slim on the Huawei, I bought the thing simply because of the size being close to the Nexus 5. Loved that thing, but has been given to my son (he is 2 and a half, so no wifi or calling, but it runs the games he wants).
Click to expand...
Click to collapse
Slim it's on my "to do list". If I'll manage to build los14.1, then I'll build Slim7, otherwise Slim6.
Last night I've started to build LOS14.1 and fixed some minor build errors which you can see on my github, but then I've ran into this build error after ~30 mins of building (usually it takes 1h 30m to finish a build, thanks to GCloud platform...). I've searched a bit and found a post where a dev has the same issue and is saying that hwcomposer isn't compatible with the kernel source and that must be because I'm still using MM source since Huawei didn't publish N source for L01/L11. There's a cm14.1 branch left by Grarak and there's a commit which contain something which appear in the build error. He might tried to build cm/los 14 and ran into the same build error, I don't know. But I'll try that commit today and I'll also do more research. I'd like to build it successfully today, but I'll see how it goes.
#Henkate said:
Well, there must be differences in the kernel source between CAZ-TL10 and CAN-L11/L01 since those models aren't mentioned at CAZ's source on huawei's website. For example, at the source code of EMUI 4.1, both L01 and L11 are mentioned, so they use the same kernel.
Last night I've updated the defconfig by looking at a commit from Moto G4 Play (harpia), at the defconfigs of Xiaomi Redmi Note 4 (mido), Moto G5 Plus (potter) and of course, the defconfig from CAZ-TL10. You can see the commit here. Other changes might be needed too, but I'll see about that later.
You can use Google Cloud Platform for building, as I'm doing now. You only need a credit card and 1$ (which they'll give back in 1 day or so).
Slim it's on my "to do list". If I'll manage to build los14.1, then I'll build Slim7, otherwise Slim6.
Last night I've started to build LOS14.1 and fixed some minor build errors which you can see on my github, but then I've ran into this build error after ~30 mins of building (usually it takes 1h 30m to finish a build, thanks to GCloud platform...). I've searched a bit and found a post where a dev has the same issue and is saying that hwcomposer isn't compatible with the kernel source and that must be because I'm still using MM source since Huawei didn't publish N source for L01/L11. There's a cm14.1 branch left by Grarak and there's a commit which contain something which appear in the build error. He might tried to build cm/los 14 and ran into the same build error, I don't know. But I'll try that commit today and I'll also do more research. I'd like to build it successfully today, but I'll see how it goes.
Click to expand...
Click to collapse
I really understand your point, but what makes me think about no differences is that the link I shared leads to Cannes AL10 and Cannes TL10, which seems to be international models, but inside the file "README_Version.txt" is written that "This kernel package is released for the phone software version--CAZ-B368,MLA-B351". This really made me think that they are compatible. Maybe the various Nova types are differs in radio/modem and storage, Idk. Really made me wonder.
Thanks for the tips for google cloud storage. First I'm trying to build at least the kernel, so I can understand a bit of the process =) At least the kernel tree I can handle with my limited storage xD
PS
Is good to know that you are making quick progress to LOS 14.1 =D
Vinnom said:
I really understand your point, but what makes me think about no differences is that the link I shared leads to Cannes AL10 and Cannes TL10, which seems to be international models, but inside the file "README_Version.txt" is written that "This kernel package is released for the phone software version--CAZ-B368,MLA-B351". This really made me think that they are compatible. Maybe the various Nova types are differs in radio/modem and storage, Idk. Really made me wonder.
Thanks for the tips for google cloud storage. First I'm trying to build at least the kernel, so I can understand a bit of the process =) At least the kernel tree I can handle with my limited storage xD
PS
Is good to know that you are making quick progress to LOS 14.1 =D
Click to expand...
Click to collapse
Umm, I haven't checked that readme. Maybe I'll try that kernel source someday.
If you'll use Google Cloud Platform, then you won't need to worry about your storage, as GCloud uses own storage, like a virtual one. When you'll sign up to GCloud, you'll see that you'll have to make an "instance" and you'll have to choose "PC specs" (CPU, ram, storage). You get 300$ free and the trial is available 1 year if I'm not wrong.
I have about 150-180$ left ( I can't remember properly) and that's kinda enough. Also, I can get another trial since I have a second credit/bank card . As a tip, make sure that you'll shutdown the instance everytime you stop using it, otherwise it'll take money after some time (e.g. if the instance has been on overnight or 1-2 days). That's how I ended up with less credits available, by forgetting to shutdown it.
Here's a great guide about how to build ROM from source. I've used it myself at begin. However, keep in mind that you'll need newer java version than the one which is mentioned there.
Regarding LOS14.1, after spending the whole day (today), I've finally built the kernel without any errors. It turned out that I had to use newer CAF source and the one left by @Grarak in "caf-n" branch was useful. Probably I would've had difficulties in finding which CAF source I should use or I would've been stuck if the one by Grarak wouldn't have been there.
Tomorrow, when I'll start building the ROM, the errors related to the kernel which I've encountered yesterday should be gone since I've built the kernel successfully.
I think the chances are pretty high that the ROM won't boot, not sure, but I'm quite excited .
The thread tittle is called "Cannes al10 & cannes tl10 emui 5.0 source code release" and we talk about... you know We've went off topic.
Thank you for working so hard on this device. Living in China as a non-Chinese it is really hard to get a credit card. I will be moving in about a week and have a much better job. Hope I can get a build device together and help you out. Again, thanks for all your work.
@Vinnom
Finally, Huawei has published the source code...
There says "CAN-L10, L11", but I don't think there's L10. Probably is just a typo as they did with "Andriod".
#Henkate said:
@Vinnom
Finally, Huawei has published the source code...
There says "CAN-L10, L11", but I don't think there's L10. Probably is just a typo as they did with "Andriod".
Click to expand...
Click to collapse
Maybe lol
Btw, do you know the differences between L10 and L11?
EDIT [OT]:
I didn't have the time to answer your in the OT thread yet, but later today I'll xD
Vinnom said:
Maybe lol
Btw, do you know the differences between L10 and L11?
EDIT [OT]:
I didn't have the time to answer your in the OT thread yet, but later today I'll xD
Click to expand...
Click to collapse
I don't know and I don't think there's CAN-L10, but I'm not sure though.