Android System porting Whole process

Source: Internet
Author: User
Tags bz2 curl generator git clone

Android Development Environment article

I. Installation: Required Packages

Android requires the following system Packages:flex:This Lexical Analyzer generator is used to read a given input file F Or a description of a scanner to generate. Bison:this is a general-purpose parser generator. Gperf:this is a perfect hash function generator. Libesd0-dev:this Enlightened sound daemon (dev files) are used to mixes digitized audio streams for playback through a single dev Ice. Libwxgtk2.6-dev:this Package provides GUI components and other facilities for many different. Build-essential:this package contains a list of packages considered fundamental to building Debian packages.

$sudo apt-get Install git-core gnupg gperf Libsdl-dev Libesd0-dev

$sudo apt-get Install libwxgtk2.6-dev Zip Curl minicom tftpd

$sudo apt-get Install uboot-mkimage Libx11-dev Libncurses-dev

$sudo apt-get Install expect Bison build-essential Flex Zlib1g-dev

Four. Java Tool installation

1. Java installation I encountered many problems:

If SUN-JAVA6-JDK is already installed, the following error is prompted when compiling:

Your version Is:java version "1.6.0_20".
The correct version is:1.5.
Or there is no hint, but the final compilation still fails, said not to find a lot of libraries.

If SUN-JAVA5-JDK is already installed, the following error is prompted when compiling:

Your version Is:java version "1.5.0_19"
The correct version is:1.6.

2. Then I thought of a way to try ubuntu9.10 and ubuntu10.04 can work properly.

Installation steps:
(1). For Ubuntu more than 9.10 users, first modify the/etc/apt/sources.list

Add two lines at the end:

Deb Http://cn.archive.ubuntu.com/ubuntu/jaunty Multiverse
Deb Http://cn.archive.ubuntu.com/ubuntu/jaunty-updates Multiverse
And then execute
$ sudo apt-get update

(2). Installation SUN-JAVA6-JDK
$ sudo apt-get install SUN-JAVA6-JDK

(3). Uninstall SUN-JAVA6-JDK
$ sudo apt-get remove sun-java6-jdk
$ sudo apt-get remove Sun-java6-bin

(4). Installation SUN-JAVA5-JDK
$ sudo apt-get install SUN-JAVA5-JDK

The installation process will have a graphical interface, if you do not click OK, please use the TAB key to cut the past on it.

After installation look at the version
$ java-version
Java Version "1.5.0_19"
Java (TM) 2 Runtime environment, Standard Edition (build 1.5.0_19-b02)
Java HotSpot (TM) Client VM (build 1.5.0_19-b02, mixed mode, sharing)

So far, the development environment is complete!


Android SDK Article

I. Installation of Repo
01.$ Curl http://android.git.kernel.org/repo>/bin/repo/* I choose to install to the/bin directory * *

02.$ chmod A+x/bin/repo
Copy code two. Create working directory
01.$ Export android= your ANDROID catalog #定义source路径

02.$ mkdir-p $ANDROID

03.$ CD $ANDROID
Copy code three. Download source

1. Download manifest all the stuff first
01.$ Repo Init-u git://android.git.kernel.org/platform/manifest.git

02.$ Repo Sync
Copy code 1.7G files, download it is not easy, so at this time we have to do a backup work.
After downloading, there is a hidden folder ". Repo", save this in addition to it, other documents can be deleted.

2. Get android-2.2_r1.1 Project

