Android

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(Buy a Handset and Debug Board)
m (Buy a Handset and Debug Board: corrected spelling to "Jon")
Line 78: Line 78:
  
 
* [http://www.openmoko.com/distributors.html OpenMoko Store] - Worldwide distributors for FIC / OpenMoko handets
 
* [http://www.openmoko.com/distributors.html OpenMoko Store] - Worldwide distributors for FIC / OpenMoko handets
* [http://wwww.koolu.com KoolU.com] - North American distributor of the OpenMoko, backed by [http://koolu.com/component/option,com_mojo/Itemid,225/ John "maddog" Hall].
+
* [http://wwww.koolu.com KoolU.com] - North American distributor of the OpenMoko, backed by [http://koolu.com/component/option,com_mojo/Itemid,225/ Jon "maddog" Hall].
 
* [http://us.direct.openmoko.com/collections/frontpage OpenMoko Direct] - [[Debug Board v3]]
 
* [http://us.direct.openmoko.com/collections/frontpage OpenMoko Direct] - [[Debug Board v3]]
  

Revision as of 01:18, 23 October 2008

Contents

Introduction

This page is dedicated to porting the Android OS to the Neo 1973 and Neo FreeRunner handsets. Since the Android OS was publically released on 20081021, work is currently underway to port Android to the Neo 1973 and FreeRunner handsets.

Goals

  1. Systematically introduce patches for ARMv4T in the Android codebase
  2. Provide Neo1973 and Neo FreeRunner hardware-dependent patches in the Android codebase, leveraging the work already done by the OpenMoko developers, without forcing Android-specific changes upstream
  3. Provide a useable Android filesystem and kernel on the Distributions page that conform to current OpenMoko installation routines

Early Attempts

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.

Current State

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 their product for everyone enrich and benefit from.

Currently, porting efforts are underway in many circles. Patches should be submitted via the official Android channels.

How to Help

Getting Started

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.

Publicize Your Efforts

It's generally a good idea to make your efforts known via wiki systems, public mailing lists, forums, and publically open version control systems.

Always take credit for your work but please don't do it in the form of comments. Some code is already hard enough to read without comments polluting the text. The best thing to do is to create a patch and put a header with your information at the top. Collaboration systems such as git might already do this for you (??).

If you create something new and have the ability to designate the license for it, please consider license compatibility issues.

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

Updates

Feel free to post a link to any of your work in the list below

  • 20081021 User:Cfriedt Android -> FreeRunner updates on my blog
  • 20081022 User:Cfriedt I was able to 'trivially' compile all of the Android source code without error for the ARMv4T architecture by removing v5TE instructions. Although it will definitely not run anything predictably, at least now that I know the build system will work with a few simple substitutions in build/core/combo/arm-linux.mk. At this point I am able to go ahead and re-implement v5TE instructions as v4T instruction sequences instead (or re-implement entire sections of assembly with hand-optimized v4T instructions).

Important Links

(Please Update Me)

Documentation

Hardware Reference

Communities

Buy a Handset and Debug Board

References

External Links

Personal tools

Introduction

This page is dedicated to porting the Android OS to the Neo 1973 and Neo FreeRunner handsets. Since the Android OS was publically released on 20081021, work is currently underway to port Android to the Neo 1973 and FreeRunner handsets.

Goals

  1. Systematically introduce patches for ARMv4T in the Android codebase
  2. Provide Neo1973 and Neo FreeRunner hardware-dependent patches in the Android codebase, leveraging the work already done by the OpenMoko developers, without forcing Android-specific changes upstream
  3. Provide a useable Android filesystem and kernel on the Distributions page that conform to current OpenMoko installation routines

Early Attempts

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.

Current State

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 their product for everyone enrich and benefit from.

Currently, porting efforts are underway in many circles. Patches should be submitted via the official Android channels.

How to Help

Getting Started

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.

Publicize Your Efforts

It's generally a good idea to make your efforts known via wiki systems, public mailing lists, forums, and publically open version control systems.

Always take credit for your work but please don't do it in the form of comments. Some code is already hard enough to read without comments polluting the text. The best thing to do is to create a patch and put a header with your information at the top. Collaboration systems such as git might already do this for you (??).

If you create something new and have the ability to designate the license for it, please consider license compatibility issues.

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

Updates

Feel free to post a link to any of your work in the list below

  • 20081021 User:Cfriedt Android -> FreeRunner updates on my blog
  • 20081022 User:Cfriedt I was able to 'trivially' compile all of the Android source code without error for the ARMv4T architecture by removing v5TE instructions. Although it will definitely not run anything predictably, at least now that I know the build system will work with a few simple substitutions in build/core/combo/arm-linux.mk. At this point I am able to go ahead and re-implement v5TE instructions as v4T instruction sequences instead (or re-implement entire sections of assembly with hand-optimized v4T instructions).

Important Links

(Please Update Me)

Documentation

Hardware Reference

Communities

Buy a Handset and Debug Board

References

External Links