yashsingh1/xdaforums huggingface dataset:
[myTouch 3G, Magic Android Development] sammypwns:
I'm working on the exact same thing. can you contact me via im? pm for my screen names
[myTouch 3G, Magic Android Development] Amon_RA:
I think that HTC patched some things in that are not available in the source tree... So I doubt that you'll be able to get a kernel running build from source. If you do happen to make it run let us know :-)
[myTouch 3G, Magic Android Development] korpenkraxar:
I would not be suprised at all if that was the case. However, since the Linux kernel is GPL, such patches, as I understand it, also need to be under the GPL and made available upon request. Is there a public HTC source tree anywhere?

And btw, how can I fix the "recompile" misspelling in the title of this thread? It is driving me insane :-)
[myTouch 3G, Magic Android Development] korpenkraxar:
This might be a very stupid question, but here it goes:

Shouldn't it be possible to build all the extra netfilter/iptables support for the vanilla 2.6.27 kernel as modules and insmod them when running HTC's kernel? Or will that result in swift and horrible death?
[myTouch 3G, Magic Android Development] sammypwns:
i don't see why it wouldn't. we wouldn't need the source for htc's kernel then, right? just figure out how to build the modules? isn't that kind of how proprietary video drivers work for linux?

EDIT: Modules will work, that is certain. A little googling confirmed that's how wlan and such work (on Android)

EDIT 2: It seems like there is .config for the kernel on the phone that can be used with the standard 2.6.27 kernel source to build the android kernel.

EDIT 3: found the kernel here http://github.com/zhoukejun/android-2.6.27-yf255/tree/master
[myTouch 3G, Magic Android Development] hotweiss:
I wonder if access to the kernel can help with the Bluetooth problems in the Hero ROM?
[myTouch 3G, Magic Android Development] gboddina:
Bump!

Is there any news about iptables on PVT 32A based sapphire?
[myTouch 3G, Magic Android Development] korpenkraxar:
Well. The kernels that we successfully have built by cross-compiling refuse to boot. Looking at the config.gz that the phone exports and trying

make oldconfig

we have learnt that HTC has a lot of parameters specified for code that appears not to be in the standard android 2.6.27 kernel source tree. We would be very very happy if someone around here could point us to the repository holding HTC specific patches and code for the Magic/Sapphire.
[myTouch 3G, Magic Android Development] gboddina:
Based on http://www.mail-archive.com/android-kernel@googlegroups.com/msg00442.html , it seems we need to find the source of the android-msm-htc-2.6.27 kernel.

Which don't seems to be public.
[myTouch 3G, Magic Android Development] korpenkraxar:
But it has to be made public if requested. That is essence of the GPL.
[myTouch 3G, Magic Android Development] sammypwns:
i emailed them a while ago. i also talked to someone who has gotten his own kernels to boot but on the dream dev phone
[myTouch 3G, Magic Android Development] biktor_gj:
Git tree: git://android.git.kernel.org/kernel/msm

Branch: origin/android-msm-2.6.29

Cmd: git clone git://android.git.kernel.org/kernel/msm -o android-msm-2.6.29
[myTouch 3G, Magic Android Development] sammypwns:
thats not the problem we're having. HTC made patches to the kernel that they haven't released :)
[myTouch 3G, Magic Android Development] kennedyshead:
Bump

Anything new on this?
[myTouch 3G, Magic Android Development] pltXtra:
Just a thought; has anyone tried to get the source from the operator? Since they are distributors of the phone they are also liable under the GPL.
[myTouch 3G, Magic Android Development] sammypwns:
no i dont have rogers
[myTouch 3G, Magic Android Development] gboddina:
I tried to compil a 2.6.29 kernel without any luck.

Has someone a way to debug the kernel boot? (see messages, ect...).
[myTouch 3G, Magic Android Development] dazcox5181:
Since cyanogen roms use a custom kernel would it be an idea to ask there? I thought a custom kernel wasn't a huge problem anymore...
[myTouch 3G, Magic Android Development] gboddina:
unfortunately, you're right for the 32B version of the HTC magic.

No custom kernel for the 32A board has been successfully build.

Look at each rom port for the 32A, you'll see that boot.img is always keept back... (which doesn't include iptables support).

Correct me if I'm wrong (I really want to be wrong and missed something :) )
[myTouch 3G, Magic Android Development] dazcox5181:
sorry, i was thinking of 32b
[myTouch 3G, Magic Android Development] shwan_3:
Have you tried to use

