Thursday, July 16, 2009

HOWTO Build Android Platform on Fedora Core 9

The final file structure looks like that

/home/android/
`-- mydroid
|-- bionic
|-- bootable
|-- build
|-- dalvik
|-- development
|-- external
|-- frameworks
|-- hardware
|-- packages
|-- prebuilt
`-- system


=========================================================

Download Android Source Code

[ ]# wget http://android.git.kernel.org/repo
[ ]# chmod +x repo
[ ]# mv repo /usr/bin

[ ]# mkdir -p /home/android/mydroid
[ ]# cd /home/android/mydroid
[ ]# repo init -u git://android.git.kernel.org/platform/manifest.git

gpg: keyring `/root/.repoconfig/gnupg/secring.gpg' created
gpg: keyring `/root/.repoconfig/gnupg/pubring.gpg' created
gpg: /root/.repoconfig/gnupg/trustdb.gpg: trustdb created
gpg: key 920F5C65: public key "Repo Maintainer "
imported
gpg: Total number processed: 1
gpg: imported: 1

Getting repo ...
from git://android.git.kernel.org/tools/repo.git
warning: no common commits
remote: Counting objects: 906, done.
remote: Compressing objects: 100% (404/404), done.
remote: Total 906 (delta 569), reused 785 (delta 482)
Receiving objects: 100% (906/906), 277.53 KiB | 142 KiB/s, done.
Resolving deltas: 100% (569/569), done.
From git://android.git.kernel.org/tools/repo
* [new branch] master -> origin/master
* [new branch] stable -> origin/stable
* [new tag] v1.6.8.7 -> v1.6.8.7
From git://android.git.kernel.org/tools/repo
* [new tag] v1.0 -> v1.0
* [new tag] v1.0.1 -> v1.0.1
* [new tag] v1.0.2 -> v1.0.2
* [new tag] v1.0.3 -> v1.0.3
* [new tag] v1.0.4 -> v1.0.4
* [new tag] v1.0.5 -> v1.0.5
* [new tag] v1.0.6 -> v1.0.6
* [new tag] v1.0.7 -> v1.0.7
* [new tag] v1.0.8 -> v1.0.8
* [new tag] v1.0.9 -> v1.0.9
* [new tag] v1.1 -> v1.1
* [new tag] v1.2 -> v1.2
* [new tag] v1.3 -> v1.3
* [new tag] v1.3.1 -> v1.3.1
* [new tag] v1.3.2 -> v1.3.2
* [new tag] v1.4 -> v1.4
* [new tag] v1.4.1 -> v1.4.1
* [new tag] v1.4.2 -> v1.4.2
* [new tag] v1.4.3 -> v1.4.3
* [new tag] v1.4.4 -> v1.4.4
* [new tag] v1.5 -> v1.5
* [new tag] v1.5.1 -> v1.5.1
* [new tag] v1.6 -> v1.6
* [new tag] v1.6.1 -> v1.6.1
* [new tag] v1.6.2 -> v1.6.2
* [new tag] v1.6.3 -> v1.6.3
* [new tag] v1.6.4 -> v1.6.4
* [new tag] v1.6.5 -> v1.6.5
* [new tag] v1.6.6 -> v1.6.6
* [new tag] v1.6.7 -> v1.6.7
* [new tag] v1.6.7.1 -> v1.6.7.1
* [new tag] v1.6.7.2 -> v1.6.7.2
* [new tag] v1.6.7.3 -> v1.6.7.3
* [new tag] v1.6.7.4 -> v1.6.7.4
* [new tag] v1.6.7.5 -> v1.6.7.5
* [new tag] v1.6.8 -> v1.6.8
* [new tag] v1.6.8.1 -> v1.6.8.1
* [new tag] v1.6.8.2 -> v1.6.8.2
* [new tag] v1.6.8.3 -> v1.6.8.3
* [new tag] v1.6.8.4 -> v1.6.8.4
* [new tag] v1.6.8.5 -> v1.6.8.5
* [new tag] v1.6.8.6 -> v1.6.8.6
Getting manifest ...
from git://android.git.kernel.org/platform/manifest.git
warning: no common commits
remote: Counting objects: 116, done.
remote: Compressing objects: 100% (45/45), done.
remote: Total 116 (delta 39), reused 107 (delta 36)
Receiving objects: 100% (116/116), 29.54 KiB, done.
Resolving deltas: 100% (39/39), done.
From git://android.git.kernel.org/platform/manifest
* [new branch] android-1.5 -> origin/android-1.5
* [new branch] android-1.5r2 -> origin/android-1.5r2
* [new branch] android-sdk-1.5-pre -> origin/android-sdk-1.5-pre
* [new branch] android-sdk-1.5_r1 -> origin/android-sdk-1.5_r1
* [new branch] cdma-import -> origin/cdma-import
* [new branch] cupcake -> origin/cupcake
* [new branch] donut -> origin/donut
* [new branch] master -> origin/master
* [new branch] release-1.0 -> origin/release-1.0
* [new tag] android-1.5 -> android-1.5
* [new tag] android-1.5r2 -> android-1.5r2
* [new tag] android-sdk-1.5-pre -> android-sdk-1.5-pre
* [new tag] android-sdk-1.5_r1 -> android-sdk-1.5_r1
From git://android.git.kernel.org/platform/manifest
* [new tag] android-1.0 -> android-1.0

