Technical Note TN_146. Creating Android Images for Application Development

Similar documents
Application Note AN_385. FTDI D3XX Driver Installation Guide

Technical Note TN_152. USB 3.0 Compatibility Issues Explained

Technical Note. TN_134 FTDI Android D2XX Driver

Future Technology Devices International Ltd. FTDI Drivers Installation guide for. Windows 7

Application Note AN_243. FT312D USB Host to UART Cable Application

Application Note AN_101. Submitting Modified FTDI Drivers for Windows Hardware Certification

Application Note AN_242

White Paper WP_001. Connecting Peripherals to an Android Platform

Application Note AN_241. FTDI_AOA_HyperTerm_User_Manual

Future Technology Devices International Ltd. Application Note AN_234. FTDI Drivers Installation guide for. Windows 8

Technical Note. TN_132 Adding FTDI Devices VCP Driver Support to Android

Determining USB Peripheral Device Class

Application Note AN_250. Configuring FT313H Driver for Embedded Linux

UMFT4222PROG FT4222 Programmer Module

Application Note AN_276. FT800 Audio File Conversion

Technical Note TN_158. What is the Camera Parallel Interface?

Application Note. AN_136_Hi-Speed Mini Module EEPROM Disaster Recovery

Application Note AN_299. FT800_FT801_Internal_Clock _Trimming

Application Note AN_149. Upgrading a passive DB9 RS232 Interface to an active USB Interface using an FTDI DB9-USB-RS232 Module

Application Note AN_209. AN_209 PDIUSBD12 to FT120 Migration Guide

Future Technology Devices International Ltd. FTDI Drivers Installation guide for Windows XP

Technical Note. TN_147 Java D2xx for Android

Future Technology Devices International Ltd

Future Technology Devices International Ltd

FTDI Chip. VM800P Datasheet Embedded Video Engine Plus Module. VM800P Embedded Video Engine Plus Module Datasheet Version 1.0

Future Technology Devices International Ltd. AN232R-02 FTDIChip-ID for the FT232R and FT245R

Application Note AN_185. Vinculum-II UART to USB HID Class Host Bridge

Future Technology Devices International Ltd. USB-Key. Datasheet

Future Technology Devices International Ltd. Technical Note TN_101

Command Processor for MPSSE and MCU Host Bus Emulation Modes

Simplified Description of USB Device Enumeration

Future Technology Devices International Ltd. USB NMC-2.5m. USB to USB Null Modem Cable. Datasheet

FT4232H Mini Module. USB Hi-Speed FT4232H Evaluation Module. Datasheet

FT2232H Mini Module. USB Hi-Speed FT2232H Evaluation Module. Datasheet

VF2F. USB Flash Disk File-to-file Transfer Vinculum Evaluation Kit. Future Technology Devices International Ltd. Preliminary - Subject to Change

USB Hi-Speed Serial/Hub Module. Datasheet

TTL-232R-PCB. TTL to USB Serial Converter PCB. Datasheet

C232HD. USB 2.0 Hi-Speed to UART Cable. Datasheet

Future Technology Devices International Ltd. FTDI Drivers Installation guide for Windows XP

Application Note AN_254. FT800 Designs With Visual TFT

Future Technology Devices International Ltd. FTDI Drivers Installation guide for. Windows VISTA

Future Technology Devices International Ltd. Windows XP Installation Guide

TTL-232R. TTL to USB Serial Converter Range of Cables. Datasheet

VDIP1. Vinculum VNC1L Module. Datasheet

Future Technology Devices International Ltd. USB to RS232 UART Serial Converter PCB. Datasheet

Application Note AN_208. FT311D and FT312D Demo_APK_User_GuideFT311D and FT312D Demo_APK_User_Guide

C232HM. USB 2.0 Hi-Speed to MPSSE Cable. Datasheet

Future Technology Devices International Ltd USB TO RS422 UART SERIAL CONVERTER PCB. Datasheet. Document Reference No.: FT_000119

Future Technology Devices International Ltd. VF2F2. USB Flash Disk File-to-file Transfer Vinculum Evaluation Kit.

Future Technology Devices International Ltd

Chapter 1 Hardware and Software Introductions of pcduino

Customizing Boot Media for Linux* Direct Boot

Vinco Development Module. Datasheet

Application Note AN_252. FT800 Audio Primer

Technical Note TN_105

Application Note AN_146. USB Hardware Design Guidelines for FTDI ICs

