Android Operating Instructions
Version 1.0
July 17, 2013
Copyright ©2013 FUJISOFT INCORPORATED, All rights reserved.
GRAPHICS ACCELERATOR for Android Operating Instructions ver. 1.0
◆Notices regarding the use of these documents
・It is prohibited to duplicate or copy the contents of this document without our permission.
・The content of this document is subject to changes without notice.
・Please understand that we are not responsible for any patent rights violation of any third parties
as a result of using the information contained in this document.
・Please note that we don’t take any responsibility for damage caused by using this material.
・The products described in this document, or cargo, are regulated based on the "Foreign Exchange
and Foreign Trade Law"
In the case of technology, you will need authorization in accordance with the above law to export this
product.
・All other company names and product names contained in this document are trademarks or
registered trademarks of their respective owners.
・Altera ® V SoC、Cyclone® V SoC、Quartus® II are Altera’s trademarks or registered trademarks.
AndroidTM is a Google Inc. trademark or registered trademark.
Copyright © 2013 FUJISOFT INCORPORATED. All rights reserved.
Copyright ©2013 FUJISOFT INCORPORATED, All rights reserved.
GRAPHICS ACCELERATOR for Android Operating Instructions ver. 1.0
【Table of contents】
1.
Introduction ........................................................................................................................................ 1
2.
Assumptions & Constraints .............................................................................................................. 1
2.1.
Operating Environment ............................................................................................................. 1
2.2.
Development Environment ........................................................................................................ 1
3.
System Overview................................................................................................................................ 2
4.
Building a Development Environment ............................................................................................. 2
5.
6.
4.1.
Installation of Android Development Package ......................................................................... 2
4.2.
Installation of Linux Development Packages ........................................................................... 2
Source Code Download Instructions ................................................................................................. 3
5.1.
Android ........................................................................................................................................ 3
5.2.
Linux ............................................................................................................................................ 3
5.3.
GRAPHICS ACCELERATOR IP Software................................................................................ 3
How to Port Android .......................................................................................................................... 4
6.1.
6.1.1.
Changes ................................................................................................................................ 4
6.1.2.
How to Build Android .......................................................................................................... 5
6.2.
7.
Android ........................................................................................................................................ 4
Linux ............................................................................................................................................ 5
6.2.1.
Changes ................................................................................................................................ 5
6.2.2.
How to Build Linux ............................................................................................................. 6
Starting Procedure ............................................................................................................................. 7
7.1.
Board Setting .............................................................................................................................. 7
7.1.1.
Switch and Jumper Setting ................................................................................................ 7
7.1.2.
Evaluation Board and LCD panel connection method...................................................... 7
7.2.
Preparing a Bootable SD Card................................................................................................... 8
7.2.1.
How to prepare an SD card from the attached disk image .............................................. 8
7.2.2.
How to change the file inside the bootable SD card.......................................................... 8
Copyright ©2013 FUJISOFT INCORPORATED, All rights reserved.
GRAPHICS ACCELERATOR for Android Operating Instructions ver. 1.0
1.
Introduction
This document describes the required steps for running Android 4.0 (ICS) on the Altera Corp. Cyclone
® V SoC Development Board using our product, the GRAPHICS ACCELERATOR IP.
For instruction on how to incorporate the GRAPHICS ACCELERATOR IP, please see the separate
"GRAPHICS ACCELERATOR for Android product specifications".
2.
Assumptions & Constraints
This document refers to the operating environment shown in section 2.1
2.1.

Operating Environment
Hardware
・ Evaluation Board
Made by Altera Corporation: Cyclone® V SoC Development Board (rev C)
・ LCD Touch panel
Made by Terasic Corporation:
Video & Embedded Evaluation Kit (LCD part only)
Video & Embedded Evaluation Kit - Multi-touch(LCD part
only)
・ Micro SD Card (Size: over 4GB)

Software
・ Android 4.0.4 (ICS)
・ Linux Kernel 3.7.0
・ U-boot version 2012.10
2.2.

Development Environment
Development PC specifications
・ OS: Ubuntu 12.04.2 LTS 64bit
※When using a Windows PC, please use a virtualizer such as VirtualBox and create a virtual
environment.
・ Memory: over 16GB recommended
・ Disk drive space: over 50GB recommended
Android: about 25GB
Yocto (Linux + boot loader): about 20GB