make menuconfig

it will make you .config file very nice and clean, there was a saphire as target in there I have made som configurations now and making modules right now , then I will try to compile the kernel and will test it later this week.
[myTouch 3G, Magic Android Development] k4r1m:
Any news on this? Seriously how is HTC not giving up the kernel, that's revolution os 101 THE KERNEL? lool its actually too funny someone needs to wake up them and explain to them what they are doing.
[myTouch 3G, Magic Android Development] shwan_3:
The main problem is that we are not able to contact any one knowing or willing to tell anything about the modified kernel , I ask HI3G the provider in Sweden who shipped the phone and said ( If I'm not wrong ) that they are obliged to give me the source code but they say that it is HTC or android developer site who has the code :confused: .

If any one know GPLV2 better than me could you please quote the paragraph making HI3G obliged to ask HTC for the code and give it to me, I will call them and if no progress there will write a letter on paper and will send it to HTC at Taiwan and their EU office this week and will ask for the code from them too. But it is much easier for me to take the fight with HI3G Sweden instead.

please help me in legal questions here .

This is what I got from the costumer service :
[myTouch 3G, Magic Android Development] k4r1m:
I found out a few more things that we are missing in the current kernel, cgroup, ext4, and squashfs.... ARGGGGGGG!!! DAM YOU HTC!
[myTouch 3G, Magic Android Development] k4r1m:
bump http://www.arm.linux.org.uk/developer/machines/list.php?id=1729 there is only one sapphire on the list and that its id... i have discover that my 32A has the same id when it boots and it is also has MACH_TYPE_SAPPHIRE.... which i think could mean they use the kernel but they have some sort of twist going for 32A.... can we get a 32b owner to check their logcat for mach_type_* and id?
[myTouch 3G, Magic Android Development] biktor_gj:
Hi, just one thing guys, all of you who can't get to boot your own kernel, how are you doing it? I've been out for a little while (work stuff), but I just picked this up this morning, cross compiled and made a boot img on my own, and it booted all the way to the home screen. OK, wifi doesn't work (can't load wlan.ko), but at least it boots correctly... So I don't know what you think is missing on the source tree...

By the way, the compiled wlan.ko's source is unavailable due to Texas Instruments' licensing stuff or something?

@k4r1m: The mach type should be exactly the same. It's one machine with two board revisions, no more. From what I've read so far, the only really changing things between boards are the RAM amount (wich the kernel doesn't care of -it detects the value, and initialize-), and the flash address from wich starts booting (wich it doesn't care either -the ipl goes to the address where the kernel boots-). There may be a command line argument passing straight from the IPL though, because my magic's (32B) boot.img only has this cmdline on boot.img:

no_console_suspend=1 console=null

and the complete cmdline read by the kernel on /proc

board_sapphire.disable_uart3=0 board_sapphire.usb_h2w_sw=0 board_sapphire.disable_sdcard=0 smisize=64 androidboot.baseband=2.22.19.26I androidboot.cid=VODAP304 androidboot.carrier=VODA-Spain androidboot.keycaps=qwerty androidboot.mode=normal androidboot.serialno=XXXX androidboot.bootloader=1.33.2005 no_console_suspend=1 console=null

(removed the serial number)

Also on board-sapphire.c, one of the initialization routines extracts parts of the commandline from the ipl, to know if it's on debugging mode, so it can set up the h2w interface uarts accordingly...

