yashsingh1/xdaforums huggingface dataset:
[Touch Diamond, MDA Compact IV ROM Development] touch of jobo:
Has anyone tried this? It'd be nice to know whether this is different for different devices.

Cool. Was that the thing where you changed smd7 (and then some) from packet to stream interface?

How safe/dangerous is access to nand? (..if you don't mind my whining:))

For the tvout, I'd be happy to look into that but I'll need time and probably help. (Is it in the mdp code in the kernel/msm git?)

Also, I've been looking at the battery driver. Android only looks at it once or twice at startup and never again. The g1 driver creates an RPC server, so I guess the arm9 notifies the driver of status changes. The vogue driver has a kernel thread that just reports status change every 10 seconds, which in turn makes Android inquire battery status, etc.. (I will use this approach at least until I figure out the data..)

I guess it is just monitoring, not controlling charging, or is it? Do we have any info on how to interpret the data in smem?

@maejrep: Did you get it to report anything real on Raph800?

-Jobo
[Touch Diamond, MDA Compact IV ROM Development] slovoflud:
if that's true - can we later change the check time to more than 10 secs? that's way too often and will reqiure more battery. I'd think 1 per min is quite enough.
[Touch Diamond, MDA Compact IV ROM Development] lrp1985:
To people cant boot ANDROID from Balsalt or ConnectUTB because raise the follwing error:

mount: mounting /dev/mmcblk0p1 on /mmc failed: Invalid argument

change this line in default.txt

imgdevname=/dev/mmcblk0 imgdevnum=0

for this

imgdevname=/dev/mmcblk0p1 imgdevnum=1

Works for me !
[Touch Diamond, MDA Compact IV ROM Development] balsat:
It is up and running!
[Touch Diamond, MDA Compact IV ROM Development] richs1992:
Excuse me all ,

I have a question because I don't understand a thing on the readme.txt (I'm a bit stupid :p) : it's written a way to have android on a partition but this means that is there a way to have definitely android on our device(even if choosing which os using at the starting of the device) ?

(excuse me for my enaglish)

waiting for a your reply

Richs
[Touch Diamond, MDA Compact IV ROM Development] Saturn2888:
It really would depend on your device though.
[Touch Diamond, MDA Compact IV ROM Development] richs1992:
excuse me very much, but if you (saturn2888) replied to me I don't understand the meaning of your reply. what "depend on your device" means ??

bye richs
[Touch Diamond, MDA Compact IV ROM Development] Saturn2888:
The type of phone you have. That changes how it will work. For instance, Android seems to be working better on the Touch Pro/Raphael than the Diamond by a lot.
[Touch Diamond, MDA Compact IV ROM Development] balsat:
The hardware is almost the same, so why does Android work better on the Raphael than the Diamond?
[Touch Diamond, MDA Compact IV ROM Development] richs1992:
thanks very much for the help, now I understand and I'll continue to do the faster way .

thanks for all

Bye Richs
[Touch Diamond, MDA Compact IV ROM Development] Saturn2888:
That's what I thought too but it's apparently not the case. I'd hope someone could elaborate on my point and verify it. I was just under that impression from what I've read thus far.
[Touch Diamond, MDA Compact IV ROM Development] wywywywy:
Raphael doesn't really work much better than Diamond according to this -

http://wiki.xda-developers.com/index.php?pagename=RaphaelLinux

It looks like there are more devs on Raphael than Diamond though.

I think, going at this rate, we will likely have a daily-usable (with compromises) build by the end of the year! :D
[Touch Diamond, MDA Compact IV ROM Development] Saturn2888:
YAY! :D. I've still got this phone until October 2010 so I'm happy about that, ha ha.
[Touch Diamond, MDA Compact IV ROM Development] fabius88:
is there a date for the android relase for diamond?
[Touch Diamond, MDA Compact IV ROM Development] balsat:
Here is what you need
[Touch Diamond, MDA Compact IV ROM Development] touch of jobo:
I now get somewhat sane values for 'level' based on voltage and current(?) and for temperature and report those to linux. This is a diff. It leaves Raph800 code unchanged. I don't have the correct GPIs yet to detect charging...

