= ODROID-XU Android-4.2(Jelly Bean) System =
This page will explain how to compile Android for ODROID-XU Current version is android 4.2(Jelly Bean) based on Samsung rtm1.0
Tested with Ubuntu 12.04/12.10/13.04 64bit version. Ubuntu 11.10 in particular is troublesome because it uses gcc-4.6 by default and has no sun-java6-jdk in its repositories. heres's what you'll need to do to get AOSP 4.x to compile on Ubuntu 11.10.
Source code is stored in bundled micro SD card or you can get the latest source from here. http://com.odroid.com/sigong/nf_file_board/nfile_board.php
Please note,
To follow below instructions, you need to update your ODROID to latest Jelly Bean release.
Android requires the following system packages:
* flex: This lexical analyzer generator is used to read a given input file for a description of a scanner to generate. * bison: This is a general-purpose parser generator. * gperf: This is a perfect hash function generator. * libesd0-dev: This enlightened sound daemon (dev files) is used to mix digitized audio streams for playback by a single device. * libwxgtk2.6-dev: This package provides GUI components and other facilities for many different platforms. * build-essential: This package contains a list of packages considered fundamental to building Debian packages. * Android source code includes a hard dependency on the Java Developer Kit (JDK) 6.0 or greater.
Please refer to this link first !!! http://source.android.com/source/initializing.html
* Install dependencies.
Compilers, parsers, file-manipulation tools, libraries, etc; this is mandatory! The list on the source.android.com Inititalizing a Build Environment page is similar, but a few of those packages don’t exist in 11.10. Use these:
#sudo apt-get update #sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \ x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils
* Your system may need a mkimage to make a ramdisk image.
# sudo apt-get install uboot-mkimage
* Android also need Phython 2.4 or higher. But, Ubuntu has Python 2.5 in general. * You must build on Ubuntu 64bit from Ice Cream. * Install JDK 6.0 or later for .04/10.10/11.10.
# sudo apt-get update # sudo apt-get install sun-java6-jdk
* Download Sun Java 6 JDK for Ubuntu 11.04/10.10/11.10 Android 2.3+ requires Java 6 to build correctly. While OpenJDK did work for 2.3, it doesn’t work for Android 4.0; you need Sun Java. Download the JDK 1.6 binary release from Sun’s Java download site and unzip it somewhere in your system, for example:
#sudo mkdir -p /opt/java/64/ #sudo cp jdk-6u29-linux-x64.bin /opt/java/64 #sudo su - #cd /opt/java/64 #chmod +x jdk-6u29-linux-x64.bin #./jdk-6u29-linux-x64.bin #exit
Add the new Java to your shell environment’s $PATH so it takes precedent over other Javas you might have installed:
echo 'export PATH=/opt/java/64/jdk1.6.0_29/bin:$PATH' >> ~/.bashrc
To activate new PATH, log out and in again or type “export PATH=/opt/java/64/jdk1.6.0_29/bin:$PATH”
Android source code is stored in bundled microSD card. File name of compressed source code may be different.
# mkdir mydroid # cd mydroid # tar xf source.tar # tar zxf android.tar.gz # cd android
With this process, you will have a full source code in mydroid directory.
There are some restricted object files which have no source code. We have no right to release even the objects. Those files should be extracted from ODROID device.
In the android/device/hardkernel/odroida/AndroidBoard.mk file, confidential library contents have no source code. Refer to the AndroidBoard.mk file to make a list of restricted ones.
You need to install ADB driver first and connect your ODROID to your host PC.
You don't need to extract any file from ODROID-XU. You can skip this process.
== ODROID-A4 == <code> == Extract library files == # mydroid/android/device/samsung/exynos4/lib/mali_ump$ # mydroid/android/device/samsung/exynos4/lib/mali_ump$ adb pull /system/lib/libMali.so . # mydroid/android/device/samsung/exynos4/lib/mali_ump$ adb pull /system/lib/libUMP.so . # mydroid/android/device/samsung/exynos4/lib/mali_ump$ adb pull /system/lib/libion.so . # mydroid/android/device/samsung/exynos4/lib/mali_ump$ adb pull /system/lib/egl/libEGL_mali.so . # mydroid/android/device/samsung/exynos4/lib/mali_ump$ adb pull /system/lib/egl/libGLESv1_CM_mali.so . # mydroid/android/device/samsung/exynos4/lib/mali_ump$ adb pull /system/lib/egl/libGLESv2_mali.so . == Change access permission == # mydroid/android/device/samsung/exynos4/lib/mali_ump$ chmod -R 755 * == Extract library files == # mydroid/android/device/samsung/exynos4/libgralloc_ump$ adb pull /system/lib/hw/gralloc.odroida4.so . == Change access permission == # mydroid/android/device/samsung/exynos4/libgralloc_ump$ chmod -R 755 * == Extract library files == # mydroid/android/vendor/invensense$ adb pull /system/lib/hw/sensors.odroida4.so . # mydroid/android/vendor/invensense$ adb pull /system/lib/libinvensense_hal.so . # mydroid/android/vendor/invensense$ adb pull /system/lib/libmplmpu.so . # mydroid/android/vendor/invensense$ adb pull /system/lib/libmlplatform.so . # mydroid/android/vendor/invensense$ adb pull /system/lib/libmllite.so . # mydroid/android/vendor/invensense$ adb pull /system/lib/libakmd.so . == Change access permission == # mydroid/android/vendor/invensense chmod -R 755 *
== Extract library files == # mydroid/android/device/samsung/exynos4/lib/mali_ump$ # mydroid/android/device/samsung/exynos4/lib/mali_ump$ adb pull /system/lib/libMali.so . # mydroid/android/device/samsung/exynos4/lib/mali_ump$ adb pull /system/lib/libUMP.so . # mydroid/android/device/samsung/exynos4/lib/mali_ump$ adb pull /system/lib/libion.so . # mydroid/android/device/samsung/exynos4/lib/mali_ump$ adb pull /system/lib/egl/libEGL_mali.so . # mydroid/android/device/samsung/exynos4/lib/mali_ump$ adb pull /system/lib/egl/libGLESv1_CM_mali.so . # mydroid/android/device/samsung/exynos4/lib/mali_ump$ adb pull /system/lib/egl/libGLESv2_mali.so . == Change access permission == # mydroid/android/device/sec/lib/mali_ump$ chmod -R 755 * == Extract library files == # mydroid/android/device/samsung/exynos4/libgralloc_ump$ adb pull /system/lib/hw/gralloc.odroidpc.so . == Change access permission == # mydroid/android/device/samsung/exynos4/libgralloc_ump$ chmod -R 755 *
Turn off ODROID, and eject the T-Flash card and insert it into T-flash memory card reader. Then plug it to your host PC In the linux host PC, you need to copy all the restricted files as described in Case-1.
You need to install mkimage package
# sudo apt-get install uboot-mkimage
or you need to set a PATH of mkimage of uboot directory.
Optional!! If you meet compile error due to JDK version mismatching, add this items in to Synaptic package source. (sudo vi /etc/apt/sources.list)
deb http://archive.ubuntu.com/ubuntu/ jaunty multiverse deb http://archive.ubuntu.com/ubuntu/ jaunty-updates multiverse
sudo apt-get update
* To build the files, command below in your working directory:
== odroid - XU == # cd ~/mydroid/android # mydroid/android$ # ./build.sh odroidxu platform
* If there is no issue, you can see below message. rootfs directory is automatically generated and all root file system of Android is located in that directory.(/mydroid/android/xxxxx-img)
ok sucess !!!
In the u-boot prompt.
#fdisk -c 0 1024 2048 256
In the host PC.
#fastboot flash system out/target/product/odroidxu/system.img
In the host PC.
#fastboot flash userdata out/target/product/odroidxu/userdata.img
In the host PC.
#fastboot flash cache out/target/product/odroidxu/cache.img
In the host PC.
#fastboot reboot
= References = * http://source.android.com/source/download.html * http://odroid.foros-phpbb.com/forum.htm * http://www.hardkernel.com