Monday, February 1, 2010

Linux on HD2 source code (so far)

Just a small update. I managed to get a git up a few days ago on linuxtogo.org and today I've managed to tidy up and commit the code that I have so far to this git.

I also planned on making a guide to build the kernel from scratch, but didn't get to that yet. You can take a look however at other guides for other phones, and just swap the git repository with the one linked above. Here is a guide for the Blackstone. I suggest you use the prebuilt toolchain by Google though. Otherwise you may run into compile issues regarding floating point instructions.

For a HaRET build you can check www.netripper.com/leo/

As default.txt you can use:
# MTYPE of the HTCLEO
set mtype 2524

# This is the physical location of the first memory bank
set ramaddr 0x20000000

# 224MB ram, just a guess though. Not sure how large
# the first bank is (or the second).
set ramsize 0x0E000000

# You must use "Image" instead of "zImage", as the
# decompression routine fails on the Leo!
set kernel Image

# The most important parameter is "lpj=8000000"
# here, without it, the kernel hangs during boot
# when it tries to calculate the loops per jiffie.
set cmdline "init=/init root=/dev/ram mem=64M lpj=8000000"

# Boot the image
bootlinux
Have fun!