Anyway, on my 32b board, I don't have problems booting... what are you guys using?
[myTouch 3G, Magic Android Development] gboddina:
I followed this tutorial (which assume 32B) (it's a french tutorial but command lines speaks themself :) )

http://wiki.smartphonefrance.info/(...mpiler ton kernel Android pour HTC Magic.ashx

Things corrected from this tuto:

<?xml version="1.0" encoding="UTF-8"?>

<manifest>

<remove-project name="kernel/common"/> <--- removed

<project path="kernel" name="kernel/msm" revision="refs/heads/android-msm-2.6.27"/>

<project path="vendor/htc/dream" name="platform/vendor/htc/dream" revision="refs/heads/master"/> <--- changed to dream-open

<project path="hardware/msm7k" name="platform/hardware/msm7k" revision="refs/heads/master"/>

</manifest>

I tried a .config from the default config and from the config.gz from a running kernel on my phone.

The processor is not the same from 32B to 32A. (a minor change, but is this related?)

I tried to split a custom kernel from some 32B ROM and boot them on the 32A board. Without any success (these custom kernel are known to be running with the 32B).

I tried to manually add kernel arguments (console=null, ...)

Only the orignal kernel want to boot.

I'm going crazy, no one has a response for this issue...

The only things which could help me is a way to see this f*** kernel booting and which errors messages are throwed.

You can add me on gtalk. (gboddin@gm....)
[myTouch 3G, Magic Android Development] biktor_gj:
can anyone with a 32A board do a dmesg and post it here (or pastebin or somewhere else) to compare results?
[myTouch 3G, Magic Android Development] gboddina:
Yop:

cat /proc/kmsg :

http://pastebin.com/m2d156c3c

dmesg :

http://pastebin.com/m44f37279
[myTouch 3G, Magic Android Development] biktor_gj:
Ok, this has a million reasons not to boot, and only one to attempt to, but we don't loose anything by trying, do we?

Try to fastboot this: (fastboot boot bootimg.img)

http://rapidshare.com/files/259925162/bootimg.img

EDIT: I'm looking now, and I think I see what you guys were talking about the missing patches on the sapphire source, there's some kind of fixup on the RAM allocation wich doesn't exist on the kernel source. I don't know if there's more than that by now, (I'll keep looking), but if the memory is not being detected correctly, it's a very good reason why the phone would refuse to boot. Other than that, the Application CPU is detected as the same on both board revisions, and on 32B SMI size is 64, and on 32A is 32.

Will keep looking!
[myTouch 3G, Magic Android Development] Amon_RA:
It isn't booting...

I extracted the kernel and repacked it with the HTC offsets, still not booting... :(
[myTouch 3G, Magic Android Development] biktor_gj:
No worries, it was just a stupid try :)

Anyway, smi size is, in theory, detected at boot. On 32B boards is detected as 64, and on 32A is 32. But if the kernel is unable to detect it by itself, it automatically sets it to 64. What worries me is the sapphire_fixup:

on 32A board:

<7>[ 0.000000] find the smi tag
<7>[ 0.000000] parse_tag_smi: smi size = 32
<4>[ 0.000000] sapphire_fixup:smisize=32
<7>[ 0.000000] find the hwid tag
<7>[ 0.000000] parse_tag_hwid: hwid = 0x1
<4>[ 0.000000] sapphire_fixup:hwid=0x1
<7>[ 0.000000] find the skuid tag
<7>[ 0.000000] parse_tag_skuid: skuid = 0x21401
<4>[ 0.000000] sapphire_fixup:skuid=0x21401
<7>[ 0.000000] find the engineer tag
<7>[ 0.000000] parse_tag_engineerid: 0x2
<4>[ 0.000000] sapphire_fixup:engineerid=0x2
<4>[ 0.000000] sapphire_fixup:bank size=0xc600000
<7>[ 0.000000] find the smi tag
<7>[ 0.000000] parse_tag_smi: smi size = 32

On 32B, instead:

<7>[ 0.000000] find the smi tag
<7>[ 0.000000] parse_tag_smi: smi size = 64
<4>[ 0.000000] sapphire_fixup:smisize=64
<7>[ 0.000000] find the hwid tag
<7>[ 0.000000] parse_tag_hwid: hwid = 0x1
<4>[ 0.000000] sapphire_fixup:hwid=0x1
<7>[ 0.000000] find the skuid tag
<7>[ 0.000000] parse_tag_skuid: hwid = 0x1e300
<4>[ 0.000000] sapphire_fixup:skuid=0x1e300
<7>[ 0.000000] find the engineer tag
<7>[ 0.000000] parse_tag_engineerid: hwid = 0x2
<4>[ 0.000000] sapphire_fixup:engineerid=0x2
<7>[ 0.000000] find the smi tag
<7>[ 0.000000] parse_tag_smi: smi size = 64

On msm qualcomm phones, there's a hole in the memory area, where the baseband code is allocated.

On 32B kernel, it doesn't have the printk telling "sapphire_fixup:bank size=0xc600000" wich has on the 32A. My first impression is that the memory bank fixup code is different for the 32A, and since that part of code is different, maybe the memory allocation fixup code is handling the memory differently, and when working with the 32B kernel, the memory gets corrupt on the init sequence...

But, as always, it's just a guess...
[myTouch 3G, Magic Android Development] gboddina:
Well, thank you :). We are progressing :).

