Android

From Openmoko

Revision as of 20:23, 22 October 2008 by Cfriedt (Talk | contribs)

Jump to: navigation, search

Contents

Introduction

As Ben Leslie had pointed out on his blog far before the source code was released, Android was originally designed to work with the ARMv5TE instruction set architecture (ISA), which allows for DSP enhanced instructions. Contrary to the ARMv5TE ISA, the Neo1973 and FreeRunner handsets both feature an arm920t core, which comply to the ARMv4T ISA.

Before the source code was released, kernel trap handlers were implemented to 'emulate' the ARMv5TE ISA. Although the results worked in many cases, trapping is costly and performance suffered as a result. Moreover, without explicitly knowing which conditions were set by various instructions, such as Thumb Mode execution, the result became nondeterministic.

With the release of the Android source code, the Open Source community is no longer limited to dealing with a binary-only product. The Open Handset Alliance (OHA) has let their source code become a part of their product for everyone to benefit from and enrich.

Since the [Android OS http://www.android.com] was publically released on 20081021, work is currently underway to port Android to the Neo 1973 and FreeRunner handsets.

How to Help

You can start by following the instructions to download and build the Android source from scratch. Please see http://source.android.com/download and follow the instructions for your architecture.

Porting Strategy

  • Analysis and leverage of the existing build system
    • buid/core/combo/arm-linux.mk
      • -D__ARCH_ARM_4__ -D__ARCH_ARM_4T__
      • -march=armv4t -mcpu=arm920t
    • fix various static references to 'armv5'
  • Isolating ARMv5TE ISA dependent code
    • e.g. grep -n -R -i "${armv5te_isa_pattern}" ~/android
  • Abstracting
    • ( C/C++ ) Use inlined functions / #ifdef statments to implement functions in a portable manner
    • ( ASM ) #ifdef statements ?

For each ARMv5TE instruction, one could potentially

  • Implement the instruction using general registers instead of DSP calls (i.e. eabi / softfloat)
  • If that is a) nondeterministic, or b) slow, then sections of code need to be analyzed and hand-optimized for the ARMv4T isa

Important Links

(Please Update Me)

Documentation

Hardware Reference

Communities

Buy a Handset and Debug Board

References

External Links

Personal tools

Introduction

As Ben Leslie had pointed out on his blog far before the source code was released, Android was originally designed to work with the ARMv5TE instruction set architecture (ISA), which allows for DSP enhanced instructions. Contrary to the ARMv5TE ISA, the Neo1973 and FreeRunner handsets both feature an arm920t core, which comply to the ARMv4T ISA.

Before the source code was released, kernel trap handlers were implemented to 'emulate' the ARMv5TE ISA. Although the results worked in many cases, trapping is costly and performance suffered as a result. Moreover, without explicitly knowing which conditions were set by various instructions, such as Thumb Mode execution, the result became nondeterministic.

With the release of the Android source code, the Open Source community is no longer limited to dealing with a binary-only product. The Open Handset Alliance (OHA) has let their source code become a part of their product for everyone to benefit from and enrich.

Since the [Android OS http://www.android.com] was publically released on 20081021, work is currently underway to port Android to the Neo 1973 and FreeRunner handsets.

How to Help

You can start by following the instructions to download and build the Android source from scratch. Please see http://source.android.com/download and follow the instructions for your architecture.

Porting Strategy

  • Analysis and leverage of the existing build system
    • buid/core/combo/arm-linux.mk
      • -D__ARCH_ARM_4__ -D__ARCH_ARM_4T__
      • -march=armv4t -mcpu=arm920t
    • fix various static references to 'armv5'
  • Isolating ARMv5TE ISA dependent code
    • e.g. grep -n -R -i "${armv5te_isa_pattern}" ~/android
  • Abstracting
    • ( C/C++ ) Use inlined functions / #ifdef statments to implement functions in a portable manner
    • ( ASM ) #ifdef statements ?

For each ARMv5TE instruction, one could potentially

  • Implement the instruction using general registers instead of DSP calls (i.e. eabi / softfloat)
  • If that is a) nondeterministic, or b) slow, then sections of code need to be analyzed and hand-optimized for the ARMv4T isa

Important Links

(Please Update Me)

Documentation

Hardware Reference

Communities

Buy a Handset and Debug Board

References

External Links