User:Seanmcneil3

From Openmoko

(Difference between revisions)
Jump to: navigation, search
m (Binutils 2.18: added <pre> for readability)
(Images)
Line 49: Line 49:
 
== Images ==
 
== Images ==
  
 +
I have placed an older 2.6.26 kernel with Android support at:
  
Coming soon.
+
  [http://people.openmoko.org/sean_mcneil/uImage-android uImage-android]
 +
 
 +
I have put up a jffs2 image that replaces rootfs on the Freerunner at:
 +
 
 +
  [http://people.openmoko.org/sean_mcneil/androidfs.jffs2 androidfs.jffs2]
 +
 
 +
Warning!!! Installation of Android requires loading a new kernel and rootfs image onto your phone. I have not had time to produce a version that runs completely off an sdcard.

Revision as of 12:44, 4 November 2008

Contents

Android on Freerunner

Google has released their open source version of the Android phone software distribution. In order to use it on the Freerunner, a number of patches need to be applied and a compiler with armv4 java exception support needs to be used to compile the software.


Compiler suite

Android is a little picky about the version of gcc compiler. It also requires some java exception support that isn't available for armv4 without a minor modification. The following tools are what I use to build Android:


Binutils 2.18

At one time I had some armv5t code that was compiled into Android which would cause the linker to generate these blx instructions which fail on armv4. I'm not sure if this is still necessary, but I still have the following change applied to binutils:

diff -urN binutils-2.18-orig/bfd/elf32-arm.c binutils-2.18/bfd/elf32-arm.c<br>
--- binutils-2.18-orig/bfd/elf32-arm.c	2007-08-07 02:59:23.000000000 +0700<br>
+++ binutils-2.18/bfd/elf32-arm.c	2008-03-15 11:30:17.000000000 +0700<br>
@@ -3093,8 +3093,8 @@<br>
 static void check_use_blx(struct elf32_arm_link_hash_table *globals)<br>
 {<br>
   if (bfd_elf_get_obj_attr_int (globals->obfd, OBJ_ATTR_PROC,<br>
-				Tag_CPU_arch) > 2)<br>
-    globals->use_blx = 1;<br>
+				Tag_CPU_arch) >= TAG_CPU_ARCH_V5T)<br>
+    globals->use_blx = 0;<br>
 }<br>
 <br>
 bfd_boolean<br>


configure --prefix={devel path}/android/cross --target=arm-eabi

gcc 4.2.4 with gcc41-java-arm4.patch

configure --prefix={devel path}/android/cross --target=arm-eabi --with-arch=armv4t --enable-shared --enable-threads --disable-nls --disable-libmudflap --enable-target-optspace --with-abi=aapcs --enable-multilib --disable-libssp --disable-libstdcxx --enable-languages=c,c++

java-6-sun

This is the standard Linux package available for most (all?) distributions.

Patches

Coming soon. I've posted a number of them on the devel mailing list so far. Eventually, I expect to provide everything necessary for people to build Android for themselves.

Images

I have placed an older 2.6.26 kernel with Android support at:

  uImage-android

I have put up a jffs2 image that replaces rootfs on the Freerunner at:

  androidfs.jffs2

Warning!!! Installation of Android requires loading a new kernel and rootfs image onto your phone. I have not had time to produce a version that runs completely off an sdcard.

Personal tools

Android on Freerunner

Google has released their open source version of the Android phone software distribution. In order to use it on the Freerunner, a number of patches need to be applied and a compiler with armv4 java exception support needs to be used to compile the software.


Compiler suite

Android is a little picky about the version of gcc compiler. It also requires some java exception support that isn't available for armv4 without a minor modification. The following tools are what I use to build Android:


Binutils 2.18

At one time I had some armv5t code that was compiled into Android which would cause the linker to generate these blx instructions which fail on armv4. I'm not sure if this is still necessary, but I still have the following change applied to binutils:

diff -urN binutils-2.18-orig/bfd/elf32-arm.c binutils-2.18/bfd/elf32-arm.c<br>
--- binutils-2.18-orig/bfd/elf32-arm.c	2007-08-07 02:59:23.000000000 +0700<br>
+++ binutils-2.18/bfd/elf32-arm.c	2008-03-15 11:30:17.000000000 +0700<br>
@@ -3093,8 +3093,8 @@<br>
 static void check_use_blx(struct elf32_arm_link_hash_table *globals)<br>
 {<br>
   if (bfd_elf_get_obj_attr_int (globals->obfd, OBJ_ATTR_PROC,<br>
-				Tag_CPU_arch) > 2)<br>
-    globals->use_blx = 1;<br>
+				Tag_CPU_arch) >= TAG_CPU_ARCH_V5T)<br>
+    globals->use_blx = 0;<br>
 }<br>
 <br>
 bfd_boolean<br>


configure --prefix={devel path}/android/cross --target=arm-eabi

gcc 4.2.4 with gcc41-java-arm4.patch

configure --prefix={devel path}/android/cross --target=arm-eabi --with-arch=armv4t --enable-shared --enable-threads --disable-nls --disable-libmudflap --enable-target-optspace --with-abi=aapcs --enable-multilib --disable-libssp --disable-libstdcxx --enable-languages=c,c++

java-6-sun

This is the standard Linux package available for most (all?) distributions.

Patches

Coming soon. I've posted a number of them on the devel mailing list so far. Eventually, I expect to provide everything necessary for people to build Android for themselves.

Images

I have placed an older 2.6.26 kernel with Android support at:

  uImage-android

I have put up a jffs2 image that replaces rootfs on the Freerunner at:

  androidfs.jffs2

Warning!!! Installation of Android requires loading a new kernel and rootfs image onto your phone. I have not had time to produce a version that runs completely off an sdcard.