Does any one known how to debug the kernel boot?
[myTouch 3G, Magic Android Development] elegos:
Hello!

I've followed this thread with interest, being an owner of the 32a version of the smartphone :)

I love *NIX-like operating systems, such as Linux or Mac OS X, but to be honest, I tried to compile a kernel only once (for a gentoo test machine)...

To make my little part I've contacted the HTC support asking the patches to the kernel or the patched kernel itself according to the GPL v3 licence of Linux, asking an alternative email (HTC developers?) in the case of they were only a customer service... I hope I'll have more luck than shwan_3 (just an unreachable address) :)
[myTouch 3G, Magic Android Development] gboddina:
This has been posted on the android-kernel mailing list:

Wait & see?
[myTouch 3G, Magic Android Development] k4r1m:
We need a laywer, any lawyers on XDA?

[/sarcasm], maybe?
[myTouch 3G, Magic Android Development] elegos:
NEWS: the european HTC support replied to me. Being confidential I can't copy/paste their reply, but I can say you that they told me they are building up a brand-new developers website where they'll put it online within the next two months, with the kernel sources of course.

Not being the Customer Care the developers, they didn't knew exactly when it will be released, but it will be done :)

In the meanwhile find that freaking way to compile our own kernels :P
[myTouch 3G, Magic Android Development] k4r1m:
2 months? i think that means never in corporate time....

You mind asking if we can still have the kernel right anyway since we need it so baddly. it's hard for them to send us the kernel infact its much easier than making a dev website lmfao.
[myTouch 3G, Magic Android Development] elegos:
They told me "within" two months, not "in" two months... That is: they're just working on it and it'll be released when it's ready™
[myTouch 3G, Magic Android Development] k4r1m:
I just don't feel like we have to wait for their website to go up JUST to get the kernel... it's just like saying ok well i have the kernel but i'm not going to upload it till i make a site for it so you guys can hit DOWNLOAD... wait that is what they are saying.
[myTouch 3G, Magic Android Development] Killadude:
i feel ur pain..... damm htc....
[myTouch 3G, Magic Android Development] biktor_gj:
It's not even the kernel, there were updates to the git tree regarding the sapphire panel configurations some weeks ago, but the memory patch shown on the dmesg doesn't exist. Has anyone tried to contact the code mantainer? If nobody has, I can try to contact him...

EDIT: Just contacted the kernel mantainer and asked for some help. Let's hope he replies! (and provides some kind of patch or something..)

EDIT2: Just got a response:

The 32A versions do have a different memory configuration that's not
compatible with the kernel as it exists in our tree at
android.git.kernel.org.

The devices that have shipped in this configuration have been HTC
devices where they were responsible for the kernel and software build
-- we (Google) have not done kernel work for this particular hardware.
You are correct that they should be making the full kernel source
code available for devices they ship (per the GPL requirements).

I can't speak for HTC, though. I know that they are in the process of
setting up a system for downloading some htc-specific glue for support
of the ADP1 open source android builds and it would not surprise me if
this same system is intended to address source delivery for GPL
compliance.

We do hope to get patches for this additional configuration integrated
into the android.git.kernel.org tree in the near future.

So the next step is going to be contact HTC and try to get it from them...

Regards!
[myTouch 3G, Magic Android Development] biktor_gj:
Good news I guess :)

When I responded to you earlier, I also forwarded your email to the
HTC team in Taiwan. They got back to me a little while ago, informing
me that they are working on this and expect to have the Magic and Hero
kernel sources available online by the end of the month.

Regards!
[myTouch 3G, Magic Android Development] ehnvis:
This is great news so lets hope we have the source by the end of the month.
[myTouch 3G, Magic Android Development] k4r1m:
Yeah nice job biktor_gj good stuff!
[myTouch 3G, Magic Android Development] k4r1m:
Sorry for the bump but i just wanted to say for all the devs or anyone else that gets the kernel let's not go crazy and make 20 different kernels with different modules and features lets keep it simple and make one big kernel with the support of all the stuff that we are missing like squashfs, cgroup, iptables and w\e else we are missing.

