Please enable javascript, or click here to visit my ecommerce web site powered by Shopify.
Jump to: navigation, search

Difference between revisions of "Rock/Android Build/zh cn"

(Before start)
(开始之前)
Line 5: Line 5:
 
__TOC__
 
__TOC__
  
=== Before start ===
+
=== 开始之前 ===
  
给radxa rock编译AOSP(Android Open Source Project)整个安卓系统源码是一项大工程,会很耗费时间和硬盘空间。你可以参考安卓官方的详细 系统要求页面。推荐的编译主机是Ubuntu 12.04 64位. It takes about 35 minutes and 30G disk space on a intel 4770 processor(i7, quad core, 3.4Ghz) machine with 16G ram and SSD.
+
    给radxa rock编译AOSP(Android Open Source Project)整个安卓系统源码是一项大工程,会很耗费时间和硬盘空间。你可以参考安卓官方的详细[http://source.android.com/source/building.html 系统要求页面]。推荐的编译主机是Ubuntu 12.04 64位。在我们的测试编译机器上一次完整编译总共花费了35分钟和30G的硬盘空间。配置intel 4770处理器(四代i7,四核八线程,3.4Ghz),16G内存和256G固态硬盘(友情提示: 固态硬盘可以极大提高编译速度).
  
 
=== Initializing a Build Environment ===
 
=== Initializing a Build Environment ===

Revision as of 14:38, 9 February 2014


中文(中国大陆)‎

开始之前

   给radxa rock编译AOSP(Android Open Source Project)整个安卓系统源码是一项大工程,会很耗费时间和硬盘空间。你可以参考安卓官方的详细系统要求页面。推荐的编译主机是Ubuntu 12.04 64位。在我们的测试编译机器上一次完整编译总共花费了35分钟和30G的硬盘空间。配置intel 4770处理器(四代i7,四核八线程,3.4Ghz),16G内存和256G固态硬盘(友情提示: 固态硬盘可以极大提高编译速度).

Initializing a Build Environment

  • Refer instructions from Google. Below is what we tested and set up the environment.

Install JDK

   sudo add-apt-repository ppa:webupd8team/java
   sudo apt-get update
   sudo apt-get install oracle-java6-installer

Install required packages

   sudo apt-get install git gnupg flex bison gperf build-essential \
   zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
   libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
   g++-multilib mingw32 tofrodos gcc-multilib ia32-libs\
   python-markdown libxml2-utils xsltproc zlib1g-dev:i386

Note: on Ubuntu 13.10, the package ia32-libs is removed, just ignore it.

Install ARM toolchain and building kernel related pacakges

   sudo apt-get install gcc-arm-linux-gnueabihf
   sudo apt-get install lzop libncurses5-dev
   export ARCH=arm
   export CROSS_COMPILE=arm-linux-gnueabihf-

Install libraries for other tools

   sudo apt-get install libssl1.0.0 libssl-dev

Get the source code

   wget http://dl.radxa.com/rock/source/radxa_rock_android.tar.gz  #(mirror1: BaiduYun)
   tar zxf radxa_rock_android.tar.gz
   cd radxa_rock_android
   git checkout .

Or if you can access the private git server, you can clone with the following command:

   git clone -b radxa-dev git@git.linux-rockchip.org:radxa/radxa_rock_android.git
   cd radxa_rock_android

Note: If someone pushed the repo to github, let me know(tom@radxa.com). I have some problems pushing it to github because of large files.

Build the kernel

   export ARCH=arm
   cd kernel
   make rk3188_radxa_rock_defconfig
   make kernel.img #kernel.img is the normal kernel image with rockchip crc
   cd ..

Build android source code

   source build/envsetup.sh
   lunch rk31sdk-eng
   make -j8

Generate the image

   ./mkimage.sh ota

you will get boot.img recovery.img system.img under rockdev/Image, and update.img under rockdev

Flash the image

Next, follow the rock/flash the image to flash the image you just build.