The DB9-USB Family of. UART Converter Modules. Datasheet

AlienVault Offline Key Activation

USB 2.0 Flash Drive User Manual

USB-COM422-PLUS1. Datasheet

Newton2 Developers Guide

RocketRAID 2640/2642 SAS Controller Ubuntu Linux Installation Guide

Windows Embedded OS USB Driver Installation

USB-COM422-PLUS2. Datasheet

System administration basics

TTL-232R-3V3 USB to TTL Serial Converter Cable

Future Technology Devices International Ltd. USB to RS232 Serial Converter Range of Cables. Datasheet

USB-COM232-PLUS4. Datasheet

DB9-USB-RS232 Module. Male & Female. Datasheet

BackTrack Hard Drive Installation

Intel Compute Stick STCK1A32WFC User Guide. Intel Compute Stick STCK1A32WFC

RocketRAID 174x SATA Controller Ubuntu Linux Installation Guide

SheevaPlug Development Kit README Rev. 1.2

USB Stick Driver Installation Instructions

ThinkServer RD550 and RD650 Operating System Installation Guide

Application Note AN_100. Using the FT232R/FT245R with an External Crystal or Oscillator

RecoveryVault Express Client User Manual

Procedure to Create and Duplicate Master LiveUSB Stick

Online Backup Linux Client User Manual

PCIe AHCI-IP Demo Instruction Rev Jul-15

Online Backup Client User Manual

Online Backup Client User Manual Linux

Digital Photo Bank / Portable HDD Pan Ocean E350 User Manual

The Tor VM Project. Installing the Build Environment & Building Tor VM. Copyright The Tor Project, Inc. Authors: Martin Peck and Kyle Williams

FTDI Ltd DS_US232R-10(R-100/500) USB to RS232 Adapter cable. Data Sheet

1. Product Information

Multi-Operating Environment System

Buildroot for Vortex86EX (2016/04/20)

LSN 10 Linux Overview

Fiery Clone Tool For Embedded Servers User Guide

How to Install Applications (APK Files) on Your Android Phone

Make a Bootable USB Flash Drive from the Restored Edition of Hiren s Boot CD

Bare Metal Backup And Restore

ARMSDK-VM Virtual Appliance A preconfigured Linux system

Adafruit's Raspberry Pi Lesson 1. Preparing an SD Card for your Raspberry Pi

Online Backup Client User Manual

BeagleBone Black: Installing Operating Systems

USB HSPA Modem. User Manual

Transcription:

TN_146 Creating Android Images for Application Development Issue Date: 2013-01-28 This document shows how to build and install the Android Operating System on the BeagleBoard xm Use of FTDI devices in life support and/or safety applications is entirely at the user s risk, and the user agrees to defend, indemnify and hold FTDI harmless from any and all damages, claims, suits or expense resulting from such use. Future Technology Devices International Limited (FTDI) Unit 1, 2 Seaward Place, Glasgow G41 1HH, United Kingdom Tel.: +44 (0) 141 429 2777 Fax: + 44 (0) 141 429 2758 Web Site: http://ftdichip.com

Table of Contents 1 Introduction... 2 1.1 Hardware and Software required... 2 1.2 Get Android source files... 3 2 Prepare micro SD card... 4 2.1 Calculate Card Size... 4 2.2 Partition the Card... 4 2.3 Format the Partitions... 5 2.4 Install the Boot Files... 5 3 Installing the micro SD card on the BeagleBoard... 7 4 Conclusion... 8 5 Contact Information... 9 Appendix A References... 10 Document References... 10 Acronyms and Abbreviations... 10 Appendix B List of Tables & Figures... 11 List of Figures... 11 Appendix C Revision History... 12 1

1 Introduction This document explains how to build a working Android image for the BeagleBoard on a micro SD card. Much of this information was gleaned from the Gumstix.org website. This procedure can be be used with any small embedded Linux system. The BeagleBoard was chosen for its power and flexibility. It is also equipped with 4 USB Host ports, which makes it ideal for USB application development. Figure 1.1 shows the BeagleBoard PCB. Figure 1.1 BeagleBoard XM The image build procedure has been verified on the following versions of Android: Gingerbread 2.3.4 Ice Cream Sandwich 4.0.1 Jelly Bean 4.1.1 1.1 Hardware and Software Required 2 GB Class 4 micro SD card (SDSC) with full size SD card adapter. Linux PC running Ubuntu 11.10 or Linux Mint 14, equipped with SD card reader. (older laptop with built in SD card reader is ideal) Make sure dosfsutils is installed on Linux PC. Android image source code. BeagleBoard-XM development board 5V, 2.0A power supply 2

