Difference between revisions of "Gentoo embedded"

From ElphelWiki
Jump to: navigation, search
Line 1: Line 1:
In order to get Embedded support somethings obviously need to be compiled. Now this is not yet going smoothly but I'll give some indication what can be done to fix it and where I am strugling.
+
In order to get Embedded support somethings obviously need to be compiled. Now this is not yet going smoothly but I'll give some indication what can be done to fix it and where I am struggling.
  
I am able to compile uclibc-0.29 with gcc-4.3.1, but out of the box glibc or uclibc is not possible. I'll try to get the ebuild of uclibc-0.29 and see if I can make some changes to it so it will leave us a successful uclibc. (That will still lack pthreads...)
+
Currently I have compiled a toolchain with gcc 4.3.1, uclibc-2008-09-06, a patch and patience. I am able to run code on the camera, if it is statically linked. Technically I could try to make a rootfs and see what happens. But currently I don't have the time to test that (and I don't want to break my came before [http://www.softwarefreedomday.eu/ SoftwareFreedomDay].
 +
 
 +
Keep in mind that the 'native' cris memcpy.c is broken, I am positive I can get it into shape :) Please validate the code I write, I'm not an embedded professional :)
  
Also the 'native' cris memcpy.c is broken :(
 
  
 
== Output first tests ==
 
== Output first tests ==

Revision as of 15:55, 6 September 2008

In order to get Embedded support somethings obviously need to be compiled. Now this is not yet going smoothly but I'll give some indication what can be done to fix it and where I am struggling.

Currently I have compiled a toolchain with gcc 4.3.1, uclibc-2008-09-06, a patch and patience. I am able to run code on the camera, if it is statically linked. Technically I could try to make a rootfs and see what happens. But currently I don't have the time to test that (and I don't want to break my came before SoftwareFreedomDay.

Keep in mind that the 'native' cris memcpy.c is broken, I am positive I can get it into shape :) Please validate the code I write, I'm not an embedded professional :)


Output first tests

[1]

crisv32-axis-linux-uclibc-gcc --static -o /tmp/test2 /tmp/test2.c /mnt/dv/elphel/uClibc/lib/libpthread.a


[root@Elphel353 /mnt/flash/root/test]1157# ./test2 
Hello World from 0!
Hello World from 1!
Hello World from 2!
Hello World from 3!
Hello World from 4!


uclibc patch

--- libc/sysdeps/linux/cris/crti.S.orig 2008-09-06 23:51:14.017004350 +0200
+++ libc/sysdeps/linux/cris/crti.S      2008-09-06 23:54:28.477004350 +0200
@@ -10,8 +10,7 @@
        move    $srp,$r1
        subq    4,$sp
        move.d  $r0,[$sp]
-       move.d  $pc,$r0
-       sub.d   .:GOTOFF,$r0
+       lapc _GLOBAL_OFFSET_TABLE_,$r0
        .align  1
 
        .section        .fini
@@ -24,6 +23,5 @@
        move    $srp,$r1
        subq    4,$sp
        move.d  $r0,[$sp]
-       move.d  $pc,$r0
-       sub.d   .:GOTOFF,$r0
+       lapc _GLOBAL_OFFSET_TABLE_,$r0
       .align  1