@maejrep: What's with the battery driver in htc_hw.c ?

-Jobo

Edit: Just in case it's useful, here is a log of smem values.

Edit: Better capacity values and some kind of charging detection. This is a commit against current ltg git head. It'd be nice if someone could test if this works for Diam100 too..
[Touch Diamond, MDA Compact IV ROM Development] balsat:
Nice work Jobo... I have compiled a zImage with your patch, it can be found here
[Touch Diamond, MDA Compact IV ROM Development] fabius88:
ok I wait for android, no problem for me ;)

I don't understand why when start "camera" I see this message: please insert sd card before using the camera

is it normal?
[Touch Diamond, MDA Compact IV ROM Development] illi:
Diamond2

Anyone can help me please. What changes is needed to the default.txt file to make it run on Touch Diamond2 (Topaz)?

TQ
[Touch Diamond, MDA Compact IV ROM Development] gm112:
Kernel panic on something relating the device drivers. Not exactly sure what since the console spits out so much information at a time. Anyhow, I've posted this before. It's on a RAPH110 HTC Fuze. Anywhere I could possibly donate to the current team who's porting this? :p.
[Touch Diamond, MDA Compact IV ROM Development] TR3Y:
would anyone here know color correction thing posted on the Wiki (the color correction is expired) for the DIAM500? Because I am getting really close to getting Android to work on my Diamond.
[Touch Diamond, MDA Compact IV ROM Development] Saturn2888:
I just had a second Diamond go bad on me, and I just got this one today. If you can find out I would love to try it on the replacement I get.
[Touch Diamond, MDA Compact IV ROM Development] adilkhan1214:
Sooooo Close

So I currently have a Diam100 and I just installed the latest balsat image (zimage270509) and I got through all the screens and as soon as the android splash screen is done, it just says shutting down with a little circle revolving but then that just freezes and stops.

In the fuzzy background I see the "connect a charger" window with a ok button and I see the actual android home page loaded up.
[Touch Diamond, MDA Compact IV ROM Development] sibbor:
Was a while ago since I last tried Android on my DIAM100, so I thought I'd give it a shot today. I downloaded the latest files from Balsat's server; the current zImage and images.

Same issue here
[Touch Diamond, MDA Compact IV ROM Development] touch of jobo:
diamonds, panels, battery charges

Maybe more devs have Raphs than Diams, but most development would apply to both devices. It's just hard to test and confirm that stuff works if you don't have the device.

The differences between Raphs and Diams are really in board-htcxxxx.c If you have a Diamond, and a Linux box, it doesn't take über-mad hacking skills to move changes over from raph to diam. (Although it helps if you can read C.)

