yashsingh1/xdaforums huggingface dataset:
[XPERIA X1 ROM Development] scholbert:
Hi,

yes that's the point, start into the GUI with a power plug. Afterwards it could be unplugged ;).

We'll need some tweaks though...

I decided to step a bit deeper into this Android system the next days.

Already had a look into the initrd.

One of the key elements during start up is an elf binary called android.init.

I seems to be responsible for some elementary functions on initializing the system.

Could also be a missing entry in the rest of the init scripts.

If someone knows more about it.... :rolleyes:

@dcordes: Thanks for the link, i'll give it a try!

May take some time, because right now there are many things to do at work, also need my X1 as a daily phone...

Anyway keep on!

Cheers,

scholbert
[XPERIA X1 ROM Development] demster:
I got it sort of working with the powerplug attached instead of just the USB plug into my laptop. Android looks quite good, some keys are even working and I really like the progress!

EDIT: I also got the slide thing to unlock the phone, where you have to connect dots to create a sequence (with F4 or F5 you lock the phone).

Great work so far :D:D:D (to all who helps making this possible)
[XPERIA X1 ROM Development] hhenault:
WI-FI, you won the game !!!

It works nice, thanks to Scholbert !

Probably one million of little things to fix, but it WORKS !!!

--------------------------------------------------------------

if I could get a beer each time I had to reset my X1, my personnal consumption would reach 10 liters a night ...
[XPERIA X1 ROM Development] scholbert:
Thanks again for appreciation...

Anyway would be nice to solve also the screen upside down issue.

I opened up a new thread to collect hardware manuals for the X1

Hopefully this may lead to a very good understandig of what's inside.

I found a full manual for the Epson controller inside X1.

Unfortunately this document is available in japanese only.

See this post for the link:

http://xdaforums.com/showpost.php?p=4719748&postcount=9

It's obvious that HTC has integrated the display in abnormal orientation, compared to other devices. Modern displays are capable to compensate this and use some logic to revert the orientation. If you now this logic, this is no big deal :p

I am not sure if the upside down effect may be caused by one of the function registers inside this chip.

Could also be wrong setting inside MSM7200 GPU, because the Epson device "simply" translates between MDDI and TTL-RGB.

Possibly this is to fix at least with some setup inside Android system.

Read many reports of this effect though.

Remember some of the guru's talking about first prototypes that used a bootloader that displayed upside down. While booting into windows mobile this was fixed. During the step to mass production this was also fixed in the booloader.

Whatever i'm sure we could do it some day, just wanted to inform you about my thoughts :rolleyes:

EDIT: Squashfs support has been integrated into kernel.

Some Android packages use this file format for read-only system partition, see attachment for the latest kernel image.

This kernel may help to do some experiments with other packages (e.g. for raphael). Did not try it right now nut feel free to do so!

Regards,

scholbert
[XPERIA X1 ROM Development] informatico:
Everything works so great graphically :D

we need some drivers now :)
[XPERIA X1 ROM Development] informatico:
I Can't wait to see xperia working as phone :D:D:D:cool:

Can your phone already recognize the sd card ? or show photos etc.
[XPERIA X1 ROM Development] hhenault:
A look inside the initrd supplied above, interesting things attached :

in the init script :

The usb device is up as netwrk device usb0, IP=192.168.0.206, gw=192.168.0.200

a telnetd daemon is launched

