Android Resource Acquisition and compilation (RedHat As5) on the Samsung cloud6410 (arm1176) Platform)

Source: Internet
Author: User

1. Some useful official Android websites:
Http://android.git.kernel.org Android source code website
Http://source.android.com
Http://code.google.com/android
Http://developer.android.com

2. Install the GIT source code management tool

# Cd ~
# Mkdir Bin
# Echo $ path
# Curl http://android.git.kernel.org/repo> ~ /Bin/Repo
# Chmod A + x ~ /Bin/Repo
 
Git download source code method:
Download a tree (to the current path ):
# Git clone git: // git path (for the GIT path, see the website release tree path)
Download the entire platform to the current path:
# Repo init-u git: // git path/platform/manifest. Git
# Repo sync

3. Get the Android platform source code (see http://android.git.kernel.org for details ):
# Mkdir myandroid
# Cd myandroid
# Repo init-u http://android.git.kernel.org/platform/manifest.git
# Repo sync
 
Follow the default settings.

4. Obtain the underlying Linux kernel source code of the Android platform

Reference: http://github.com/leemgs/samsung-s3c6410-android.1.0/tree/master
Home: http://code.google.com/p/android-group-korea/
Http://www.android.cc/dev/, http://www.china-android.org
# Git clone git: // github.com/leemgs/samsung-89c6410-android.1.0.git

5. obtain and install the android compilation tool (toolchain)
# Wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.12.tar.gz
#./Configure -- prefix =/usr/local
# Make
# Make install
# Vi/etc/lD. So. conf
Include lD. So. conf. d/*. conf
/Usr/local/lib
# Ldconfig

# Cd/OPT
# Wget http://www.kandroid.org/devtools/kandroid-1.1.2.1-20080530.glibc.tgz
# Tar xvzf kandroid-arm-toolchain-20080530.tgz
# Cd./kandroid-arm-toolchain-20080522/bin
# Ls
Arm-android-linux-gnueabi-addr2line arm-Android-Linux-gnueabi-GPROF
Arm-Android-Linux-gnueabi-ar arm-Android-Linux-gnueabi-JCF-dump
Arm-Android-Linux-gnueabi-as arm-Android-Linux-gnueabi-JV-Scan
Arm-Android-Linux-gnueabi-C ++ arm-Android-Linux-gnueabi-LD
Arm-Android-Linux-gnueabi-C ++ filt arm-Android-Linux-gnueabi-nm
Arm-Android-Linux-gnueabi-CC arm-Android-Linux-gnueabi-objcopy
Arm-Android-Linux-gnueabi-CPP arm-Android-Linux-gnueabi-objdump
Arm-Android-Linux-gnueabi-G ++ arm-Android-Linux-gnueabi-populate
Arm-Android-Linux-gnueabi-GCC arm-Android-Linux-gnueabi-ranlib
Arm-android-linux-gnueabi-gcc-4.2.3 arm-Android-Linux-gnueabi-readelf
Arm-Android-Linux-gnueabi-gccbug arm-Android-Linux-gnueabi-run
Arm-Android-Linux-gnueabi-gcj arm-Android-Linux-gnueabi-size
Arm-Android-Linux-gnueabi-gcbench arm-Android-Linux-gnueabi-sstrip
Arm-Android-Linux-gnueabi-gcov arm-Android-Linux-gnueabi-strings
Arm-Android-Linux-gnueabi-GDB arm-Android-Linux-gnueabi-strip
Arm-Android-Linux-gnueabi-gjinstitutes

#
#./ARM-Android-Linux-gnueabi-gcc-V
Bytes ---------------------------------------------------------------------------------------------------------------
Using built-in specs.
Target: Arm-Android-Linux-gnueabi
Configured: /opt/androidtoolchain110/bin/targets/src/gcc-4.2.3/configure -- Build = i686-pc-linux-gnu -- target = arm-Android-Linux-gnueabi -- Host = i686-pc-linux-gnu -- prefix =/root/X- tools/ARM-Android-Linux-gnueabi -- With-sysroot =/root/X-tools/ARM-Android-Linux-gnueabi/sys-Root -- enable-languages ages = C, c ++, java -- With-arch = armv6j -- With-CPU = arm1136jf-s -- With-tune = arm1136jf-s -- With-float = soft -- enable-_ cxa_atexit -- disable-multilib -- With-GMP = /root/X-tools/ARM-Android-Linux-gnueabi -- With-mpfr =/root/X-tools/ARM-Android-Linux-gnueabi -- With-local-Prefix = /root/X-tools/ARM-Android-Linux-gnueabi/sys-root -- disable-NLS -- enable-threads = POSIX -- enable-symvers = GNU -- enable-c99 -- enable-Long-long -- With-bugurl = http://www.kandroid.org -- With-pkgversion = kandroid-invain-arm_v6_nfp_le-ver.1.1.2.1
Thread model: POSIX
GCC version 4.2.3
Bytes ----------------------------------------------------------------------------------------------------------
# Vi autotoolpath. Sh
#! /Bin/bash
Export Path =/opt/kandroid-1.1.2.1-20080530.glibc/bin: $ path

6. Android Compilation
1) download jdk1.5 (jdk-1_5_0_21-linux-i586-rpm.bin) from Sun website)
#./Jdk-1_5_0_21-linux-i586-rpm.bin
Decompress to: jdk-1_5_0_21-linux-i586-rpm.rpm
 
2) install JDK 1.5
# Rpm-IVH jdk-1_5_0_21-linux-i586-rpm.rpm
 
3) download gperf-3.0.4.tar.gz and install
./Configure
Make
Make install

4) Add at the end of/etc/profile
Java_home =/usr/Java/jdk1.5.0 _ 21
Export android_java_home = $ java_home
Path = $ java_home/bin: $ path
Export path
Classpath =.: $ java_hoem/lib/dt. jar: $ java_home/lib/tools. Jar
Export classpath

5) Compile android
Run make.
# Make
 
6) Compile the android SDK
#./Build/envsetup. Sh
#./Make SDK
If a Java link problem occurs, run:
# Java_home =/usr/Java/jdk1.5.0 _ 21
# Export android_java_home = $ java_home

7. Linux kernel Compilation
# Cd samsung-s3c6410-linux
# Cp./ARCH/ARM/configs/smdk6410mtd. android_defconfig. config
# Make menuconfig
# Make

 

Note: Reference http://hi.baidu.com/aokikyon/blog/item/d5c93c2371a07947935807ff.html

Get Android source code with Repo today

I found that only common virtual machines are available, and the server and dormitory virtual machines run the repo error.

The error is as follows:

Traceback (most recent call last ):
File "./repo", line 590, in <module>
Main (SYS. argv [1:])
File "./repo", line 557, in Main
_ Init (ARGs)
File "./repo", line 176, in _ init
_ Checkgitversion ()
File "./repo", Line 205, in _ checkgitversion
Proc = subprocess. popen (CMD, stdout = subprocess. Pipe)
File "/usr/lib/python2.5/subprocess. py", line 594, in _ init __
Errread, errwrite)
File "/usr/lib/python2.5/subprocess. py", line 1147, in _ execute_child
Raise child_exception
Oserror: [errno 2] No such file or directory

After reading the android mail list for one night, I installed countless lib libraries and finally found the real reason-it turned out that git was not installed.

Apt-Get install git

Apt-Get install Git-core

OK!

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.