Expired? Right now, the 666 vs. 565 flags are used based on GSM vs. CDMA. It would be more appropriate to do this based on Toshiba vs. Epson. Something along the lines of this commit here. (I'd love to hear what this does on different devices...) Here, msm_fb passes the pixel packing format from the mddi client platform data on to mdp->dma() which uses it to configure the dma2 flags. Maybe the 'output_format' member was intended for this, I didn't see it used anywhere, but I wasn't sure so I introduced a new member.

The battery_smem driver is one of those things you may want to copy over from raph to diam. (Also, once you have a battery driver enabled, make sure it doesnt report zero capacity. I got good values for the Raph100 (2-byte smem layout) with the commit from my previous post, but I'm not sure about the Raph/Diam800 side.) I would guess that the Diam100 uses the same smem layout as the Raph100 for this, and the Diam800 the same as Raph800. (But thats just a guess because I have nothing else to guess...)

Please report back when stuff moved over from Raphael works on Diamond so that it can be added into git.

Thanks,

-Jobo

EDIT:

So I went ahead and merged board-htcraphael into board-htcdiamond and here is the result. It compiles but I can't test it. I will produce a kernel and a commit against head as soon as I rebase my battery branch.
[Touch Diamond, MDA Compact IV ROM Development] frodo9999:
Hello to everyone,

I have the same problems with the battery drivers than adilkhan1214. I talk about the last Balsat build (Android-28May-09). My HTC Device is a:

DIAM100 64M

SPL-1.93 Olinex

MicroP-Diam (LED) v11

PSOC-Diam STAGE_PVT v0x30​

I can confirm that at least two more user have the same problems with the same DIAM100 model.

Thank you to everyone for help to port Android to other devices.

P.D: I think a lot of user are able to Donate to support this projets. Donations could help to devs to have enough devices for testing changes in the kernel and test it in diferents diam/raph models.
[Touch Diamond, MDA Compact IV ROM Development] Soaa-:
Just a quick reminder: the DIAM500's mtype (2040) activates the color fix, although it also changes the configuration and makes it not boot.

Fun fun. :|
[Touch Diamond, MDA Compact IV ROM Development] yochen:
i will try ,but not now~~~~~

thanks for sharing your idea!
[Touch Diamond, MDA Compact IV ROM Development] mitpianoman:
Not sure if there was any doubt, but I'm happy to report I was able to boot under WM 6.5 on a RAPH800.
[Touch Diamond, MDA Compact IV ROM Development] TR3Y:
Also, I've found that changing mmcblk0 (in the default.txt) to mmcblk0p5 makes the keyboard atleast show upon the screen in some android versions
[Touch Diamond, MDA Compact IV ROM Development] Erik_PLD:
Hello everybody!Please, can you update at some time the XDADeveloperWiki page?

thnx
[Touch Diamond, MDA Compact IV ROM Development] irusul:
Android on Wm 6.5

Good for you
[Touch Diamond, MDA Compact IV ROM Development] richs1992:
even I confirm the problem with the diam100 with the 28th may release (as the 26th).

I hope the problem will solve asap ... I like very much android and I hope there will be a 100% functional release one day.

good work

Richs
[Touch Diamond, MDA Compact IV ROM Development] lucxxx:
Hello

has anyone manage to boot diam 100 with Android_fs.tar.gz ??

i'm not able to boot, it freeazes my phone sayng "booting in 5 seconds....."

I need to format my "Internal Storage" to an ext2 or ext3 partition? or it works as is?
[Touch Diamond, MDA Compact IV ROM Development] jutley:
Hi i was woundering if anyone could help on the HTC Touch Pro2 section under roms i have opened up a thread for android port we need help testing and trying to ge a base vershion running on this device would anyone be so kind to help thanks for your time.
[Touch Diamond, MDA Compact IV ROM Development] touch of jobo:
This clearly indicates that the only problem is lack of battery driver. I'd be happy to work on this together with someone who has a Diam100. I will produce a kernel from last weeks head plus battery in Diamond (later tonight), just to get a handle on this...

I've heard that we need to change #if 1 to #if 0 in htcdiamond_fixup() in that board-htcdiamond. Tho I'd like to have a single board-htcblergh for both raph and diam (and maybe blackstone) and do everything in htcbergh_device_specific_fixes().

You need an ext2 (or 3) FS on a partition on your SD card and extract the .tar.gz into it. (You get to use fdisk, mkfs, tar.) Then, in your default.txt you don't specify an initrd, and on the cmdline you specify root=/dev/mmcblk0p2 (or whatever your partition is) in stead of /dev/ram0.

I personally don't have a Diamond, but I would say Balsat has managed to untar these onto a partition and boot into it. I do the same all the time on Raph100.

-Jobo

EDIT:

This kernel is head at 09/04/26 plus battery driver. This is a commit against that head (NOT current head. That commit would be huge :) )

If you have a Diamond an old set (kernel + images) that works (confirm this first so as to not chase ghosts), please test that it still works with this kernel (to make sure this kernel doesnt break anything new), that it doesn't work with recent images and the old kernel (to make sure the problem exists and that its the issue we're looking for), and finally that it works again with recent images and this kernel.
[Touch Diamond, MDA Compact IV ROM Development] richs1992:
how can I do an ext2(3) partition on my sd card ?? (I don't understand anything about these things)

Await for a your help

Richs
[Touch Diamond, MDA Compact IV ROM Development] touch of jobo:
On Diamond I'm not sure, as you can't take the SD card out. (Maybe from within Linux on the device itself?) With Raph I use a card reader to mount the (removable) SD card on a Linux box.

Not to sound like an asshole, but if you don't understand anything about these things, using the FS images you put in /tmp is probably the better way to go.

-Jobo
[Touch Diamond, MDA Compact IV ROM Development] Willis111:
I just use fdisk on my diamond ... plug it in, set it to disk mode, rtfm and fdisk away.
[Touch Diamond, MDA Compact IV ROM Development] fliggygeek:
Hey Balsat, whats up with your server?

its redirecting to another domain. also can i mirror the images when theyre accessible?
[Touch Diamond, MDA Compact IV ROM Development] krymel:
Hey,

i'm searching for the android images for installing them on my HTC Touch Diamond too. I also have webspace to mirror the images if wanted.

Would be nice to have a chance for building android images if the hosting / mirrors are offline.

Is there a documentation how to build such an image? :)
[Touch Diamond, MDA Compact IV ROM Development] krymel:
I've found the image build by Balsat on 2009-05-06 for touch diamond.