So, it would be interesting to make the usb device recognized by your PC (post #114)
[XPERIA X1 ROM Development] hhenault:
This image (#132) does not work: it ftreezes quite immediatly at :

....

console handover: boot [ htc-fb-1] -> real tty0

------------------ Oops! it works for me too !!!!
[XPERIA X1 ROM Development] informatico:
it works for me....
[XPERIA X1 ROM Development] achmed20:
for teh screen issue. wastn that allready solved? im not sure if its this thread or teh other one (general x1) but im quite sure some1 solved that allready.
[XPERIA X1 ROM Development] cyberdesigner.net:
as i remember only for angstrom not android... and the console _is_ right orientet... only the (whatever is used) X is turned 180 degres... have searched today for a config file to tell android to start rotated. but... found nothing helpful :(
[XPERIA X1 ROM Development] Borstel:
How can i test it? I just want to see android on my Xperia Screen, but i don't know how to do that. :X
[XPERIA X1 ROM Development] cyberdesigner.net:
read post #92 #94 #96
[XPERIA X1 ROM Development] SneakyViper:
What did you change since the first tries with the SDHC card? I'm having the same problems, the "No such device or address" error. I've tried different zImage's (scholbert's, blackstone's and my own build), different default.txt's, but nothing seems to help.

I also tried logging in using telnet to see the actual device name, but that didn't work either, it would immediately disconnect again. Ping works though...
[XPERIA X1 ROM Development] informatico:
to hhneault:

Try this default.txt

http://rapidshare.com/files/292702787/default.txt

It has correct screen calibration and onscreen keyboard active

when you are in front of the locked screen just press F1 on the onscreen keyboard

Good Luck :)
[XPERIA X1 ROM Development] hhenault:
Nothing special, I just put the files in the SD Card '/TMP' directory, put the power plug into the X1, and launched Haret-X1.exe .

Sure I made a mistake at the beginning, but I was so excited that I cann't remember which mistake ...

You should carefully check that all the stuff is properly in '/TMP' of your SDcard.

default.txt <== posted by schlolbert @ #143

zImage_kovsky_20091012 <== posted by scholbert @ #132

initrd.cpio.gz <== those 5 from blackstone, somewhere at the beginning of this thread

data.e2img

cache.e2img

haret-x1.exe

system.e2img
[XPERIA X1 ROM Development] hhenault:
Hey all !!!

I got the X1 plugged to my USB-PC (Linux, Fedora 11), launched haret-x1.exe

good news : linux recognized the X1 as "usb0", without IP addr (no dhcpd in android)

I have set manually the usb0 (as root) :

ifconfig usb0 192.168.0.200

then :

telnet 192.168.0.206

And it works !!!

I'm logged as root, without being prompted for userid nor password ..

the mount command gives :

# mount

rootfs / rootfs rw 0 0

none /dev/pts devpts rw,mode=600 0 0

/dev/mmcblk0p1 /mmc vfat rw,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1 0 0

/dev/loop0 /system ext2 rw,errors=continue 0 0

/dev/loop1 /data ext2 rw,errors=continue 0 0

/dev/loop2 /cache ext2 rw,errors=continue 0 0

tmpfs /dev tmpfs rw,mode=755 0 0

devpts /dev/pts devpts rw,mode=600 0 0

proc /proc proc rw 0 0

sysfs /sys sysfs rw 0 0

tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0

#​

the set command gives :

# set

HOME=/

IFS='

'

OPTIND=1

PATH=/system/bin:/system/xbin:/sbin:.

PS1='# '

PS2='> '

PS4='+ '

PWD=/system/bin

TERM=linux

_=/system/bin:/system/xbin:/sbin:.

imgdevname=/dev/mmcblk0p1

imgdevnum=1

imgdir=/tmp

msmsdcc_id=2

msmvkeyb_toggle=on

#

​

Some traditionnal unix progs work, other don't, or incomplete, or missing

among working :

basic unix command (ls, cat, dd, ln, mv, ping, mount ...)

among missings :

cp, telnet, ftp, vi, ed ...

among half-broken or minimalist :

ssh [bad entropy seed], ifconfig [mysterious parms], route [same] ...

if someone knows what parms expected by route (i.e. 'route add default gw 192.168.0.200) , then we'll probably get android browser working ...

for Windows users, you have a reasonnable chance to get the IPAQ usb drivers working for android/X1

A suivre ...
[XPERIA X1 ROM Development] vdelf:
hi @all

i fixed the wrong battery- and usb-plug-detection in my kernel, so there is no need anymore to start linux plugged in. The usb-plug-detection takes up to 10 seconds, and the capacity is reported a bit lower than in wm6.5 but it works well for me.

If someone feels brave enough to test my kernel, its attached. Feedback by pm is very welcome :) If it works on other X1s too, i can commit my changes to the kernel-source.

By the way, with Alt + cursor left/right you can switch between the linux consoles. Nice for debugging. Even hardware-keys work (au-key between Sym and space, and digipad left/right). Sadly "reboot" dosnt work, hangs my X1.

greetings vdelf
[XPERIA X1 ROM Development] scholbert:
Screen Rotation

Hi!

Wow great finding :D

This is very useful to examine the system!

Another topic:

I started to look deeper inside kernel, maybe someone could help!

So i have to quote myself, because i think i have found something interesting in the Epson support package for API programming.

There's a register for screen rotation of display 0 (Epson chip can handle more than one display!!).

It is assumed that HTC decided to connect the TFT to the display 0 port, because this is the only port to drive WVGA resolution.

I implemented a little hack, but it seems this is not enough. Maybe some additional settings have to be done to make it work.

These are the dedicated lines i found in the API package from Epson:

...
//---------------------------------------------------------------------------
// seMwpSetMainRotation() - .
//---------------------------------------------------------------------------
void seMwpSetMainRotation( UInt32 RotationDegrees )
{
switch( RotationDegrees )
{
case 0:
seModifyReg16( REG0504_MAIN_PATH_CONFIG, 0x0006, 0x0000 );
break;
case 90:
seModifyReg16( REG0504_MAIN_PATH_CONFIG, 0x0006, 0x0002 );
break;
case 180:
seModifyReg16( REG0504_MAIN_PATH_CONFIG, 0x0006, 0x0004 );
break;
case 270:
seModifyReg16( REG0504_MAIN_PATH_CONFIG, 0x0006, 0x0006 );
break;
}
}
...

So setting some bits in S1D13774 register 0x504 should rotate the screen by 180°

This is what i've done in the kernel source in the file mddi_client_epson.c:

...
static int mddi_epson_probe(struct platform_device *pdev)
{
printk("mddi_epson_probe\n");

int ret;
[B]uint31_t reg_status;[/B]
...
#if defined(CONFIG_MACH_HTCBLACKSTONE) || defined(CONFIG_MACH_HTCKOVSKY) || defined(CONFIG_MACH_HTCTOPAZ) ||

defined(CONFIG_MACH_HTCRHODIUM)

/* mddi_remote_write(mddi, 0, WAKEUP); */
client_data->remote_write(client_data, GPIOSEL_VWAKEINT, GPIOSEL);
client_data->remote_write(client_data, INTMASK_VWAKEOUT, INTMASK);
client_data->remote_write(client_data,0x8000,0x400);//rgb565 input
[B]reg_status = client_data->remote_read(client_data,0x504);//read main path status reg[/B]
[B]client_data->remote_write(client_data,(reg_status | 0x004),0x504);//screen rotation 180 degrees[/B]
client_data->remote_write(client_data,0x8000,0x680);//main memory rgb565
client_data->remote_write(client_data,0x4000,0x600);//reset
#endif //ORUX
...

Any comments on this?

BTW, what does this address refer to?

#define LCD_CONTROL_BLOCK_BASE 0x110000

@vdelf: That's great news, would you mind posting your patch?

Would be very helpful!!

Best regards,

scholbert
[XPERIA X1 ROM Development] scholbert:
GPS issue....

Hi again!

Another thing i realized maybe related to GPS freeze on Diamond and Raphael.

But at the moment this is only speculation.

So it would be nice to get this verified by some other users working with my kernel release. It would be very helpful to fix some bugs i guess ;)

Pelase try the following:

1. Grab this little tool and install it to your device:

http://xdaforums.com/attachment.php?attachmentid=186365&d=1242625661

By default GPStool uses the "real" COM port to acces the GPSone chipset, so no AGPS or something.

2. Go outside and start the tool, take a watch and wait for a fix.

Normally this should do fine within some seconds, maybe some minutes.

3. Exit GPStool and start the Android package. Wait untill the GUI is appearing.

4. Return to Windows Mobile by pressing the reset button on the back of your device.

5. After WM has completed start GPStool again, take a watch and wait for some fix.

Please report how long you are waiting for a fix!

If you got very long fix times after you had booted the linux kernel please report!

Best regards,

scholbert
[XPERIA X1 ROM Development] achmed20:
since i'm actualy just a low end coder, i actualy have no clue about kernel coding. but from my understanding, it should'nt matter if its android or angstrom since both are based on linux. so if u get those graphic headers from angstrom, they should work for android too. same for the keyboard module

but, like i said, i never got into kernel coding itself so this is more an assumption ;)
[XPERIA X1 ROM Development] Lucleonhart:
For all of us no-ieda-of-linux-people, could somebody be brave enough to make a little package for starting, so replacing the pretty fast updating kernels here will get us running with this great project?

Thanks in advance (I got all files together i think, but it's not booting, hanging in command line ui with last line saying "boot"...)! :)
[XPERIA X1 ROM Development] scholbert:
Would do a simple zip of my system...

But no way to post it here, the package would be to big for an attachment.

If there's anyone with rapidshare account or similar....

Please help out!!

Regards,

scholbert
[XPERIA X1 ROM Development] Darth Sith:
No account needs for megaupload.

Try it.
[XPERIA X1 ROM Development] hhenault:
to vdeff :

I tried your kernel, it works.

The only difference is that the 1st boot part (console) is correct in the screen, but the 2nd part (init.android) is still reversed ...

basic functions available thru command line busybox (just type 'busybox' without args)
[XPERIA X1 ROM Development] vdelf:
@hhenault: Hmm, for me it shows "charging xx%" on the lock-screen when i plug in the charger, and does not show "charging xx%" when i dont. Also the xx% should be somewhat realistic, mostly lower than in wm6.5. Thats the only part i changed. Does it work like this on your device, too?
[XPERIA X1 ROM Development] hhenault:
you're right, I didn't notice : charging @91%

Unlock with F1 ==> popup SYStem UID's inconsistent ... I'm feeling lucky ==> Ok
[XPERIA X1 ROM Development] scholbert:
Hey hhenault!

:confused:

You're confusing me....

Taking my latest kernel build (zImage-20091012) and the latest default.txt (fbcon = rotate:2) gives the same result:

Console: O.K.

Android: Upside down!

Console does a handover during boot, while it switches to the orientation.

While starting into graphic mode (msm_fb is responsible now) it falls back to upside down.

So this still unsolved.

Did i miss something?

scholbert
[XPERIA X1 ROM Development] hhenault:
For those looking for last files,

last items gathered in this zip file :============> http://dl.free.fr/r0OSnpfc2

Archive: android-X1-20091014.zip

Length Date Time Name

-------- ---- ---- ----

33554432 04-10-09 19:49 tmp/cache.e2img

33554432 04-10-09 23:49 tmp/data.e2img

348 14-10-09 14:02 tmp/default.txt

165376 09-10-09 20:39 tmp/haret-x1.exe

809457 04-10-09 20:00 tmp/initrd.cpio.gz

268435456 29-09-09 02:57 tmp/system.e2img

1382260 13-10-09 14:11 tmp/zImage_kovsky_20091012

1358236 14-10-09 09:57 tmp/zimage_kovsky_20091014

-------- -------

339259997 8 files
[XPERIA X1 ROM Development] hhenault:
Hello all,

May somebody post which applications are running, and which don't run ?

My opinion is that for the moment, the screen keyboard is not easily usable, nor the sliding one ( I have an azerty sliding kbd ).

But I can telnet the X1 from my Linux box, and edit any text file by 'busybox vi ...'

I can also easily add new files via the SD card.

If somebody want to test any new Android appl., just post it and I'll give a try.

Also, if somebody has some background in cross-compiling console appl., and can give a link to some tuto, I'm ready to port a console ftp client, which is missing in this release.
[XPERIA X1 ROM Development] scholbert:
Superb...

Hi hhenault,

thanks for hosting the ZIP-archiv of the Proof-Of-Concept package :D

BTW, i will try to fix the keyboard issue.

All the *.e2img inside the package are simple ext2 formated files.

It's easy to loop mount them on your host PC and edit anything you like inside the file structure with the comfortable tools of your workstation.

Maybe we should shrink down the size of system.e2img a little bit to make it more handy to deal with.

Anyway, having telnet access on the platform is a must.

So thanks for pointing out the necessary steps!

This gives a good tool do examine the system at runtime ;)

Very nice progresses :D

Where have the kernel hackers gone ?

scholbert
[XPERIA X1 ROM Development] Lucleonhart:
Hey there.

Just downloaded your files hhenault, but it stops at exactly the same point as my own gathered files:

[2.951538] console handover: boot [htc_fb-1] -> real [ttfy0]

And thats it, even after 10 minutes...

Got a X1i with Touch It 14.2.1.
[XPERIA X1 ROM Development] Chaosstorm:
The keyboard works great with your version.. but i have a qwerty :P
[XPERIA X1 ROM Development] scholbert:
See git repository...

Hi Lucleonhart!

Seems that the X1 behave a little different concerning timing limits.

On my hardware there's no such problem :D

Anyway should be fixed with the latest kernel, see here:

http://git.linuxtogo.org/?p=groups/...it;h=d692af1b9e2e83cc19d969a633d77abfd4e9d582

Got no time to recompile new kernel right now...

If no one else will do i may post an updated zImage tomorrow.

Regards,

scholbert
[XPERIA X1 ROM Development] hhenault:
I have double-checked by re-downloading the zip file, unzip to the root of the SD card, and launched haret-X1.exe : it works for me, with or without power plugged.

During the past days, I got the X1 freezed at the same point ('console handover: ...') several times: it was mostly due to testing the stuf with another haret.exe, another initrd etc ...

So, either your got a bad download or bad SDcard install, or the two X1 are differents (ROM? Battery low ? SDcard ?)

I suggest that you retry carefully the whole operation.

good luck !
[XPERIA X1 ROM Development] vdelf:
I like Android!!

I just finished "playing around" with the Android, checking the apps, exploring the menus, checking the wallpapers... and it feels good! Stable, fast, responsive, smooth. To have the full fun, i remapped the three essential Android-Keys in the kernel to the X1-Buttons as follows:

Home = Panel

Menu = left softkey

Back = OK

(Power = right softkey, but nothing happens)

Now you can play with Android without the on-scree-keyboard. :D

Patch:

diff --git a/drivers/input/keyboard/microp-keypad.c b/drivers/input/keyboard/microp-keypad.c
index 70f199c..aa9aa55 100644
--- a/drivers/input/keyboard/microp-keypad.c
+++ b/drivers/input/keyboard/microp-keypad.c
@@ -190,10 +190,11 @@ static int microp_keymap_raph100[] = {

// This is htckovsky keymap. can be remapped by userland
static int microp_keymap_htckovsky[] = {
+
KEY_RESERVED, // invalid
KEY_ENTER,
KEY_LEFT,
-	KEY_RESERVED, // NAVI_SILVER_LEFT
+	KEY_F1, // NAVI_SILVER_LEFT; Menu-Key for Android
KEY_RESERVED, // NAVI_GREEN
KEY_A,
KEY_F,
@@ -201,10 +202,10 @@ static int microp_keymap_htckovsky[] = {
KEY_D,
KEY_RESERVED,
KEY_RESERVED,
-	KEY_RESERVED, // NAVI_SILVER_RIGHT
+	KEY_POWER, // NAVI_SILVER_RIGHT; Power-Key for Android
KEY_DOWN,
KEY_RIGHT,
-	KEY_RESERVED, // NAVI_XPANEL
+	KEY_HOME, // NAVI_XPANEL; Home-Key for Android
KEY_K,
KEY_J,
KEY_H,
@@ -212,7 +213,7 @@ static int microp_keymap_htckovsky[] = {
KEY_RESERVED,
KEY_RESERVED,
KEY_RESERVED, // NAVI_RED
-	KEY_RESERVED, // NAVI_OK
+	KEY_BACK, // NAVI_OK; Back-Key for Android
KEY_UP,
KEY_RESERVED,
KEY_L,

HERE i found the android keycodes.

And here is my kernel-zImage:
[XPERIA X1 ROM Development] SneakyViper:
I know now what I was doing wrong: I didn't check the partition on the sd card. Although it was formatted as FAT32, the partition was not marked as primary. Once I changed this, the error did not occur anymore. Now I can test some more as well, I've got some posts to catch up :p

Edit:

I can create a new zImage as well tonight, if scholbert didn't do it yet. I've got another question tho: in the wiki there is an explanation for compiling the kernel, but it's using the 'old' compiler from codesourcery, 2008q1, but there's also a 2009q1 version. Last time I tried compiling the kernel, I used the 2009q1 version and it seemed to work just as well and that included running on the Xperia. Is there any particular reason not to use it? I haven't really searched for it, but I thought maybe someone knows it by heart.
[XPERIA X1 ROM Development] informatico:
does your linux recognize the sd card ... i mean files or media gallery for fotos... ?

I get the message sd card removed i am not sure if is my problem or is for all so ... i have 16 gb fat 32
[XPERIA X1 ROM Development] cyberdesigner.net:
with this image my X1 freezes after framebuffer console, befor 1st android screen appears :(
[XPERIA X1 ROM Development] allenx1:
Ummm... sorry to be a noob but where can i get the Android file?
[XPERIA X1 ROM Development] cyberdesigner.net:
http://wiki.xda-developers.com/index.php?pagename=Kovsky Linux
[XPERIA X1 ROM Development] Lucleonhart:
Woohooo, now it boots, even with the new image from vdelf! So, i'll experiment a bit, too! So far i can say that no connection works (phone, wifi, bluetooth) and the SD card is not recognised, but maybe i misformatted it... *g*

One question... is there a special reason why it is that slooooow? The hardware of the G1 is not better than our beloved X1, so is there a driver issue or something? :)

BTW: Wouldn't it be nice to add the Kovsky to http://www.androidonhtc.com ?
[XPERIA X1 ROM Development] scholbert:
Hi there!

Maybe someone should check the start up scripts... :confused:

What exactely is slow?

Starting applications or running applications.

Please be aware that this package is very early stage.

It was intentionally packed for blackstone, i guess it's based on standard system for emulator.

Also keep in mind:

- everything is loaded form the loop mounted file on sdcard

- maybe some adjustments for RAM usage is needed to perform better

At this early stage the X1 system may not be compared with Android on a G1!

Indeed it would, anyway Kovsky is already here: http://www.htc-linux.org

Check the wiki!!

@dcordes:

Thank for the hint, of course your right about SDHC!

It was a mistake :p

@SneakyViper:

If everything works out nicely using this toolchain, there's no problem using it for the kernel compilation.

From my point of view, some devolopers prefer to use older toolchains because most bugs are known or even fixed in this environment.

There's no real improvement with the newer toolchain, i suppose.

If you like to compile for userland (Android system files, e.g. some native libs or arm binaries such as busybox) it is recommended to use the same toolchain you've build the kernel/system with. Otherwise there might be some conflicts.

In general (e.g. angstrom distribution) get it like this:

A system compiled with 2009q1 will run applications compiled with 2008q1.

A system compiled with 2008q1 may run into errors with applications compiled with 2009q1.

Apart from this most parts inside Android are written in Java, no need for these kind of toolchain...

Regards,

scholbert
[XPERIA X1 ROM Development] strboy:
been reading this post for some time now, (use my pone too much to use as a test subject) but keep up the great work guys, i cant wait till you get something stable running...