We're no longer updating This wiki!!

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:c2_building_android [2016/06/08 14:01]
odroid [Android]
en:c2_building_android [2017/06/27 09:13] (current)
odroid [Android]
Line 1: Line 1:
 ====== Android ====== ====== Android ======
 This page will introduce you how you can download and build Android source tree to customize it for your usage. This page will introduce you how you can download and build Android source tree to customize it for your usage.
-<​WRAP ​center ​round important 60%>+<WRAP round important 60%>
 If you have not built Android on your desktop yet, please read Android'​s official build environment set up guide [[https://​source.android.com/​source/​initializing.html]] carefully before your proceed. Otherwise, you would have unexpected errors and exhaust to read quite long and complicated build log to find the problem.\\ If you have not built Android on your desktop yet, please read Android'​s official build environment set up guide [[https://​source.android.com/​source/​initializing.html]] carefully before your proceed. Otherwise, you would have unexpected errors and exhaust to read quite long and complicated build log to find the problem.\\
-\\ +</​WRAP>​ 
-We've used only Ubuntu 14.04 64bit since other newer versions had some issues while building the Android OS. \\+ 
 +<WRAP round important 60%> 
 +We've used only Ubuntu 14.04 64bit with 8GB RAM since other newer versions had some issues while building the Android OS. \\
 Android 5.x (Lollipop) build needs the OpenJDK 7 not the Oracle-Java-JDK.\\ Android 5.x (Lollipop) build needs the OpenJDK 7 not the Oracle-Java-JDK.\\
 +[[https://​source.android.com/​source/​requirements.html]]\\
 +If you want to compile Android system on Ubuntu 16.04 PC, refer this article.
 +[[https://​magazine.odroid.com/​wp-content/​uploads/​ODROID-Magazine-201610.pdf#​page=26|Jörg'​s Article]]
 +</​WRAP>​
 +
 +<WRAP round important 60%>
 +If you want to build full Android source tree, don't download & build the kernel source separately. \\
 +Separated Kernel build might break the Android build process.
 </​WRAP>​ </​WRAP>​
 ===== Toolchain ===== ===== Toolchain =====
Line 14: Line 24:
 http://​odroid.com/​dokuwiki/​doku.php?​id=en:​c2_building_kernel#​toolchain_492 http://​odroid.com/​dokuwiki/​doku.php?​id=en:​c2_building_kernel#​toolchain_492
 ===== Checkout full source code ===== ===== Checkout full source code =====
-This command will initiate to download Android source tree for **ODROID-C2**.+This command will initiate to download Android source tree for **ODROID-C2**.\\ 
 +The full source includes u-boot, kernel and Android trees. 
 +=== Android Lollipop ===
 <​code>​ <​code>​
 $ mkdir odroid-c2 $ mkdir odroid-c2
Line 21: Line 33:
 $ repo sync $ repo sync
 $ repo start s905_5.1.1_master --all $ repo start s905_5.1.1_master --all
 +</​code>​
 +=== Android Marshmallow ===
 +Full source code will be released in middle of December after fixing some critical issues and source code clean up.
 +<​code>​
 +$ mkdir odroid-c2
 +$ cd odroid-c2
 +$ repo init -u https://​github.com/​hardkernel/​android.git -b s905_6.0.1_master
 +$ repo sync
 +$ repo start s905_6.0.1_master --all
 </​code>​ </​code>​
 ===== Build ===== ===== Build =====
Line 27: Line 48:
   * [[http://​odroid.com/​dokuwiki/​doku.php?​id=en:​c2_building_kernel|Toolchain for Kernel]]   * [[http://​odroid.com/​dokuwiki/​doku.php?​id=en:​c2_building_kernel|Toolchain for Kernel]]
 There is no specific build script for **ODROID-C2**,​ instead it supports generic build step what AOSP does as below. There is no specific build script for **ODROID-C2**,​ instead it supports generic build step what AOSP does as below.
 +=== Android Lollipop ===
 <​code>​ <​code>​
 $ export ARCH=arm64 $ export ARCH=arm64
 $ export CROSS_COMPILE=aarch64-none-elf- $ export CROSS_COMPILE=aarch64-none-elf-
 $ export PATH=/​opt/​toolchains/​gcc-linaro-aarch64-none-elf-4.9-2014.09_linux/​bin:​$PATH $ export PATH=/​opt/​toolchains/​gcc-linaro-aarch64-none-elf-4.9-2014.09_linux/​bin:​$PATH
 +$ export PATH=/​opt/​toolchains/​gcc-linaro-arm-none-eabi-4.8-2014.04_linux/​bin:​$PATH
 +$ export JAVA_HOME=/​usr/​lib/​jvm/​java-1.7.0-openjdk-amd64
 +$ export PATH=$JAVA_HOME/​bin:​$PATH
 +
 +$ source build/​envsetup.sh
 +$ lunch odroidc2-eng-32
 +$ make -j4 selfinstall
 +</​code>​
 +=== Android Marshmallow ===
 +<​code>​
 +$ export ARCH=arm64
 +$ export CROSS_COMPILE=aarch64-linux-gnu-
 +$ export PATH=/​opt/​gcc-linaro-aarch64-linux-gnu-4.9-2014.09_linux/​bin:​$PATH
 +$ export PATH=/​opt/​toolchains/​gcc-linaro-arm-none-eabi-4.8-2014.04_linux/​bin:​$PATH
 $ export JAVA_HOME=/​usr/​lib/​jvm/​java-1.7.0-openjdk-amd64 $ export JAVA_HOME=/​usr/​lib/​jvm/​java-1.7.0-openjdk-amd64
 $ export PATH=$JAVA_HOME/​bin:​$PATH $ export PATH=$JAVA_HOME/​bin:​$PATH
Line 39: Line 75:
 </​code>​ </​code>​
 You can replace the number on the command **make** for simultaneous compile as much as number of core on your build machine. But it should not to exceed 16, otherwise build would stop with an error. You can replace the number on the command **make** for simultaneous compile as much as number of core on your build machine. But it should not to exceed 16, otherwise build would stop with an error.
-===== Download ​=====+===== Flashing images ​=====
 Once Android build is completed, you will have all necessary files to download into your MicroSD/​eMMC. If you already have a boot media and can switch to **fastboot** mode is U-boot, you can proceed to update while executing below commands one by one or ignore particular steps. Once Android build is completed, you will have all necessary files to download into your MicroSD/​eMMC. If you already have a boot media and can switch to **fastboot** mode is U-boot, you can proceed to update while executing below commands one by one or ignore particular steps.
 ==== Boot loader ==== ==== Boot loader ====
en/c2_building_android.1465363879.txt.gz · Last modified: 2016/06/08 14:01 by odroid
CC Attribution-Share Alike 3.0 Unported
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0