Hereinafter, the term "Development PC" in this document will describe a PC that meets the
specifications mentioned above.
Make sure you have installed the terminal software as well as the Quartus II 64Bit Programmer
(Version 13.0 or later) in advance.
Copyright ©2013 FUJISOFT INCORPORATED, All rights reserved.
- 1 -
GRAPHICS ACCELERATOR for Android Operating Instructions ver. 1.0
3.
System Overview
The following diagram (Figure 1) is an example of a system using a Video & Embedded Evaluation Kit
LCD touch panel and a Cyclone ® V SoC Development Board.
Figure 1: System Overview
4.
Building a Development Environment
This section describes how to install the necessary tools on your development PC in order to run Android
4.0 on the Altera Corp. Cyclone ® V SoC Development Board.
4.1.
Installation of Android Development Package
Refer to the Android Developers website and install the required packages to build Android and JDK.
■ Android Developers Website:
<http://source.android.com/source/initializing.html>
4.2.
Installation of Linux Development Packages
Refer to the RocketBoards.org website and install the required packages to build Linux.
■ RocketBoards.org Website
<http://www.rocketboards.org/foswiki/Documentation/AlteraSoCDevelopmentBoardYoctoGetting
Started>
Copyright ©2013 FUJISOFT INCORPORATED, All rights reserved.
- 2 -
GRAPHICS ACCELERATOR for Android Operating Instructions ver. 1.0
5.
Source Code Download Instructions
This section describes how to download the necessary source codes to run Android on the Altera Corp.
Cyclone ® V SoC Development Board.
5.1.
Android
Refer to the Android Developers website and download the Android source code.
Additionally, you must specify the branch "ics-plus-aosp".
■ Android Developers Website:
<http://source.android.com/source/downloading.html>
5.2.
Linux
Refer to the RocketBoards.org website and download Linux for the Altera SoC Development Board.
■ RocketBoards.org Website:
<http://www.rocketboards.org/foswiki/Documentation/AlteraSoCDevelopmentBoardYoctoGettingStarted >
5.3.
GRAPHICS ACCELERATOR IP Software
Download the source codes for Android, Linux Kernel and the interface between those, in order to start the
GRAPHICS ACCELERATOR IP, from our download site.
Copyright ©2013 FUJISOFT INCORPORATED, All rights reserved.
- 3 -
GRAPHICS ACCELERATOR for Android Operating Instructions ver. 1.0
6.
How to Port Android
This section describes the necessary porting steps to run Android on the Altera Corp. Cyclone ® V SoC
Development Board.
Additionally, Table 1 offers the root directory of each file.
Table 1: Root Directory Listing
Root Directory Path
Title Name
~/yocto/build/tmp/work/
U-boot
armv7ahf-vfp-neon-poky-linux-gnueabi/
U-BOOT_ROOT
u-boot-altera-2012.10-r0.0/u-boot-altera-2012.10/
~/yocto/build/tmp/work/
Kernel
socfpga_cyclone5-poky-linux-gnueabi/
KERNEL_ROOT
linux-altera-3.7-r1/linux-altera-3.7
Android
6.1.
Directory download for the source code in section 5.1
ANDROID_ROOT
Android
This section describes how to build and make changes on Android.
6.1.1.
Changes
6.1.1.1.
Changes Overview
Instructions on how to make changes and a summary of changes are noted in Table 2.
Table 2: Android Changes Overview
Directory Path
ANDROID_ROOT/device/
Directory Name
Altera
Summary of Changes
Cyclone® V SoC Development Board
Settings
Copyright ©2013 FUJISOFT INCORPORATED, All rights reserved.
- 4 -
GRAPHICS ACCELERATOR for Android Operating Instructions ver. 1.0
6.1.1.2.
How to make changes
Copy the Altera directory obtained in Section 5.3 to the ANDROID_ROOT/device directory.
6.1.2.
How to Build Android
Go to ANDROID_ROOT on the development PC, enter the command below and build Android.
$ source build/envsetup.sh
$ lunch full_cyclone5devkit-eng
$ make -j4
Note: Please change the number of the j4 command according to your PC.
6.2.
Linux
This section describes how to set up Linux and make changes.
6.2.1.
Changes
6.2.1.1.
Changes Overview
Instructions on how to make changes and a summary of changes are noted in Table 3.
Table 3: Kernel Changes Overview
Summary of Changes
Modification Method
Modify the configuration using the menu configuration and built-in
Touch panel settings
driver
LCD screen and GRAPHICS
Modify the configuration using the menu configuration and built-in
ACCELERATOR settings
driver
6.2.1.2.
i)
How to make changes
Copying the driver
Please copy the FSI_Demos directory downloaded in section 5.3 to the Development PC. The destination
directory can be found in Table 4.
Table 4: Driver built-in directory
Source Directory
FSI_Demos
Destination Directory
~KERNEL_ROOT/drivers/staging/android
ii ) Copying the configuration file
Please copy the Makefile and Kconfig files found in the FSI Demos downloaded in section 5.3 to the location
shown in Table 5.
Copyright ©2013 FUJISOFT INCORPORATED, All rights reserved.
- 5 -
GRAPHICS ACCELERATOR for Android Operating Instructions ver. 1.0
Table 5: Change Files
Copy File
Destination Directory
Kconfig
~KERNEL_ROOT/drivers/staging/android
Makefile
6.2.2.
How to Build Linux
This section describes how to build Linux.
6.2.2.3.
i)
Changing the Configuration
Starting the Menuconfig
Refer to the RocketBoards.org website and start Menuconfig.
■ RocketBoards.org Website
<http://www.rocketboards.org/foswiki/Documentation/AYoctoUserManual >
ii ) Configuration Settings
Depending on your configuration, select either "Single Touch Panel Demo" or "Multi Touch Panel Demo" as
outlined below:
Device Drivers - - - >
[*] Staging Drivers - - - >
Android - - - >
[*] FSI Demos - - - >
[ ] Single Touch Panel Demo
[ ] Multi Touch Panel Demo
6.2.2.4.
Setting up the Demo
Refer to the RocketBoards.org website (found in section 6.2.4.5) and set up the demo.
Copyright ©2013 FUJISOFT INCORPORATED, All rights reserved.
- 6 -
GRAPHICS ACCELERATOR for Android Operating Instructions ver. 1.0
7.
Starting Procedure
This section explains how to start Android on the Cyclone ® V SoC Development Board.
7.1.
Board Setting
7.1.1.
Switch and Jumper Setting
Please refer to the RocketBoards.org website for setting up the switch and jumper of each Cyclone ® V SoC
Development Board.
■ RocketBoards.org Website
<http://www.rocketboards.org/foswiki/Documentation/Altera SoCDevelopmentBoardSoftwareGettingStarted >
7.1.2.
Evaluation Board and LCD panel connection method
Connect the LCD part of the Terasic Multi Touch Display with the Cyclone ® V SoC Development Board
using the supplied HSMC Flex Cable. Figure 2 shows the status when both are connected.
Figure 2: Evaluation board - LCD panel connection
Copyright ©2013 FUJISOFT INCORPORATED, All rights reserved.
- 7 -
GRAPHICS ACCELERATOR for Android Operating Instructions ver. 1.0
7.2.
Preparing a Bootable SD Card
7.2.1.
How to prepare an SD card from the attached disk image
Store the SD card image file that you obtained in section 5.3 in any directory of the development PC.
Prepare a bootable SD card by entering the following command:
$ dd if=XXX.img of=/dev/sdX

