xda-developers.com
forum.xda-developers.com
device database
wiki.xda-developers.com Wiki HomePage
FAQ | Xanadux

RecentChanges | FindPage | | LikePages | BackLinks

Blackstone Linux

Linux (Android and Angstrom) on Blackstone

This page contains the current status and instructions running Android (Google's operating system for phones) and Angstrom (Linux for embedded devices) running on the HTC Touch HD, also known as the HTC Blackstone.

Warning: Please note this is still in very early stages. If you don't know what you are doing...YOU WILL BRICK YOUR PHONE, we take no responsability. You've been warned.

Index

  1. Current state
  2. Progress
  3. Running Linux on your blackstone

    Get a Kernel
    Running Android 0.8
    Running Android 1.0
    Running Angstrom
    Running Debian

  4. Known Issues and How-To solve them
  5. Useful links
  6. Getting involved

Current state

As of now (2009-11-16) here is what works or not (testing on a BLAC100):

 Device / Task   Status 
 Boot   OK 
 Graphical interface   OK 
 Touch screen   OK 
 Phone   OK 
 SMS   OK 
 MMS   ??? 
 GPRS/EDGE/3G/HSUPA   OK Unstable 
 Wifi   OK 
 Bluetooth   OK 
 Access to SD / Internal Storage   OK 
 Main / Second camera   NOK 
 Hardware Home/Back/Menu/Talk/End buttons   OK 
 Hardware Volume buttons   OK 
 Hardware On/Off button   Partial (different function) 
 GPS   NOK 
 Stylus detection   NOK 
 USB   Partial (usbnet is working) 

Progress

2009-11-15

New team released a 1.6 Android version, the new Thread can be found at http://forum.xda-developers.com/showthread.php?t=584559

--- Android 1.6

--- Accellerometer works

--- Bluetooth Works

--- Screen on/off works

--- Telephone, SMS system works

--- 3G works

--- Internet connection is finally fully controlled by Android and not from startup.txt so is supposed to be easier and working better

--- WiFi working

--- Now power botton is "home botton" short press go to home, long press popup a menu of latest applications used

--- Recharging working

CAUTION --- THERE ARE INSTANCES OF LOOSING CAMERA AND VOLUME BUTTON FUNCTIONALITY AFTER TESTING. THE ONLY SOLUTION IS A HARD RESET. ALSO TO BE ON THE SAFE SIDE PLEASE ALLOW THE WINDOWS MOBILE TO STARTUP AND LEAVE IT FOR SOME TIME BEFORE STARTING HARET.. THIS ALLOWS WIN MOB TO COMPLETE ALL THE BACKGROUND PROCESSES..

2009-10-16

The devs are now making good progess again using Android 1.5 - keep up to date with progress in this thread (newest forum post) (note: only Android 1.5 is working best at the moment - 1.6 images will load but you can not make calls)

Summary:

calls fully working

audio player/ringtones/etc. working (playing from speaker only - no headphones support yet) - there are still pops/clicks from the speaker as it switches itself on/off

data connection working (see thread for steps to setup) - but not the most stable

only English lang support at the moment

only partial USB support

phone does charge but UI (or power led) does not always accurately reflect this

Links to images...

http://rapidshare.com/files/293276668/BLAC_touch_quickfix_corrected.rar

The ION Varient

http://rapidshare.com/files/293276662/BLAC_touch_quicfix_ION_corrected.rar

screen shots:

http://wiki.xda-developers.com/images/IMG_6911.jpghttp://wiki.xda-developers.com/images/IMG_6913.jpg

2009-06-11 Restarted Development by new Team (newest forum post)
2009-03-10 Update mostly of Android, compiled cupcake and created images (system.e2img, cache.e2img and data.e2img), the previous release used Diamond's images. Added Menu button in between Home and Back and improved a lot stability and softbuttons work better. The procedure is the same, unzip to sdcard. Ps: If you want to add apps to android, copy the .apk files to /tmp/newapps, I already copied the a few from Diamond's image. Drawbacks: From Android sdcard is not readable, working on it, also up/down (volume buttons), repeat the event when pressed, again, working on it. But hey, phone calls and SMS work, no sound or vibration thought. See Running Android 1.0
2009-03-08 blackstone patches added to the htc-msm-2.6.27 kernel branch LINK blackstone machine type in openembedded
2009-03-03

Update, android running from SD working, hard and soft buttons work. Also, zImage and patch updated. Someone can update more decently the wiki. See Running Android 1.0

http://wiki.xda-developers.com/images/200903050633.jpg

2009-02-24

The screen output problem got fixed.

Here at the wiki, you can find instructions on how to run Android 1.0 on your Blackstone, :).

So, now we can run a striped down version of Android 1.0!!!, a nice picture that shows it:

http://www.rewpparo.org/blackstone/android10.jpg

2009-02-22 Our fine developers got the screen to work properly. Android boots, but still has strange colors.
2008-12-28

http://www.gavero.com/pichurri/blackstone/images/corrupted_output_2008-12-28_1_small.jpg, still problems with htc_fb_console.c

http://www.gavero.com/pichurri/blackstone/images/corrupted_output_2008-12-28_4_small.jpg, still problems with msm_fb.c

2008-12-10 Angstrom boot video Android boot video

Running Linux on blackstone

To run linux on a blackstone, you'll need the following

  1. Haret.exe. This program will load a linux kernel for you from windows mobile without any change to windows mobile
  2. A default.txt, a file telling haret what to do
  3. A kernel Image. This is actually what is under development, it will change often. It's usually provided under the name zImage. Rename it to zImage.bin if you want it to work. See next section for download and details.
  4. An image of the OS you want to run (Android, angstrom...). See the section of the OS you want to boot

Please note that this procedure is very experimental, we're adding drivers one by one, and not much works yet. We're far away from having a usable rom.

Get a Kernel

You can get a precompiled Kernel Image from http://www.gavero.com/pichurri/blackstone/zImage (updated 03/03/09)
Kernel used : 2.6.27 HEAD from LinuxToGo
Latest patch : http://www.gavero.com/pichurri/blackstone/pichurri_2.6.27_2009-03-03.diff (updated 03/03/09)
pichurri_2.6.27_2009-03-03.diff was comitted to htc-msm-2.6.27 on March 8th 2009

OPTIONAL
If you want to compile your own kernel, follow these steps (on linux):

  1. 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

  2. Create a directory to hold the kernel sources

    mkdir ~/blackstone-dev

  3. Download the kernel source

    cd ~/blackstone-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

  4. Download and decompress the arm toolchain (64mb)

    cd ~/blackstone-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

  5. Generate the default .config for the kernel(ARCH is case sensitive)

    cd ~/blackstone-dev/kernel
    make htcblackstone_defconfig ARCH=arm

  6. Compile

    cd ~/blackstone-dev/kernel
    export PATH=~/blackstone-dev/arm-2008q1/bin:$PATH
    make zImage ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-

  7. Play and have fun!!! Now you can copy the compressed kernel image to your blackstone

    cp ~/blackstone-dev/kernel/arch/arm/boot/zImage /wherever your blackstone is mounted/

Running Android 1.0

  1. Disable the PIN from wince
  2. Unzip to your SD card (it should create a directory named tmp):

    android_cupcake_2009-03-10.zip

  3. Unplug your phone from the USB or configure it to use "Activesync" and not "Disk Drive".
  4. Softreset or reboot (switch off and on) your phone
  5. Run haret.exe on your phone (under /tmp/boot)

Note: This procedure won't remove windows mobile from your phone. To go back to windows after booting Linux, push the red (reset) button on the back of the phone (use the stylus)

