搜档网
当前位置:搜档网 › android2.0_developer_guide_EN

android2.0_developer_guide_EN

ANDROID2.0 DEVELOPER GUIDE Version: 1.0

Date: Feb, 2010

Ingenic

Android Developer Guide

Copyright ? Ingenic Semiconductor Co. Ltd 2010. All rights reserved.

Release history

Date Revision Author Change

Feb, 2010 1.0 Rocky First release

Disclaimer

This documentation is provided for use with Ingenic products. No license to Ingenic property rights is granted. Ingenic assumes no liability, provides no warranty either expressed or implied relating to the usage, or intellectual property right infringement except as provided for by Ingenic Terms and Conditions of Sale.

Ingenic products are not designed for and should not be used in any medical or life sustaining or supporting equipment.

All information in this document should be treated as preliminary. Ingenic may make changes to this document without notice. Anyone relying on this documentation should contact Ingenic for the current documentation and errata.

Ingenic Semiconductor Co., Ltd.

Room 108, Information Center Block A

Zhongguancun Software Park

8 Dongbeiwang west Road, Haidian District

Beijing China, 100193

Tel: 86-10-82826661

Fax: 86-10-82825845

Http: //https://www.sodocs.net/doc/ec7806131.html,

Content

ANDROID DEVELOPER GUIDE, Revision 1.0

Copyright? 2010 Ingenic Semiconductor Co., Ltd. All rights reserved. i

Content

1Overview (1)

2Setup Develop Environment (3)

2.1Overview (3)

2.2Install Develop Tools (3)

2.2.1System Requirements (3)

2.2.2Install Step by Step (3)

3Create Platform (4)

3.1Overview (4)

3.2Create Platform Step by Step (4)

4Download Images and Launch Android (6)

4.1Overview (6)

4.2Download Images (6)

Overview

ANDROID DEVELOPER GUIDE, Revision 1.0

Copyright? 2010 Ingenic Semiconductor Co., Ltd. All rights reserved. 1

1 Overview

The document will introduce how to setup and use Ingenic Android development environment. And, what is Android?

·A free, open source platform.

·A Linux-based, multiprocess, multithreaded OS

·Android is not a device or a product

·It’s not even limited to phones - you could build a handheld GPS, an MP3 player, etc.

The following the diagram of Android.

Diagram 1-1

2 Setup Develop Environment

2.1 Overview

This section will introduce how to setup the android develop environment

2.2 Install Develop Tools

2.2.1 System Requirements

● Operation System: Ubuntu 9.04 or 10.04.

● 8 GB of available hard-disk space needed.

2.2.2 Install Step by Step

1. Install toolchain and essential library for host,

$ apt-get install gcc-4.3 g++-4.3 (19.1M)

$ apt-get install sun-java5-jdk (117M)

$ apt-get install flex bison libesd0-dev libwxgtk2.8-dev build-essential zip valgrind zlib1g-dev libncurses5-dev x11proto-core-dev libx11-dev gperf gawk (95.5)

2. If the sun-java6-jdk has been installed, please run

update-alternatives --config javac

to select sun-java5-jdk

3. Setup android tool chain mips-

4.3, and put it in the following directory is recommended.

$ cd /

$ mkdir opt

$ cd opt

$ tar –vxf mips-4.3.tar.bz2

4. Prepare android source code package

$ cd /

$ mkdir source

$ cd source

$ tar –vxf android-2.0.tar.bz2

3 Create Platform

3.1 Overview

According to the last section, we have installed all the tools successfully, and this section will introduce how to create a platform

3.2 Create Platform Step by Step

1. Get the android patch from SVN

$ mkdir android

$ cd android

$ svn co svn://192.168.1.22/solution/android-2.0/trunk android-2.0

2. Link the source code

$ cd android-2.0

$ ln-src /source/android-2.0

If it reports error, please go back to chapter two to double-check them.

NOTE:

·the ln-src may be last for twenty minutes or even more, based on the computer.

3. Compile the android image

$ make

If it reports error, please go back to chapter two to double-check them.

NOTE:

·the make may be last for forty minutes or even more, based on the computer.

4. Wait the step-3 make finish, you will get the following two files,

out/target/product/aquila/system.img

out/target/product/aquila/userdata.img

And they are the android image

·SYSTEM.IMG: contain the packages and library.

·USERDATA.IMG: contain the user data.

5. Compile the Linux kernel

$ cd kernel

$ make aquila_defconfig

$ make uImage

If it reports error, please go back to chapter two to double-check them.

NOTE:

·the make may be last for ten minutes or even more, based on the computer.

6. Wait the step-5 make finish, you will get the Linux kernel,

arch/mips/boot/uImage

7. Congratulation! My friend, if come here, you have got all the image needed, and then can go to the

next chapter to download image to target device and touch the live android.

4 Download Images and Launch Android

4.1 Overview

This section describes how to download images and launch android

4.2 Download Images

1. Configure the target device to USB BOOT. VERIFY that the 2nd switch of SW1 on the main board

is OFF.

2. Connect USB cable, and the port is J7 on the main board, power on and reset.

3. If you have not setup the USB BOOT driver, please refer to document for USB BOOT

4. Run USB_Boot.exe. In the command line,

USB Boot :> boot 0

If boot and configure successfully, the debug message is as followed,

Diagram 4-1

If no or prompt failure, please go back to the step 1.

5. VERIFY that the four images are all in the

directory of USB_Boot.exe, if NOT, please get them in the following directory,

ANDROID DEVELOPER GUIDE, Revision 1.0

Copyright? 2010 Ingenic Semiconductor Co., Ltd. All rights reserved. 7

$(ANDROID_ROOT)/images/jz4750_aquila/u-boot-nand.bin

$(ANDROID_ROOT)/out/target/product/aquila/system.img

$(ANDROID_ROOT)/out/target/product/aquila/userdata.img

$(ANDROID_ROOT)/kernel/arch/mips/boot/uImage

In the command line,

USB Boot :> run aquila.sh

6. Waiting for the downloading finish.

7. Configure the target device to NAND BOOT. VERIFY that the 2nd switch of SW1 on the main board

is ON.

8. Power ON and just waiting for the system booting up, the first time may be longer, maybe two

minutes.

9. During the system booting, you will get a static LOGO picture first, and then an android splash

screen, at last the android desktop. If you can NOT see them, please go back to step 5.

10. Welcome to android world! Congratulations!

相关主题