Related
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.
Many people want to run a working froyo on their devices.
This won't be possible in a clean way without compiling a new kernel.
To archive this goal, we need to merge the Huawei specific device drivers (which are for 2.6.29) into a new kernel tree, the 2.6.32.9 one (or even 2.6.35 but 2.6.32.9 comes first since it is stable and thus important to us).
I did some research and preliminary work which I will explain here:
- The base kernel Huawei started with is available here (gitweb) - also check their wiki.
- Huawei started with the Q8650BSDCANLYA324020 tag on the donut_glazed branch (see instructions at the end of the post)
- Huawei has written it's own board driver (note they have used a Q8650 kernel release not a MSM7x25 one, most likely because this board driver is a little older and was not available for the version they wanted)
- After they were finished writing their drivers they released the kernel source (as you can download it from Huawei)
I have checked out the Q8650BSDCANLYA324020 base kernel version and diffed it against the kernel release of Huawei, generated a patch file (and stripped out the DOS linebreaks wtf) which can be applied to the base kernel.
Applying this patch to a more recent kernel (2.6.32.9) is not possible without merging the code into the new kernel tree (and since I'm not a programmer I can't do it - this is were your help is needed).
The other question is in which kernel tree we can port the patch I have extracted. I think we can use Q8650BSDCANLYA504005 on the froyo_almond branch since Huawei used an older version of it. Merging it into the AOSP msm-2.6.32.9 tree may be possible too (but the code aurora msm kernel is an improved AOSP version, so I guess we want that one).
My patch (and some non-pulse-mini fixup patch) alongside with a freshly extracted and fixed .config for the U8120 can be found at http://nico.core.ws/misc/huawei_kernel_u8100_8110_8120/
To port the source you need to checkout the original source (Q8650BSDCANLYA324020), create a new branch in which you apply the Huawei patch, then checkout the froyo kernel (Q8650BSDCANLYA504005) and merge your branch containing the changes from the patch into it.
Another way may be porting the froyo kernel tree back to the eclair one with Huawei patches.
Please post any results/questions/etc. here!
If we should get this working we can also enable the GPU driver (Adreno 200) as requested by many people (and much more (CyanogenMOD anyone? )).
Appendix:
Instructions on how to get the original source:
$ git clone git://codeaurora.org/kernel/msm.git
$ git checkout Q8650BSDCANLYA324020
Instructions on how to apply the patch (assuming "msm" is the kernel tree):
$ cp diff_kernel_msm_aurora_Q8650BSDCANLYA324020.diff msm/
$ cd msm/
$ patch -p1 < diff_kernel_msm_aurora_Q8650BSDCANLYA324020.diff
If you are compiling for U8100 or U8120 phones, you need to apply another
patch which fixes sensors (otherwise your phone won't be able to read battery
level and stuff):
$ cp needed_fixes_for_non_u8110_devices.diff msm/
$ cd msm/
$ patch -p1 < needed_fixes_for_non_u8110_devices.diff
Note that the above instructions will get you nothing new, only the kernel already running on your device.
This thread is about porting the Huawei patch to a froyo kernel.
Very nice! Thank you for this topic!
I hope this will be successfull
Are the Atheros sources included aswell?
[GER]Roxxor said:
Are the Atheros sources included aswell?
Click to expand...
Click to collapse
To be honest, I don't know. They should be in there though (maybe under a more generic driver name or integrated in the board driver) otherwise Huawei would have violated the GPL.
The problems with the fixes:
wifi
They got almost wifi working in other post
radio
FM radio too with an 3rd party app
dpad
dpad crash in this post too 2 pages back just disable this
screen calibration
calibration fix can meaby be fixed with HTC calibrate??(its an calibration app)
sound
I solve the sound problem with my phone is to replace the libaudio.so from 2.1rom,maybe you can try.\
cedric123 said:
here is an source for the adreno drivers.
https://www.codeaurora.org/gitweb/q...b819424af4be;hb=refs/heads/android-msm-2.6.32
Click to expand...
Click to collapse
Basically this is the complete kernel source for froyo without Huawei patches (it's the wrong tag too).
When we have ported the drivers we easily can enable that driver.
cedric123 said:
the froyo kernel source: http://www.huaweidevice.com/tcpsdow...&attachmentName=kernel-2.6.32-U8150-Froyo.zip
Click to expand...
Click to collapse
Thats the source for the U8150, not the ones we want. The only thing which may help us at a future point in there is the kernel config.
cedric123 said:
If you compile a kernel right now you'd get a kernel that won't read the batterylevel and the magnetic compass won't work so we need to make a few adjustments.
Click to expand...
Click to collapse
This is in needed_fixes_for_non_u8110_devices.diff
So nothing new here.
So what can we do to help?
Is there a way to chat in XDA?
Any news on this?
cedric123 said:
here is an source for the adreno drivers.
LINK REMOVED
Here are some are adreno 200 drivers from a Custom nexus one ROM:
Areno Drivers package contains the adreno rivers only(i could miss some drivers here so look for the package above contains all drivers from the nexus rom
LINK REMOVED
Click to expand...
Click to collapse
Possible to make an update.zip for this Adreno 200 driver on 2.1 while 2.2 is not working?
editeditediteditediteditedit
Maybe he's working on the project.
Leito92 said:
Maybe he's working on the project.
Click to expand...
Click to collapse
I dont think so he's not saying anything about it for 1 week now...
But even if he doesnt say anything, this topic can be useful.
Someone with git/kernel/c knowledge need to port the patch.
nicoderboss said:
Someone with git/kernel/c knowledge need to port the patch.
Click to expand...
Click to collapse
Who can do That?
Kallt_kaffe meaby?
nicoderboss said:
Someone with git/kernel/c knowledge need to port the patch.
Click to expand...
Click to collapse
You need some elemental knowledge in C and then simply cut and paste the text in the files.
However, I think that it is more important to be able to compile from source and install the existing Huawei Linux kernel for the U8120. That is, can we compile from source all the code for Android 2.1-update1 and install on the U8120?
It might be good to try to get CyanogenMod on the U8120 for the kernel version that Huawei provides. Then, we can cut down the 1.5MB patch into smaller parts, and even try to get the drivers included in the Linux kernel.
I have not idea how to compile Android 2.1-update1 and get the plain old android source on the phone. I am willing to invest the CPU clocks to compile it, though.
cedric123 said:
Who can do That?
Kallt_kaffe meaby?
Click to expand...
Click to collapse
Dunno, it's quite a huge and advanced task.
Sent from my Vodafone 845 using XDA App
maybe we can get some kernel developers from the desire topic to help us?
I have send Benee, deovferreira, Kali- a PM maybe they could help us
nicoderboss said:
Dunno, it's quite a huge and advanced task.
Sent from my Vodafone 845 using XDA App
Click to expand...
Click to collapse
Can we just replace the normal kernel in the command list for the new kernel so you apply patch in the new kernel(u8150)froyo kernel?
I have had contact with benee a kernel developer for the htc desire. He is willing to help but he needs a device so he can test kernels he build. It is not possible to build kernels without a device because this is a huge project without a good base.
Maybe we can setup a fund raiser to get him a device?
Nearly days I get an open souce code of i5800 and I just a new one in the compling world,so I hope someone can help me find something useful in configuring the code or some books useful.
If you have a qq number and our time are not rushed ,we can communicate in this way.(No facebook or twitter in china....How big the wall!)
My QQ number is 361180509
not sure I understood what you mean, do you have access to newer (froyo) kernel sources for I5800? if so, please do share
eclair kernel source is on opensource.samsung.com, and they compile just fine with the official Android toolkit, but Samsung's changes for Froyo are nowhere to be found (a few modules missing, touchscreen and accelerometer being the most notable), and the kernel doesn't compile anyway.
ze-m0n5t3r said:
not sure I understood what you mean, do you have access to newer (froyo) kernel sources for I5800? if so, please do share
eclair kernel source is on opensource.samsung.com, and they compile just fine with the official Android toolkit, but Samsung's changes for Froyo are nowhere to be found (a few modules missing, touchscreen and accelerometer being the most notable), and the kernel doesn't compile anyway.
Click to expand...
Click to collapse
Not sure if i get you right, do you say it does, or it does not compile? If not, we should request propper sources from Samsung.
sorry,I just don't find the offical source code website before posting this.Cause I just a freshman and I haven't got my PC....
maybe I'll compile the source code later.Sorry to make these mistakes.And I'm chnese.So my english is poor.....
Sent from my GT-I5800 using XDA App
FadeFx said:
Not sure if i get you right, do you say it does, or it does not compile? If not, we should request propper sources from Samsung.
Click to expand...
Click to collapse
eclair sources compile just fine, both with my system cross-compiling toolkit (arm-android-linux-gnueabi managed on gentoo by crossdev) and with the prebuilt one that comes with the Android platform
I might give it a try to actually boot it (but I would need to construct an initramfs, and it's a lot of work, and I kinda need to get back to "proper" work, I was consumed by Android during the last 3 weeks since I got the phone )
ze-m0n5t3r said:
eclair sources compile just fine, both with my system cross-compiling toolkit (arm-android-linux-gnueabi managed on gentoo by crossdev) and with the prebuilt one that comes with the Android platform
I might give it a try to actually boot it (but I would need to construct an initramfs, and it's a lot of work, and I kinda need to get back to "proper" work, I was consumed by Android during the last 3 weeks since I got the phone )
Click to expand...
Click to collapse
You can use the initramfs from Eclair.. I'm assuming you're talking about 2.1.. since 2.2 sources aren't out yet for this phone.
Link for the initramfs for Eclair is here: http://www.multiupload.com/U6GB5BB3HI
This is the JK1 I think - or whatever eclair rom I posted up previously
Hi to all Broadcom BCM215XX armv6 devices running android!
I'm glad to announce that, our organisation, BroadcomCM will start working on the port of AOSP ICS drivers for our CPU and GPU, BCM21553. First of all, I've asked moderators to close all my threads, why? We know we have [GENERAL] Thread for our projects but most users don't care, so this will be the thread to talk about it, development!.
Samsung stopped the development on this devices long ago, but their drivers where not ever released. Thanks to our petition, we have managed to force Broadcom to release the drivers, and we managed to release them on ICS, android 4.0+, way!
Index:
Post 1 (this) ...................................... Information about drivers
Post 2 .............................................. Frequently asked questions
Post 3 .............................................. Drivers on Github (Opensource)
Post 4 .............................................. Videos showing HW working
Click to expand...
Click to collapse
A bit of introduction:
Broadcom gave to us test driver builds, which were prebuilt, .so libraries, and we could not edit them, but they gave us the code to patch framework to make those prebuilt libraries work with our AOSP project (by that time, CyanogenMod 7.2). After some re-search and lot of work on our team (thanks Legolas93), I managed to implement AOSP Alcatel drivers to our CyanogenMod 7.2 Based ROM. This was the biggest change ever happened to that device, as we managed to fix 100% HW and as a cosnequence, libstatgefright was fixed too, and HGL. This resulted on camera/vide recordi (media profiles, encoding and decoding) to work, this was RC1. REMEMBER: As we extracted this libs from sotck AOSP alcatel ROM they are prebuilt, so we can not modify them at all.
SInce that moment, project on HW was stopped, and we focused to fix other issues not releted to HW (ext4, backlight, led, tethering, BT...), and we managed (most of them), and everyone enjoys now a CM, AOSP and Cyanmobile port brought to you by broadcomCM.
What else?
Broadcom released, or seemed to, BCM21553 driver source for AOSP ICS source. They released the source, so now we can know how our chip work. What is weird about it, is that this chip is released for ICS source, when it is an armv6 chip, and any device of our family has official ICS. (Maybe BROADCOM are really nice people, or maybe they trolled us). We will add new tag to be defined on Boardconfig.mk to make the drivers work on it.
So.. We did it?
Yes, we forced Broadcom to release the source, you, we, we all did this possible, and we should be prud of ourselves.
Will with this come BroadcomCM to develop?
Well, yes and no, we already have some surpises for BroadcomCM ROMs owner, which were not reletated to drivers at all, and they affect all devices. As this work is nearly finished (first alpha), we will release this next week, and then we will start working on it. Keep calm, good things make people wait for it don't ?
What is now?
Now, nice question. We will implement this source code on our CM9, ICS, branch. (all sources can be found on our github), and implement them on the build, will that be easy? OF COURSE NOT. Broadcom trolled us with first test builds of drivers, so maybe expect the same from that sources, we don't know and we will not know unitl we build it, and we have to compare each file, ONE PER ONE, so it will be a hard work.
Frequently asked questions can be found on the second post, as well as a video to show you what was having a device with drivers, and what was not. (Qualcomm vs Broadcom [armv6]).
ANY ETA? (Estimated Time of Arrival)
No. I can not tell any eta, I'll maintain you informed to you on this thread. I'll start my work next week (Exams on this one, need to study ), and I'll keep calm, I'm as amazed as you, but we have to be very down to earth. Broadcom lied to us, maybe they made it too. It will take some time to study and implement, and then make them work!
WILL THAT FIX ALL THE ISSUES WE HAVE ON ICS?
No, but will fix the most important one, HW. What I mean by hardware is the animations will be smooth, video on second post. So hopefully we will run a good ICS build, but expect camera and Audio not working too. Audio? Well some progress have been made on shadows, camera? That will be hard, really hard. Even Cooper (Galaxy Ace MSM7x27 based chip wasn't able to run camera at the first, since Qualcomm not release their source too).
AND WHAT ABOUT CM7 (2.3.7 based roms)?
We hope 2.3.7 ROMs will benefict from it, but we are not sure, we will have to test them and implement on our CM7 tree, but as they are for ICS, or this seems to, first goal is ICS, as we have 100% HW working, but with prebuilt, for the moment is OK and not our priority,
CAN I IMPLEMENT THE DRIVERS ON MY DEVICE?
No, to implement those dirvers you will need big knowledge of BroadcomCM devices, and I think our team has. We have managed to solve many bugs, and, talk with broadocm to solve first driver errors we had.
Ok, we have managed to get drivers working on our CyanogenMod 9.1 Ice Cream Sandwich version 4.0.4. Remember the drivers were given in 4.0.1 which were a bit different from actual 4.0.4 used.
After the release of the ROM with first version of those drivers included, we are glad to announce that, as always, we opensourced this "4.0.4 drivers" as well as Broadcom did. Feel free to take them, and use it at your own, to build diferent ROMs, such as AOKP, Paranoid, AOSP... Or Jelly Bean . This are drivers source, you will need to cherry-pick them to your local repo:
/bionic
/frameworks/base
/hardware/libhardware
/system/core
Broadcom was nice, and they created a new HGL lib, which they open-sourced too, and give the name of libv3d, kind of a new HGL lib, which should complish all patches and BCM21553 requiriments, also opensourced on BroadcomCM.
/brcm_usrlib also known as libv3d
You can also find original patch on Broadcom's page (4.0.1 patch) and the diff files I've made, which they will give you more clues on how to implement them on other sources.
On those videos, we can see that those drivers are fully working! Thanks for those youtubers, we can show to the world that WE DID IT!
ME presenting those drivers:
COOPERVE:
TOTORO:
TASSVE:
CORI: (WIP)
you guys are amazing,thanx for all............
Does this mean we can build other roms as well?
like aokp / paranoid android / pac /miui etc.
Anyhoo, I wish you goodluck.
u doing a great job buddy.
keep it up. :thumb:
n best of luck for ur exams..
---------- Post added at 11:18 PM ---------- Previous post was at 11:18 PM ----------
CharsiBabu said:
Does this mean we can build other roms as well?
like aokp / paranoid android / pac /miui etc.
Anyhoo, I wish you goodluck.
Click to expand...
Click to collapse
yup..
Always Great biel and his team..
using the great ace -i
Only these lines in legacy_prebuilts.mk already made me start to give up the drivers must be another troll source, maybe I'm wrong...
libEGL_POWERVR_SGX530_121.so \
libEGL_tegra.so \
libGLESv1_CM_POWERVR_SGX530_121.so \
libGLESv1_CM_tegra.so \
libGLESv2_POWERVR_SGX530_121.so \
libGLESv2_tegra.so \
Maybe they gave us fake one or another test builds. Still will take time months/year. Just buy new phone. This doesnt worth it.
Good luck, BroadcomCM!
It means,that we can expect cm9 only woth not working camera and sound?
This is some real good news if the broadcomCM have given the proper sources... Well, let's hope bielt.v keeps us updates
Dr.Pepper said:
It means,that we can expect cm9 only woth not working camera and sound?
Click to expand...
Click to collapse
If we get stable cm9 thats also great for us..
using the great ace -i
I highly doubt a big manufacturer would "troll" its consumers and volunteer developers with "fake" driver sources.
Sent from my GT-I9195 using xda app-developers app
I don't think they trolled us, they wrote a documentation and made an announcement for Fake drivers? A big manufacturer like broadcom will not play hide and seek with us, they know that they will lose their respect.
Sent from my GT-S5360 using Tapatalk 2
NICE!
CharsiBabu said:
Does this mean we can build other roms as well?
like aokp / paranoid android / pac /miui etc.
Anyhoo, I wish you goodluck.
Click to expand...
Click to collapse
We can leterally "port" those, (copy paste u know, lol)
Mitko said:
I highly doubt a big manufacturer would "troll" its consumers and volunteer developers with "fake" driver sources.
Sent from my GT-I9195 using xda app-developers app
Click to expand...
Click to collapse
Its natural, lol, happens once in a millenium, but these maybe true... but one thing is serioussly doubtful that the readme says
Readme.txt: last line:
make -j8 TARGET_DEVICE=generic_armv5
Click to expand...
Click to collapse
and armv5 doesn't exist ?? && moreover our bcm21553 devices are more likely to be armv6 variations....
really confuses me
Code:
I havent done enough research tho (due to less time on pc)
can anybody explain me that ??
There a long-long way to go. hopefully the awaited days come with good news.
XDA-Developer App
So I'm noodling through the source code, and I guess I'm gonna see what I can do to try and compile something for the Raspberry Pi. Fingers crossed.
EDIT: Also, according to wiki, ARMv5 is in fact a thing. Who knew?
http://en.wikipedia.org/wiki/ARM_architecture
Hello friends, I 'm editliy custom ROM and you would have a couple of questions . I would be glad if you could help .
• The setting is established in the CM ROM updates and the " Welcome to cynogenmod the text" How can I edited ?
• The icon will appear when installed package Rom How do I change .
• Settings> About phone > cynogenmod version.
How do I change fonts and animations in .
I do not know much English. I used to Google translation.
Does not that help ?
Please help !! ?
Start with learning to compile from source code. You will have to edit it in the source. But be advised that changing things like that is not gonna allow you to post it here.
zelendel said:
Start with learning to compile from source code. You will have to edit it in the source. But be advised that changing things like that is not gonna allow you to post it here.
Click to expand...
Click to collapse
Where do I need to compile the source code of CM .zip file ? I know compile the source code from Ubuntu as I search on the internet.
Trip-Tonic said:
Where do I need to compile the source code of CM .zip file ? I know compile the source code from Ubuntu as I search on the internet.
Click to expand...
Click to collapse
You do. You will have to sync the source code and then compile a build with your changes.
zelendel said:
You do. You will have to sync the source code and then compile a build with your changes.
Click to expand...
Click to collapse
So how to do extensive editing what action you tell a manner ? Do not bother . thanks.