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
odroid-c1:software:building_android [2017/05/31 09:40]
luke.go ↷ Page moved from odroid-c1:software:c1_building_android to odroid_c1:software:c1_building_android
odroid-c1:software:building_android [2019/07/16 15:54] (current)
tony.hong ↷ Links adapted because of a move operation
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. Also note that you need around 100GB of free space in your storage to get the full source code and binary space. At least 8GB of RAM is required. \\ 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. Also note that you need around 100GB of free space in your storage to get the full source code and binary space. At least 8GB of RAM is required. \\
 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.\\
Line 9: Line 9:
 For Linux kernel and U-boot, you must install specific toolchains. Android will use its prebuilt ARM toolchain. For Linux kernel and U-boot, you must install specific toolchains. Android will use its prebuilt ARM toolchain.
 === U-boot === === U-boot ===
-http://​odroid.com/​dokuwiki/​doku.php?​id=en:​c1_building_u-boot#​toolchain+[[building_u-boot#​toolchain|Toolchain]]
 === Linux kernel === === Linux kernel ===
-http://​odroid.com/​dokuwiki/​doku.php?​id=en:​c1_building_kernel#​toolchain_492+[[building_kernel#​toolchain_492|Toolchain]] 
 ===== Checkout full source code ===== ===== Checkout full source code =====
 This command will initiate to download Android source tree for **ODROID-C1**. This command will initiate to download Android source tree for **ODROID-C1**.
 ==== Android kitkat ==== ==== Android kitkat ====
 === 4.4.2 v3.2 == === 4.4.2 v3.2 ==
-<​code>​+<​code ​bash host>
 $ mkdir odroid-c1 $ mkdir odroid-c1
 $ cd odroid-c1 $ cd odroid-c1
Line 23: Line 24:
 </​code>​ </​code>​
 === 4.4.4 v3.3 == === 4.4.4 v3.3 ==
-<​code>​+<​code ​bash host>
 $ mkdir odroid-c1 $ mkdir odroid-c1
 $ cd odroid-c1 $ cd odroid-c1
Line 30: Line 31:
 </​code>​ </​code>​
 ==== Android lollipop ==== ==== Android lollipop ====
-<​code>​+<​code ​bash host>
 $ mkdir odroid-c1 $ mkdir odroid-c1
 $ cd odroid-c1 $ cd odroid-c1
Line 38: Line 39:
 ===== Build ===== ===== Build =====
 Please make sure that you've already installed cross toolchain for kernel and U-boot before you start to build. Please make sure that you've already installed cross toolchain for kernel and U-boot before you start to build.