Uploaded it:

http://kyrosoft.de/downloads/Android-images.tar.gz

It's also available from:

http://www.wuala.com/Linux and Andr...id 1.0/_Builds/latest Builds/Diamond/?lang=de
[Touch Diamond, MDA Compact IV ROM Development] lucxxx:
I cant format internal storage of diamod with ext3, in fact i can but afther an restart the partition is back with fat32!! this is stupid!!!
[Touch Diamond, MDA Compact IV ROM Development] frodo9999:
Thank you Touch of Jobo¡¡¡

I test the lmage that krymel found (Balsat on 2009-05-06) and I can confir that it boot. Later I test that files changing the zimage file by your zImage-diamtest-jobo and my DIAM100 boot android without problem. With the new zImage test file my DIAM100 report a 84% Battery Level, and with WM6.5 I have a 52% Battery Level.

I´m waiting that some friends of Htcmania test this new zImage file to help you.

Thank you very much and if you need more test, please only order it.

EDIT:

_Erik_ - DIAM100 - Test the same Balsat build with the new zImage-diamtest-jobo with the same result. The old build work with the new zImage-diamtest-jobo file.

eco17 - DIAM100 - Test the same Balsat build with the new zImage-diamtest-jobo with the same result. The old build work with the new zImage-diamtest-jobo file.
[Touch Diamond, MDA Compact IV ROM Development] willyy1991:
They have to do it! WM sucks :S come on..
[Touch Diamond, MDA Compact IV ROM Development] NetRipper:
We'll get linux running, just a matter of time...
[Touch Diamond, MDA Compact IV ROM Development] druidu:
So bottom line is that sooner or later we're going to need some specs of the LCD Diamond's using (registers, init sequence, etc). I know Diamond's LCD is different from G1's (different size, different resolution), but Diamond and Raphael have very similar characteristics and I bet they have identical displays (it would be cost effective for HTC to use same part for both):

Display Type: color transflective TFT display

Display Color Depth: 16 bit/pixel (65536 scales)

Display Diagonal: 2.8 " (72 millimetres)

Display Resolution: 480 x 640 (307200 pixels)

Viewable Display Area: 1.7" x 2.3" (43.2 x 57.6 millimetres)

Dot Pitch: 0.09 millimetre/pixel

Do we know the manufacturer (could be written on the LCD itself if anybody disassembled the phone) or can we cross-reference the specs with common manufacturers? Maybe even get some datasheets? The part number in the service manual is: 80H00704-00

