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"

(Initializing a Build Environment)
(Initializing a Build Environment)
Line 7: Line 7:
 
=== Initializing a Build Environment ===
 
=== Initializing a Build Environment ===
 
* Refer [http://source.android.com/source/initializing.html instructions] from Google. Below is what we tested and set up the environment.
 
* Refer [http://source.android.com/source/initializing.html 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
 +
Install ARM toolchain
 +
    sudo apt-get install gcc-arm-linux-gnueabihf
 +
    export ARCH=arm
 +
    export CROSS_COMPILE=arm-linux-gnueabihf-
  
 
=== Get the source code ===
 
=== Get the source code ===

Revision as of 08:04, 4 November 2013

Before start

Building AOSP(Android Open Source Project) for radxa rock is a huge task, it takes a lot of time and disk space. You can read the detail requirement of the machine on AOSP requirement page. The recommend building OS is Ubuntu 12.04 64bit. 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.

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

Install ARM toolchain

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

Get the source code

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

Note: you need access to the private git server, send mail to support@radxa.com for account.

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

you will get kernel.img boot.img recovery.img system.img under rockdev/Image