Running Android 0.8

  1. Make a directory on your phone (NOT on SD card, it won't work), and put the following files in :

    Haret.exe
    Default.txt
    Kernel Image
    Android 0.8 initrd

  2. Edit default.txt, remove the # before the "set INITRD" line, and make sure the filename after is "initrd-android08.bin"
  3. Run haret.exe on your phone

Note: This procedure won't remove windows mobile from your phone. To go back to windows after booting Linux, push the red (reset) button on the back of the phone (use the stylus)

Running Angstrom

  1. Make a directory on your phone (NOT on SD card, it won't work), and put the following files in :

    Haret.exe
    Default.txt
    Kernel Image

    Kernel that works with Xfbdev

    Angstrom initrd

  2. Edit default.txt, remove the # before the "set INITRD" line, and make sure the filename after is "initrd-angstrom.bin"
  3. Run haret.exe on your phone

Note: This procedure won't remove windows mobile from your phone. To go back to windows after booting Linux, push the red (reset) button on the back of the phone (use the stylus)

It boots Angstrom, which will configure the usbnet with the 192.168.0.206 IP address, it also runs a SSH deamon, thus we can connect to the phone using the USB cable. If you want to build your own angstrom images, see Useful Links.

Running Debian

The following instructions describe how to get a working armel debian/unstable from SD-card on your blackstone.

  1. Format your SD-card so you've two partitions (e.g. using gparted). One fat32 partition for your WM stuff and haret and the kernel and a second partition for debian. The debian partition should have at least a size of 256MB, the more the better. Format the partition with ext2. The following instructions assume, that the WM-partition is your first partition and the debian partition the second one.
  2. Make a directory on the WM-partition and put the following files there

    Haret.exe
    Kernel that works with Xfbdev

  3. Put also a default.txt with the following content there
    set mtype 2030
    set kernel zImage-htcblackstone-20090308-01-xfbdev
    set ramsize 0x8000000
    set ramaddr 0x10000000
    set cmdline "root=/dev/mmcblk0p2 rootwait mem=108M msmsdcc_id=2 msmts_calib=0x395.0x3d1.0x79.0x77"
    boot
  4. That's all you've to do with the WM-partition.
  5. Switch to your pc now, create a directory named /root/blackstone-chroot/ there and run the following command as root
    cdebootstrap --arch=armel --foreign \
    --include locales,openssh-server,screen,udev sid /root/blackstone-chroot
  6. Create /root/blackstone-chroot/etc/fstab with the following content
    rootfs               /                    auto       defaults              1  1
    proc                 /proc                proc       defaults              0  0
    # uncomment this if your device has a SD/MMC/Transflash slot
    /dev/mmcblk0p1       /media/card          auto       defaults,sync         0  0
  7. Create the directory /root/blackstone-chroot/media/card. Your WM-partition will be mounted there.
  8. Create /root/blackstone-chroot/etc/hostname and insert a hostname of your choice.
  9. Create /root/blackstone-chroot/etc/network/interfaces with the following content
    auto lo
    iface lo inet loopback
    
    auto usb0
    iface usb0 inet static
            address 192.168.0.206
            netmask 255.255.255.0
            gateway 192.168.0.1
  10. Copy the files to the ext2 partition of your blackstone.
  11. Run haret and watch debian booting. It'll execute the second stage of the bootstrapping which may take a while (less than 30 minutes). After that, you'll get a login prompt, but won't be able to login, because there is no password set for root.
  12. Reboot your blackstone and edit the /etc/shadow of the debian partition so the entry for root looks like
    root:$1$DDKv/aQm$xj1MHkKYzcEsjvfClkRkz.:14329:0:99999:7:::
  13. Boot debian through haret again.
  14. You should now be able to login into your debian system with username root and password debian via console and ssh.
  15. Congratulations. You're done. You can now use the standard debian tools to manage your system.
  16. To get the modem running just have a look on the following page and install the FSO-stuff: http://wiki.debian.org/Teams/DebianFSO.

Connecting via SSH to your phone

  1. Configure your phone to use "Activesync" and not "Disk Drive". The usb driver cannot cope with the "Disk Drive" mode, but only works when you boot with the "ActiveSync" mode enabled.

    http://www.gavero.com/pichurri/blackstone/images/usb to pc.png

  2. Connect the phone to your PC using the USB cable
  3. Start haret to boot Angstrom
  4. Configure an IP address in your PC usbnet on the same segment as the phone (192.168.0.0/24), if you're using Linux on your PC

    ifconfig usb1 192.168.0.200
    ssh root@192.168.0.206
    (blank password)
    Note: Make sure you don't have a network manager or any software that will try to assign an IP address to the usb1 interface in your PC. On ubuntu you need to deactivate nerwork with the notification icon

Known Issues and How-To solve them

  • You hang at mmcblk0: p1 <p5>?
    Get a partition management program and check that the card is a primary partition and not a logical partition! if it is, reformat or convert it to an primary!
  • You hang at mmcblk0: p1?
    Push the red reset button with the stylus and try it again!
  • After running android, some windows mobile applications do no longer run, because of "invalid or missing certificates"?
    This is a known issue. For now you have no other choice but to hard reset your blackstone (backup your data first!). To prevent this from happening in the future you can install the Default_Signed_DisableSecurity.CAB-file afterwards.

Useful links

Android, Google's operating system for phones
Angstrom, Linux for embedded devices
Angstrom: Roll your own. Use htcblackstone as <your machine>
Linux on Diamond/Raphael
Forum on the development done for the HTC Diamond/Raphael
Forum on the development done for the HTC Touch HD/Blackstone
Haret
Haret Documentation
More Haret Documentation
More Haret Documentation
G1 dmesg
Manually Download and Install the latest Android firmware
Note on initrd
Installing software in Angstrom
Diamond Linux Development
Linux on vogue
Android on Kaiser
Android on blackstone
Blackstone roms
Changing Blackstone Language
HTC-Linux IRC live logs
Vogue Linux - by Martin Johnson (dzo)
Android on Kaiser
Android on HTC
WM5-6 memory management
AndroidPortingOnRealTarget
Android_on_OMAP
Customizing_Android_Initrd
Porting Android on Asus

todo: put title on each link

Blackstone Docs

Blackstone's Epson LCD controler doc

Getting involved

Join #htc-linux and #angstrom on irc.freenode.net
Forum Thread
Dev Thread


Last edited on November 16, 2009 10:58 pm.


Edit | PageHistory | Diff | PageInfo
Login
User Name: Password:
Remember Me?