Lately... I've been trying to port CWM/TWRP onto a generic device based on the MSM8926 chipset. I have researched and found the proper recovery.fstab mount points and flags but my problem now is how to reference in my device tree the qcom platform. According to master carliv, he said that I have absolutely no reference in my device tree to the qcom(qualcomm) platform, and all android sources have specific requests for qcom devices. So this is where I'm currently stuck at. I have absolutely no idea on how to reference the qcom platform nor even know what to download(like proprietary software needed to create CWM/TWRP). Could someone please guide me on this? I have no experience whatsoever in referencing the qcom platform or even knowing how to download the proprietary software from the phone itself. I've also tried snooping around in CAF(Code Aurora Forum) to find the kernel tag of my phone which would probably be:
Code:
May 07, 2014 LNX.LA.3.5.2.1-02910-8x26.0 msm8226 LNX.LA.3.5.2.1-02910-8x26.0.xml 04.04.02
^ Since I looked at the kernel version for my phone which is
Code:
[email protected] #1 Wed May 7 00:24:52 CST 2014
. I assumed that the kernel's build date is the same as the ones written in CAF except I need to find which platform the kernel was made for and closest platform was MSM8226 which is kinda weird that the phone's build.prop shows that the flattened device tree it has used is MSM8226 rather than using MSM8926.
Related
Hi all,
I'm having trouble trying to check out a version of the android source code from the git repository, with a known build.
For example, my Droid 1 is running:
2.6.32.9-g68eeef5
[email protected] #1
frg83d
I first figured that g68eeef5 referred to the git hash, but using gitk it appears that this is not a valid hash.
Does anyone know how I might be able to grab the kernel code for this build?
Thanks!
George
You could check out this guide http://stackoverflow.com/questions/315911/git-for-beginners-the-definitive-practical-guide#316055, in case you haven't already. It's got info on checking out branches - you'll need to know its name - and a lot more.
It seems g68eeef5 is kernel-specific - it might correspond to a revision/version of the kernel only (as opposed to the android system). That would not correspond to a branch though - kernel or android - rather to a revision inside a branch I'd think.
right, i'm trying to find the exact kernel branch or revision. g68eeef5 can't be a hash, since it has a 'g' in it, so i'm not sure what it corresponds to exactly.
Hi guys,
I'm a kernel developer having trouble flashing a new kernel using fastboot on my rooted stock Xoom running Android 3.2. I flash my new kernel, and it gets stuck booting at the Motorola dual-core screen, and I have to reset and reflash the rootboot.img I got from these forums. I need to build some kernel modules, but I can't find the 2.6.36.3-gb899528 kernel on git anywhere. Before linking me to tegra or honeycomb git, please make sure this is the correct version, as I've tried most of the current branches. If I can't flash a new kernel, I can at least build and load the kernel modules I need.
Thanks in advance for any help.
http://android.git.kernel.org/?p=kernel/tegra.git;a=summary
Use the android-tegra-2.6.36 branch
Thanks, I tried that branch, but the vermagic string on the kernel modules is wrong (in the case of the most recent revision in that branch the vermagic string is '2.6.36.3-g9001adc SMP preempt mod_unload ARMv7' but I need it to be '2.6.36.3-gb899528 SMP preempt mod_unload ARMv7' to load the module on the Xoom). Android doesn't seem to let you force load kernel modules, so this remains an issue. Is it just another revision in that branch maybe? I'll try a few of the other revisions, but any other help would be appreciated.
Interesting -- I can't find it either. The b899528/9001adc refers to a git commit-ish (disclaimer: not a git expert), eg., http://android.git.kernel.org/?p=kernel/tegra.git;a=commit;h=9001adc
But http://android.git.kernel.org/?p=kernel/tegra.git;a=commit;h=b899528 doesn't resolve . . . they could be still working to get the GPL components made available?
Very strange indeed. Well it looks like that is out then. Is there a trick to building a kernel for the Xoom? Is there a certain base offset to use? I've built and flashed kernels for many other Android devices, but for the life of me cannot get one working with the Xoom.
Hi guys,
I was working on this since some time and here it is
Please read FAQ first
FAQ :
Can I compile a MT6589 kernel for every phone ?
As you know, a MT6589 kernel won't fit in every MT6589 smartphone because of specific configs/files in the kernel source tree.
So, if you compile my kernel which is expected to work on a Faea F2S don't expect it to work on a Acer Liquid E3 for example.
Conclusion : You have to get the kernel source for your phone
How can I check my kernel source ?
Of course, this is not enough to see "source code for ZTE N986", you have to check if it's full or not and if it works.
Most people don't know what is working kernel source. You just have to read the GPL guidelines that every manufacturer have to complain with :
“ The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. ”
The part which has not to be included is the toolchain but there should reference to it (which toolchain to use)
For MT6589 kernel, the toolchains arm-eabi-4.6 and arm-linux-androideabi-4.6 should be used. (mtk used arm-linux-androideabi-4.6 for kernel but it should be arm-eabi-4.6)
So now you know which toolchain to grab and then for kernel source you have to check this minimal structure :
bionic
kernel
mediatek
build
config
custom
kernel
platformREADME
If I have kernel source, can I build it for my device ?
Erm... Sometimes the structure is here but the kernel source is messy... Why ?
Because you were not provided the matching source of the kernel used on your smartphone and the reasons are multiple (I won't give details).
So, the idea is to run a first build. If you get errors, then check the step above about toolchain and structure.
The next step for fixing errors is to play with source. Good luck for that.
What are the benefits of a custom kernel for MT6589 ?
First big benefit is to introduce kitkat compatibility because there was an issue on android binder driver in mtk kernel source.
Next benefit is to be able to remove some stuff from mtk which is useless on user side and waste ressources (a lot of debug for example).
Others benefits will be in optimizations or new features (see frandom for example)
HOWTO :
Build from my repo (specific devices supported) - It's not for compiling your kernel source but to understand how kernel build worksI explain how to build from my repo first because it can help you to understand how you should build kernel source
Prerequisites : A build environment (actually Ubuntu Saucy x64 with build-essentials, ccache, repo, java, perl v5.14+ and openssl) and I won't explain how to get one as there is multiple howto on the net.
For repo, the idea is to create a bin directory in your $HOME (usually /home/accountname/), copy repo binary inside it and then add this bin to $PATH var.
BE CAREFULL TO WHAT YOU DO WITH $PATH VAR ! I always see people doing :
Code:
export PATH=/home/foo/bin
this is erasing $PATH var, just check before and after with echo $PATH
So the idea is to introduce your path AFTER the actual $PATH var
This is easy...
Code:
export PATH=[COLOR="red"]$PATH:[/COLOR]/home/foo/bin
And of course, $PATH is reset once you close terminal and I won't explain how to set $PATH automatically.
Once you got this, everything should be working and it will be easy
Code:
mkdir workdir
cd workdir
repo init -u https://github.com/Dr-Shadow/android_kernel_mt6589_manifest.git -b master
repo sync
Then you should get this in your workdir :
kernel
manifest
mtk-tools
out
ramdisk
scripts
toolchainJust do :
Code:
cd kernel
./certificates.sh
./build.sh
./certificates.sh is needed only once (it's for signing flashable zip and it will setup some keys for it, just reply to questions and don't add passphrase)
And of course, the build.sh contains most things you need to know on steps for building kernel (which commands to use) and you need to know how it works Build from your own kernel source
I'm building the doc... I have to remind which vars need to be overriden
Reserved
Reserved #2
Thanks for making this thread brother it will help us to learn... Subscribed
Looking forward to the how-to to build with your own kernel source.
Dr-Shadow said:
Hi guys,
I was working on this since some time and here it is
Click to expand...
Click to collapse
Thank you Dr-Shadow! This is very cool. I'm going to try it out!
Great
It's always nice to see further development on MTK Based Devices.
Regards
I'll chip in and say thanks too. Finally getting around to trying to compile Alcatel's OneTouch Hero (aka TCL Y910) provided sources.
I might be in as well with A820, but I'm relatively new to Android and have only done porting of 4.1 and 4.2 so far.
Haven't built anything although I have some knowledge about the source code and SDK, which I've only used for reference purposes and the tools from it.
Will try to compile the stock kernel this weekend, but I'm not quite sure if something else is needed, even if the kernel source seems complete to me.
I'm a quick learner and have a lot of programming experience in other technologies, even thought I'm more of a front-end developer these days.
I know that this source is not Lineage but I would think the basic principles for building for an supported device under Lineage would also be applicable to any other source repository.
All of the guides I have found only tell you how to build for a supported device and not any help for an unsupported one. I figured out how to sync a suitable device tree and kernel etc but since the rom source repository does not support my device I can't go any further. I can't get it to build from my sync'd local sources it keeps trying to pull stuff from the original source repository so builds fail at the start.
I have setup a local manifest for this project that sync's the device tree and a kernel and the proprietary blobs and this sync completes without error. next I ran - source build/envsetup.sh and then brunch hlte (not a supported device I know) but that throws up this error -
build/core/product_config.mk:248: * Can not locate config makefile for product "gzosp_hlte". Stop.
Device hlte not found. Attempting to retrieve device repository from GZOSP-Devices Github (http://github.com/GZOSP-Devices).
Repository for hlte not found in the GZOSP-Devices Github repository list.
If this is in error, you may need to manually add it to your .repo/local_manifests/gzosp_manifest.xml
build/core/product_config.mk:248: * Can not locate config makefile for product "gzosp_hlte". Stop.
So I think that the error basically means that github.com/GZOSP-Devices does not have the hlte device listed so can anyone tell me how to make the build point to my local repository after I have sync'd so that it at least starts to build ?
I am a newbie to rom building and have much to learn but I would really appreciate any help you guys could give.
Thanks in advance for any an all help offered.
Before I start, here's what I have and what I don't have:
What I have:
BLU R1 PLUS
BLU R1 PLUS Kernel Source
A possible port device (An Intex Infie 3, to use the vendor from)
Experience with the linux command line
What I DO NOT have:
A kernel source for the Intex Infie 3
Now for the explaination:
I found several ARM64 devices and vendors, however the kernel source for my device is ARMv7 (even though the SoC is ARMv8).
I soon learnt that trying to build an ARM64 kernel would be a waste of time, so I decided to go searching for the needle in a haystack (which of course was another device, with android Oreo and an ARM kernel+vendor) I eventually found this Intex Infie device which I noticed did not have any arm64-related prop lines and ONLY had the zygote32 in boot.img
However I then discovered that even if the vendor would work, Marshmallow drivers in the stock kernel for the BLU R1 Plus will cause issues to boot any GSI because of the many changes between android versions AND I need "Binderised HALs"
I intend to use my cache partition as the vendor partition (which of course, I'll have to add early mount to the DTB in the kernel for)
I struggle with kernel editing and compiling as this is my first shot at developing for an unknown or unpopular device.
What I'm asking for:
I'm not asking for it to be done for me, but rather a hand that can point me in the right direction that would at least allow me to boot a GSI.