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

Difference between revisions of "Rock2/Android/develop"

< Rock2‎ | Android
(Android5.1)
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{{Rock2_header}}
 +
 
==Development==
 
==Development==
 
Please refer [[Rock/Android_Build#Initializing_a_Build_Environment]] to set up the building environment if you haven't set it already.
 
Please refer [[Rock/Android_Build#Initializing_a_Build_Environment]] to set up the building environment if you haven't set it already.
 
+
===Android4.4===
'''Get the source code
+
'''Get the source code '''
'''
+
   Download here [http://dl.radxa.com/rock2/source/radxa_rock2_square_android4.4.2_sdk.tar.xz radxa_rock2_square_android4.4.2_sdk.tar.xz]
   Download here [http://dl.radxa.com/rock2/source/radxa_rock2_square_android4.4.2_sdk_20150324.tgz radxa_rock2_square_android4.4.2_sdk_20150324.tgz]
+
  
 
'''Build u-boot'''
 
'''Build u-boot'''
Line 21: Line 22:
  
 
     source build/envsetup.sh  
 
     source build/envsetup.sh  
     lunch 12
+
     lunch rk3288-eng
 
     make -j 8
 
     make -j 8
  
Line 29: Line 30:
  
 
you will get boot.img recovery.img system.img under rockdev/Image, and [[rock/update.img | update.img]] ( e.g. rock2_android_kitkat_15-03-23_141904.img)under rockdev
 
you will get boot.img recovery.img system.img under rockdev/Image, and [[rock/update.img | update.img]] ( e.g. rock2_android_kitkat_15-03-23_141904.img)under rockdev
 +
 +
===Android5.1===
 +
 +
First of all , Android 5.x need jdk 7, Please refer [[Rock/Android_Build#Initializing_a_Build_Environment]] to set up the building environment if you haven't set it already.
 +
 +
If you need compile android4.4 and android5.x which need differet jdk version at same build environment. you can do as the follows
 +
put a shell script(like below) at the android root directory like build.sh contained in the source code. and source build.sh before compile
 +
 +
#!/bin/bash
 +
export JAVA_HOME=/usr/lib/jvm/jdkxxx
 +
export PATH=$JAVA_HOME/bin:$PATH
 +
export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar
 +
 +
'''Get the source code '''
 +
 +
http://dl.radxa.com/rock2_square/source/radxa_rock2_square_rk3288_android51_151107.tgz
 +
 +
http://dl.radxa.com/rock2_square/source/radxa_rock2_square_rk3288_android51_151107.md5
 +
 +
After download.
 +
 +
tar -xvf  radxa_rock2_square_rk3288_android51_151107.tgz
 +
cd radxa_rock2_square_rk3288_android51_151107
 +
git checkout .
 +
 +
 +
 +
'''Build u-boot'''
 +
 +
cd u-boot
 +
make rk3288_defconfig
 +
make -j8
 +
 +
'''Build the kernel'''
 +
 +
cd kernel
 +
make radxa_rock2_square_lollipop_defconfig
 +
make radxa-rock2-square-lollipop.img -j8
 +
 +
'''Build android source code'''
 +
 +
source build/envsetup.sh
 +
lunch rk3288_box-userdebug
 +
make -j 8
 +
 +
''Generate the image''
 +
 +
./mkimage.sh ota
  
 
[[Category:rock2_square]]
 
[[Category:rock2_square]]
 
[[Category:dev]]
 
[[Category:dev]]

Latest revision as of 03:10, 9 November 2015

Development

Please refer Rock/Android_Build#Initializing_a_Build_Environment to set up the building environment if you haven't set it already.

Android4.4

Get the source code

  Download here radxa_rock2_square_android4.4.2_sdk.tar.xz

Build u-boot

    cd u-boot 
    make rk3288_defconfig 
    make -j4

Build the kernel

    cd kernel
    make radxa_rock2_square_defconfig
    make radxa-rock2-square.img -j 16

Build android source code

    source build/envsetup.sh 
    lunch rk3288-eng
    make -j 8

Generate the image

   ./mkimage.sh ota

you will get boot.img recovery.img system.img under rockdev/Image, and update.img ( e.g. rock2_android_kitkat_15-03-23_141904.img)under rockdev

Android5.1

First of all , Android 5.x need jdk 7, Please refer Rock/Android_Build#Initializing_a_Build_Environment to set up the building environment if you haven't set it already.

If you need compile android4.4 and android5.x which need differet jdk version at same build environment. you can do as the follows put a shell script(like below) at the android root directory like build.sh contained in the source code. and source build.sh before compile

#!/bin/bash
export JAVA_HOME=/usr/lib/jvm/jdkxxx
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar

Get the source code

http://dl.radxa.com/rock2_square/source/radxa_rock2_square_rk3288_android51_151107.tgz

http://dl.radxa.com/rock2_square/source/radxa_rock2_square_rk3288_android51_151107.md5

After download.

tar -xvf  radxa_rock2_square_rk3288_android51_151107.tgz
cd radxa_rock2_square_rk3288_android51_151107
git checkout .


Build u-boot

cd u-boot 
make rk3288_defconfig 
make -j8

Build the kernel

cd kernel
make radxa_rock2_square_lollipop_defconfig
make radxa-rock2-square-lollipop.img -j8

Build android source code

source build/envsetup.sh 
lunch rk3288_box-userdebug
make -j 8

Generate the image

./mkimage.sh ota