Linux boots on my Htc Vox!

Search This thread

biktor_gj

Senior Member
Jan 25, 2008
1,408
7,008
@Usak: The login details are:
username: root
password: root

@cpt.bert
GSM functions are not available now. There's no audio support even, so even if you could make a call, you wouldn't hear anything. By now, only the screen, part of the keyboard, mmc, and some little things are working, but you can't use it as a phone.
The purpose of porting linux is to replace windows mobile (wich is slow, closed source, and cannot be too modified -you can cook roms, ok, but that's not comparable to make your own operating system and make it behave the way you want, or better said, the way it should-)

We are on a very first stage for this, and there's a long way to go, please be patient.


By the way, I was wondering if we should start making a wiki page for this, and get it updated with the information we have about the device, links to the files, and start putting things on the xda-devel ftp... what do you think?

PS: Still working on the gpe thing! definitely seems a problem with the framebuffer...
 

usakc

New member
Apr 22, 2007
3
0
@biktor

Many thanks, it works!! The only problem is, we cannot get into graphic environment.
Can you help again??
 

biktor_gj

Senior Member
Jan 25, 2008
1,408
7,008
OK, I have a new kernel build for you!

This theorically fixes the frame buffer issue (everything wich wasn't text appeared corrupt on the screen).

Download: http://rapidshare.com/files/94816162/zImage.tar.gz.html
Overwrite the zImage from the Linux test Image I uploaded some days ago with this file, and when you boot, you should see that little penguin called Tux :)

This kernel build has also some other settings enabled:
Omap RTC Clock
OMAP 1 Wire bus
I2C
And lots of other supposedly working drivers (I've been tweaking this thing for hours)
Anyway, lights still don't come up when I ask them to do it, so don't expect too much apart from the framebuffer.

About the GPE Image you've been asking: It's useless for now, as you cannot move between tabs, and it's not even compiled for this, but as you wanted to see it by yourself...

NOTICE: YOU CAN REALLY BREAK A LOT OF THINGS IF YOU DO THIS WRONG.
I'm not responsible for your mess, you're warned. All the data on your SD will be erased, so make a backup. This is a little bit tricky, and if you do it wrong, you could get to break your PC. The instructions posted here are generic, be careful, and use your common sense. Don't blame me if you screw it up!


To follow these instructions you will need:
*WM5Storage installed on the phone

*Windows XP (you can use another windows version, but you may have problems I didn't have to face -you shouldn't anyway-)

*Linux distribution (installed on the hard drive or booted from livesystem cd)

*The linux test image I uploaded some posts ago:
http://rapidshare.com/files/93938763/test.zip.html
*The new kernel image:
http://rapidshare.com/files/94816162/zImage.tar.gz.html
*A bootable GPE Image (for example this):
http://www.angstrom-distribution.or...e-image-glibc-ipk-2007.12-h2200.rootfs.tar.gz
Once you have this, you can start.

1. From Windows
Connect your phone through USB to the computer, and launch WM5Storage
Disable: Read-Only, Removable Class and Lock card on attach only. Hit activate.
Windows will show the phone as an external hard drive.
Go to Control Panel --> Administrative tools --> Computer Management
When the window opens, click on Disk Management.
There, look for your SD card and DELETE the partition. Then Create a new primary partition, leaving at least 200Mb free for another partition on the end (In my 1Gb SD card for example, I left 700Mb on the primary partition, and 300Mb for the linux partition)

When you're finished creating that first partition, copy the contents of the Test linux image onto that new partition, then overwrite the file called zImage with the new one. Now you have the updated linux test image.

Now, boot linux on the PC. Don't disconnect the phone, or do anything with it yet.
Open a terminal and run (as root)
fdisk /dev/sdX (where X is the letter of your memorycard)
Create a new linux partition (press 'N', enter, then 'P', enter, '2', enter, enter, enter). When you finish press 'P' <enter>.
you shold be seeing the two partitions on the SD, the first will be FAT, the second will be Linux Ext2. Assuming you've done it right, you can press W <enter> to save changes.

Now, reboot the phone. When it comes back to life, open WM5Storage again, and, on the terminal write:
mkfs /dev/sdX2 (where X is the letter of your memorycard)

When you finish with this you are almost finished!

Mount the second partition to a folder (for example /mnt/voxpart2)

Uncompress the image file:
tar -xzf Angstrom-minimalist-gpe-image-glibc-ipk-2007.12-h2200.rootfs.tar.gz

Then copy the contents of the Angstrom minimalistic image to the mountpoint of your second partition. (something like "cp -rf * /mnt/voxpart2 on the folder where you decompressed the file, following the example)

When you're done, open the default.txt file on the first partition on the SD.
Replace the contents of the file with this:

set MTYPE 6666
set RAMADDR 0x10000000
set RAMSIZE 0x02000000
set CMDLINE "root=/dev/mmcblk0p2 noinitrd"
set KERNEL zImage
bootlinux

Save the file, umount all the filesystems from the SD, disable wm5Storage and run HaRET. Hit Run, and you should start booting GPE with the new kernel.

If you want to boot back to windows mobile simply pull the sim card cover out, it will shut down.
If you want to boot back to the ramdisk image (cc.ext2), undo the changes you've done to default.txt

Note this is almost useless, and that you won't be even able to run a terminal from the graphic environment, this is just for you to see it really does the job :)

Regards!

PS: oops... what a big post...
 
Last edited:
Jan 9, 2008
30
15
Groningen
Some usefull bits:

Some extra OMAP850 clock speeds (taken from OMAPClock, they go in {kernel_source_root}/arch/arm/mach-omap1/Kconfig):
Code:
config OMAP_ARM_60MHZ
	bool "OMAP ARM 60MHz CPU clockspeed"
	depends on ARCH_OMAP1 && ARCH_OMAP850
	help
	  Enable 60MHz clock speed for OMAP850. Lowest possible clock.

config OMAP_ARM_80MHZ
	bool "OMAP ARM 80MHz CPU clockspeed"
	depends on ARCH_OMAP1 && ARCH_OMAP850
	help
	  Enable 80MHz clock speed for OMAP850. If unsure, say N.

config OMAP_ARM_100MHZ
	bool "OMAP ARM 100MHz CPU clockspeed"
	depends on ARCH_OMAP1 && ARCH_OMAP850
	help
	  Enable 100MHz clock speed for OMAP850. If unsure, say N.

config OMAP_ARM_120MHZ
	bool "OMAP ARM 120MHz CPU clockspeed"
	depends on ARCH_OMAP1 && ARCH_OMAP850
	help
	  Enable 120MHz clock speed for OMAP850. If unsure, say N.

config OMAP_ARM_144MHZ
	bool "OMAP ARM 144MHz CPU clockspeed"
	depends on ARCH_OMAP1 && ARCH_OMAP850
	help
	  Enable 144MHz clock speed for OMAP850. If unsure, say N.

config OMAP_ARM_168MHZ
	bool "OMAP ARM 168MHz CPU clockspeed"
	depends on ARCH_OMAP1 && ARCH_OMAP850
	help
	  Enable 168MHz clock speed for OMAP850. If unsure, say N.

config OMAP_ARM_186MHZ
	bool "OMAP ARM 186MHz CPU clockspeed"
	depends on ARCH_OMAP1 && ARCH_OMAP850
	help
	  Enable 186MHz clock speed for OMAP850. If unsure, say N.

config OMAP_ARM_192MHZ
	bool "OMAP ARM 192MHz CPU clockspeed"
	depends on ARCH_OMAP1 && ARCH_OMAP850
	help
	  Enable 192MHz clock speed for OMAP850. If unsure, say N.

config OMAP_ARM_204MHZ
	bool "OMAP ARM 204MHz CPU clockspeed"
	depends on ARCH_OMAP1 && ARCH_OMAP850
	help
	  Enable 204MHz clock speed for OMAP850. If unsure, say N.

config OMAP_ARM_216MHZ
	bool "OMAP ARM 216MHz CPU clockspeed"
	depends on ARCH_OMAP1 && ARCH_OMAP850
	help
	  Enable 216MHz clock speed for OMAP850. If unsure, say N.

config OMAP_ARM_216MHZ
	bool "OMAP ARM 216MHz CPU clockspeed"
	depends on ARCH_OMAP1 && ARCH_OMAP850
	help
	  Enable 216MHz clock speed for OMAP850. If unsure, say N.

config OMAP_ARM_228MHZ
	bool "OMAP ARM 228MHz CPU clockspeed"
	depends on ARCH_OMAP1 && ARCH_OMAP850
	help
	  Enable 228MHz clock speed for OMAP850. If unsure, say N.

config OMAP_ARM_240MHZ
	bool "OMAP ARM 240MHz CPU clockspeed"
	depends on ARCH_OMAP1 && ARCH_OMAP850
	help
	  Enable 240MHz clock speed for OMAP850. If unsure, say N.
 

lukas.wolf

New member
Dec 29, 2007
3
0
Hi all,

I've just stumbled upon this thread and tried the newest posted zImage and ramdisk (not gpe yet) and it works great so far ;-). I'd be interested in helping out too, I don't know a lot about the kernel but have been tinkering with ramdisks and custom made kernels before. I could also contribute a little to a wiki...

Have you decided yet where to host a wiki and the files? Could you do it like xanadux here on xda-dev?

Keep up the great work and thanks for your efforts!

Greetings, Lukas Wolf
 

biktor_gj

Senior Member
Jan 25, 2008
1,408
7,008
@Steffan
You scared me with that! :) I'll try to merge it into the kernel this weekend!
One thing, do you think Omapclock does really change the cpu clock? Been thinking about it for a while and I'm not too sure that it does what it say it does... Maybe I'm thinking too much, but the idea of windows not getting stucked when I change the cpu freq on the fly above the specifications given by TI...

@lukas
Welcome!
About the wiki, I'm still thinking about it... Of course it will be more accesible here, but maybe Google gives a better service...

@all
I've been tweaking a bit the tornado keyboard driver, and I found the guy who did it got to work the direction keys handling them in a completely different way than the standard omap keyboard, but I`m not getting it still. When I have some results I'll get back!
 

lukas.wolf

New member
Dec 29, 2007
3
0
Regarding the clock speed, I've tested all settings from 80Mhz to 264Mhz and it definitly makes a big differance. I'm just no sure if it's safe to run it that high for a longer period, but as it's dimmed (set it to 186) or sleeping (80Mhz) most of the time I guess it's ok.

Update: I've just now realized that I get some minor screen errors with 264Mhz, 240 seems to run fine though. On the other end, 80 is working fine but 60Mzh crashed immediatly.

L
 
Last edited:

Dr. Martin Gonzo

Senior Member
Aug 27, 2007
528
1
Tours
I don't know a thing about Linux but would getting this work might be a way to integrate Android on the Vox in the future ?

Anyway you seem to do a great work there guys.!:)
 

lukas.wolf

New member
Dec 29, 2007
3
0
@biktor_gj

I've reproduced your steps (2.6.16.27, omap1 patch, tornado and wizard patch) and updated with your keyboard mappings. Compiled it with code sourcerys arm-toolchain. I've tried to shed some light into the duplication of keys when pressing n-key (and some other keys).

You've problably made this as well:
I've followed it up to omap_kp_scan_keypad() in omap-keypad.c. There the new state of the keypad is read in with some bitwise magic and I don't know how to proceed debugging from there. In the state array just one index should be filled by the corresponding key bitpattern, but with the "n"-key state[0] to state[7] gets filled with all the same value, that's why we get 8 key events.

Anybody any ideas?

@StefanHamminga
I've also downloaded and inspected 2.6.24.3 patched with 2.6.24-omap1 and seen that quite a bit of the tornado patch seems to be integrated already. Have you succeded running the 6.24 kernel? If yes what steps did you take?

@all
- I've seen on linwizard sourceforge that they have a git repository, still looking into it, from the mailing list there seems to be a little progress lately...
- Is the wizard the most similar device to the vox? what about the work of the xanadux people? Haven't looked into it, what could we use?
- I've run haret-5.1 and haretconsole and could get some gpios, but I've no clue what to do with this info. Only the keys that don't work at the moment (up/down/etc.) result in GPIO state change. But how to proceed from here?

Greetings, Lukas
 

biktor_gj

Senior Member
Jan 25, 2008
1,408
7,008
Hi lukas, have you seen the tornado-keypad driver? It's stored at /drivers/input/keyboard.

There, the author (some guy called Nico -thanks man!-) says this:
/*
* key tables. a bit more complex than those in the omap-keypad
* driver: HTC devices keys events tends to trigger two or more
* row/col.
*/

The driver is constructed in a similar way to omap-keypad, but it's using a different delay to avoid the flow of keys.

It really does some part of the job, as I'm able to let the volume and sliding keyboard softkeys work without triggering events from other keys, but as soon as I put all the bunch of keycodes requiered for the complete keyboard, the driver stops responding without dumping a kernel message. Probably a buffer overflow I guess, but I'm working more on that file now, as it seems to have a lot of chances more to work right.

By the way, traced the GPIOs from the D-Pad keys and guess what... They seem sliding-switch dependant. But hey, still working on it!
I haven't got it yet, but I feel like on the way, got to work the caps lock led also, but still don't know how... (i think I put a '1' where a '0' was, but don't know where...)
 

biktor_gj

Senior Member
Jan 25, 2008
1,408
7,008
lukas.wolf:
- Is the wizard the most similar device to the vox? what about the work of the xanadux people? Haven't looked into it, what could we use?
- I've run haret-5.1 and haretconsole and could get some gpios, but I've no clue what to do with this info. Only the keys that don't work at the moment (up/down/etc.) result in GPIO state change. But how to proceed from here?


I almost forgot this part... I got the gpio change traced for the d-pad keys, and for the sliding keyboard switch (what makes the phone know it has to switch to landscape) but haven't got it working yet (that's why I'm looking at the tornado-keypad.c)

The thing about the wizard, is that it uses the same cpu, and pretty much the same hardware design. I tried with the typhoon kernels I found, and none of then booted. The same happened with the tornado.
The biggest progress on the xanadux page is about phones wich use an Intel PXA processor, wich has almost nothing similar to this phone.
We could use root filesystems from others, if they're compiled for standard arm. But anyway, we would need to change the bootscripts, keycodes, and lots of other things, so, maybe better if we start from scractch with something like GpePhone, so we can build it specifically for this. That way we will learn more about it, and will be easier to modify whatever we need to tune...

@Dr Martin Gonzo
Already working on the Android thing too... The Omap 850 cpu is Arm V5, and Android is compiled for Arm V5. It starts booting on the HTC Vox, but it doesn't get anywhere past the first part of the INIT. But with lots of patching, we could make it run here. By now it's not viable, because the kernel we have is a box full of bugs, with no real support for anything wich is not a screen, or a keyboard, but, compatible, it is. I'm not working more on that by now, because I think it's more important to have a good kernel than booting google-os, but if some day we have a good working kernel, we can try that too :)
 
Last edited:

BoardDWorld

Member
Aug 30, 2007
18
0
Don't Give Up!

This is very exciting stuff, please keep it up. I can't help out much but can devote as much time as you need to testing.
 

sujahat

Member
Nov 6, 2007
21
0
Great going guys

WM6 is really slow in the phone.. i just put it on auction on ebay last night.. i guess i will take it off right away.. rather use it for testing then scrap it..... do let me know if you need me..
 

llipavsky

New member
Apr 16, 2008
4
0
Great work!

Hi,

It's a great work you've done! Could you please attach/post your current config and publish the source somewhere?

I've also noticed that new linwizard kernel has been released yesterday, but unfortunately my vox won't boot with it.

can you add following to the kernel config?:
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
This will greatly help in the future and (I hope) won't increase size much

I'd like to try to test kernel from linux-omap git tree, but since I never worked with non-x86/x86_64 kernel, I'd appreciate your code & config as startpoint

TIA

Lukas Lipavsky
 

biktor_gj

Senior Member
Jan 25, 2008
1,408
7,008
I was hoping to get some things fixed before doing that, but my Htc Vox died a week ago and it's gone for repair. Try to avoid unplugging the lcd cable too many times, it's sticked to the main board with some glue, and when the glue stops doing its job, the phone starts to reboot itself for no apparent reason.

If it works for linwizard, it should work for us too (if they didn't change too much on the screen driver...) Whenever I find some time (this weekend), I will upload all the sourcecode I have to sourceforge (from the working version), so you can download it from there. You'll also need an arm toolchain! (if you need more info just ask) I wish I could upload it clean, but build I was working on is _very_ patched, and you might see a lot of printks dumping info to the screen... Anyway, will try to clean that before uploading. Will post back when done!
 

llipavsky

New member
Apr 16, 2008
4
0
> If it works for linwizard, it should work for us too
Actually, there's a problem with framebuffer device in new linwizard kernel on vox, so probably rest of the kernlel would work.
 

prajith

Senior Member
Aug 15, 2007
341
1
I dont think I would like to have linux (or android) on my vox.
The main purpose of using a windows mobile device is its close integration with the desktop OS. Without that what good are HTC phones for? I mean Nokia and Sony Erricson provide much better phones and the only reason why HTC sells is because of WM.

Now the thing to watch is if the upcoming android could do what WM can but even then it will take a great deal of thinking to move away from Windows Mobile. Atleast for me....
:)
 

makaveli86

Senior Member
Dec 28, 2007
225
0
I dont think I would like to have linux (or android) on my vox.
The main purpose of using a windows mobile device is its close integration with the desktop OS. Without that what good are HTC phones for? I mean Nokia and Sony Erricson provide much better phones and the only reason why HTC sells is because of WM.

Now the thing to watch is if the upcoming android could do what WM can but even then it will take a great deal of thinking to move away from Windows Mobile. Atleast for me....
:)
Linux would should run much faster and a lot more efficiently than WM would. granted it is in the early stages so probably a lot of bugs to sort out, but from the users i've talked to that got linux installed on their phones, they all say it runs a lot faster. not to mention its open sourced, so traditionally, linux comes with tons of custom options