How to port a new kernel - General Questions and Answers

Hi ,
I have and old msm7225 device , and development on xda has stopped . obviously everyone have bought a new phone ( me too ) , and nobody cares about it .
since i am not using it as my everyday phone , i want to bring a new kernel for it . It currently has a 2.6.32 kernel , and i want to port 2.6.35 or .38 .
i have some knowledge about kernels ,i have done some additions to the current kernel and i can fix most of the compilation errors that i will face ( i've tried it before ) , but i don't know what it needs to make it boot .
i don't expect a full working kernel , just boot and screen working , and then i'll start to fix the rest , one by one .
thnx

TakisBeskos said:
Hi ,
I have and old msm7225 device , and development on xda has stopped . obviously everyone have bought a new phone ( me too ) , and nobody cares about it .
since i am not using it as my everyday phone , i want to bring a new kernel for it . It currently has a 2.6.32 kernel , and i want to port 2.6.35 or .38 .
i have some knowledge about kernels ,i have done some additions to the current kernel and i can fix most of the compilation errors that i will face ( i've tried it before ) , but i don't know what it needs to make it boot .
i don't expect a full working kernel , just boot and screen working , and then i'll start to fix the rest , one by one .
thnx
Click to expand...
Click to collapse
For that you will have to patch your kernel upstream. Search for upstream patches of the specific kernel from CAF.. or some other devices must have patched it... who's source you may find on xda or on github.
If you are looking to port kernel 3.x.x .. then HTC Explorer ( which has Msm7225a ) also runs kernel 3.0.100 so you check out its kernel source that is probably the closest device you will get apart from HTC Golfu
There are no guides as such. Basic knowledge on C/C++ is required as well as good knowledge on the linux kernel and you will have to read in depth its documentation.
http://kernelnewbies.org/ is a good site to gain some knowledge on the subject.

Red Devil said:
For that you will have to patch your kernel upstream. Search for upstream patches of the specific kernel from CAF.. or some other devices must have patched it... who's source you may find on xda or on github.
If you are looking to port kernel 3.x.x .. then HTC Explorer ( which has Msm7225a ) also runs kernel 3.0.100 so you check out its kernel source that is probably the closest device you will get apart from HTC Golfu
There are no guides as such. Basic knowledge on C/C++ is required as well as good knowledge on the linux kernel and you will have to read in depth its documentation.
http://kernelnewbies.org/ is a good site to gain some knowledge on the subject.
Click to expand...
Click to collapse
htc explorer has msm7225a which is armV7 with adreno 200 . msm7225 is armv6 without gpu (like htc buzz which has 2.6.35 kernel ).
I am not a total noob in kernels , i can port some features and fix some problems on my existing kernel .
but i want to experiment , on new kernel

Related

[HUAWEI U8100/U8110/U8120] Froyo Kernel Development / Porting (Your help needed!)

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?

[Q] Android kernel programming

Hi All
I am a newbi to kernel programming , especially to android kernel.
Can you tell me some good places on the net , that can be great sources for getting in touch with that thing.
I want to become familiar with the android kernel , dalvic etc. ( I speak english and german )
thanks in advance.
Sz_gergo
I am too interested in this subject. I am learning slowly as and when I get time.
kernelnewbies.org
Generally good resource for starting out learning linux kernel
(Which is what the android is built off of)
android.git.kernel.org
Android Kernel Source
lwn.net/Kernel/LDD3/
Online guide to driver development among many other related topics.
pdk.android.com
This guide provides an under-the-hood introduction to the Android platform, and is designed for platform developers and manufacturers building Android-powered devices.
Sorry for not providing the links...xda won't allow me to post links since I have less posts.
Android kernel
Dear All
as i understand, the android kernel source, what you can download from Google , should be enough for building a new kernel to some phone.
If i am right, does that mean that the Linux kernel sources are already included?
Or am i totally wrong?
Thanks for your answers
I am also interested in learning the Kernel Development and ROM development. Can Any one Help.
sz_gergo;11673408 begin_of_the_skype_highlighting 11673408 end_of_the_skype_highlighting said:
Dear All
as i understand, the android kernel source, what you can download from Google , should be enough for building a new kernel to some phone.
If i am right, does that mean that the Linux kernel sources are already included?
Or am i totally wrong?
Thanks for your answers
Click to expand...
Click to collapse
I have the answere for the question above.
After i have inspected the Android kernel sources, it came out, that i have been right.The only source you need for creating a new kernel for a phone, is the complete android kernel.
The linux kernel is allready included.
I think if you want to build a kernel, specific for your phone. you have to overwrite the default dirs with the specific sources of your phone. If it is not allready done by others.
Android Kernel
Hi,
We need to distinguish between Linux and Android. Android was forked from Linux, and now those are managed as separate products. Android usually takes the updates from linux, but there are features in Android which Linux refused to get (such as wakelocks).
So the android kernel source includes all needed to build a working kernel.

Porting kernel 2.6.35 to other devices

hello @all,
where can i get some informations of how to port a kernel to a specified device?
i'll try to port the kernel 2.6.35 to a LG-P500 device, but i don't know what i MUST do for this.
have just copied some LG drivers files from kernel .32 to .35, made modifications in GPIO (GPIO calls has changed) and registered the device in Kconfig, Makefiles and includes/defines - but i think this can't be all what i have to do
does exist a android kernel mailing list or a howto port a kernel in general somewhere?
Greets & thanks
Another anything known about this in the last year BUMP

Wondermedia WM8880 SoC TABLET's - JB/KK ROM and KERNEL+Recovery's Development

Code:
#include
/*
* I am not responsible for bricked devices, dead SD cards, thermonuclear
* war, or the current economic crisis caused by you following these
* directions. So don't be an *** ****
*/
hi.. i'm already started make some modifications on ROM with other Brazilian DEV's for "Evertek S.A - SKMtek Genesis Tab GT7305"... we already found the source kernel from another Netbook or Development Board PC who uses the same SOC... but nothing already have been maked to kernel, we use the provided kernel from stock (Kernel 3.4.5+)... and about the ROM we already have two custom ROM's... One is Stock Modded (4.2.2) and another is KitKat Ported ROM from another Evertek Device... *Portuguese-Brazil Language Site/Forum
And we already make some modifications to this KK port...
- ROOT
- BusyBox
- Init.D support
- Build.Prop Mods
- SuperUser
- zipalign apps after boot
.. and other mods.
we already make too much on ROM but nothing about kernel... we want make a better kernel with optimizations and a better TCP/Clock Table, More Governors , More I/O Scheduler and maybe Overclock to 1600mhz to start after have a custom Kernel booting...
Now we need someone who understand about recovery's like CWM or TWRP and Kernel Compilation better than me to we can start make something awesome =D i think this can be used to another company's/Chinese tablets too, using the same SOC (WM8880) evidently... . . . (Found^^Working^^Recovery's)
i can't start testing here because if i flash this kernel using the Stock Recovery (WonderMedia Recovery tool) maybe i can possible brick my tablet... so if someone understand about CMW recovery to start would be nice =D
Update Progress / ChangeLog ¬
Code:
# 25/12:
- [STRIKE]Found Possible match [URL="http://forum.xda-developers.com/showthread.php?t=2305268"]CWM port[/URL] from [URL="http://forum.xda-developers.com/showthread.php?t=2216390"]Asus MeMo Pad 7{ME172V}[/URL] on XDA Forum[/STRIKE] #NOPE...
- FOUND WOKING [URL="http://blog.hadi-cpu.com/2013/09/cwm-recovery-6036-w8850-rc2.html"]CWM Recovery[/URL] from Malasya Blog from Generic WM8850 SOC tablet , Founded [URL="http://blog.hadi-cpu.com/2013/10/twrp-touch-wondermedia-wm8850-jb-version.html"]TWRP recovery[/URL] too but not tested (Thanks to #Rollidark to notify me about and #osinaldi to discover that from malasya blog) [Mirrors -> [URL="https://www.4shared.com/rar/2POyc0B0ba/CWM_WM8850_NSFAT-RC2.htm?sop=true"]CMW[/URL] -> [URL="https://www.4shared.com/rar/rJBfUTQF/TWRP-JB-NSFAT-WM8850.htm"]TWRP[/URL]] // [URL="https://www.facebook.com/groups/NewSmartFrenAndroTab/"]Facebook Group of Recovery Developers[/URL]
- Studying some way to introduce the missing Touch driver to kernel from [URL="https://gist.github.com/psachin"]psachin Github[/URL]|[URL="http://cdn.liliputing.com/wp-content/uploads/2013/01/rock_02.jpg"]apc-rock-II-[/URL]|[URL="https://github.com/psachin/apc-rock-II-kernel"]kernel[/URL] how already modded the Source to work with [URL="http://tinyurl.com/oqxmuam"]Generic Netbook[/URL] who uses the same SOC
-- Merry Christmas to #ALL
# ?? to 23~24/12:
- ROM JB and KK + ADV. Patch developed by Brazilian Dev's team
- found Source Kernel to WM8880 SoC
Brazilian Developers who already help this projects from forum - genesiseries :
Code:
# KK ROM:
- #paulomsilva2006 {KitKat ROM Port}
- #Rollidark {KitKat Patch}
- #Wcfuria
- #? - Pedro Alves
- #? - Pedro Victor
- #? - Walter Moretti
- #? - Moises Teixeira
Code:
# JB Stock ROM:
- #ylukasy {ROM Dev.}
- #Rollidark
- #paulomsilva2006
- +?
if i forget someone.. please comment below :highfive:
Reserved
wow there's only a handful on and off development going on for this SoC, I still keep my WM8880 tablet just in case somebody made a breakthrough in doing Custom ROM or even getting real ubuntu/debian to boot natively... are you still on this?
funtikar said:
wow there's only a handful on and off development going on for this SoC, I still keep my WM8880 tablet just in case somebody made a breakthrough in doing Custom ROM or even getting real ubuntu/debian to boot natively... are you still on this?
Click to expand...
Click to collapse
just a few Brazilian and Malasya Developers still make progress with this SoC... if you want to try install the custom ROM´s i have shared upper topic.. it will be by your won and I am not responsible for bricked devices...
i´m already started make progress with Custom Kernel but i need found the touch screen driver source and re-work the sound driver(Alsa Drivers...) and compile the recovery with kernel too.. to than have some trust on my work to flash it on tablet =#
:highfive:
DvDwx. said:
just a few Brazilian and Malasya Developers still make progress with this SoC... if you want to try install the custom ROM´s i have shared upper topic.. it will be by your won and I am not responsible for bricked devices...
i´m already started make progress with Custom Kernel but i need found the touch screen driver source and re-work the sound driver(Alsa Drivers...) and compile the recovery with kernel too.. to than have some trust on my work to flash it on tablet =#
:highfive:
Click to expand...
Click to collapse
meh, its my rom testing ground anyway not really worried .. i actually have the tablet connect directly from the battery wires(the battery removed) to the adapter(usb)... anything is better than nothing for the development hehe...wait by Malasya do u mean Malaysia? whos that developer lol..
funtikar said:
meh, its my rom testing ground anyway not really worried .. i actually have the tablet connect directly from the battery wires(the battery removed) to the adapter(usb)... anything is better than nothing for the development hehe...wait by Malasya do u mean Malaysia? whos that developer lol..
Click to expand...
Click to collapse
i mean Malaysia.. the country... because i don't have found the real developer.. only the Facebook's group where it have been shared... i write too fast and don't check if i write it correct too...
--
i Already compile the kernel with CMW recovery and flashed on tablet ... but i need find the Touchpad driver to make he work properly... i stay getting some other minor issues on logcat/kmsg reports...
but i already test four touch drivers and anyone works... only OTG stay working.. that is the problem on developing the kernel without the official source release by the producer company... maybe i will need close this developing project because that =/
DvDwx. said:
i mean Malaysia.. the country... because i don't have found the real developer.. only the Facebook's group where it have been shared... i write too fast and don't check if i write it correct too...
--
i Already compile the kernel with CMW recovery and flashed on tablet ... but i need find the Touchpad driver to make he work properly... i stay getting some other minor issues on logcat/kmsg reports...
but i already test four touch drivers and anyone works... only OTG stay working.. that is the problem on developing the kernel without the official source release by the producer company... maybe i will need close this developing project because that =/
Click to expand...
Click to collapse
what a coincidence , I was wondering today when you will reply lol
ah I see too bad, maybe you will share it at techknowme forum, ... wow Malaysian ?, Im asking because I'm Malaysian, can you pm me the link where its shared?
DvDwx. said:
i mean Malaysia.. the country... because i don't have found the real developer.. only the Facebook's group where it have been shared... i write too fast and don't check if i write it correct too...
--
i Already compile the kernel with CMW recovery and flashed on tablet ... but i need find the Touchpad driver to make he work properly... i stay getting some other minor issues on logcat/kmsg reports...
but i already test four touch drivers and anyone works... only OTG stay working.. that is the problem on developing the kernel without the official source release by the producer company... maybe i will need close this developing project because that =/
Click to expand...
Click to collapse
please continue developing this project..i have using acer b1 740 and it dont have android 4.4 update
tuyenat3 said:
please continue developing this project..i have using acer b1 740 and it dont have android 4.4 update
Click to expand...
Click to collapse
man... i just don't want blame anyone but... to we can do something to your tablet we need the kernel source and that don't stay open to developers... on this Chinese tablets we have some little configurations to can work with... but the custom kernel project i need to abandon for two reasons... first i don't have much time to can work to create a stable and functional custom kernel to everyone... second i don't have a kernel source compatible with tablets... what i found is from a electronics engineering Project computer Board ... and to it can fit on tablet is missing too much drivers compatibles with to can work smoothly and functional... someday if i found a new source maybe i can try comeback developer something to that =#
please continue developing this project
I use a genesis 7305 his kernel is very poorly optimized would like to make this usable tablet sorry for my bad English I use Google translator ;-;
2021... I tried to put a Chinese rom, but I brick the tablet, it only responds to fastboot, when I put the sudo command fastboot flash:raw boot uzImage.bin ramdisk.bin and plug in the charger and press power it appears a genesis screen.
Boot FOSSEE-OS from SCARD | FOSSEE-Laptop
laptop.fossee.in
GitHub - FOSSEE/FOSSEE-netbook-kernel-source: A low cost fossee-laptop based on wm8880 ARMv7 SoC
A low cost fossee-laptop based on wm8880 ARMv7 SoC - GitHub - FOSSEE/FOSSEE-netbook-kernel-source: A low cost fossee-laptop based on wm8880 ARMv7 SoC
github.com

How to port rom from HTC sensation?

I have an One s with S3 processer(villeC2).
Its specs are similar to sensation(with same cpu and screen resolution),but sensation has Android 7.1 ROM and one s only 4.4......
I would like to port a ROM for it from sensation.
Does anyone know how to do that?
Or if it is possible ?
(sorry for my bad english)
(my first post)
Some info !
Hi,
Actually I'm new in building roms and kernels, too. But i can share some info with you.
For starting this tutorial may be helpful: [Guide] Compile 4.2 & 4.3 & 4.4 Roms for villec2
As you can see, you will need "device", "vendor" and "kernel" source to build a rom.
Usually you can find source code of roms and kernels in xda threads and can start from those.
For example for Android 7.1 you can use RROS vendor and VilleC2 device and kernel sources. (Note: i don't know are these examples compatible or not?!)
And for kernel, maybe you has to upstream the kernel source to be compatible with new version of android that you want to build.
Good luck.
-----------------------------------
Edit:
After Compiling for myself, i figured out Vendor files for choosed rom (Lineage, RR, ..) will be included by their manifest files automatically. so for "Vendor" part in "local_manifest.xml" (or newer "local_manifests/roomservice.xml") we need to assign "proprietary_vendor" files related to our devices. "proprietary_vendor" files can be extracted manully if there isn't any online source.
one more useful guide: [GUIDE]Building any ROM from source for HTC One S aka ville!

Categories

Resources