1. 主机(Host)
Dell Optiplex 745, Pentium D Processor, Ubuntu 7.10
# uname -a
Linux souken-i2 2.6.22-14-generic #1 SMP Tue Dec 18 08:02:57 UTC 2007 i686 GNU/Linux
# cat /proc/version
Linux version 2.6.22-14-generic (buildd@terranova) (gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)) #1 SMP Tue Dec 18 08:02:57 UTC 2007
2. Android 安装笔记 @ 2009/01/05
About Android
==============
*
Development Resources
======================
* App SDK
* Sources
Install SDK
============
* Downloaded package: android-sdk-linux_x86-1.0_r2.zip
* Install guide:
* steps
# cd ~
# mkdir -p android/SDK
# cd android/SDK
# cp ~/Download/android-sdk-linux_x86-1.0_r2.zip .
# unzip android-sdk-linux_x86-1.0_r2.zip
# vi /home/souken-i/.bashrc (Add this line:)
------
export PATH=${PATH}:/home/souken-i/android/SDK/android-sdk-linux_x86-1.0_r2/tools
------
Now the SDK is OK. Run "# emulator" to test.
* Update Eclipse:
* Remove current eclipse if have:
# sudo apt-get remove eclipse
* Download latest elipse from:
* I choose "Eclipse IDE for Java EE Developers (162 MB)" and
download file: eclipse-jee-ganymede-SR1-linux-gtk.tar.gz
* Unpack it and add its path to PATH.
* Version: 3.4.1 Build id: M20080911-1700
* Install Eclipse plugin for Android: ADT
* Download latest ADT(I choose ADT-0.8.0.zip) from:
* Following the installing guide to install ADT:
Build Enviroment
================
* Guide:
* Install Java:
# sudo apt-get install sun-java6-jdk
* Install Other library
# sudo apt-get install flex bison gperf libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev
* Install SDL
# sudo apt-get install libsdl-dev
SDL fails to install on my Host. It gives me this message:
-----------------------
libsdl1.2-dev:
依存: libx11-dev しかしそれはインストールされません
依存: libglu1-xorg-dev しかしそれはインストールされません または
libglu-dev
-----------------------
So I tried to install libx11-dev, this time it gives me another
error message:
-----------------------
libx11-dev: 依存: libx11-6 (= 2:1.1.1-1ubuntu4) しかし、2:1.1.1-1ubuntu4ja1 はインストールされようとしています
-----------------------
But in fact, 2:1.1.1-1ubuntu4ja1 is installed in my host.
* I skip this package, and to see when and where this package will
be used.
* Update git version
On Ubuntu 7.10, if I use command apt-get command to install git tools,
the version is 1.5.2. But repo requests that git version is 1.5.4 or
larger. So, I have to compile it from source code.
See guide on:
# git clone git://git.kernel.org/pub/scm/git/git.git
# cd git
# make prefix=/usr; make install
# make prefix=/usr all doc info
# sudo make prefix=/usr install install-doc install-html install-info
To compile git, install the packages below on Ubuntu for missing header
files:
# sudo apt-get install libc6-dev libssl-dev zlib1g-dev libcurl4-openssl-dev libexpat1-dev asciidoc xmlto texinfo
* For missing header file, go to web
and search which package which includes this file.
Get repo tools
==============
* repo is not a new tools. It is just a wrap for git command.
# mkdir ~/bin
# curl > ~/bin/repo
# chmod a+x ~/bin/repo
Add ~/bin to PATH.
Get Android Source
==================
# cd ~/android/source
# repo init -u git://android.git.kernel.org/platform/manifest.git
# repo sync
Build Android
=============
# cd ~/android/source
# make
* compile error:
prebuilt/linux-x86/sdl/include/SDL/SDL_syswm.h:75: error: syntax error before '}' token
* possibly because of missing package: libsdl-dev
* I selected package "libx11-6" and did "パッケージ" → "パッケージの固定"
from Synaptic menu, then I can install libsdl-dev successfully.
* recompile and wait for the result. (How long will it cost to compile all the source???)
* It takes about 1 hour to compile all the source. And at last it shows:
-----------------------------------
......
Generated: (out/target/product/generic/android-info.txt)
Target system fs image:
out/target/product/generic/obj/PACKAGING/systemimage_unopt_intermediates/system.img
Install system fs image: out/target/product/generic/system.img
Target ram disk: out/target/product/generic/ramdisk.img
Target userdata fs image: out/target/product/generic/userdata.img
-----------------------------------
* These images are for target:
system.img ramdisk.img userdata.img
Copy them to the SDK diretory and it works:
# cp out/target/product/generic/*.img
~/android/SDK/android-sdk-linux_x86-1.0_r2/tools/lib/images/
# emulator &
* But where is the kernel image? (kernel-qemu)
阅读(1953) | 评论(0) | 转发(0) |