[FWL] Firmware Linux for Openmoko's Freerunner

Marc Andre Tanner mat at brain-dump.org
Fri Sep 18 01:05:56 PDT 2009


Hi Rob,

After some more head scratching some unsuccessful attemps and quite
some frustration I think I found out why it didn't work.

The following gcc patch seems to be required (taken from the OpenWRT
repo).

gcc-core-unbreak-armv4t.patch:

--- gcc-4.2.1/gcc/config/arm/linux-eabi.h	2006-02-17 00:29:10.000000000 +0100
+++ gcc-4.2.1-patched/gcc/config/arm/linux-eabi.h	2009-09-16 13:34:25.000000000 +0200
@@ -45,7 +45,7 @@
    The ARM10TDMI core is the default for armv5t, so set
    SUBTARGET_CPU_DEFAULT to achieve this.  */
 #undef SUBTARGET_CPU_DEFAULT
-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi
 
 #undef SUBTARGET_EXTRA_LINK_SPEC
 #define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi"

With this patch applied and the following settings: 

GCC_FLAGS="--with-march=armv4t --with-float=soft --disable-sjlj-exceptions"
BINUTILS_FLAGS="--with-float=soft"

Yes I know you already told me that setting BINUTILS_FLAGS wouldn't
be necessary but I just wanted to be sure and not waste even more time.

Additionally I set UCLIBC_EXTRA_CFLAGS to "-msoft-float" again I am
not sure if this is actually required (after all we configured
gcc to only generate soft-float in the first place, right?) but again
I just wanted to be on the save side.

So things seem to work for me now although I haven't yet tested it extensively.
I just tried the cross compiler, copied over the generated root filesystem
chrooted into it and compiled a hello world natively. So far so good.

This bears the question whether you would be willing to add an 
armv4tl-softfloat-eabi configuration to FWL? This would require a per
target patch facility because the before mentioned gcc patch should
probably only be applied for arvm4t*-eabi targets.

> Mind if I cc: this to the FWL mailing list?

No. I have added it, but I am currently not subscribed.

Marc

-- 
 Marc Andre Tanner >< http://www.brain-dump.org/ >< GPG key: CF7D56C0


More information about the firmware mailing list