- 1 Sony Ericsson Xperia X1/HTC-Kovsky - Linux/Android porting effort
- 2 Current state
- 3 Videos
- 4 Downloads
- 5 Lazymans guide to Linux/Android
- 6 Boot options
- 7 Compiling the Kernel from the Sources
- 8 Getting WiFi working
- 9 Known Issues and How-To solve them
- 10 IRC chat/discussion
- 11 Forum Treads
- 12 A little history
- 13 Repositories
- 14 Useful links
Sony Ericsson Xperia X1/HTC-Kovsky - Linux/Android porting effort
Technically the X1 is a HTC device, and it is based on the QCT MSN7xxxA chipset, which is employed on a lot of HTC devices. Therefore development is closely related to that on other HTC devices.
Notes on this article: This Wiki article is mainly aimed for normal X1 users who are interested in seeing Linux/Android running on the X1, but also for xda-developers who want to jump in the development boat and quickly gather some information on the outline of the project. If you see anything incorrect feel free to correct/supplement/extend it. Wiki's are meant to be collaborative ;). The content of this article may be out of date; newer, less buggy builds may be available. Check this thread for the Android effort: http://forum.xda-developers.com/showthread.php?t=609463
Warning: I'll just state the obvious: Linux/Android is no official platform for the X1, use it/flash it, you might brick you phone, you might not be able to receive warranty. Use it at your own risk. You've been warned.
Should I ditch Windows Mobile and switch to Android? : I think it's safe to say that for the average X1 user that's used to the high quality custom ROM's, Android is still far from a state that's reliable and functional enough for daily use.
Though this project is quite and end through, it's still far from completion. Many components of the device are not yet functional under Android 1.0.
|Device or function||Status||Technical name||Comment|
|Boot||Done||HaRET||Linux Boot Loader|
|NAND Boot||Done||LK Bootloader||LittleKernel Bootloader Currently issues with GSM and sound on NAND boot|
|Power management||More or less||Driver for DS2746 needs correction. The reason of high battery drain is unknown. Charging via USB/AC works|
|Console interface||Done||fbcon||Framebuffer Console|
|Android Graphical User Interface||Done||Google Android||XDANDROID, CM6, Sense...|
|Touch screen||Done||Epson D7741B1 F872U53, Source: PhoneWreck.com X1 block diagram, 'best educated guess' they say||Calibration in some builds already in the Default.txt boot options file. 'msmts_calib=0xc5.0x399.0x367.0x4d', see Boot options section. Others need calibration during boot.|
|Hardware keyboard||Done||Microp-KSC||Fully working keyboard that has 30% more additional new keys as Windows Mobile. Keyboard driver extended with haptic and visual feedback. "This new feature makes typing text in linux a joy!" :) [email protected] Keyboard Layouts need to be tested. (see Keyboard Layouts) (Keymap file here.)|
|Keyboard slide event registration and handling||Done||Microp-KSC||http://forum.xda-developers.com/showpost.php?p=4132824&postcount=474), rotation can now also be set for HaRET bootup in 'Default.txt'|
|Hardware buttons||Done||msm-gpio-keys||android might need a power button fix.|
|D-Pad||Working||Microp-KSC||Orentation of the Buttons on Keyboard Slide Event has been implemented.|
|SD Storage Access||Done||msm_sdcc||.|
|LCD Backlight||Done||Microp-KLT||implemented by ultrashot.|
|LED Illumination (the 4 notification LED's on both sides below the screen)||NO||Microp-KLT||needs implementation, algorithm is known.|
|LED Keyboard Backlight||Done||Microp-KLT||implemented by ultrashot.|
|LED D-Pad Backlight||Done||Microp-KLT||implemented by ultrashot.|
|GPRS/EDGE/3G/HSUPA||Done||||HSDPA/EDGE with 2G/3G switching like in winmo|
|GSM Phone Calling||Done|
|USB||Done||USB PHY SMSC USB3316, Source: PhoneWreck.com X1 block diagram||full hw reset implemented, works without the need to insert the cable while booting from winmo|
|Audio controls interface||Done|
|WiFi||Done||TIWLAN or wl1251-sdio||works with tiwlan, while wl1251 is unstable and lacks power saving mode|
|R/W Access to AT serial channel||Working||Qualcomm MXU6219 Quad-band GSM/Tri-band UMTS, Source: [PhoneWreck.com X1 block diagram||http://www.phonewreck.com/wiki/index.php?title=Sony_Ericsson_XPERIA_X1], 'best educated guess' they say||.|
|R/W Access to DATA serial channel||NO||Qualcomm MXU6219 Quad-band GSM/Tri-band UMTS, Source: PhoneWreck.com X1 block diagram, 'best educated guess' they say||.|
|USB Host Mode||YES||?||Working with ehci-msm7201.c by Andrew De Quincey. Needs external power.|
|Bluetooth||Done||Texas Instruments BRF6350 BL, Source: PhoneWreck.com X1 block diagram||Working in current XDANDROID builds, rfkill implemented in kernel.|
|GPS||Done||Integrated into Qualcomm MSM7200A Baseband Processor, Source: PhoneWreck.com X1 block diagram||Implemented in current XDANDROID builds.|
|Camera||WIP||driver for mt9t012vc is reimplemented. Still capture/preview is working. TODO is camera focus, reworking gpio init to be done as in native android devices, fix userland issues with video recording.|
- XDANDROID Wiki
- Xperia X1 android forum
- Kernel Autobuilder
- Kernel Autobuilder 2
- rootfs autobuilder
- initramfs autobuilder
Lazymans guide to Linux/Android
- Download a compiled package of a Linux distribution built for the X1.
- Place all the files in a folder directly under your device root (aka 'My Device' in Windows Mobile).
- Adjust the default.txt boot options file to your preferences or use the options that the builder provided. (see [Default.txt boot options | #Boot options])
- Fire up HaRET and hit 'Start'.
- Depending on the image that you downloaded and are booted, the Linux distro might not boot with a GUI (Graphical User Interface) but a CLI (Command Line Interface) instead. Ångström is the most common distro around right now and is used through a CLI. Android however usually boots up a GUI, but this might be different depending on the image.
- In case of Ångström with a CLI; Log in with 'root' account and no password. (According to: http://forum.xda-developers.com/showpost.php?p=4262910&postcount=26)
Depending on the package that you intend on running, the following boot options may be configured in the Default.txt file.
(Probably not yet complete and up to date)
####### Device ####### 1910 = Raphael (Touch Diamond) ####### 2006 = Kovsky (Xperia X1) set MTYPE 2006
####### KERNEL ####### Name of the image file, usually (starting with) 'zImage' set KERNEL zImage-xxx
####### INITRD ####### initrd file contains a filesystem that is loaded into ram ( initial ram disk) and is passed to the kernel from the bootloader (in this case Haret, but on other systems grub/lilo/elilo/etc). ####### Check this note on initrd by bloatboy in [PRJ][OS]Linux and Android on HTC Diamond "NOT YET WORKING" set INITRD initrd-xxx.gz
####### Size of RAM (continuous area) set RAMSIZE 0x6000000
####### Physical RAM address (to override the one set in HaRET, which seems to fail more often) set RAMADDR 0x10000000
####### Command line to pass to kernel ####### Root mount point: "root=/dev/ram0" ####### Working touch screen calibration: "msmts_calib=0xc5.0x399.0x367.0x4d" ####### Screen orientation (only recently supported): "fbcon=rotate:3" set cmdline "root=/dev/ram0 init=/init msmts_calib=0xc5.0x399.0x367.0x4d fbcon=rotate:2"
####### Boot from ram (needed for Linux booting) # ramboot # boot_delay=<N> # msmvkeyb_toggle=<off|hide> bootlinux
Compiling the Kernel from the Sources
- Make sure you have an appropriate environment to get the source (git) and to compile the kernel. Install git, gcc, make and libncurses-dev at least. For debian based distributions.
- apt-get install git-core build-essential libncurses-dev
- Create a directory to hold the kernel sources
- mkdir ~/kovsky-dev
- Download the kernel source
- cd ~/kovsky-dev
- git clone git://git.linuxtogo.org/home/groups/mobile-linux/kernel.git
- cd kernel
- git checkout -b htc-msm-2.6.27 origin/htc-msm-2.6.27
- cd ~/kovsky-dev
- Download and decompress the arm toolchain (64mb)
- cd ~/kovsky-dev
- wget THISLINK -O arm-2008q1-126-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 (The link-address has to be here instead of the link, but the large link makes the width of this page very big)
- tar xjf arm-2008q1-126-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
- cd ~/kovsky-dev
- Generate the default .config for the kernel(ARCH is case sensitive)
- cd ~/kovsky-dev/kernel
- make htc_msm_android_defconfig ARCH=arm
- cd ~/kovsky-dev/kernel
- cd ~/kovsky-dev/kernel
- export PATH=~~/kovsky-dev/arm-2008q1/bin:$PATH
- make zImage ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
- cd ~/kovsky-dev/kernel
- Play and have fun!!! Now you can copy the compressed kernel image to your blackstone
- cp ~/kovsky-dev/kernel/arch/arm/boot/zImage /wherever your boot files are stored
Getting WiFi working
- Download the TI wireless driver http://code.google.com/p/zimages/downloads/detail?name=sta_dk_4_0_4_32.tar.gz&can=2&q=
- tar -zxvf sta_dk_4_0_4_32.tar.gz
- cd sta_dk_4_0_4_32
- Set kernel path, i.e
- export KERNEL_DIR=/home/matt/kovsky-dev/linux-msm-xdadev/
- Build it
- make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- KLIB=/home/matt/kovsky-dev/linux-msm-xdadev KLIB_BUILD=/home/matt/kovsky-dev/linux-msm-xdadev/
- Tar it up into a modules tar ball, i.e
- tar -zcvf modules-22.214.171.124-01095-g23f3fd5.tar.gz wlan.ko
- Copy to device/sdcard
- cp modules-126.96.36.199-01095-g23f3fd5.tar.gz /mnt/xperia
Make sure the kernel version (i.e modules-188.8.131.52-01095-g23f3fd5 ) in the tarball name matches the output of uname -a, otherwise the module will not load
Known Issues and How-To solve them
- Because the power button doesn't work one might think that removing the battery or using the soft reset button is the only quick and dirty method to reset. However it is advised to use the reboot shell command instead for a clean reboot.
- If you want to use your XPERIA over the USB connection with your (Ubuntu) Linux, you have to disable WinSyncCE in the connection settings in Windows Mobile, and enable Disk drive mode.
- Most of ARAN's builds have decreased memory usage because of freezes while booting Linux. It will be for sure go to the max (256 MB) as we implement more stuff in the builds.
A great amount of information is shared and discussion is done over IRC in the HTC Linux channel, and is another valuable communication channel alongside the xda-developers forum.
- [email protected] - This is the main channel where most discussion is held:
Read back in time: http://irclog.netripper.com/?chan=htc-linux
- Current threads
- Android on X1 subforum http://forum.xda-developers.com/forumdisplay.php?f=622
- Old threads
- Original thread (by _Xmoo_), currently dead: [NO LONGER IN DEVELOPMENT - SEE OTHER THREAD] Linux on Xperia X1i http://forum.xda-developers.com/showthread.php?t=456595 [540 posts - 19-08-2009]
A little history
I believe _Xmoo_ and _dcordes_ started out quite a while back, mainly building forth on the porting effort that at that time was already running quite a while for other HTC devices such as the HTC Touch Diamond (Raphael) and HTC TouchHD (Blackstone). At the time when I started tracking the effort the thread was already quite a while running, Android 0.8 and 1.0 were running (booted with HaRET from Windows Mobile). The colours were kinda like the X1 was on psychedelic drugs. I think this was also due do the problems with the framebuffer, which also caused the images to appear upside down.
You can see that in this old Android 1.0 boot tutorial by Xmoo: http://www.youtube.com/watch?v=L4z1hgUNH3o&fmt=18 (which has been fixed now).
A lot of testers/users experienced problems with the HaRET booting method, where HaRET would hang when it had almost loaded the image. Unfortunately _Xmoo_ lost his X1 in a peculiar event, and development is now mainly led by _Aiv_, _ARAN_ and _dcordes_ if I'm correct. The thread is now dead and a new one has been set up by _dcordes_ that pretty much starts of where _Xmoo_'s [ thread | http://forum.xda-developers.com/showthread.php?t=456595] ended.
- https://gitorious.org/linux-on-qualcomm-s-msm/linux-msm htc-linux main branch
- https://gitorious.org/~ast/linux-on-qualcomm-s-msm/alex-linux-xperia xperia x1 development branch with 184.108.40.206 and 220.127.116.11 kernels
- https://gitorious.org/lk-msm7200a-htc-wince LK bootloader to boot from NAND on X1
- Technical teardown/analyses of X1 hardware - PhoneWreck.com
- Technical teardown/analyses of X1 hardware - Wiki Page - PhoneWreck.com
- For compiling here a short how-to from the BlackStone Linux wiki