-  * [[http://​odroid.com/​dokuwiki/​doku.php?​id=en:​c1_building_u-boot#​toolchain|Toolchain for U-boot]] +  * [[building_u-boot#​toolchain|Toolchain for U-boot]] 
-  * [[http://​odroid.com/​dokuwiki/​doku.php?​id=en:​c1_building_kernel|Toolchain for Kernel]]+  * [[building_kernel|Toolchain for Kernel]]
 There is no specific build script for **ODROID-C1**,​ instead it supports generic build step what AOSP does as below. There is no specific build script for **ODROID-C1**,​ instead it supports generic build step what AOSP does as below.
  
 ==== Android Kitkat ==== ==== Android Kitkat ====
-<​code>​+<​code ​bash host>
 $ export ARCH=arm $ export ARCH=arm
 $ export CROSS_COMPILE=arm-linux-gnueabihf- $ export CROSS_COMPILE=arm-linux-gnueabihf-
Line 56: Line 57:
  
 ==== Android Lollipop ==== ==== Android Lollipop ====
-<​code>​+<​code ​bash host>
 $ export ARCH=arm $ export ARCH=arm
 $ export CROSS_COMPILE=arm-linux-gnueabihf- $ export CROSS_COMPILE=arm-linux-gnueabihf-
Line 70: Line 71:
 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 ===== ===== Download =====
-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 in 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 in U-boot, you can proceed to update while executing below commands one by one or ignore particular steps.\\ 
 +[[getting_started:​adb_fastboot| How to use fastboot]]
 ==== Boot loader ==== ==== Boot loader ====
-<​code>​+<​code ​bash host>
 $ fastboot flash bootloader out/​target/​product/​odroidc/​u-boot.bin $ fastboot flash bootloader out/​target/​product/​odroidc/​u-boot.bin
 </​code>​ </​code>​
 ==== Linux kernel ==== ==== Linux kernel ====
-<​code>​+<​code ​bash host>
 $ fastboot flash dtb out/​target/​product/​odroidc/​meson8b_odroidc.dtb $ fastboot flash dtb out/​target/​product/​odroidc/​meson8b_odroidc.dtb
 $ fastboot flash boot out/​target/​product/​odroidc/​kernel $ fastboot flash boot out/​target/​product/​odroidc/​kernel
 </​code>​ </​code>​
 ==== Android ==== ==== Android ====
-These three files contains Linux utilities, Android frameworks and pre-installed Android applicatioins as well as necessary files to run Android. These three files will be flash into its own partition dedicated, please find [[http://​odroid.com/​dokuwiki/​doku.php?​id=en:​c1_partition_table#​android_partition_table|the partition table]] pre-defined for each partition'​s size.+These three files contains Linux utilities, Android frameworks and pre-installed Android applicatioins as well as necessary files to run Android. These three files will be flash into its own partition dedicated, please find [[partition_table#​android_partition_table|the partition table]] pre-defined for each partition'​s size.
  
 === KitKat === === KitKat ===
-<​code>​+<​code ​bash host>
 $ fastboot flash system out/​target/​product/​odroidc/​rootsystem.img $ fastboot flash system out/​target/​product/​odroidc/​rootsystem.img
 $ fastboot flash userdata out/​target/​product/​odroidc/​userdata.img $ fastboot flash userdata out/​target/​product/​odroidc/​userdata.img
Line 91: Line 93:
  
 === Lollipop === === Lollipop ===
-<​code>​+<​code ​bash host>
 $ fastboot flash system out/​target/​product/​odroidc/​rootsystem.img $ fastboot flash system out/​target/​product/​odroidc/​rootsystem.img
 $ fastboot flash cache out/​target/​product/​odroidc/​cache.img $ fastboot flash cache out/​target/​product/​odroidc/​cache.img
Line 99: Line 101:
  
 === Kikkat === === Kikkat ===
-<​code>​+<​code ​bash host>
 $ fastboot flash recovery out/​target/​product/​odroidc/​recovery.img $ fastboot flash recovery out/​target/​product/​odroidc/​recovery.img
 $ fastboot flash logo out/​target/​product/​odroidc/​hardkernel-720.bmp $ fastboot flash logo out/​target/​product/​odroidc/​hardkernel-720.bmp
Line 105: Line 107:
  
 === Lollipop === === Lollipop ===
-<​code>​+<​code ​bash host>
 $ fastboot flash recovery out/​target/​product/​odroidc/​recovery.img $ fastboot flash recovery out/​target/​product/​odroidc/​recovery.img
 $ fastboot flash logo out/​target/​product/​odroidc/​hardkernel-720.bmp.gz $ fastboot flash logo out/​target/​product/​odroidc/​hardkernel-720.bmp.gz
Line 114: Line 116:
 This is the same way how Hardkernel team create Android release image and most easiest way to have bootable media on your **ODROID-C1** if you proceed one more build step. This is the same way how Hardkernel team create Android release image and most easiest way to have bootable media on your **ODROID-C1** if you proceed one more build step.
 This procedure combine all required image files created by Android build into single file, **out/​target/​product/​odroidc/​selfinstall-odroidc.bin**. This procedure combine all required image files created by Android build into single file, **out/​target/​product/​odroidc/​selfinstall-odroidc.bin**.
-<​code>​+<​code ​bash host>
 $ make selfinstall $ make selfinstall
 </​code>​ </​code>​
 ==== Using Updatepackage.zip ==== ==== Using Updatepackage.zip ====
 **out/​target/​product/​odroidc/​updatepackage-odroidc-signed.zip**. **out/​target/​product/​odroidc/​updatepackage-odroidc-signed.zip**.
-<​code>​+<​code ​bash host>
 $ make updatepackage $ make updatepackage
 </​code>​ </​code>​