Haii guys!
So, i'm young "kernel developer".. I am actually not a coder, i just try to learn by making kernels and if they are stable enough i test them. So, till now i was working with Mako source - i had phone lg optimus g which i really close to mako and i based everything on Mako source.
Now i bought a new phone, Nexus 5. I am really satisfied by this phone on stock, but even more on custom ROM & Kernel.. But hey, it's me, i'm curious and i have to try to make stuff myself, so i choose to make my own kernel for Nexus 5.. More to learn than anything.
So, i started.. I forked this to my github and do some basic changes for me.. Just to start. I added graphite support and option to build with Linaro 4.9.4.. And i started to build. And it had some errors, so i also fixed them - fs/namespace.c error with 4.9 toolchains, so, i fixed it and it built with no trouble.
So, i was coming from world of Mako and took zImage, made a flashable zip with AnyKernel and flashed it.. And i was stuck at google logo with unlock icon. I restored twrp backup of previous kernel and started over and it booted normally...
Then i did some research and found out that i should use zImage-dtb because Nexus 5 uses something named device tree blob.. So, i did everything from scratch.
I forked same source as before, and did my changes over it.. Renamed kernel, added kernel build script, made my slightly modified defconfig, this time i used toolchain LinaroMod 4.9 from here and some other stuff.. I built with no trouble, used zImage-dtb as zImage in flashable zip as i saw in other kernels and flashed.. I was sure it will boot this time, none of those modifications was supposed to break anything.. But again, I am stuck at Google logo.
Have any of you guys any idea where i missed? Maybe wrong source? Wrong toolchain?
Here are some maybe useful links:
My source: https://github.com/Matthew-333/BlueMoon
My Changes: https://github.com/Matthew-333/BlueMoon/commits/master
Toolchain: https://github.com/hyper-toolchains/LinaroMod-arm-eabi-4.9
AnyKernel Template: https://github.com/koush/AnyKernel
I am using xUbuntu 15.04 64 bit..
Thank you if anybody manage to help me with this...
Matthew_333 said:
Haii guys!
So, i'm young "kernel developer".. I am actually not a coder, i just try to learn by making kernels and if they are stable enough i test them. So, till now i was working with Mako source - i had phone lg optimus g which i really close to mako and i based everything on Mako source.
Now i bought a new phone, Nexus 5. I am really satisfied by this phone on stock, but even more on custom ROM & Kernel.. But hey, it's me, i'm curious and i have to try to make stuff myself, so i choose to make my own kernel for Nexus 5.. More to learn than anything.
So, i started.. I forked this to my github and do some basic changes for me.. Just to start. I added graphite support and option to build with Linaro 4.9.4.. And i started to build. And it had some errors, so i also fixed them - fs/namespace.c error with 4.9 toolchains, so, i fixed it and it built with no trouble.
So, i was coming from world of Mako and took zImage, made a flashable zip with AnyKernel and flashed it.. And i was stuck at google logo with unlock icon. I restored twrp backup of previous kernel and started over and it booted normally...
Then i did some research and found out that i should use zImage-dtb because Nexus 5 uses something named device tree blob.. So, i did everything from scratch.
I forked same source as before, and did my changes over it.. Renamed kernel, added kernel build script, made my slightly modified defconfig, this time i used toolchain LinaroMod 4.9 from here and some other stuff.. I built with no trouble, used zImage-dtb as zImage in flashable zip as i saw in other kernels and flashed.. I was sure it will boot this time, none of those modifications was supposed to break anything.. But again, I am stuck at Google logo.
Have any of you guys any idea where i missed? Maybe wrong source? Wrong toolchain?
Here are some maybe useful links:
My source: https://github.com/Matthew-333/BlueMoon
My Changes: https://github.com/Matthew-333/BlueMoon/commits/master
Toolchain: https://github.com/hyper-toolchains/LinaroMod-arm-eabi-4.9
AnyKernel Template: https://github.com/koush/AnyKernel
I am using xUbuntu 15.04 64 bit..
Thank you if anybody manage to help me with this...
Click to expand...
Click to collapse
Hi, thanks for using XDA assist!
Please have a look here for some useful information:
http://forum.xda-developers.com/android/software/ultimate-guide-compile-android-kernel-t2871276
Good luck!
Related
Hey guys i need a little guidance. I'm trying to compile a SGS4G version of the CM10.1 ROM ive been building for the grouper and running in to some issues. For now Im using airfluip1's Kernel and device tree with source from CM and my Github. To narrow down the issues I swiched back to the stock 4.6 toolchain till i can get this working. It builds fine with no errors but comparing it to airfluip1's roms zip file i only have the boot.img, system folder, and META-INF folder. When i add the missing files like ex: updater.sh, modem.bin, bml_over_mtd.sh...etc wont go past the splash screen and dosent even make it to the bootanimation :crying: and i end up loseing CWM. if i switch my boot.img out with airfluip1's it fixes everything, boots right up, CWM is working properly, and the ROM is fine other than the Known CM10.1 bugs like multiple text, network issues. I never compiled a ROM that had the recovery with the boot.img and don't know if there's someting special you have to do with it to get it to work. any help is appreciated thanks guys
It might be that the latest kernel commits cause the rom not to boot. If you look up a guide on how to do a git reset in the kernel directory you might be able to compile a bootimage that works fine.
The kernel source is under
kernel/samsung/galaxys4gmtd
If you do a git log in that directory you will see the commit history with the hashes for each commit. If you do
git reset --hard sha1_hash
You can go back to a previously working commit, which might be trial and error
To speed up your testing process, instead of compiling the whole rom again you can try doing a
mka bootimage
Instead of
mka bacon
As far as the missing files, I don't have any input on that.
I'm finally back with my build rig and I finished syncing cm10.1 last night so I'll be trying to get some builds going tonight too.
FBis251 said:
It might be that the latest kernel commits cause the rom not to boot. If you look up a guide on how to do a git reset in the kernel directory you might be able to compile a bootimage that works fine.
The kernel source is under
kernel/samsung/galaxys4gmtd
If you do a git log in that directory you will see the commit history with the hashes for each commit. If you do
git reset --hard sha1_hash
You can go back to a previously working commit, which might be trial and error
To speed up your testing process, instead of compiling the whole rom again you can try doing a
mka bootimage
Instead of
mka bacon
As far as the missing files, I don't have any input on that.
I'm finally back with my build rig and I finished syncing cm10.1 last night so I'll be trying to get some builds going tonight too.
Click to expand...
Click to collapse
Thanks for the reply ... I've been having this issue for almost a week.. I might have set it up wrong I've been just doing brunch galaxys4gmtd to start the build. I'll have to look into mka. Should the kernel source be in kernel/samsung/galaxys4gmtd? In his device/samsung/galaxys4gmtd/BoardConfig.mk its targeting the kernel source to kernel/samsung/aries so that where I put it
EDIT: Was just set up weird by me...had to re add the vendersetup.sh back that he deleted from the device tree, did a lunch full_galaxys4gmtd-userdebug, then brunch galaxys4gmtd, and it compiled fine with the files I was missing and the kernel booted :beer:
Sent from my Nexus7 using Tapatalk HD
DJLamontagneIII said:
Thanks for the reply ... I've been having this issue for almost a week.. I might have set it up wrong I've been just doing brunch galaxys4gmtd to start the build. I'll have to look into mka. Should the kernel source be in kernel/samsung/galaxys4gmtd? In his device/samsung/galaxys4gmtd/BoardConfig.mk its targeting the kernel source to kernel/samsung/aries so that where I put it
EDIT: Was just set up weird by me...had to re add the vendersetup.sh back that he deleted from the device tree, did a lunch full_galaxys4gmtd-userdebug, then brunch galaxys4gmtd, and it compiled fine with the files I was missing and the kernel booted :beer:
Sent from my Nexus7 using Tapatalk HD
Click to expand...
Click to collapse
Awesome, I'm glad you got it working. . I haven't tried an aries build yet, but yes BoardConfig.mk is correct. You should try doing:
lunch cm_galaxys4gmtd-userdebug
mka bacon
I'm not sure, but the full_ prefix might be preventing the files that help flash the rom to be included with the zip file.
good job.
Also, yes kernel should be in kernel/samsung/aries.
EDIT: it is a smart decision not to use my airfluip1 stuff, and rather those from teamuserdebug.
Why, well, my latest kernel tree was only used to pull request to anak1n, so it is not even the kernel with my changes. So FFC/Compass/latests fixes won't be there.
Also, you might be using the common aries common from cyanogenmod... FFC from device tree side will be borked, and Aries Parts won't work.
Please use teamuserdebugs repos.
---------- Post added at 10:10 PM ---------- Previous post was at 10:05 PM ----------
FBis251 said:
Awesome, I'm glad you got it working. . I haven't tried an aries build yet, but yes BoardConfig.mk is correct. You should try doing:
lunch cm_galaxys4gmtd-userdebug
mka bacon
I'm not sure, but the full_ prefix might be preventing the files that help flash the rom to be included with the zip file.
Click to expand...
Click to collapse
Or brunch cm_galaxys4gmtd-eng
which runs both commands, and the eng builds are better since you have a debuggable kernel.
Thanks for the tip i used team userdebug's repos and roms been running great haven't had time to mess with the updated toolchains yet but il have something up to play with in a day or two
Sent from my SGH-T959V using Tapatalk 4 Beta
Ok, I'm trying to do something fun with my phone... (Hisense EG909 MSM8625)
Since hisense is keeping the source code, so I'm trying to build the source from codeaurora.org ics branch M8625SSNSKMLYA1015 (to keep the same version with my current stock ROM)
I've successfully compiled the kernel with the ndk but I'm stuck on getting it to boot.
It just show the carrier logo (bootloader). I can't get the bootanimation to load.
I'm not expecting things like wifi / bluetooth or even the radio works... but I'm just trying to at least get it to boot the launcher
I have experience in c/c++ but I know nothing about android and just started to learn it...
Can anyone point me on how to debug or see what's wrong with the kernel?
Is there any way to show something on the screen? I mean turning on the frame buffer
I've search and tried many method like altering the command line "console=tty0", adding "CONFIG_MSM_FRAMEBUFFER", etc..
but seems like nothing works, it just stuck there...
the way I build is:
1. downloading code from caf
2. pulled config.gz from my working phone... but it require some hisense stuff. so I'm using the configs that come with the code
3. tried both msm7627a_defconfig and msm7627a-perf_defconfig,
4. extract current working boot.img
5. substitute the kernel with my compiled zImage, and repack the boot.img
Am I missing something here?
million thanks for your help...
Looks like you are missing some hardware drivers. Why not find the lines in defconfig mentioning "hisense stuff" and search at Google or "searchcode.org" to see if drivers are available. And then patch your source as necessary.
sharonsym said:
Ok, I'm trying to do something fun with my phone... (Hisense EG909 MSM8625)
Since hisense is keeping the source code, so I'm trying to build the source from codeaurora.org ics branch M8625SSNSKMLYA1015 (to keep the same version with my current stock ROM)
I've successfully compiled the kernel with the ndk but I'm stuck on getting it to boot.
It just show the carrier logo (bootloader). I can't get the bootanimation to load.
I'm not expecting things like wifi / bluetooth or even the radio works... but I'm just trying to at least get it to boot the launcher
I have experience in c/c++ but I know nothing about android and just started to learn it...
Can anyone point me on how to debug or see what's wrong with the kernel?
Is there any way to show something on the screen? I mean turning on the frame buffer
I've search and tried many method like altering the command line "console=tty0", adding "CONFIG_MSM_FRAMEBUFFER", etc..
but seems like nothing works, it just stuck there...
the way I build is:
1. downloading code from caf
2. pulled config.gz from my working phone... but it require some hisense stuff. so I'm using the configs that come with the code
3. tried both msm7627a_defconfig and msm7627a-perf_defconfig,
4. extract current working boot.img
5. substitute the kernel with my compiled zImage, and repack the boot.img
Am I missing something here?
million thanks for your help...
Click to expand...
Click to collapse
if you can't extract original defconfig (config.gz) from device, it would be hard to have bootable kernel.
Sent from my Oppo N1 using Tapatalk
Haii guys!
So, i'm young "kernel developer".. I am actually not a coder, i just try to learn by making kernels and if they are stable enough i test them. So, till now i was working with Mako source - i had phone lg optimus g which i really close to mako and i based everything on Mako source.
Now i bought a new phone, Nexus 5. I am really satisfied by this phone on stock, but even more on custom ROM & Kernel.. But hey, it's me, i'm curious and i have to try to make stuff myself, so i choose to make my own kernel for Nexus 5.. More to learn than anything.
So, i started.. I forked this to my github and do some basic changes for me.. Just to start. I added graphite support and option to build with Linaro 4.9.4.. And i started to build. And it had some errors, so i also fixed them - fs/namespace.c error with 4.9 toolchains, so, i fixed it and it built with no trouble.
So, i was coming from world of Mako and took zImage, made a flashable zip with AnyKernel and flashed it.. And i was stuck at google logo with unlock icon. I restored twrp backup of previous kernel and started over and it booted normally...
Then i did some research and found out that i should use zImage-dtb because Nexus 5 uses something named device tree blob.. So, i did everything from scratch.
I forked same source as before, and did my changes over it.. Renamed kernel, added kernel build script, made my slightly modified defconfig, this time i used toolchain LinaroMod 4.9 from here and some other stuff.. I built with no trouble, used zImage-dtb as zImage in flashable zip as i saw in other kernels and flashed.. I was sure it will boot this time, none of those modifications was supposed to break anything.. But again, I am stuck at Google logo.
Have any of you guys any idea where i missed? Maybe wrong source? Wrong toolchain?
Here are some maybe useful links:
My source: https://github.com/Matthew-333/BlueMoon
My Changes: https://github.com/Matthew-333/BlueMoon/commits/master
Toolchain: https://github.com/hyper-toolchains/LinaroMod-arm-eabi-4.9
AnyKernel Template: https://github.com/koush/AnyKernel
I am using xUbuntu 15.04 64 bit..
Thank you if anybody manage to help me with this...
Hi all. I have Questions for compiling a Kernel
I got a little bit know-how of how to compile a Kernel. I´m a beginner, and my first time imy first training was to download source, get toolchain, take an working kernel (for me it was BlueBolt OnePlus2 Kernel Oreo 8.0)
I compiled the kernel, and it start booting. After all works, i add a scheduler, and cpu governor. Compiled, and it is working. Now, and here comes the problem. Now, i want to learn to compile my self a kernel.
I downloaded Blue Bolt kernel source for 8.1. Test it with his defconfig. Works. Ok. So, how to start now. There are many defconfigs (msm8994_defconfig, msm8994_oneplus2_defconfig, msm8994-OnePlus2-perf_defconfig, msm8994-perf_defconfig). What defconfig it the right to start? I took the msm8994_oneplus2_defconfig (compiled with no errors), but phone doesn´t boot.
-How do i start to make it work?
-Why there are mulitple defconfig?
-After compiling there is no error. Why it doesnt boot?
-And when you got errors, how do you find the problem, and how do you correct them?
Hope someone could explain me a little bit how to start.
Thx
I thought I have successfully ported kernel source for my lyf wind 3 from yu yuniqe but when the rom booted I noticed Touchscreen was not working.
I thought to add goodix-TS drivers in /driver/input/Touchscreen then I realised that my phone uses gt915l driver(from defconfig extracted from stock kernel). So found drivers added from redmi 5a (got lots of errors while compiling but fixed them all. Again booted the rom still not Touchscreen working. Again opened defconfig and found my phone uses another ty_gt9xx drivers.Copied them from blustudio5qcom and put them in the same folder. Included them in kconfig and makefile.
But got lots of errors this time.the errors didn't stopped. Fixed one got one. After so much tries I fixed it also.
Another time booted rom found still the Touchscreen not working. Gone through the defconfig there was no other drivers than these. ?
Please if any experienced person is reading this just comment down a solution. May it work and you may owe my thanks. By the way,if I can fix this I can have many ROMs for my device.
Thanks in advance!
Solution Found !!!
If someday I will fix it would share in this comment.
If not i will write nevert port a kernel source for a device which do not have.
First extract the defconfig from stock kernel
Seach for "Touchscreen"
Notice the drivers and search for it on GitHub.
Merge into your kernel/drivers/input/Touchscreen/
Paste the drivers folder there and add them in kconfig and Makefile
DONE ?
BOOTED Roms from lollipop to Android 10 using the kernel source. ?
XD
Amit Kumar R said:
I thought I have successfully ported kernel source for my lyf wind 3 from yu yuniqe but when the rom booted I noticed Touchscreen was not working.
I thought to add goodix-TS drivers in /driver/input/Touchscreen then I realised that my phone uses gt915l driver(from defconfig extracted from stock kernel). So found drivers added from redmi 5a (got lots of errors while compiling but fixed them all. Again booted the rom still not Touchscreen working. Again opened defconfig and found my phone uses another ty_gt9xx drivers.Copied them from blustudio5qcom and put them in the same folder. Included them in kconfig and makefile.
But got lots of errors this time.the errors didn't stopped. Fixed one got one. After so much tries I fixed it also.
Another time booted rom found still the Touchscreen not working. Gone through the defconfig there was no other drivers than these. [emoji3064]
Please if any experienced person is reading this just comment down a solution. May it work and you may owe my thanks. By the way,if I can fix this I can have many ROMs for my device.
Thanks in advance!
Click to expand...
Click to collapse
I don't think that can be done by porting the kernel, you'll probably have to compile a new kernel from source with the additions added to the lyf wind 3 kernel source code before you compile the kernel.
I'm not a kernel developer, but, I do know that editing an existing kernel file, in general, doesn't allow you to get to what really needs to be changed. Typically, it requires building a new kernel from the ground up with the necessary changes added during the build/compiling process.
Sent from my SM-S767VL using Tapatalk
Solution Found !!!
See the second post