Just a general thought that i was thinking about, that is if we actually ever see a kernel
[myTouch 3G, Magic Android Development] elegos:
Well, different kernels should go forward different goals. Remember that the more modules you load, the more CPU and RAM will be consumed.
[myTouch 3G, Magic Android Development] biktor_gj:
The kernel itself could detect if it's running board revision A or B by the smi size and through some checks. I've been tricking with it a little bit and despite the manufacturing process of each board, they should be compatible (the cores seem to be detected as the same kind anyway). I'm with elegos about the cpu and ram consumption, but I'm also with k4r1m on keeping it simple. Anyone can make his own kernel if he wants anyway, but I'm more concerned on if we could make boot.imgs wich could work for both devices..

I'm already started with iptables for the 32B (wich is what I own) but during week I have almost no time for it and I'm still testing. Also I can't get wlan module to work with my own kernels... I also started to look at the led code to replace the way they work (upper leds and jog ball -I hate the misuse they've given to them-), but I see no easy fix until I change the code on the userspace too, and it's a bit huge for the time I have, and I see quite a lot of problems with the google apps..
[myTouch 3G, Magic Android Development] inoah:
[please ignore this post]
[myTouch 3G, Magic Android Development] k4r1m:
True true but each rom usually has a different ramdisk where the loading of certian things happen like in the init files, so i think have a lot of modules and only loading a few won't really create an issue or will it?
[myTouch 3G, Magic Android Development] ehnvis:
Having loads of modules but not loading em will give you a longer boottime. This is because it check all to see if it should use it or not. So we should aim for as few modules as possible, same goes for things in the kernel that we dont need or use.
[myTouch 3G, Magic Android Development] k4r1m:
Aw i see, well the basic modules/features that are mostly by the g1 are most of the stuff that already comes with 29 except compcache i think... but yeah i get your point.
[myTouch 3G, Magic Android Development] hotweiss:
Great, we'll be able to add multi-touch support also!
[myTouch 3G, Magic Android Development] gboddina:
Got this reply from an HTC developer:
[myTouch 3G, Magic Android Development] jfive74:
Great news if it happens.
[myTouch 3G, Magic Android Development] elegos:
lol and what about the up-coming hero source? The kernel must still be open!

But this isn't our problem :P
[myTouch 3G, Magic Android Development] malefic:
Any news on this? Promises have been made to make the source available by the end of July. It's July 31st and the source is still nowhere to be found. Or is it?
[myTouch 3G, Magic Android Development] gboddina:
I asked htc yesterday, no reply.

Someone surprised ?
[myTouch 3G, Magic Android Development] Wysie:
:( Maybe we should start an online petition of some sort?
[myTouch 3G, Magic Android Development] :
Petitions never help.

What we need to do is contact the GPL watchdogs and sic them onto HTC for not releasing what they are obligated to do by law.

Somebody needs to draft a letter to them (The watchdogs) and explain to them the problems. I will probably get around to this, but I am very busy at the moment with studies and exams. Preferably someone with a technical background and understanding of the GPL, the linux kernel, etc... should write and send the letter.
[myTouch 3G, Magic Android Development] mpwarner:
Yup, best way to get the source is to create a threatening letter. Petitions are not the answer in this case, the linux kernel is under the GPL, therefore we don't have to petition anything, legally they must release the code.
[myTouch 3G, Magic Android Development] :
Bump, for great justice. ;I
[myTouch 3G, Magic Android Development] bademasta:
can we hope to get the source anytime soon?

Would it help if i annoy HTC with daily emails?
[myTouch 3G, Magic Android Development] :
I think I'm going to start annoying them with daily mails. ;/
[myTouch 3G, Magic Android Development] wire103:
Let me understand this problem

First post here, don't bash me ;)

Let me see if I understand this, correct me where I am wrong, please.

1) The radio module/gfx chip etc. needs some RAM to function in the background. This is reserved and not accessible to the Linux kernel.

2) HTC has extended the "stock" Google Android board (32B) which has 192MB RAM, by adding extra RAM to the board. So instead of having the reserved RAM at the end of the memory map, now the reserved memory is in the middle of everything. (Also the 32A CPU is a different revision, but compatible with the 32B CPU).

3) A radio module from 32B can be flashed onto a 32A board. This makes a 32B kernel boot on a 32A board, but with the lower part of the 192MB RAM accessible only.

4) We are missing the stuff that maps the correct accessible RAM beyond the 192MB RAM, as HTC has made patches but failed to publish them.

Wouldn't it be possible to at least get a "pure" 32A kernel running, by just skipping the extra RAM, just to see it booting?

If so, development of ROMs for 32A wouldn't be stopped until HTC finally manages to release the missing patches.