A datasheet for MSM7201A wouldn't be bad either, the Android guys surely have it but they don't share it. They did reference it in the source as "80-VA736-2 Rev C". If anybody has it, please share it (give me a priv msg if you don't want to post it).
[Touch Diamond, MDA Compact IV ROM Development] cr2:
Please read this page first:

http://wiki.xda-developers.com/index.php?pagename=RaphaelLCD

and maybe this one too:

http://wiki.xda-developers.com/index.php?pagename=RaphaelResearch

They have the same hitachi panels for the phones we have seen. You can check your panel id too (the exact location is documented in the MemoryMap page)
[Touch Diamond, MDA Compact IV ROM Development] NetRipper:
I'm thinking it's against the license for the MSM7201A to share the documentation, else Qualcomm would probably have made the documents public. The Android has the same chip, which should make a lot of the stuff easier.

The LCD is probably Hitachi. The wince drivers (htcdispsrvc.dll) refer to this panel in the code using debug printf's. A part of the LCD init has been researched by cr_. In fact he's playing a large role in documenting Raphael stuff.

A lot of investigative results for the Raphael can be found here:

http://wiki.xda-developers.com/index.php?pagename=RaphaelResearch

The diamond has a similar page, but either the research page is not complete or less research has been done:

http://wiki.xda-developers.com/index.php?pagename=DiamondResearch

For ARM datasheets you can refer to this one, which seems to be most alike with the ARM core in the MSM7201A:

http://infocenter.arm.com/help/topic/com.arm.doc.ddi0301g/index.html

I'm currently into debugging on how far the linux kernel loads - I have been able to trace it up to the point where the MMU is re-enabled. I've been using GPIO's to enable the flashlight to see where it gets. However, currently I'm stuck when the MMU is re-enabled, as I can't get the flashlight to light up to indicate it reached there. ;-) I'm almost certain it boots a bit further, but not sure up to where. (I have a Raphael, hence the flashlight.)

Ongoing investigation... I'm lovin' it. ;-)

edit: oi, cr2 beat me to it... :)
[Touch Diamond, MDA Compact IV ROM Development] NikPraskaton:
Thumbs up for trying to get this running on our diamond!
[Touch Diamond, MDA Compact IV ROM Development] druidu:
I know about all the research pages, thanks!

To be sure I read the MemoryMap correctly, panel_id is at physical address 0x081034? How should the id look like and what's the value for Raphael?

Here's what I have around that memory location for my Diamond:

00081034 | 0000000a 2beff7bf 5ffd0bb9 ffff35df | .......+..._.5..
00081044 | ffcfbddb b57ddf3f df3fdf7f 6bfbfef7 | ....?.}...?....k
00081054 | fffeefef 00000000 52455354 55aaaa55 | ........TSERU..U
00081064 | 58899885 00490044 004d0041 00300031 | ...XD.I.A.M.1.0.
00081074 | 00300030 00000030 00000000 00000000 | 0.0.0...........

How do you copy system dlls from wince? I tried to copy them from \windows to internal memory but I get an error saying that I'm not allowed to copy ROM files or something.

Actually, the exact datasheet for the cpu core is this one, but this is general -- it won't give us the specifics of MSM7201A like how to drive the MDDI inside the chip or list of registers and memory locations.

Damn, Diamond doesn't have that! Any idea if the vibrator is controlled via a simple GPIO?

I mapped out the sequence to power the LCD on/off, but it uses like 9 pins (maybe some are unrelated, gotta investigate). A simple pin to show binary output would be useful :)

PS: is there any place like an IRC channel dedicated to Android porting on HTC or something similar?
[Touch Diamond, MDA Compact IV ROM Development] cr2:
Your panel is from "sharp".

maybe, but it's not an arm11-controlled gpio. You need to disassemble the amss/microkernel to know for sure.

What pins are you talking about ?

