[Touch Cruise Android Development] dubbeld00:
Alright, I really hope someone can get into this and cook a working zImage for the Polaris.

_______________________

First of all create a folder Android on your Polaris (in / (not on storage card)).

Get the following files, and place them in this folder:

- Haret

- default.txt (see attached)

- initrd for android

_______________________

Now we can bake a zImage. I've used a Linux distro called Ubuntu, version 8.04, default installation x86 (so not the AMD_64 version):

1. Get your Ubuntu up to date, go to your command line:

sudo -i

Enter your password, now you are logged on as root; enter:

aptitude update && aptitude upgrade -y

Your system is now up to date.

2. You have to install a couple of packages so you can cook your own zImage so enter:

aptitude install git-core git jfsutils xfsprogs quota isdnutils-base nfs-common oprofile

______________________

Now we can start creating the zImage on your Ubuntu installation (always keep in root mode!!):

1. Let's start with creating a directory for kernel in home directory:

mkdir ~/android-kernel
cd android-kernel

2. Next thing is to get the sources from repository. To make it happen (this could take a while, it downloads 280MB):

git clone git://git.linuxtogo.org/home/groups/mobile-linux/kernel.git

OUTPUT:

Initialized empty Git repository in /home/user/android-kernel/kernel/.git/
remote: Counting objects: 908251, done.
remote: Compressing objects: 100% (153970/153970), done.
remote: Total 908251 (delta 755115), reused 906063 (delta 753016)
Receiving objects: 100% (908251/908251), 281.86 MiB | 292 KiB/s, done.
Resolving deltas: 100% (755115/755115), done.
Checking out files: 100% (22584/22584), done.

3. The htc-msm branch is of our interest (again it could take a few seconds):

cd kernel
git checkout -b htc-msm origin/htc-msm

OUTPUT:

Branch htc-msm set up to track remote branch refs/remotes/origin/htc-msm.
Switched to a new branch "htc-msm"

4. Let's take care of arm toolchain. Download this file (64MB) into ~/android-kernel:

http://www.codesourcery.com/gnu_toolchains/arm/portal/package2549/public/arm-none-linux-gnueabi/arm-2008q1-126-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2

Unpack it:

cd ~/android-kernel
tar -xjf arm-2008q1-126-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2

5. Compile the kernel

Prepare default .config for Kaiser:

cd ~/android-kernel/kernel
make htckaiser_defconfig ARCH=arm

OUTPUT:

........
lots of output
........
# configuration written to .config
#

And finally compile the kernel to get zImage (takes a minute or two):

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

OUTPUT:

........
lots of output
........
Kernel: arch/arm/boot/zImage is ready

Now copy ~/android-kernel/kernel/arch/arm/boot/zImage to your phone (in the folder Android).

_________________

What do we have to change?

Well go to: ~/android-kernel/kernel/arch/arm.

Here we have the file htckaiser_defconfig, I've allready tried different things with the framebuffer (because it seems it goes wrong there) but it didn't work. Maybe someone can get a solution...

There are also 3 files within the ~/android-kernel/kernel/arch/arm/mach-msm folder:

- board-htckaiser.c

- board-kaiser-keypad.c (we have to change this to get our keypad working)

- kaiser-smd.c

If you made changes to the defconfig or to any of the other files, you have to do step 5 over again and copy zImage to your device and test it :).

_______________

Some ending tips:

A. Once you have downloaded git repository, you can swallow latest changes by issuing:

cd ~/android-kernel/kernel
git pull

B. If your machine has more than one cpus/cores you can speed up kernel compilation by adding -j <cores/cpus_number>, for example (dual core):

make -j 2 zImage ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-

C. If you want to cook on another distro, this are the minimal versions which you got to have:

Name Minimal version How to check:
o Gnu C 3.2 # gcc --version
o Gnu make 3.79.1 # make --version
o binutils 2.12 # ld -v
o util-linux 2.10o # fdformat --version
o module-init-tools 0.9.10 # depmod -V
o e2fsprogs 1.29 # tune2fs
o jfsutils 1.1.3 # fsck.jfs -V
o reiserfsprogs 3.6.3 # reiserfsck -V 2>&1|grep reiserfsprogs
o xfsprogs 2.6.0 # xfs_db -V
o pcmciautils 004 # pccardctl -V
o quota-tools 3.09 # quota -V
o PPP 2.4.0 # pppd --version
o isdn4k-utils 3.1pre1 # isdnctrl 2>&1|grep version
o nfs-utils 1.0.5 # showmount --version
o procps 3.2.0 # ps --version
o oprofile 0.9 # oprofiled --version
o udev 081 # udevinfo -V
o grub 0.93 # grub --version

D. Can't boot the zImage from haret (so you also don't get the grapical bug) try:

Upgrading your ROM to VEGA v2 or bepe 0.67 (It can also work on other ROMs, but cheese are tested)

Turn off 3g mode (in Comm Manager)

Turn off Wifi/WLAN (Comm manager)

Don't connect your device to your PC (USB)

Turn off bluetooth (comm manager)

Phone mode must be active!

Tnx to: dwaradzyn for his "how to cook" guide