Porting kernel 2.6.35 to other devices - Android Software/Hacking General [Developers Only]

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

Related

Anyone compiled 2.6.27 from HTC source?

I'm trying to compile the source (from the Sapphire link), but am running into compile errors in the iptables/netfilter subsystem
Seems there are filename case issues.. Which I resolved, but now getting an undefined symbol IPT_DSCP_MASK
It's not defined anywhere in the kernel source.
----
Subsequently tried the hero source and get
http://member.america.htc.com/download/RomCode/Source_and_Binaries/kernel_hero_0078c992.tar.bz2
This fails on undefd:
CC arch/arm/mach-msm/htc_battery.o
arch/arm/mach-msm/htc_battery.c: In function 'htc_set_smem_cable_type':
arch/arm/mach-msm/htc_battery.c:405: error: 'ENOTSUP' undeclared (first use in this function)
----
Can HTC really say that they released the source when it won't compile out of the box?
Anyone else have these issues?
Apparently, no one ever compiled the 2.6.27 kernel... simply amazing! (well, also, everybody is doing their stuff for their specific device, so you'll have to ask around in multiple forums like Dream, Hero, Nexus, etc.)
I didn't either.. but here is a nice starter guide.
The errors you get are probably due to missing files (they are available from your device).
In that starter guide he is building android itself, not the kernel...
I've been through every kernel build doc that google can reference...
The errors could be due to missing files... Why they are a missing is a mystery; as the kernel sources were those officially released by HTC for the device...
I even replaced the .config with that from my device.
Will try to pull a 2.6.27 kernel from the git this weekend and go at it again...
magicdroid said:
Apparently, no one ever compiled the 2.6.27 kernel... simply amazing! (well, also, everybody is doing their stuff for their specific device, so you'll have to ask around in multiple forums like Dream, Hero, Nexus, etc.)
I didn't either.. but here is a nice starter guide.
The errors you get are probably due to missing files (they are available from your device).
Click to expand...
Click to collapse
Stupid HTC kernel source...
I tried dozens of times to get it to compile and it never wanted to work.
Try this kernel source. Works for HTC Magic 6.35 radio and the HTC Hero (different .config)
http://github.com/cursordroid/HTC-CCR-Kernel
Thanks CD,
I was trying to compile for the old radio/SPL... There is an interlacing issue we are running into with this 32A on 2.6.29 so I want to build s 2.6.27 as it is supposed to be ok there, then figure out what has changed; or what is the difference with the board/chip variant in this version of the Rogers 32A...
Thx!
Kernels 32A
Questions for the enlightened:
1) If I want to build a Donut rom for the 32A, I need to compile a 2.6.29 kernel?
2) And if I want to build an Eclair rom for the 32A, I need to compile a 2.6.30+ kernel?
3) And these specific kernels need to be configured (forward-ported) for the 32A?
I think I'm getting there.. or not?
magicdroid said:
Questions for the enlightened:
1) If I want to build a Donut rom for the 32A, I need to compile a 2.6.29 kernel?
2) And if I want to build an Eclair rom for the 32A, I need to compile a 2.6.30+ kernel?
3) And these specific kernels need to be configured (forward-ported) for the 32A?
I think I'm getting there.. or not?
Click to expand...
Click to collapse
Donut and Eclair both require 2.6.29 kernels.
Eclair can run on a 2.6.30+ kernel
And you're right, we need specific kernel source for the 32A to get 2.6.29 or higher kernels.
Thanks for the input Cursor!
Maybe I'm wrong, but it seems to me that Magic kernel development is something that is mostly done solo. I know there are custom kernel sources available, but you have like a dozen to choose from, there doesn't seem to be any (community) effort to build one single kernel that could be used for all roms.
Wouldn't it help getting more result if people just would share their precious little spare-time and work together?
I'm thinking of starting an xda-msm-2.6.29 branch based on android-msm-2.6.29-donut..
Wait.. that would be yet another branch