#htc-linux on freenode
[Touch Diamond, MDA Compact IV ROM Development] druidu:
I'm kind of new to wince, where exactly is the amss/microkernel located and how do I get it? I can't even copy a dll from \windows to internal memory. Are there tools to extract files form the ROM? I'm trying to see if QMAT can help with that...

Basicly, haret imports NLedSetDevice from coredll.dll so I would start from there, if I could get the dll.

GPIO pins. The following are traced with haret when pressing the power button (which switches the display on and off).

LCD off:

out4-7(135)=0 out4-8(136)=0

out2_en-8(392)=1 out2_en-9(393)=1 out2_en-10(394)=1 out2_en-11(395)=1 out2_en-12(396)=1

out4-3(131)=0 out4-4(132)=0

LCD on:

out4-3(131)=1 out4-4(132)=1

out4-7(135)=1 out4-8(136)=1

out2_en-8(392)=0 out2_en-9(393)=0 out2_en-10(394)=0 out2_en-11(395)=0 out2_en-12(396)=0
[Touch Diamond, MDA Compact IV ROM Development] cr2:
It's loaded to (physical) 0xa00000, but is hidden somehow (unlike on the first titans ...)

Vibra is controlled via proc_comm interface, so don't waste time with nled*

http://wiki.xda-developers.com/index.php?pagename=RaphaelDEX

These are your 2 lcd power gpios, and wifi-related power/sdio gpios

http://wiki.xda-developers.com/index.php?pagename=Raphael_GPIO
[Touch Diamond, MDA Compact IV ROM Development] druidu:
Sorry for keep asking more questions, but I can't find any useful docs around...

I found some proc_comm_* functions in latest android kernel, there's a lot of code but I'm trying to get some minimum basic working code for the buzzer for example.

#define APP_COMMAND 0x00
#define APP_STATUS 0x04
#define APP_DATA1 0x08
#define APP_DATA2 0x0C

#define MSM_SHARED_RAM_PHYS 0x01F00000

int msm_proc_comm(unsigned cmd, unsigned *data1, unsigned *data2)
{
unsigned base = MSM_SHARED_RAM_PHYS;
// ...
writel(cmd, base + APP_COMMAND);
writel(data1 ? *data1 : 0, base + APP_DATA1);
writel(data2 ? *data2 : 0, base + APP_DATA2);
// ...
}

How do ioctl and cmd columns map to cmd/data1/data2 parameters in this function? For example, how would these commands be sent?

ioctl cmd
1c	0x4	pmic vibra on
1c	0x5	pmic vibra off

Thanks
[Touch Diamond, MDA Compact IV ROM Development] NetRipper:
Easiest way to have access to all files is to use a kitchen and extract a rom. The kitchens can be easily used to extract an existing rom.

Thanks for referring to the correct datasheet. I was under the impression it was the other one as I found it to be the only one to have a peripheral port remap register, but I was mistaken.
[Touch Diamond, MDA Compact IV ROM Development] skiwithpete:
Just to recap...

We're going to take the LCD code from the Raphael.

And...

When the G1 is released, we'll take the info about the Qualcomm chipset.
[Touch Diamond, MDA Compact IV ROM Development] NetRipper:
Why wait? There's quite some info to extract from the code.

http://git.android.com/?p=kernel.git;a=shortlog;h=android-msm-2.6.25

Not everything is complete though.
[Touch Diamond, MDA Compact IV ROM Development] TripleQ:
I dono if you guys knows that thread...

http://xdaforums.com/showthread.php?t=431115&page=4

They almost dumped a rom from the G1..

Keep you eye on it;)
[Touch Diamond, MDA Compact IV ROM Development] cr2:
Look at the vogue git branch, it has vibra (and sound) control implemented.

These are wince ioctl numbers and data for DEX1: device.

I don't have any working code.
[Touch Diamond, MDA Compact IV ROM Development] cr2:
"almost dumped" != "dumped".