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:u3_building_android [2015/09/17 15:14]
odroid [Android Kernel]
en:u3_building_android [2015/09/17 15:15] (current)
odroid [Android Kernel]
Line 1: Line 1:
 +====== Android ======
 +This page introduce how you can download and compile the Android kernel for **ODROID-U3/​X2**. ​
 +To build the Android Kernel, we strongly recommend the **gcc version 4.4.1** .
 +===== Toolchain =====
 +Click one of the site to download toolchain to build Linux kernel.
 +  * [[http://​www.mdrjr.net/​odroid/​toots/​arm-2010q1.tar.xz|Download Linux Kernel Toolchain(arm-2010q1)]]
 +  * [[http://​dn.odroid.com/​toolchains/​arm-2010q1.tar.xz|Download Linux Kernel Toolchain(arm-2010q1)]]
 +Once the download is done, extract the tarball to **/​opt/​toolchains/​**.
 +<​code>​
 +$ sudo mkdir -p /​opt/​toolchains
 +$ unxz arm-2010q1.tar.xz
 +$ tar xvf arm-2010q1.tar
 +$ sudo mkdir /​opt/​toolchains
 +$ sudo mv arm-2010q1 /​opt/​toolchains/​
 +</​code>​
 +In order to add the toolchain path to PATH, paste below lines to **$HOME/​.bashrc**.
 +<​code>​
 +export PATH=$PATH:/​home/​odroid/​adt-bundle-linux-x86_64-20140702/​sdk/​platform-tools:/​opt/​toolchains/​arm-2010q1/​bin
 +export ARCH=arm
 +export CROSS_COMPILE=arm-none-linux-gnueabi-
 +</​code>​
 +You can apply the change if you login again or import ​
 +to apply this change, login again or evaluate **$HOME/​.bashrc** with source command.
 +<​code>​
 +$ source ~/.bashrc
 +</​code>​
 +You can check if the toolchain installed above works properly while checking the version of toolchain. If you can find **(Sourcery G++ Lite 2010q1-202) 4.4.1** at the end of the line, the toolchain is well installed.
 +<​code>​
 +$ source ~/.bashrc
 +$ $ arm-none-linux-gnueabi-gcc --version
 +arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2010q1-202) 4.4.1
 +Copyright (C) 2009 Free Software Foundation, Inc.
 +This is free software; see the source for copying conditions. ​ There is NO
 +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 +</​code>​
 +===== Checkout =====
 +You can checkout **Kernel** source tree from **[[https://​github.com/​hardkernel/​linux|Hardkernel'​s Github]]**, **Android platform** source tree from **[[https://​github.com/​hardkernel/​android|Hardkernel'​s Github]]**. ​
 +Please note that we distribute the Linux kernel in different branches for Android and other Linux distributions.
  
 +==== Android Kernel ====
 +<​code>​
 +$ git clone --depth 1 https://​github.com/​hardkernel/​linux.git -b odroid-3.0.y-android
 +$ cd linux
 +</​code>​
 +==== Android Platform ====
 +== android-4.1.2 ==
 +<​code>​
 +$ mkdir <Android Platform Folder Name>
 +$ cd <Android Platform Folder Name>
 +$ repo init -u https://​github.com/​hardkernel/​android.git -b 4412_4.1.2_master
 +$ repo sync
 +$ repo start 4412_4.1.2_master --all
 +</​code>​
 +== android-4.4.4 ==
 +<​code>​
 +$ mkdir <Android Platform Folder Name>
 +$ cd <Android Platform Folder Name>
 +$ repo init -u https://​github.com/​hardkernel/​android.git -b 4412_4.4.4_master
 +$ repo sync
 +$ repo start 4412_4.4.4_master --all
 +</​code>​
 +==== ====
 +<​WRAP ​ left round tip 70%>
 +  * Visit this link to install the repo.
 +[[http://​source.android.com/​source/​downloading.html]]
 +</​WRAP>​
 +
 +
 +
 +
 +===== Compile =====
 +Before compiling, you must configure for **ODROID-U3** with following command.
 +
 +==== Android Kernel ====
 +=== Android-4.1.2 ===
 +== ODROID-U2/​U3 ==
 +<​code>​
 +$ make odroidu_android_422_defconfig
 +$ make
 +</​code>​
 +== ODROID-X2 ==
 +<​code>​
 +$ make odroidx2_android_422_defconfig
 +$ make
 +</​code>​
 +
 +
 +
 +=== Android-4.4.4 ===
 +We've merged the Kernel source into the Android repo. Android build-script also includes the Kernel compile.
 +
 +If you still want to compile only the kernel,
 +<​code>​
 +$ make odroidXX_android_442_defconfig
 +$ make
 +</​code>​
 +==== Android Platform ====
 +=== ODROID-U2/​U3 ===
 +<​code>​
 +$ ./​build_android.sh odroidu
 +</​code>​
 +=== ODROID-X2 ===
 +<​code>​
 +$ ./​build_android.sh odroidx2
 +</​code>​
 +===== Installation =====
 +There are different instructions to install Linux kernel image for Android and Linux. Since Android loads both from a kernel partition, we have to use **fastboot** to install into the dedicated partition. Please refer the partition table from [[http://​odroid.com/​dokuwiki/​doku.php?​id=en:​u3_partition_table|here]]. In contrast, Linux boots by the instructions described in **boot.ini** the 1st FAT partition.
 +
 +This is the instruction to install kernel image, **zImage**, to the boot card.
 +
 +<​code>​
 +$ sudo fastboot flash kernel <​path/​of/​your/​zImage>​
 +</​code>​
 +
 +This is to install android platform files, **system.img**,​ **userdata.img**,​ **cache.img**.
 +
 +<​code>​
 +$ sudo fastboot flash system <​path/​of/​your/​system.img>​
 +$ sudo fastboot flash userdata <​path/​of/​your/​userdata.img>​
 +$ sudo fastboot flash cache <​path/​of/​your/​cache.img>​
 +</​code>​
 +
 +If you want to initialize the FAT partition, run this command.
 +
 +<​code>​
 +$ sudo fatboot erase fat
 +</​code>​
 +
 +[[http://​codewalkerster.blogspot.kr/​search?​q=cross_compile]]
CC Attribution-Share Alike 3.0 Unported
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0