Your Name [ ]: scott
Your Email [ ]: scott.shu@gmail.com

Your identity is: scott
is this correct [yes/no]? yes

Testing colorized output (for 'repo diff', 'repo status'):
black red green yellow blue magenta cyan white
bold dim ul reverse
Enable color display in this user account (y/n)? y

[ ]# repo sync
... skip ...
... skip ... checkout 1.9G in 22 minutes
[ ]#

Install some tools before build "manifest"
[ ]# yum install java-1.6.0-openjdk-devel
[ ]# yum install gperf

Make it


Reference:
http://source.android.com/download/using-repo

HOWTO Install Android SDK 1.5.r2 on Fedora Core 9

The final file structure looks like that

/home/android/
|-- android-kernel
| `-- kernel
|-- android-sdk
| `-- android-sdk-linux_x86-1.5_r2

=========================================================

Download Android 1.5 SDK, Release 2
[ ]# mkdir -p /home/android/android-sdk
[ ]# cd /home/android/android-sdk
[ ]# wget http://developer.android.com/sdk/download.html?v=android-sdk-linux_x86-1.5_r2.zip
[ ]# unzip android-sdk-linux_x86-1.5_r2.zip

Linux Kernel for Android
[ ]# mkdir -p /home/android/android-kernel
[ ]# cd /home/android/android-kernel
[ ]# git clone git://android.kernel.org/kernel/common.git kernel
[ ]# cd kernel

[ ]# git branch goldfish origin/android-goldfish-2.6.27
[ ]# git checkout goldfish

[ ]# make ARCH=arm CROSS_COMPILE=arm-linux- goldfish_defconfig
[ ]# make ARCH=arm CROSS_COMPILE=arm-linux- menuconfig
[ ]# make ARCH=arm CROSS_COMPILE=arm-linux- zImage

Switched to branch "goldfish-2.6.29"
[ ]# git branch goldfish-2.6.29 origin/android-goldfish-2.6.29
[ ]# git checkout goldfish-2.6.29

To see a list of existing branches
[ ]# git branch
android-2.6.27
goldfish
* goldfish-2.6.29

Android Emulator

Create Android Virtual Device
[ ]# android-sdk/android-sdk-linux_x86-1.5_r2/tools/android create avd -n foo -t 3
Created AVD 'foo' based on Google APIs (Google Inc.)

Run the emulator
[ ]# android-sdk/android-sdk-linux_x86-1.5_r2/tools/emulator @foo -kernel android-kernel/kernel/arch/arm/boot/zImage

Delete the Android Virtual Device
[ ]# android-sdk/android-sdk-linux_x86-1.5_r2/tools/android delete avd -n foo









Endianness

LE: Little-endian

BE-8: Byte-Invariant Big-endian

BE-32: Word-Invariant Big-endian

The differences between BE-32 and BE-8 data buses are:
• In a BE-32 system, the representation of a 32-bit Word access is
the same between a BE-32 access and a LE access to the same word address.
However, the representation of the byte (and half-word) accesses on the bus is
different.

• In a BE-8 system, the representation of a byte access is the same
between a BE-8 access and a LE access to the same byte address. However, the
representation of the word (and half-word) accesses on the bus is different.

Android Development Environment

Thursday, June 25, 2009

Linux Kernel Reading Book List

1. Professional Linux Kernel Architecture (PDF)


This book is focus on kernel 2.6.24 ~ 2.6.26.
2.

Android Reading List

1. Hello, Android: Introducing Google's Mobile Development Platform
2. Android Application Development
3. Unlocking Android (PDF)
4. Professional Android Application Development (PDF)
5. Android Essentials (PDF)
6. Beginning Android (PDF)
7. Pro Android (PDF)
8. Androd Programmer Guide (PDF)
9. The Busy Coder's Guide to Android Development ()
10.


Related Blog:
http://scottshulinux.blogspot.com/2009/01/howto-compile-android-linux-on-fedora.html

Tuesday, June 23, 2009

Eclipse

Embedded Linux development using Eclipse
(PDF)



Eclipse Distro + Subversive Team Provider
Free download