jeudi 30 septembre 2010

GPIO Haret Howto

As usual you need Haret and HaretConsole to do that! My version or netrippers one.

Steps

1) Connect your TG01 with your wifi router and get the address

2) Open a terminal and lunch ./console

The command to watch GPIOs is "watch GPIOS , you replace with a number for seconds.

3)For the first time just run the followinf command to see what happens

watch GPIOS 1

Here you will see a lot of numbers and you will not understand a thing, it is normal.
Actually the LCD, usb,sd,wifi gpios are always running so these is a reason why you will always see the same numbers.

Haret provides a command which can block certain gpios.

ibit gpios

In the htc-linux.org Leo page . I found that we can block this gpios so we can start searching for others.

#lcd
ibit gpios 426 427 428 429 430 433
ibit gpios 448 449 450 451 452 456 457 458 459 460 461 462 463 464
# cam
ibit gpios 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271
# sd
ibit gpios 339 340 341 342 343 344
#wifi
ibit gpios 328 329 330 331 332 333

4) run the previous commands

5) Run

watch GPIOS 20

Still you will see that there are some gpios that are still printing all the way

6) Block them with the command

ibit gpios

7) And finally Run

watch GPIOS 20

And if you push the Camera buttton you will see that something with in1(23) that is you gpio for the camera button!

8) Run
watch GPIOS 20

And now can activate your Bluetooth too to see what happen!

mercredi 22 septembre 2010

Compiling the TG01 kernel!

Steps :

1) Use Linux, I am using Ubuntu. Go open a console and install this packages, you may not need all of them but is good to have it all. (Taken from source.android.com)

sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev

2) Download the cross compiler
I use the codesourcery cross compiler you can use the google one too!

Here is the link of the compiler:


3) Extract the compiler to /opt/cross

sudo mkdir /opt/cross
cd /opt/cross

I imagine that you have download the file in your /home/username/Downloads

tar xjvf /home/usename/Downloads/arm-2009q1-203-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2

Now you will have the folder arm-2009q1 in /opt/cross

4) It is great and to easy to define global variables in a unix system so we are going to create one to make our life easier. To a console type

gedit ~/.bashrc

and add the following line

export CROSS_TOOLS=/opt/cross/arm-2009q1/bin/arm-none-linux-gnueabi-

now to the console do

source ~/.bachrc

to be able to use the CROSS_TOOLS global variable

5) Create a directory Project in you home folder

mkdir Project
cd Project

Now the funny stuff:

6) Clone the git repository :

git clone git://github.com/endrix/kernel_common.git

Wait a little for the download !!!

7) Go to the kernel_common directory

cd kernel_common

8) Change the branch to the TG01

git checkout android-msm-2.6.32-tg01

9) Create the default config for htc leo but with some modified values for the TG01

make ARCH=arm htcleo_defconfig

10) Compile the kernel Image

make ARCH=arm CROSS_COMPILE=$CROSS_TOOLS Image

You wait a little and you will have the file Image in the arch/arm/boot directory

11) Download haret from the netrriper directory

haret for qsd8x

12) create a file default.txt with this in it

set mtype 2524
set ramaddr 0x11800000
set ramsize 0x18C00000
set kernel Image
boot

13) Create a ToshDroid directory in your SD card

14) Put the "Image" file the default.txt and the haret executable in the ToshDroid directory

15) Run haret and click on Run

16) You will see that the kernel is booting

17) And it craches ;) for the moment

So that is all folks for cross compiling the Linux kernel

jeudi 9 septembre 2010

Toshiba TG01 Android Porting

Yesterday I started a git repository for porting the Android to the Toshiba TG01 smartphone! In the begging I will start porting the linux kernel. I will not start form scratch. I am going to modify the htc HD2 kernel for the TG01. Both phone are sharing the same Snapdragon ARM processor!

Actually transferring the kernel to my github repo!

Stay tuned !

samedi 21 février 2009