1.2 Get Android Source Files Download the BeagleBoard-xM Ice Cream Sandwich image from code.google.com Extract the files into your target directory. 3

2 Prepare Micro SD Card Insert the micro SD card into the Linux PC s card reader slot. Open a Linux terminal window. Use the Linux df command to determine the device name of the micro SD Card. Before starting, you will need to unmount any mounted partition of the attached micro SD card: sudo umount /dev/mmcblk0p1 (SD card name may be different on your Linux machine) 2.1 Calculate Card Size A specific format of the micro SD card is needed to make micro SD cards work with the Android boot file. Find the card size in the first line of the fdisk command (there will be many lines returned by this command) You will calculate the number of cylinders for your specific micro SD card. sudo fdisk l /dev/mmcblk0 (returns the following ) Disk /dev/mmcblk0: 1990 MB, 1990197248 bytes Divide the card size in bytes by 255 heads, 63 sectors, and 512 bytes per sectors and round down to the nearest integer, ie: 1990197248/255/63/512 = 241.96 = 241 cylinders 2.2 Partition the Card The Android image needs at least two partitions: a FAT partition to store the boot files and a Linux partition to store the root file system. To start, clean up any existing partition data: sudo dd if=/dev/zero of=/dev/mmcblk0 bs=1024 count=1024 Use the sfdisk tools to start the partitioning process: sudo sfdisk - force D us H 255 S 63 C 241 /dev/mmcblk0 In this case, -C refers to the number of cylinders calculated in the previous step. You should see the sfdisk> prompt appear. At this prompt, enter the following: sfdisk>128,130944,0x0c,* <ret> sfdisk> 1310722,,,- (press return 3 more times) The micro SD card will now have the following partitions: Figure 2.1 Micro SD Card Partitions 4

2.3 Format the Partitions Next, format the first partition as a FAT file system. (The n argument names this partition boot) sudo mkfs.vfat F 32 /dev/mmcblk0p1 n boot Format the second partition for Linux. (The L argument gives it the label rootfs). sudo mke2fs j L rootfs /dev/mmcblk0p2 (This command will take about one minute to finish) Mount the partitions: sudo mkdir /media/boot sudo mkdir /media/rootfs sudo mount t vfat /dev/mmcblk0p1 /media/boot sudo mount t ext3 /dev/mmcblk0p2 /media/rootfs 2.4 Install the Boot Files The last step is to copy the Android boot files and root filesystem that will run on the BeagleBoard. Point your terminal window to the directory containing the Android BeagleBoard source files and directories. The working directory will contain: Boot_Images Filesystem Media_Clips Mkmmc.android.sh README.txt Only the Boot_Images and Filesystem directories will be used to get basic Android functionality on the Beagleboard. You can ignore the README file and shell script (.sh) file. The MLO (x-loader binary) file must be copied first. Go to the Boot_Images directory: sudo cp MLO /media/boot/mlo Copy the u-boot bootloader: sudo cp u-boot.bin /media/boot/u-boot.bin Copy the kernel binary image: sudo cp uimage /media/boot/uimage Copy the boot script: sudo cp boot.scr /media/boot/boot.scr 5

Next, go to the File system directory and extract the compressed root file system onto the second partition. (This file may have a different name, but it will be a compressed file.) sudo tar xavf rootfs.tar.bz2 C /media/rootfs (This will take about a minute to extract and copy all of the files to the micro SD card) Run the Sync command to make sure all files are written to micro SD Card: sync Unmount the partitions and the card is ready to load on the BeagleBoard: sudo umount /media/boot sudo umount /media/rootfs 6

3 Installing the Micro SD Card on the BeagleBoard Make sure the monitor, mouse and keyboard are connected. The monitor must be powered up before applying power to the Beagleboard. Insert the micro SD card into the micro SD socket next to the micro USB connector (refer to Figure 1.1). After these steps are completed, you can now apply 5V power to the BeagleBoard. The Android OS will begin to boot. On first power up, many compressed files on the micro SD card will be uncompressed during boot up. This will take time. It has been found that pressing the reset button, waiting for a minute, and then removing and re-installing the micro SD card will get Android to boot up properly. On first boot, the initial Android screens will take some time to appear. Subsequent boots will load much faster. 7