Please change "/sdX " depending on the appropriate environment.

Please replace "XXX.img" with the name of the SD card image file.

It is possible to prepare a bootable SD card in environments other than Linux, such as Windows,
when using Win32DiskImager etc.
7.2.2.
How to change the file inside the bootable SD card
① Follow the steps in section 7.2.1 and prepare the SD card.
② Insert the SD card into the development PC and wait until the PC recognizes it.
③ Check that there are three partitions in the SD card (see Figure 3).
Table 6 notes the role of each partition.
Figure 3: Partition Verification Examples
Copyright ©2013 FUJISOFT INCORPORATED, All rights reserved.
- 8 -
GRAPHICS ACCELERATOR for Android Operating Instructions ver. 1.0
Table 6: List of Partitions
Partion Name
IMAGE
Use
Remarks
Kernel storage area
―
Will be recognized by
ROOTFS
Android File System storage area
U-DATA
User data storage area (photographs etc.)
N/A
Windows
Boot Loader storage area
Will be recognized by
Windows
Unmountable
④ Use the following commands and copy the Android file system to the / media / ROOTFS directory.
$ cd ~/ANDROID_ROOT/
$ cp -a out/target/product/cyclone5devkit/root/* /media/ROOTFS/
$ cp -a out/target/product/cyclone5devkit/system/* /media/ROOTFS/system/
$ cp -a out/target/product/cyclone5devkit/data/ /media/ROOTFS
$ chown -R root:root /media/ROOTFS/
$ chmod -R 777 rootfs_ICS+AOSP_12.04/system
$ chmod 777 rootfs_ICS+AOSP_12.04/init.*
$ chmod 777 rootfs_ICS+AOSP_12.04/ueventd.*
Note: Assuming that the ROOTFS partition of the SD card is mounted on / media / ROOTFS /
⑤ Copy the library downloaded in section 5.3 onto the micro SD card (see Table 7).
Table 7: Library storage directory
Library name
fepslge.socfpga5xs1.so
gralloc.default.so
libGLES_android.so
Storage directory
/media/ROOTFS/system/lib/hw
/media/ROOTFS/system/lib/egl
⑥ Refer to the RocketBoards.org website and copy the Kernel image to the /media/IMAGE directory.
■ RocketBoards.org Website
<http://www.rocketboards.org/foswiki/Documentation/AlteraSoCDevelopmentBoardYoctoGettingS
tarted>
⑦ To unmount the SD card, remove the micro SD card from the development PC.
⑧ Connect the PC and Cyclone ® V SoC Development Board using the Serial and Blaster Cable.
Copyright ©2013 FUJISOFT INCORPORATED, All rights reserved.
- 9 -
GRAPHICS ACCELERATOR for Android Operating Instructions ver. 1.0
⑨ Turn on the Cyclone® V SoC Development Board.
⑩ Start the Quartus II 64Bit Programmer (ver. 13.0 or later)
⑪ Click "Hardware setup" (see Figure 4) and open the Hardware Setup screen to add the Blaster cable.
Figure 4: Blaster Cable Screen
⑫ Click "Auto Detect" (see Figure 5), open the Select Device screen and select 5CSXFC6DES.
Figure 5: Device Selection Screen
Copyright ©2013 FUJISOFT INCORPORATED, All rights reserved.
- 10 -
GRAPHICS ACCELERATOR for Android Operating Instructions ver. 1.0
⑬ Double-click the 5CSXFC6DES File field to open the "Select New Programming File" screen. Then,
select the SOF file downloaded in Section 5.3.
Figure 6: SOF File Selection Screen
⑭ After checking the 5CSXFC6DES Program/Configure box, click Start. The download of the SOF file
will begin (see Figure 7).
Figure 7: SOF Download Screen
Copyright ©2013 FUJISOFT INCORPORATED, All rights reserved.
- 11 -
GRAPHICS ACCELERATOR for Android Operating Instructions ver. 1.0
⑮ Please start the terminal software (for settings see Table 8).
Table 8: Serial Settings
Settings
Baud rate
57600
Data
8 bit
Parity
None
Stop
1 bit
Flow control
None
⑯ Insert the Micro SD card into the Cyclone ® V SoC Development Board.
⑰ Press the WARM reset button on the Cyclone ® V SoC Development Board.
⑱ Press the Enter key on the console to stop the U-boot from starting up automatically.
⑲ Enter the following command in the console.
$ setenv mmcboot “setenv bootargs console=ttyS0,57600 mem=512M@0x0 init=/init vram=64M
altfb.vram=0:32M androidboot.console=ttyS0 root=${mmcroot} rw rootwait;bootm ${loadaddr} ${fdtaddr}”
$ mw.l 0xffc25080 0x00003fff
$ run bootcmd
⑳ The process is completed when Android’s home screen appears on the LCD (see Figure 8).
Figure 8: Completed Android Boot Image
Copyright ©2013 FUJISOFT INCORPORATED, All rights reserved.
- 12 -
GRAPHICS ACCELERATOR for Android Operating Instructions ver. 1.0
Modification History
Version
1.0
Modifications
Date
New Creation
2013/7/17
www.fsi.co.jp
Contact:
Common Platform Promotion Group
Embedded System Department, Solution Business Division
E-mail:et-solution@fsi.co.jp
Web Site:http://www.fsi.co.jp/project/e/products/Android_solution/index.html
Copyright ©2013 FUJISOFT INCORPORATED, All rights reserved.