Compile kernel to new radio - myTouch 3G, Magic Android Development

i build the kernel what distributes by htc(HTC Magic 32a) But i want to compile the kernel for new radio 6.35. How can i do it? Can some one give me his kernel config to this or say what will i change on my default config?

Related

[Important] All Kernel builders/ROM developers read this!

Just learnt something that to my knowledge isn't documented anywhere that I know of and thought I'd share it - I'm not the greatest kernel hacker, but I'm okay at documenting sh*t - the wiki is proof of that
For anyone who's ever built a 32a kernel using TigerTael's patches - well it turns out we've been doing it all wrong and Zinx (from #android) has finally set me straight on it all.
Firstly, we've kinda missed the boat a bit with our existing kernel patches and it's had one casualty so far - Rogers Dream users. These users use the same Radio as HTC Magic 32a
Instead of using that 32a/32b as an discerning factor for kernels what we should really be using is RADIO VERSION.
Phones with radios with 1.xxx or 2.xxx versions are EBI0 - or what we think of as 32b - these are limited to 128MB ram.
Phones with radios with 3.xxx versions require EBI1 - this has a special fix to allow up to 256MB ram.
HTC actually released code in their kernels allowing us to switch between EBI0 and EBI1 with a single kernel config option while using the same codebase - unfortunately it was in the 2.6.27 kernel and since most of us have switched to 2.6.29 we stuck with TigerTael's patch.
TigerTael's patch doesn't work for Rogers Dream users though!
Zinx has extracted a HTC's code and it can now be applied to any kernel tree quite easily - and since its implemented as a kernel config option you're not breaking your code by including it.
You can download Zinx's kernel patch here:
http://zenthought.org/tmp/MSM_AMSS_SUPPORT_256MB_EBI1.diff
You can apply this to your source tree the same way TT's patch was done:
cd kernel_dir
patch -p1 < MSM_AMSS_SUPPORT_256MB_EBI1.diff
Click to expand...
Click to collapse
And then you enable MSM_AMSS_SUPPORT_256MB_EBI1 in your kernel config if you want to build for all EBI1 phones (or disable if you want EBI0 for older Dreams and 32B sapphires).
I'm thinking this should replace the 32a/32b stuff we've named everything up until now - and instead of getting people to check that in the wiki we should be just going by radio versions.. but it depends what you all think really.
I'll be doing all my CyanogenMod ports this way from now on - and hope to get this patch put directly in his github repo to make it easier in future.
If you use this patch - I think it should be specified as EBI1 and EBI0 from now on - perhaps that's expecting too much, but it will let everyone know.
I hope that the rest of you who build your own kernels can do the same!
Awesome - Looks like Cyanogen's going to update his github source to include the MSM_AMSS_SUPPORT_256MB_EBI1 patch according to his latest tweet:
Cyanogen: @Radix999 yes ill patch it in tomorrow
Click to expand...
Click to collapse
This should make it veeeery simple to build a EBI1 compatible kernel in future - just one kernel config option!
Radix999 said:
Just learnt something that to my knowledge isn't documented anywhere that I know of and thought I'd share it - I'm not the greatest kernel hacker, but I'm okay at documenting sh*t - the wiki is proof of that
For anyone who's ever built a 32a kernel using TigerTael's patches - well it turns out we've been doing it all wrong and Zinx (from #android) has finally set me straight on it all.
Firstly, we've kinda missed the boat a bit with our existing kernel patches and it's had one casualty so far - Rogers Dream users. These users use the same Radio as HTC Magic 32a
Instead of using that 32a/32b as an discerning factor for kernels what we should really be using is RADIO VERSION.
Phones with radios with 1.xxx or 2.xxx versions are EBI0 - or what we think of as 32b - these are limited to 128MB ram.
Phones with radios with 3.xxx versions require EBI1 - this has a special fix to allow up to 256MB ram.
HTC actually released code in their kernels allowing us to switch between EBI0 and EBI1 with a single kernel config option while using the same codebase - unfortunately it was in the 2.6.27 kernel and since most of us have switched to 2.6.29 we stuck with TigerTael's patch.
TigerTael's patch doesn't work for Rogers Dream users though!
Zinx has extracted a HTC's code and it can now be applied to any kernel tree quite easily - and since its implemented as a kernel config option you're not breaking your code by including it.
You can download Zinx's kernel patch here:
http://zenthought.org/tmp/MSM_AMSS_SUPPORT_256MB_EBI1.diff
You can apply this to your source tree the same way TT's patch was done:
And then you enable MSM_AMSS_SUPPORT_256MB_EBI1 in your kernel config if you want to build for all EBI1 phones (or disable if you want EBI0 for older Dreams and 32B sapphires).
I'm thinking this should replace the 32a/32b stuff we've named everything up until now - and instead of getting people to check that in the wiki we should be just going by radio versions.. but it depends what you all think really.
I'll be doing all my CyanogenMod ports this way from now on - and hope to get this patch put directly in his github repo to make it easier in future.
If you use this patch - I think it should be specified as EBI1 and EBI0 from now on - perhaps that's expecting too much, but it will let everyone know.
I hope that the rest of you who build your own kernels can do the same!
Click to expand...
Click to collapse
how will all this help out the end user?
We can use the kernel that the rom devs use for their rom, instead of using a 32A kernel from a 32A rom, which may not be 100% compatible
The biggest change will be that all Rogers Dream users will be able to start using our kernels without having to rebuild their own all the time.
Previously they were unable to use G1/Dream/32B kernels, nor our hacked TT-32a kernels because of the way we were doing it.
Very little change for anyone else - though for kernel developers it will instantly mean we can have a single unified kernel source for all kernel builds (still not unified roms yet, but we'll get there!).
One boot.img for Dream/32b magic
One boot.img for Rogers Dream/32a Magic
Thanks for all these doc although I'm not a developer hence don't understand it fully
however anyone implemented this on 32A kernel for Hero ROM?? Am very eagerly expecting it
Hey that's a good question.. what does the Hero use?
Anyone willing to try my cyanogenmod port to see if it works for Hero too?
It may well mean Hero roms can use the same boot kernel as 32a too.
Edit: Bleh.. I worded that really badly. I mean HERO Owners.. ie. actual Hero hardware. Not people using Hero roms on their magic or dream.
This code comes from the HTC release kernel source. It's been around for a while.
It think it's a little misleading to say that the patches prepared by TigerTael were doing it all wrong. His patches did essentially the same thing without giving the option to switch in .config
I don't see what this has to do with the radio version? The memory map depends on two things. The size of the SMI memory (32 or 64) and the size of the EBI1 memory (128 or 256).
As far as I know:
Dream (classic) SMI = 64 EBI1 = 128 TOTAL = 192
Dream (rogers) SMI = 32 ? EBI1 = 256 TOTAL = 288 ?
Magic/Sapphire 32a SMI = 32 EBI1 = 256 TOTAL = 288
Magic/Sapphire 32b SMI = 64 EBI1 = 128 TOTAL = 192
Radix999 said:
J...
Zinx has extracted a HTC's code and it can now be applied to any kernel tree quite easily - and since its implemented as a kernel config option you're not breaking your code by including it.
...
Click to expand...
Click to collapse
When you say "any kernel tree", does this mean we are no longer restricted to 2.6.29? Not that I'm aware of any exciting newer kernel features for embedded devices (but there very well could be), but does this make it easier to try out Android with 2.6.31.x? Is there any value in doing so?
Raydicks I love you
Hi,
could you please give us a more detailed guide about the patch use?
You wrote:
cd kernel_dir
patch -p1 < MSM_AMSS_SUPPORT_256MB_EBI1.diff
Which is the kernel dir?
Thanks
If you're not a kernel developer then this doesn't apply to you and you're just cluttering up this thread.
You apply it only if you're actually BUILDING a kernel - ie from Android's git or Cyanogen's github source tree (though as Cyanogen is applying it tomorrow you won't need to soon).
If you are a kernel developer, then you should know where your kernel source is.. sheesh!
Thanks for the info and patch, will definitely try!
TheStrider said:
Hey Radix. Just trying to understand what it actually means to enable this config option in the kernel (well I know what that means but what's the outcome).
Does the config option allow you to build a kernel that supports both 32a and 32b devices?
From your comments I understood that it will help Rogers 32b users out, but does nothing really for us 32a users (Rogers). So tomorrow if Cyanogen adds the option it doesn't mean I can go and flash his ROM without doing a kernerl port first....
Can you set me straight..
Cheers.
Click to expand...
Click to collapse
Yeah, unless Cyanogen's new trick for the new release is 'detecting radio version at runtime and installing appropriate boot.img' then no - You're still going to need a kernel port - there's no unified kernel (yet anyway).
But on the upside, the kernel port will be:
a hell of a lot simpler as it's the same code base, just a EBI0/EBI1 toggle - and Cyanogen may himself provide the port because he can.
now support Rogers Dream users as well with all EBI1 ports
not so hacky
daproy said:
This code comes from the HTC release kernel source. It's been around for a while.
It think it's a little misleading to say that the patches prepared by TigerTael were doing it all wrong. His patches did essentially the same thing without giving the option to switch in .config
Click to expand...
Click to collapse
Unfortunately this is not true, TigerTael's patches were NOT working for other EBI1 handsets - namely Rogers Dream. His code was a quick hack to get things working for 32a only.
Zinx's patch adds HTC's own code which does it properly for all EBI1 handsets.
Does anyone has a EBI1 kernel I could test on Hero please?
Lox_Dev: I can package one up for you, but I'll need the ramdisk from whatever rom/kernel you're currently using. If you have an existing boot.img - let me know where it is and I can package one up for you to try.
No guarantees it'll work on a Hero, but you never know!
Radix999 said:
J
HTC actually released code in their kernels allowing us to switch between EBI0 and EBI1 with a single kernel config option while using the same codebase - unfortunately it was in the 2.6.27
Click to expand...
Click to collapse
The developers from HTC were probably laughing at our efforts to develop the 32A kernels. Now, if they had just released a patch for the AOSP code, then everything would have been much easier.
This sound interesting, has anybody been able to get it to work?
I'm using it for my cyanogenmod port already... After checking out the Hero kernel dump that htc just did I'm not so sure about it actually working on Hero hardware tho.

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

How to compile the 2.6.29 kernel for the htc magic 32A?

I built the android2.1 rom from the official source code for my htc magic 32A. But the wifi doesn't work. So I want to compile the kernel and the wifi driver. Could somebody tell me the detail step to do this? And I want to know which kernel should be used for android2.1? Any help will be appreciated!
http://androidspin.com/forum/showthread.php?t=2207
http://wiki.cyanogenmod.com/index.php/How_to_build_a_kernel_port
I would recommend to build from cyanogen .33 source for eclair as it is complete and works 100% with eclair - he updates and fixes bugs regularly as well
Thanks for your reply! Do you mean I should use the origin/android-msm-2.6.33 branch to compile the 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

Changing M4 Aqua CPU clock (Kernel mod.)

Good afternoon. I appoligise for the noob question but is there a way I can edit (I want to add overclock to a kernel) an already made (compiled?) kernel instead of having to completely build the kernel from source? For example, is there a way I can unpack a boot.img and modify the kernel, repack the boot image, and flash it instead of (in my case) going to Sony Developer World and compiling an AOSP kernel from source, I can just modify the frequencies of the CPU in the kernel the phone is currently running and reflash it? Sorry for the complicated and stupid question, i'm very new to kernel modifying... Thanks for any responses and/or help. ^^
Here: http://forum.xda-developers.com/showthread.php?t=1659584

Categories

Resources