4 Conclusion With the Android image installed, you now have the capability to develop and test Android applications on the Beagleboard. You will need to have the Android SDK and Eclipse IDE installed on your Linux or Windows PC. The use of these tools is beyond the scope of this document. By following the procedure in TN_134, you can install the FTDI D2XX driver and demo code which will allow you to demonstrate and develop Android to USB communication. A key advantage of the Beagleboard as a development platform is the straightforward process to rebuild the Android image if it becomes corrupted during application development. 8

5 Contact Information Head Office Glasgow, UK Future Technology Devices International Limited Unit 1, 2 Seaward Place, Centurion Business Park Glasgow G41 1HH United Kingdom Tel: +44 (0) 141 429 2777 Fax: +44 (0) 141 429 2758 Branch Office Tigard, Oregon, USA 7130 SW Fir Loop Tigard, OR 97223-8160 USA Tel: +1 (503) 547 0988 Fax: +1 (503) 547 0987 E-mail (Sales) E-mail (Support) E-mail (General Enquiries) sales1@ftdichip.com support1@ftdichip.com admin1@ftdichip.com E-Mail (Sales) E-Mail (Support) E-Mail (General Enquiries) us.sales@ftdichip.com us.support@ftdichip.com us.admin@ftdichip.com Branch Office Taipei, Taiwan 2F, No. 516, Sec. 1, NeiHu Road Taipei 114 Taiwan, R.O.C. Tel: +886 (0) 2 8791 3570 Fax: +886 (0) 2 8791 3576 E-mail (Sales) E-mail (Support) E-mail (General Enquiries) tw.sales1@ftdichip.com tw.support1@ftdichip.com tw.admin1@ftdichip.com Branch Office Shanghai, China Room 1103, No. 666 West Huaihai Road, Shanghai, 200052 China Tel: +86 21 62351596 Fax: +86 21 62351595 E-mail (Sales) E-mail (Support) E-mail (General Enquiries) cn.sales@ftdichip.com cn.support@ftdichip.com cn.admin@ftdichip.com Web Site http://ftdichip.com System and equipment manufacturers and designers are responsible to ensure that their systems, and any Future Technology Devices International Ltd (FTDI) devices incorporated in their systems, meet all applicable safety, regulatory and system-level performance requirements. All application-related information in this document (including application descriptions, suggested FTDI devices and other materials) is provided for reference only. While FTDI has taken care to assure it is accurate, this information is subject to customer confirmation, and FTDI disclaims all liability for system designs and for any applications assistance provided by FTDI. Use of FTDI devices in life support and/or safety applications is entirely at the user s risk, and the user agrees to defend, indemnify and hold harmless FTDI from any and all damages, claims, suits or expense resulting from such use. This document is subject to change without notice. No freedom to use patents or other intellectual property rights is implied by the publication of this document. Neither the whole nor any part of the information contained in, or the product described in this document, may be adapted or reproduced in any material or electronic form without the prior written consent of the copyright holder. Future Technology Devices International Ltd, Unit 1, 2 Seaward Place, Centurion Business Park, Glasgow G41 1HH, United Kingdom. Scotland Registered Company Number: SC136640 9

Appendix A References Document References TN_134 FTDI Android D2XX Driver Android downloads for BeagleBoard and other devices Gumstix utilities Acronyms and Abbreviations Terms Boot Partition EXT File System FAT File System File System Partition Kernel OS Image SDSC Card Description In Android, this partition contains the kernel image and boot scripts. Extended File System, designed for use with Linux operating systems. File Allocation Table file system, still used on solid state memory cards. In Android, the file system partition contains the entire operating system, other than the kernel. This includes the Android user interface and all the system applications that come pre-installed on the device. In operating systems, the kernel serves as a bridge between application programs and the actual hardware (CPU, memory, IO devices). An OS image is a file that contains the OS, the executables, and any data files that are related to application programs. Secure Digital Standard Capacity card, up to 2 GB capacity. 10

Appendix B List of Tables & Figures List of Figures Figure 1.1 BeagleBoard XM... 2 Figure 2.1 Micro SD Card Partitions... 4 11

Appendix C Revision History Document Title: TN_146 Creating Android Images for App Development Document Reference No.: FT_000781 Clearance No.: FTDI# 326 Product Page: http://www.ftdichip.com/android Document Feedback: Send Feedback Revision Changes Date 1.0 Initial Release never published 2013-01-28 1.1 Update OS versions supported 29/04/02 12

13