Android Development Environment (DACU)

From DAVE Developer's Wiki
Revision as of 16:30, 24 July 2012 by DevWikiAdmin (talk | contribs) (Android porting on Dacu)

Jump to: navigation, search
Info Box
Android-logo.jpg Applies to Android
Dacu-top-view.png Applies to Dacu

Introduction[edit | edit source]

When we talk generically about Android, we mean we deal with an embedded system running a Linux-based operating system. As the reader probably already knows, Linux was first developed on the PC platform, based on the famous x86 architecture. Typical embedded systems using an operating system (O.S. for short), today are running Linux. This choice has several benefits:

  • The developer can count on a reliable, efficient and robust software, developed and maintained by a large community all over the world
  • The software is open-source, so developers have access to the whole source code
  • Since the Linux kernel runs on many different platforms (x86, PowerPC, ARM, SuperH, MIPS etc.), applications are portable by definition
  • There are a lot of open-source applications running on top of Linux that can be easily integrated in the embedded system

The typical Android/Linux Embedded system is composed by:

  1. the bootloader – this software is run by the processor after coming out of reset. It performs basic hardware initialization, retrieves the Android kernel image (for example from a remote server via the TFTP protocol) and launch it by passing the proper arguments (command line and tags)
  2. the Android/Linux kernel
  3. the Android root file system – this file system is mounted (that is, made available, attached) by the kernel during the boot process on the root directory (“/”).


Android porting on Dacu[edit | edit source]

Android relies on the Linux kernel version 2.6.x, so, like many other linux systems, booting it is straightforward once a working Linux kernel image and a pre-built root file system are available. A big help in getting these software components come from the Texas Instruments Android Development Kit for Sitara Devices (http://software-dl.ti.com/dsps/dsps_public_sw/sdo_tii/TI_Android_DevKit/TI_Android_GingerBread_2_3_4_DevKit_2_1/index_FDS.html), which provides, among other things, the Linux kernel source code and a Android 2.3.4 "Gingerbread" pre-packaged root file system source code.

The porting on Dacu consisted in:

  • patching the TI Android kernel source tree with the Dacu/Lizard modifications
  • adding kernel support for the capacitive touchscreen controller and buttons
  • rebuilding the root file system, adding some demo and benchmark applications


Android "Gingerbread" desktop Multitouch demo application

Running Android[edit | edit source]

From internal flash[edit | edit source]

The Dacu system is provided with a pre-programmed Android environment. When started (please refer to Dacu Quick Start), the bootloader loads the Android kernel and mounts the default root file system retrieving these components from the flash. For further information on the boot process, please refer to Android Booting.

From the network[edit | edit source]

In some cases (in particular during the development phase) it's required to boot the system loading different kernel images or root file systems. You can do this by setting up Dacu to load the kernel and root file sustem from the network, using tftp and nfs protocols. Please refer to Setting_up_tftp_and_nfs for instruction on how to install a tftp and nfs servers on the host environment. When the TFTP and NFS services are properly configured, copy the kernel image to the tftp directory (es: /tftpboot/dacu/android/uImage) and export via NFS the directory where the root file system archive has been previously uncompressed.

The software package provided with Dacu includes the kernel binary image and a compressed archive containing the root file system, so you can use these default components to set up the host machine.

A few more steps are required before launching Android: from the U-Boot console, you need to stop the default boot procedure and configure some environment variables, as described in this section: Configuration net_nfs.

Once U-Boot is configured, you can launch the following command:

run net_andr_nfs


The console should report the following boot messages:

[...]

Useful Links[edit | edit source]

http://processors.wiki.ti.com/index.php/TI-Android-GingerBread-2.3.4-DevKit-2.1_ReleaseNotes

http://processors.wiki.ti.com/index.php/TI-Android-GingerBread-2.3.4-DevKit-2.1_PortingGuides

http://processors.wiki.ti.com/index.php/TI-Android-GingerBread-2.3.4-DevKit-2.1_DeveloperGuide

http://processors.wiki.ti.com/index.php/TI-Android-GingerBread-2.3.4-DevKit-2.1_UserGuide