Difference between revisions of "Android Development Environment (DACU)"

From DAVE Developer's Wiki
Jump to: navigation, search
(Android porting on Dacu)
Line 22: Line 22:
 
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, which provides, among other things, the Linux kernel version 2.6.32 source code and a Android 2.3.4 "Gingerbread" demo root file system.
 
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, which provides, among other things, the Linux kernel version 2.6.32 source code and a Android 2.3.4 "Gingerbread" demo root file system.
  
Once the kernel is built, the system must be configured to boot from network, installing on the host machine a tftp and a nfs server. Please refer to [...] for instruction on how to setup the host environment. When the TFTP and NFS services are properly configured, copy the kernel image (arch/arm/boot/uImage) to the tftp directory (es: /tftpboot/lizard/android/uImage) and export via NFS the directory where the root file system archive TI_Android_Eclair_DevKit-V1/Filesystem/rootfs_am35x.tar.bz2) has been previously uncompressed.
+
Once the kernel is built, the system must be configured to boot from network, installing on the host machine a tftp and a nfs server. Please refer to [...] for instruction on how to setup the host environment. When the TFTP and NFS services are properly configured, copy the kernel image (arch/arm/boot/uImage) to the tftp directory (es: /tftpboot/lizard/android/uImage) and export via NFS the directory where the root file system archive has been previously uncompressed.
 
 
  
 
=== Running Android ===
 
=== Running Android ===

Revision as of 10:28, 20 July 2012

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, which provides, among other things, the Linux kernel version 2.6.32 source code and a Android 2.3.4 "Gingerbread" demo root file system.

Once the kernel is built, the system must be configured to boot from network, installing on the host machine a tftp and a nfs server. Please refer to [...] for instruction on how to setup the host environment. When the TFTP and NFS services are properly configured, copy the kernel image (arch/arm/boot/uImage) to the tftp directory (es: /tftpboot/lizard/android/uImage) and export via NFS the directory where the root file system archive has been previously uncompressed.

Running Android[edit | edit source]

A few more steps are required before launching Android: from the U-Boot console, configure all the environment variables (using the setenv and saveenv commands) to allow the system to boot from network. In particular, add the following variables:

nfsandrargs=setenv bootargs init=/init rw root=/dev/nfs nfsroot=${serverip}:${rootpath} mem=256M noinitrd androidboot.console=ttyS2 vram=${vram}

vram=24M

net_andr_nfs=tftp ${buf} ${bootfile}; run nfsandrargs addip addcons; bootm ${buf}

Enter the run net_andr_nfs command. 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