We're no longer updating This wiki!!

= ODROID-A & 7 & E7 & PC Android(Gingerbread) System =

Preface

This page will explain how to compile Android for Odroid-A & 7 & E7 & PC. Current version is android 2.3(Gingerbread) based on Samsung rtm1.0

Build environment

Tested with Ubuntu 10.04/10.10/11.04

Source code download

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 system to 2011-04-11 firmware.

Download and Install essential packages

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/download.html

* Download packages.

# sudo apt-get install flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev libc6-dev-i386 build-essential zip curl valgrind g++-multilib lib32z1-dev lib32ncurses5-dev

* Android also need Phython 2.4 or higher. But, Ubuntu has Python 2.5 in general. * You must build on Ubuntu 64bit from Gingerbread. * Install JDK 6.0 or later.

# sudo apt-get update
# sudo apt-get install sun-java6-jdk

* Your system may need a mkimage to make a ramdisk image.

# sudo apt-get install uboot-mkimage
Getting source code and extraction

Android source code is stored in bundled microSD card. File name of compressed source code may be different.

# mkdir mydroid
# cd mydroid
# mydroid$ tar xfz android_20110411.tgz
# cd android

With this process, you will have a full source code in mydroid directory.

Obtain restricted files from Odroid

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.

Case 1: ADB from android-sdk

You need to install ADB driver first and connect your Odroid to your host PC.

Odroid-A
== Extract library files ==
# mydroid/android/device/sec/smdkc210/lib/mali_ump$
# mydroid/android/device/sec/smdkc210/lib/mali_ump$ adb pull /system/lib/libMali.so
# mydroid/android/device/sec/smdkc210/lib/mali_ump$ adb pull /system/lib/egl/libEGL_mali.so
# mydroid/android/device/sec/smdkc210/lib/mali_ump$ adb pull /system/lib/egl/libGLESv1_CM_mali.so
# mydroid/android/device/sec/smdkc210/lib/mali_ump$ adb pull /system/lib/egl/libGLESv1_CM_mali.so
# mydroid/android/device/sec/smdkc210/lib/mali_ump$ adb pull /system/lib/egl/libGLESv2_mali.so
# mydroid/android/device/sec/smdkc210/lib/mali_ump$ adb pull /system/lib/hw/gralloc.odroida.so

== Change access permission ==
# mydroid/android/device/sec/lib/mali_ump$ chmod -R 755 *

== Extract library files ==
# mydroid/android/device/hardkernel/proprietary/sensor$ adb pull /system/lib/hw/sensors.odroida.so

== Change access permission ==
# mydroid/android/device/hardkernel/proprietary/sensor$ chmod -R 755 *
Odroid-PC
== Extract library files ==
# mydroid/android/device/sec/smdkc210/lib/mali_ump$
# mydroid/android/device/sec/smdkc210/lib/mali_ump$ adb pull /system/lib/libMali.so
# mydroid/android/device/sec/smdkc210/lib/mali_ump$ adb pull /system/lib/egl/libEGL_mali.so
# mydroid/android/device/sec/smdkc210/lib/mali_ump$ adb pull /system/lib/egl/libGLESv1_CM_mali.so
# mydroid/android/device/sec/smdkc210/lib/mali_ump$ adb pull /system/lib/egl/libGLESv2_mali.so
# mydroid/android/device/sec/smdkc210/lib/mali_ump$ adb pull /system/lib/hw/gralloc.odroida.so

== Change access permission ==
# mydroid/android/device/sec/lib/mali_ump$ chmod -R 755 *

== Extract library files ==
# mydroid/android/device/hardkernel/proprietary/sensor$ adb pull /system/lib/hw/sensors.odroida.so

== Change access permission ==
# mydroid/android/device/hardkernel/proprietary/sensor$ chmod -R 755 *
Odroid-7
== Extract library files ==
# mydroid/android/device/hardkernel/confidential$
# mydroid/android/device/hardkernel/confidential$ adb pull /system/lib/hw/overlay.s5pc110.so
# mydroid/android/device/hardkernel/confidential$ adb pull /system/lib/hw/copybit.s5pc110.so
# mydroid/android/device/hardkernel/confidential$ adb pull /system/lib/hw/sensors.odroid7.so
# mydroid/android/device/hardkernel/confidential$ adb pull /system/lib/egl/libGLES_android.so
# mydroid/android/device/hardkernel/confidential$ adb pull /system/bin/logtool
# mydroid/android/device/hardkernel/confidential$ adb pull /system/bin/orientationd
# mydroid/android/device/hardkernel/confidential$ adb pull /system/bin/geomagneticd
# mydroid/android/device/hardkernel/confidential$ adb pull /system/vendor/lib/hw/gralloc.s5pc110.so
# mydroid/android/device/hardkernel/confidential$ adb pull /system/vendor/lib/egl/libEGL_POWERVR_SGX540_120.s
# mydroid/android/device/hardkernel/confidential$ adb pull /system/vendor/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so
# mydroid/android/device/hardkernel/confidential$ adb pull /system/vendor/lib/egl/libGLESv2_POWERVR_SGX540_120.so
# mydroid/android/device/hardkernel/confidential$ adb pull /system/vendor/lib/libIMGegl.so
# mydroid/android/device/hardkernel/confidential$ adb pull /system/vendor/lib/libPVRScopeServices.so
# mydroid/android/device/hardkernel/confidential$ adb pull /system/vendor/lib/libglslcompiler.so
# mydroid/android/device/hardkernel/confidential$ adb pull /system/vendor/lib/libpvr2d.so
# mydroid/android/device/hardkernel/confidential$ adb pull /system/vendor/lib/libpvrANDROID_WSEGL.so
# mydroid/android/device/hardkernel/confidential$ adb pull /system/vendor/lib/libsrv_init.so
# mydroid/android/device/hardkernel/confidential$ adb pull /system/vendor/lib/libsrv_um.so
# mydroid/android/device/hardkernel/confidential$ adb pull /system/vendor/lib/libusc.so
# mydroid/android/device/hardkernel/confidential$ adb pull /system/vendor/bin/pvrsrvinit