[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?

(DEV-WIP) Updated Device Tree for JB 4.2.2

Hi guys first sorry for post in this forum, i no have permission for write in the dev forum.
recently i get this terminal and i know it have a omap4430 and sgx540, so this hardware its similar to the galaxy nexus but jellybean 4.1.2 and 4.2.2 for my works horrible lag and unresponsive, and also something related to a fps issue that make the ui super slow.
so im working and trying to make a updated and revamped device tree for the lge p920 for jb 4.2.2, that include updated powervrsgx 540 modules and propietary drivers update to the lasted 4AJ.2.5, hwc, gralloc, libionpower, domx, libion, bltsville, etc etc. from omapzoom
at this moment i manage to get the updates for the omap44x from omapzoom, and also update the boardconfig for the new sources, its fully buildeable but at this time its not booteable and for my side adb no works for debug it.
so i have propose to all devs here for work together and try to make this work, im not a kernel dev, and my pc its so slow take 5 hours to compile the source. so for all devs here want to help and compile it for trying
this its de device tree:
github.com/samuaz/android_device_lge_p920
and also you need the updated propietary vendor:
github.com/samuaz/proprietary_vendor_lge
it can be buildable with cm10.1, aokp, pacman or whatever 4.2.2 rom
this week i try to rebuild it with a other pvrsources and boardconfig for try to make it booteable
and sorry for my english im spanish
thanks to all
it would be much easier to help you if you would fork a repo and then update the files with a new commit per file
so we can see what you've changed to what
eduzvargas said:
Hi guys first sorry for post in this forum, i no have permission for write in the dev forum.
recently i get this terminal and i know it have a omap4430 and sgx540, so this hardware its similar to the galaxy nexus but jellybean 4.1.2 and 4.2.2 for my works horrible lag and unresponsive, and also something related to a fps issue that make the ui super slow.
so im working and trying to make a updated and revamped device tree for the lge p920 for jb 4.2.2, that include updated powervrsgx 540 modules and propietary drivers update to the lasted 4AJ.2.5, hwc, gralloc, libionpower, domx, libion, bltsville, etc etc. from omapzoom
at this moment i manage to get the updates for the omap44x from omapzoom, and also update the boardconfig for the new sources, its fully buildeable but at this time its not booteable and for my side adb no works for debug it.
so i have propose to all devs here for work together and try to make this work, im not a kernel dev, and my pc its so slow take 5 hours to compile the source. so for all devs here want to help and compile it for trying
this its de device tree:
github.com/samuaz/android_device_lge_p920
and also you need the updated propietary vendor:
github.com/samuaz/proprietary_vendor_lge
it can be buildable with cm10.1, aokp, pacman or whatever 4.2.2 rom
this week i try to rebuild it with a other pvrsources and boardconfig for try to make it booteable
and sorry for my english im spanish
thanks to all
Click to expand...
Click to collapse
how far did you get with this.
in relation to hwc the ics kernel will not cut it there stuff missing i attempted to merge P920 with 3.0.31 kernel from P760
https://mega.co.nz/#!VQQw3BDS!OaeDOEaGSNE36-2ZylQVexGKqIEyrVXMSOBzH7JO2Is
need to fix errors
changes need to happen in
kernel/sound/soc/omap/omap-mcbsp.c
kernel/sound/soc/omap/omap-abe.c
kernel/include/linux/muic/muic.h
kernel/include/linux/fuel_gauge_max17043.h
kernel/include/linux/i2c/twl.h
kernel/include/linux/input/lge_touch_core.h
kernel/include/linux/i2c.h
kernel/include/linux/input.h
kernel/include/linux/cosmo/cosmo_muic.h
kernel/include/video/dsscomp.h
kernel/include/video/omapdss.h
kernel/include/net/ip6_fib.h
kernel/include/config/auto.conf
kernel/include/generated/mach-types.h
kernel/include/generated/autoconf.h
kernel/arch/arm/mach-omap2/hsmmc.c
kernel/arch/arm/mach-omap2/include/mach/lpddr2-elpida.h
kernel/arch/arm/mach-omap2/remoteproc.c
kernel/arch/arm/mach-omap2/prm44xx.c
kernel/arch/arm/mach-omap2/omap4_ion.c
kernel/arch/arm/mach-omap2/gpio.c
kernel/arch/arm/mach-omap2/lpddr2_elpida_data.c
kernel/arch/arm/mach-omap2/omap4_ion.h
kernel/arch/arm/mach-omap2/omap4-reboot-reason.c
kernel/arch/arm/mach-omap2/pm44xx.c
kernel/arch/arm/mach-omap2/lge/include/lge/board/cosmo.h
kernel/arch/arm/mach-omap2/lge/include/lge/board.h
kernel/arch/arm/mach-omap2/lge/Makefile.board
kernel/arch/arm/mach-omap2/lge/lge-common.c
kernel/arch/arm/mach-omap2/lge/cosmo/cosmo_i2c.c
kernel/arch/arm/mach-omap2/lge/cosmo/cosmo_keypad.c
kernel/arch/arm/mach-omap2/lge/cosmo/cosmo_cmdline.c
kernel/arch/arm/mach-omap2/lge/cosmo/cosmo_pdev.c
kernel/arch/arm/mach-omap2/lge/cosmo/cosmo_display.c
kernel/arch/arm/mach-omap2/lge/cosmo/cosmo_mmc.c
kernel/arch/arm/mach-omap2/lge/cosmo/cosmo.c
kernel/arch/arm/configs/cyanogenmod_p920_defconfig
kernel/arch/arm/configs/cosmo_su760_defconfig
kernel/arch/arm/configs/cosmo_p920_defconfig
kernel/arch/arm/plat-omap/Makefile
kernel/fs/proc/base.c
kernel/kernel/timer.c
kernel/drivers/omap_hsi/hsi_driver.h
kernel/drivers/omap_hsi/xmd-tty.c
kernel/drivers/omap_hsi/xmd-hsi-ll.c
kernel/drivers/omap_hsi/hsi_driver_int.c
kernel/drivers/omap_hsi/xmd-hsi-ll-cfg.h
kernel/drivers/omap_hsi/Makefile
kernel/drivers/omap_hsi/xmd-ch.h
kernel/drivers/omap_hsi/hsi_driver.c
kernel/drivers/mmc/core/sd.c
kernel/drivers/video/omap2/displays/panel-lh430wv4-sd02.c
kernel/drivers/video/omap2/displays/panel-lh430wv2-sd01.c
kernel/drivers/video/omap2/dsscomp/dsscomp_adapt.c
kernel/drivers/video/omap2/dsscomp/gralloc.c
kernel/drivers/video/omap2/dsscomp/queue.c
kernel/drivers/video/omap2/dsscomp/device.c
kernel/drivers/video/omap2/vram.c
kernel/drivers/video/omap2/dss/dispc.c
kernel/drivers/video/omap2/dss/hdmi.c
kernel/drivers/video/omap2/dss/hdmi_panel.c
kernel/drivers/video/omap2/dss/gammatable.h
kernel/drivers/video/omap2/dss/core.c
kernel/drivers/input/touchscreen/lge_touch_core.c
kernel/drivers/input/touchscreen/touch_synaptics.c
kernel/drivers/input/touchscreen/lghdk_tm1709_ts.c
kernel/drivers/input/misc/twl6030-pwrbutton.c
kernel/drivers/input/keyboard/omap4-keypad.c
kernel/drivers/usb/gadget/f_mass_storage.c
kernel/drivers/rpmsg/rpmsg_omx.c
kernel/drivers/power/twl6030_bci_battery_ap_fuel.c
kernel/drivers/lge/subpmic/Makefile
kernel/drivers/lge/misc/Makefile
kernel/drivers/lge/Makefile
kernel/drivers/gpu/ion/omap/omap_tiler_heap.c
kernel/.config
kernel/.config.old
Click to expand...
Click to collapse
https://github.com/Pesach85/lge-kernel-omap4/search?p=1&q=CONFIG_MACH_LGE_COSMO&source=cc
i dunno if it would be easier to backport dsscomp to 3.0.21

How to port a new kernel

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

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