(1) Initialization of the android-2.2_r1.1 project
01.$ Repo init-u git://android.git.kernel.org/platform/manifest.git-b android-2.2_r1.1
(Copy Code (2) Create Local_manifest.xml file
01.$ Touch. Repo/local_manifest.xml

02.$ Vi. Repo/local_manifest.xml
Copy Code/* Do not want to use VI, also can use gedit*/
Copy the following:/* Now is the first to use ALSA related things, later may want our own choice
01.<?xml version= "1.0" encoding= "UTF-8"?>

02.<manifest>

<project path= "External/alsa-lib" name= "Platform/external/alsa-lib" revision= "Froyo"/>

<project path= "External/alsa-utils" name= "Platform/external/alsa-utils" revision= "Froyo"/>

<project path= "Hardware/alsa_sound" name= "Platform/hardware/alsa_sound" revision= "Froyo"/>

06.</manifest>
Copy Code (3) sync) (I think the red part can not do, not necessary)
01.$ Repo Sync
The copy code is now much faster and can be completed in just a few minutes because of previous sync work.

Four. I8320 Patch
01.$ CD $ANDROID

02. Method One: Directly download the attachment, extract to the current directory, you can see the vendor folder. This method is not recommended and is done for backup.

03. Method Two: Recommend to get the latest vendor from Mephistoph's Git repository:

04.$ git clone git://gitorious.org/h1droid/vendor.git

05. Then copy the Vendor folder to the $android directory

06.$ CD Vendor

07.$./sola/omap3/patch/omap3-patch.sh
Copy code five. Android codec
01.$ CD $ANDROID

02.$ Source build/envsetup.sh

03.$ Lunch I8320board-eng

04.$ make-j3
Copy code five. In order to finally generate image files, the environment is ready to work
01.$ CD $ANDROID

02.$./vendor/sola/omap3/image/i8320board-image.sh
Copy code six. TI company Android SGX SDK Access, this is the tool to generate SDK image.

1. Install TI_ANDROID_SGX_SDK
01.$ CD $ANDROID

02.$ git clone git://gitorious.org/rowboat/ti_android_sgx_sdk.git ti_android_sgx_sdk

03.$ CD TI_ANDROID_SGX_SDK

04.$./omap35x_android_graphics_sdk_setuplinux_3_01_00_03.bin
Copy code Then there will be the interface, we started to install the SDK tool, note that the installation directory must be the current directory (TI_ANDROID_SGX_SDK).

2. Modify the Make rule.
When the installation is complete, edit the/opt/omap35x_android_graphics_sdk_3_01_00_03/rules.make file.

Locate the corresponding location in the file and modify the following:
01.home=$ (ANDROID)

02.graphics_install_dir=$ (ANDROID)/ti_android_sgx_sdk

03.android_root=$ (ANDROID)/vendor/sola/omap3/image/i8320board/android

04.cstool_dir=$ (ANDROID)/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/

05.kernel_install_dir=[color=darkorchid]linux Kernel Absolute Path
Copy Code 3. Follow the instructions below to take the following steps again each time you modify the kernel kernel section
01.$ CD $ANDROID/TI_ANDROID_SGX_SDK

02.$ make

03.$ make install omapes=3.x
Copy code when your SDK image is generated.

Seven. Copy image to TF card

TF Card requirements: More than 200M, ext3 file system.
Enter the $ANDROID/vendor/sola/omap3/image/i8320board/android directory, and all files are copied to the TF card root directory.

Eight. Run

Put the I8320 into the download state, then plug in the USB cable and download the Boot.bin
01.$ CD Odin

02.$./odin. /boot.bin
Copy code/*boot.bin in the previous level directory * *

If all goes well, then the screen will be white or flower screen for a few seconds, and then come out penguin and some character information.
First launch to initialize our TF card, wait a minute, you can see the Android logo coming out, then the exciting android2.2 main interface.

It was yesterday that I really ran Android, and there are a lot of questions that need to be studied together:
(1) Power management
(3) Wi-Fi, sound card, bluetoolth,watchdog,pl_sensor, etc. too many things have not done well.Kernel article
I. Preparatory work
1.toolchain Set up
Download and decompression Toochain:
$ wget http://www.codesourcery.com/sgpp/lite/arm/portal/package5383/public/arm-none-linux-gnueabi/ arm-2009q3-67-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
$ tar xvjf arm-2009q3-67-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2-c The directory you want to unzip
Copy Code
Set Toolchain:
$ Export Path=/toolchain folder location/bin: $PATH
$ Export cross_compile=arm-none-linux-gnueabi-
$ Export Arch=arm
Copy Code
2. Install git
# Apt-get Install Git-core
Copy Code
Two. U-boot compilation
1. Download the master branch source $ git clone git://h1.pargon.nl/srv/git-h1/u-boot.git
$ CD U-boot
2. Get code updates for the Nowplus branch (Nowplus is I8320 alias) $ git checkout Nowplus * If not successful, please use this command: $ git checkout-b nowplus *
h1.pargon.nl git warehouse is broken, please use Mephisto new warehouse:
$ git clone git://gitorious.org/h1droid/u-boot.git
$ CD U-boot
Copy Code
3. Modify U-boot/include/configs/omap3_nowplus.h
Config_bootdelay,config_extra_env_settings and Config_bootcommand
#define CONFIG_BOOTDELAY 0
#define CONFIG_EXTRA_ENV_SETTINGS \
"Loadaddr=0x82000000\0" \
"Console=ttys2,115200n8\0" \
"Usbtty=cdc_acm\0" \
"Stdout=usbtty\0" \
"Stdin=usbtty\0" \
"Stderr=usbtty\0" \
"Bootargs=root=/dev/mmcblk0p1 rw init=/init rootdelay=1 rootfstype=ext3 rootwait debug\0" \
#define CONFIG_BOOTCOMMAND \
"Bootm 0x86c30000"
Copy Code
4. Compilation U-boot
$ make Omap3_nowplus_config
$ make
Copy Code
Three. Linux kernel, version 2.6.32.9
1. Download the master branch of the source code
$ cd U-boot Previous directory/* Note: U-boot and I8320kernel should be easily generated in the same level of directory boot.bin*/
(Git warehouse moved, old: git://github.com/mephistophilis/i8320kernel.git)
$ git clone git://gitorious.org/h1droid/i8320kernel.git
$ CD I8320kernel
Copy Code
2. Get code updates for the I8320 branch
(There is no i8320 branch now $ git checkout i8320/* If unsuccessful, please use this command: $ git checkout-b i8320 origin/i8320 */$ git pull Origin i8320)
For the time being you only need to perform:
$ Git pull Origin master #更新代码
Copy Code
3. Set tool path for build Uimage
$ Export Path=u-boot directory/tools: $PATH
Copy Code
4. Compilation Uimage
$ cp arch/arm/configs/omap_nowplus_defconfig. config
$ make Uimage
Copy Code
Four. Generate Boot.bin
The purpose of Boot.bin is to synthesize u-boot.bin and uimage.
1. Get Makeboot Tool
$ CD kernel and U-boot pre-level directory
$ wget http://h1droid.googlecode.com/files/makeboot.sh
$ chmod +x makeboot.sh
Copy Code
2. Generate Boot.bin
$/makeboot.sh./u-boot/u-boot.bin./i8320kernel/arch/arm/boot/uimage
Copy Code
Five. Running the kernel
1. Download tool
$ git clone git://h1.pargon.nl/srv/git-h1/odin.git
$ cd Odin
Copy Code
2. Compilation
$ make Brick
Copy Code
3. Will I8320 into the download state, and then plug in the USB cable, download Boot.bin
$/odin. /boot.bin
Copy Code
/*boot.bin in the first level directory * *
At this point the screen will be white or flower screen for a few seconds, and then come out penguin and some character information.
The system works ....

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.