== Change access permission ==
# mydroid/android/device/hardkernel/confidential$ 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.

Building the code

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 - A ==
# cd ~/mydroid/android
# mydroid/android$
# chmod u+x device/hardkernel/odroida/build_android.sh
# ./build_android.sh
== odroid - PC ==
# cd ~/mydroid/android
# mydroid/android$
# chmod u+x vdevice/hardkernel/odroidpc/build_android.sh
# ln -s vdevice/hardkernel/odroidpc/build_android.sh .
# ./build_android_sh
== odroid - 7 ==
# cd ~/mydroid/android
# mydroid/android$
# chmod u+x vdevice/hardkernel/odroid7/build_android.sh
# ln -s vdevice/hardkernel/odroid7/build_android.sh .
# ./build_android_sh
== odroid - E7 ==
# cd ~/mydroid/android
# mydroid/android$
# chmod u+x vdevice/hardkernel/odroide7/build_android.sh
# ln -s vdevice/hardkernel/odroide7/build_android.sh .
# ./build_android_sh

* 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/odroidt-img)

ok sucess !!!
#

* Note: Compile takes about 20 minutes with latest multi-core CPU based computer. Some old computer or virtual machine may need about 2 hours.

Write the compiled files to T-Flash card under Ubuntu (Must have Linux PC)

* Insert the T-Flash card into Card reader and connect the card reader to Linux PC. * Copy all files in the \odroidt-img\system to EXT4 partition of T-Flash card. * Normally when you plug the card reader into Ubuntu PC, Ubuntu will mount it automatically. You need to remember the mounting point. * To find the mounting points, command below.

# mount
/dev/sdc2 on /media/disk-1 type ext4 (rw,nosuid,nodev,uhelper=hal) ---> Mount T-Flash first partition(Android system): remember this!
/dev/sdc3 on /media/disk-2 type ext4 (rw,nosuid,nodev,uhelper=hal) ---> Mount T-Flash second partition(Android data)
/dev/sdc4 on /media/disk-3 type ext4 (rw,nosuid,nodev,uhelper=hal) ---> Mount T-Flash third partition(Android cache)
#
 

If the partition table is NOT correct, you need to make partition as below. You also need this process if you want to use fresh new T-flash card.

Or, you can use Windows recovery tool “ODROID_T_TF_Bunner_21a.exe” or later version with .odt image.

Copy Android system to formatted partition (Overwrite)

* Copy android system file to EXT4 partition of T-Flash.

# sudo cp -a ~/mydroid/android/odroida-img/system/* /media/disk-1 ---> mounting point (Your location may be different)
# sync
 

* Unmount the T-Flash disk and eject the card from PC and insert it to Odroid for testing.

# sudo umount /media/disk-1 (or) sudo umount /dev/sdc1 ---> Unmount T-Flash card for the first partition(Android system)
# sudo umount /media/disk-2 (or) sudo umount /dev/sdc2 ---> Unmount T-Flash card for the second partition(Android data)
 

Copy android system to new partition (Clean & Write)

* Before copying files, format the partition first. All data will be erased. * To format the T-Flash card, unmount it first. * This is an example when device node of T-flash card is /dev/sdc.

# sudo umount /dev/sdc2 ---> Unmount T-Flash card for the first partition(Android system)
# sudo umount /dev/sdc3 ---> Unmount T-Flash card for the second partition(Android data)
# sudo umount /dev/sdc4 ---> Unmount T-Flash card for the third partition(Android data)
# sudo mkfs.ext4 /dev/sdc2
# sudo mkfs.ext4 /dev/sdc3
# sudo mkfs.ext4 /dev/sdc4
 

* If you want clean install, erase the Android data partition as below. * WARNING! : You might delete all of data in you Host PC if you select wrong disk/partition node name.

# sudo mkfs.ext4 /dev/sdc3 ---> T-Flash card for the second partition(Android data)
 

* After formatting, mount the T-flash card to /media/disk

# sudo mount /dev/sdc2 /media/disk ---> T-Flash card for the first partition(Android system)
 

* You can copy the Android system files to T-Flash card.

# sudo cp -a ~/mydroid/android/odroidt-img/system/* /media/disk ---> T-Flash card for the first partition(Android system)
# sync
 

* Unmount the T-Flash disk. Eject it from the card reader and insert it to Odroid for testing.

# sudo umount /media/disk (or) sudo umount /dev/sdc2 ---> Unmount T-Flash card for the second partition(Android system)
 
ramdisk-uboot.img write

Need to learn u-boot section of Odroid project. http://dev.odroid.com/projects/odroid-t/wiki/UbootPage UBoot_Compile_HowTo

In the u-boot prompt, type “fastboot”. In the host PC, type “fastboot flash ramdisk ramdisk-uboot.img”

= References = - http://source.android.com/source/download.html

- http://groups.google.co.kr/group/odroid-developer-discuss

- http://odroid.foros-phpbb.com/forum.htm

- http://www.hardkernel.com

en/android/androidgb/start.txt · Last modified: 2014/07/01 17:39 by ruppi
CC Attribution-Share Alike 3.0 Unported
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0