1. ARM Updates

Hey, euphoria for ARM early adopters! I've made some changes and have pushed them up into the default branch. I recently acquired a raspberry pi, and I've been using the raspbian distro, which uses the hard float (i.e., hardware floating point) capabilities. I've been using the raspbian specific cross compiler here: git://github.com/raspberrypi/tools.git (specifically, the stuff in arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian).

I've updated it so that stuff like t_callc.e now passes. The hardfloat calling convention is similar to the AMD64 convention. Anyways, I'd be really interested to hear from someone running a soft float system, if there's anyone out there.

It should build correctly, assuming the compiler defaults are correct for your system, or you set the flags correctly to tell it to use softfloat. Basically, some online research showed that when the predefined macro __ARM_PCS_VFP equals 1, we're compiling for hardfloat systems.

Matt

new topic     » topic index » view message » categorize

2. Re: ARM Updates

mattlewis said...

I've updated it so that stuff like t_callc.e now passes. The hardfloat calling convention is similar to the AMD64 convention. Anyways, I'd be really interested to hear from someone running a soft float system, if there's anyone out there.

Thanks for the updates! I just cross-compiled the new changes for my soft-float system and things are definately better. I did have an issue with one of my older cross-compilers (based on gcc 4.2.1). It looks like lines 350 and 351 are duplicated definitions for cddfuncF in be_callc.c. Also, I had an undefined referece to 'WEXITSTATUS' which was fixed with '#include <sys/wait.h>' in be_runtime.c.

But now t_callc.e only has one failed test which looks like a simple rounding issue!

Nokia-N900:/home/user/Code/Euphoria/tests# eui t_callc.e -all | grep failed 
  failed: Can call and things are passed correctly for ten argument functions, expected: 1.12589993095027e+15 but got: 1.12589991858202e+15 
  96 tests run, 95 passed, 1 failed, 99% success 

Thanks,
Ira

new topic     » goto parent     » topic index » view message » categorize

3. Re: ARM Updates

mattlewis said...

From "Build Error" thread.

I don't fully understand the ARM ecosystem, but there seem to be a lot of different architectures out there, where something built for one chip doesn't work on another, similar to something like i686 vs i386. Then there are the soft vs hard float issues, which are part hardware, part software.

It's probably not as bad as my (poor, incomplete) understanding is, but doing the translation on a more maturely supported (by/for euphoria) platform seems less risky. Of course, it doesn't hurt to try, and if it doesn't work, I don't think it will be subtle, but quick and catastrophic.

Another issue I had was that I couldn't use the cross compiler from my distro, because it linked to GLIBC 2.15, but raspbian uses GLIBC 2.13. I tried several things to hack around this, but couldn't get it to work. The provided cross compilers, OTOH, worked right away with no extra hacks or worrying about setting the right options to target the specific chip, since that was already baked into everything.

For all of these reasons, I suspect that we probably won't be able to offer a single binary ARM distribution of euphoria that we can expect to work everywhere.

Matt

As I said before, Rasbian is still lagging behind officially.
This guy is worth following, but he does not publish his methodology.
http://www.element14.com/community/blogs/mirandasoft/2013/02/19/raspberry-pi-now-running-linux-kernel-380-freshly-compiled-in-the-philippines

You are on the right track with Linaro. They are still going for separate builds, because of the Rapberry Pi guys, but eventually there will be a merged and more generic distro. Eventually you will be able to offer a single binary ARM distro.

new topic     » goto parent     » topic index » view message » categorize

4. Re: ARM Updates

I've just pushed up some more updates. All of the tests pass interpreted here. I haven't run the translated tests...maybe overnight, if I remember to kick it off.

Matt

new topic     » goto parent     » topic index » view message » categorize

5. Re: ARM Updates

mattlewis said...

I've just pushed up some more updates. All of the tests pass interpreted here. I haven't run the translated tests...maybe overnight, if I remember to kick it off.

Matt

Hi Matt,

Did you compile binaries for your RPi? My efikaMx smartbook is repaired. If you have binaries for your RPi I would try them on my Efika. You could place a link on the wiki page about euphoria and Raspberry pi. There is 2 links on that page pointing to binaries. The soft float version doesn't work at all. The hard float version fail sanity.ex at 4%.

If I had a procedure to cross-compile on my desktop running ubuntu 12.04LTS I would try to compile the binaries myself. Out of question to compile them on Efika, even if it succeed, it would take hours.

Jacques

new topic     » goto parent     » topic index » view message » categorize

6. Re: ARM Updates

coconut said...

Did you compile binaries for your RPi? My efikaMx smartbook is repaired. If you have binaries for your RPi I would try them on my Efika. You could place a link on the wiki page about euphoria and Raspberry pi. There is 2 links on that page pointing to binaries. The soft float version doesn't work at all. The hard float version fail sanity.ex at 4%.

I've uploaded my latest:

http://openeuphoria.org/eubins/linux/4.1.0/arm-32-bit/eubin-arm-raspbian-2013-04-07-160b54b3ea7c.tar.gz

coconut said...

If I had a procedure to cross-compile on my desktop running ubuntu 12.04LTS I would try to compile the binaries myself. Out of question to compile them on Efika, even if it succeed, it would take hours.

Yes, before launch, I'm going to have to update some of the packaging to allow use of cross compiled binaries. I'm currently running kubuntu 12.04, so I'm sure you could use the same stuff I'm using. Here's what I did:

  • clone this repository: git://github.com/raspberrypi/tools.git
  • add to your PATH: path/to/git/repo/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin
  • configure with --cc-prefix arm-linux-gnueabihf-

Additionally, I've used sshfs to mount my development environment on my raspberry pi, so I can edit and build as normal, and then test via an ssh session in my pi.

Matt

new topic     » goto parent     » topic index » view message » categorize

7. Re: ARM Updates

mattlewis said...
coconut said...

Did you compile binaries for your RPi? My efikaMx smartbook is repaired. If you have binaries for your RPi I would try them on my Efika. You could place a link on the wiki page about euphoria and Raspberry pi. There is 2 links on that page pointing to binaries. The soft float version doesn't work at all. The hard float version fail sanity.ex at 4%.

I've uploaded my latest:

http://openeuphoria.org/eubins/linux/4.1.0/arm-32-bit/eubin-arm-raspbian-2013-04-07-160b54b3ea7c.tar.gz

coconut said...

If I had a procedure to cross-compile on my desktop running ubuntu 12.04LTS I would try to compile the binaries myself. Out of question to compile them on Efika, even if it succeed, it would take hours.

Yes, before launch, I'm going to have to update some of the packaging to allow use of cross compiled binaries. I'm currently running kubuntu 12.04, so I'm sure you could use the same stuff I'm using. Here's what I did:

  • clone this repository: git://github.com/raspberrypi/tools.git
  • add to your PATH: path/to/git/repo/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin
  • configure with --cc-prefix arm-linux-gnueabihf-

Additionally, I've used sshfs to mount my development environment on my raspberry pi, so I can edit and build as normal, and then test via an ssh session in my pi.

Matt

Matt, No luck with your build neither with mine on EfikaMX (I used linaro building tools). When trying to run eui the loader complain the file doesn't exist although "file eui" report

jacques@efikamx:~/Téléchargements/euphoria-4.1.0-Linux-ARM/bin$ file eui 
eui: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, not stripped 

Don't know if it is difference between freeScale imx515 and BMC2708 or something related to OS. Is this a problem with different version of kernel? or libc? I don't know much about it.

Jacques

new topic     » goto parent     » topic index » view message » categorize

8. Re: ARM Updates

coconut said...
mattlewis said...
coconut said...

Did you compile binaries for your RPi? My efikaMx smartbook is repaired. If you have binaries for your RPi I would try them on my Efika. You could place a link on the wiki page about euphoria and Raspberry pi. There is 2 links on that page pointing to binaries. The soft float version doesn't work at all. The hard float version fail sanity.ex at 4%.

I've uploaded my latest:

http://openeuphoria.org/eubins/linux/4.1.0/arm-32-bit/eubin-arm-raspbian-2013-04-07-160b54b3ea7c.tar.gz

coconut said...

If I had a procedure to cross-compile on my desktop running ubuntu 12.04LTS I would try to compile the binaries myself. Out of question to compile them on Efika, even if it succeed, it would take hours.

Yes, before launch, I'm going to have to update some of the packaging to allow use of cross compiled binaries. I'm currently running kubuntu 12.04, so I'm sure you could use the same stuff I'm using. Here's what I did:

  • clone this repository: git://github.com/raspberrypi/tools.git
  • add to your PATH: path/to/git/repo/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin
  • configure with --cc-prefix arm-linux-gnueabihf-

Additionally, I've used sshfs to mount my development environment on my raspberry pi, so I can edit and build as normal, and then test via an ssh session in my pi.

Matt

Matt, No luck with your build neither with mine on EfikaMX (I used linaro building tools). When trying to run eui the loader complain the file doesn't exist although "file eui" report

jacques@efikamx:~/Téléchargements/euphoria-4.1.0-Linux-ARM/bin$ file eui 
eui: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, not stripped 

Don't know if it is difference between freeScale imx515 and BMC2708 or something related to OS. Is this a problem with different version of kernel? or libc? I don't know much about it.

Jacques

What happens when you run ldd on the file?

new topic     » goto parent     » topic index » view message » categorize

9. Re: ARM Updates

coconut said...

Matt, No luck with your build neither with mine on EfikaMX (I used linaro building tools). When trying to run eui the loader complain the file doesn't exist although "file eui" report

jacques@efikamx:~/Téléchargements/euphoria-4.1.0-Linux-ARM/bin$ file eui 
eui: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, not stripped 

Don't know if it is difference between freeScale imx515 and BMC2708 or something related to OS. Is this a problem with different version of kernel? or libc? I don't know much about it.

Difficult to say. Try something like:

$ /lib/ld-linux.so --list ./eui 

That should show you what might be missing.

Matt

new topic     » goto parent     » topic index » view message » categorize

10. Re: ARM Updates

mattlewis said...
coconut said...

Matt, No luck with your build neither with mine on EfikaMX (I used linaro building tools). When trying to run eui the loader complain the file doesn't exist although "file eui" report

jacques@efikamx:~/Téléchargements/euphoria-4.1.0-Linux-ARM/bin$ file eui 
eui: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, not stripped 

Don't know if it is difference between freeScale imx515 and BMC2708 or something related to OS. Is this a problem with different version of kernel? or libc? I don't know much about it.

Difficult to say. Try something like:

$ /lib/ld-linux.so --list ./eui 

That should show you what might be missing.

Matt

jacques@efikamx:~/Téléchargements/euphoria-4.1.0-Linux-ARM/bin$ /lib/ld-linux.so.3 --list ./eui 
	libm.so.6 => /lib/libm.so.6 (0x2aab4000) 
	libdl.so.2 => /lib/libdl.so.2 (0x2ab5c000) 
	libresolv.so.2 => /lib/libresolv.so.2 (0x2ab68000) 
	libnsl.so.1 => /lib/libnsl.so.1 (0x2ab7c000) 
	libpthread.so.0 => /lib/libpthread.so.0 (0x2ab99000) 
	libc.so.6 => /lib/libc.so.6 (0x2abb9000) 
	/lib/ld-linux-armhf.so.3 => /lib/ld-linux.so.3 (0x54aaa000) 
this the same information as 'ldd eui' but doesn't report any missing library. Without a better understanding of building linux application I can't do much more, hopefully python works well on efika so I don't really need euphoria.

Thanks Matt for all your efforts.

regards,

Jacques

new topic     » goto parent     » topic index » view message » categorize

11. Re: ARM Updates

coconut said...

this the same information as 'ldd eui' but doesn't report any missing library. Without a better understanding of building linux application I can't do much more

So both /lib/ld-linux-armhf.so.3 and /lib/ld-linux.so.3 exist on your system? Is one of them a symlink to the other?

What does something like 'ldd /bin/sh' say?

coconut said...

hopefully python works well on efika so I don't really need euphoria.

Wait a moment. I thought you already had eubins that worked! http://openeuphoria.org/forum/m/121251.wc

There's still http://openeuphoria.org/forum/m/121279.wc and http://openeuphoria.org/forum/m/121268.wc

new topic     » goto parent     » topic index » view message » categorize

12. Re: ARM Updates

coconut said...

If I had a procedure to cross-compile on my desktop running ubuntu 12.04LTS I would try to compile the binaries myself. Out of question to compile them on Efika, even if it succeed, it would take hours.

Jacques

Maybe take a look at http://www.raspberrypi.org/phpBB3/viewtopic.php?t=11315&p=129461

new topic     » goto parent     » topic index » view message » categorize

13. Re: ARM Updates

jimcbrown said...
coconut said...

this the same information as 'ldd eui' but doesn't report any missing library. Without a better understanding of building linux application I can't do much more

So both /lib/ld-linux-armhf.so.3 and /lib/ld-linux.so.3 exist on your system? Is one of them a symlink to the other?

What does something like 'ldd /bin/sh' say?

coconut said...

hopefully python works well on efika so I don't really need euphoria.

Wait a moment. I thought you already had eubins that worked! http://openeuphoria.org/forum/m/121251.wc

There's still http://openeuphoria.org/forum/m/121279.wc and http://openeuphoria.org/forum/m/121268.wc

Yes there is a version of eubins that run up to 4% of sanity.ex that's the best I got up to now. It fail at the poke, peek test.

Jacques

new topic     » goto parent     » topic index » view message » categorize

14. Re: ARM Updates

coconut said...

Yes there is a version of eubins that run up to 4% of sanity.ex that's the best I got up to now. It fail at the poke, peek test.

But Python can't do poke/peek at all - http://mail.python.org/pipermail/cplusplus-sig/2010-October/015792.html

If you actually need that functionality, I can write up a small C lib that'll do it for you.

new topic     » goto parent     » topic index » view message » categorize

15. Re: ARM Updates

jimcbrown said...
coconut said...

If I had a procedure to cross-compile on my desktop running ubuntu 12.04LTS I would try to compile the binaries myself. Out of question to compile them on Efika, even if it succeed, it would take hours.

Jacques

Maybe take a look at http://www.raspberrypi.org/phpBB3/viewtopic.php?t=11315&p=129461

Thanks Jim for the link, but I don't know if I will take all the time needed to learn about that new stuff. It seem a lot to learn and understand. And the time a I take for it is less time for my main project.

Jacques

new topic     » goto parent     » topic index » view message » categorize

16. Re: ARM Updates

jimcbrown said...
coconut said...

Yes there is a version of eubins that run up to 4% of sanity.ex that's the best I got up to now. It fail at the poke, peek test.

But Python can't do poke/peek at all - http://mail.python.org/pipermail/cplusplus-sig/2010-October/015792.html

If you actually need that functionality, I can write up a small C lib that'll do it for you.

The poke / peek issue goes deeper than that, though, since it's a critical part of how the front end of the interpreter communicates with the back end.

Matt

new topic     » goto parent     » topic index » view message » categorize

17. Re: ARM Updates

mattlewis said...
jimcbrown said...
coconut said...

Yes there is a version of eubins that run up to 4% of sanity.ex that's the best I got up to now. It fail at the poke, peek test.

But Python can't do poke/peek at all - http://mail.python.org/pipermail/cplusplus-sig/2010-October/015792.html

If you actually need that functionality, I can write up a small C lib that'll do it for you.

The poke / peek issue goes deeper than that, though, since it's a critical part of how the front end of the interpreter communicates with the back end.

Matt

Based on the fact that he was able to get to the point of failing with std/map.eissues during a translation attempt, I suspect that this part is working fine. That is, peek()/poke() doesn't work from Euphoria code run by the eubin, but the front-backend communication is functional.

new topic     » goto parent     » topic index » view message » categorize

18. Re: ARM Updates

jimcbrown said...
mattlewis said...

The poke / peek issue goes deeper than that, though, since it's a critical part of how the front end of the interpreter communicates with the back end.

Based on the fact that he was able to get to the point of failing with std/map.eissues during a translation attempt, I suspect that this part is working fine. That is, peek()/poke() doesn't work from Euphoria code run by the eubin, but the front-backend communication is functional.

It only fails for some values. For instance, if you have a pointer that's too big for a signed integer of the right size, you'll get a bad value. So if you have a big literal value in your code, it will show up as zero. This was why the tests for text:format() were failing.

I don't think this was the cause of the map issues, but it's hard to tell. Anyways, it's a serious problem, especially since it's not obvious why some bits of code fail.

Matt

new topic     » goto parent     » topic index » view message » categorize

19. Re: ARM Updates

mattlewis said...

I don't think this was the cause of the map issues, but it's hard to tell.

I didn't either.

mattlewis said...

It only fails for some values. For instance, if you have a pointer that's too big for a signed integer of the right size, you'll get a bad value. So if you have a big literal value in your code, it will show up as zero. This was why the tests for text:format() were failing. Anyways, it's a serious problem, especially since it's not obvious why some bits of code fail.

Matt

You seem to be saying that there are cases where front-backend communication will fail because of this bug, but in subtle ways instead of blowing up big.

Would this cause issues during translation? If not, I don't see why this is a serious issue here (though I agree that it's a pretty big deal in general).

new topic     » goto parent     » topic index » view message » categorize

20. Re: ARM Updates

jimcbrown said...
mattlewis said...

It only fails for some values. For instance, if you have a pointer that's too big for a signed integer of the right size, you'll get a bad value. So if you have a big literal value in your code, it will show up as zero. This was why the tests for text:format() were failing. Anyways, it's a serious problem, especially since it's not obvious why some bits of code fail.

You seem to be saying that there are cases where front-backend communication will fail because of this bug, but in subtle ways instead of blowing up big.

Would this cause issues during translation? If not, I don't see why this is a serious issue here (though I agree that it's a pretty big deal in general).

The same bug hits the translator and the interpreter. Consider the interpreter. It reads in literal values, and pokes them into memory for the back end to read. So instead of #4000_0000 being poked, actually #0 goes into memory. That's obviously a translator issue manifesting itself in the interpreter.

But if you create a large value somehow...say by allocating memory and poking the pointer value somewhere, you get the same result.

Matt

new topic     » goto parent     » topic index » view message » categorize

21. Re: ARM Updates

mattlewis said...

The same bug hits the translator and the interpreter. Consider the interpreter. It reads in literal values, and pokes them into memory for the back end to read. So instead of #4000_0000 being poked, actually #0 goes into memory. That's obviously a translator issue manifesting itself in the interpreter.

But if you create a large value somehow...say by allocating memory and poking the pointer value somewhere, you get the same result.

Matt

I see. So it might cause translation to blow up sometimes, but not everytime (depending on which address you get).

I guess in Jacques's case, he's better off cross-translating or cross-compiling then.

new topic     » goto parent     » topic index » view message » categorize

22. Re: ARM Updates

coconut said...

Matt, No luck with your build neither with mine on EfikaMX (I used linaro building tools).

I missed this the first time I read it. You're just trying to run Matt's eubins right? Where does linaro come into play?

coconut said...

When trying to run eui the loader complain the file doesn't exist although "file eui" report

jacques@efikamx:~/Téléchargements/euphoria-4.1.0-Linux-ARM/bin$ file eui 
eui: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, not stripped 

Don't know if it is difference between freeScale imx515 and BMC2708 or something related to OS. Is this a problem with different version of kernel? or libc? I don't know much about it.

Actually, I find it strange that the softfloat version on the wiki failed. Looking it up, it looks like it has the same type of processor (ARM Cortex-A8) that my Nook Color has. http://wiki.debian.org/EfikaMX

What was the exact error with that version?

mattlewis said...

Difficult to say. Try something like:

$ /lib/ld-linux.so --list ./eui 

That should show you what might be missing.

Matt

Actually, try

LD_DEBUG=all /lib/ld.so  ./eui 

That should produce a lot more output.

Also, we can use the readelf command, which will go down to the individual symbol level.

readelf -d ./eui 

It'd be nice to be able to compare that output to something like this:

readelf -d /bin/sh 

new topic     » goto parent     » topic index » view message » categorize

23. Re: ARM Updates

jimcbrown said...
coconut said...

Matt, No luck with your build neither with mine on EfikaMX (I used linaro building tools).

I missed this the first time I read it. You're just trying to run Matt's eubins right? Where does linaro come into play?

coconut said...

When trying to run eui the loader complain the file doesn't exist although "file eui" report

jacques@efikamx:~/Téléchargements/euphoria-4.1.0-Linux-ARM/bin$ file eui 
eui: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, not stripped 

Don't know if it is difference between freeScale imx515 and BMC2708 or something related to OS. Is this a problem with different version of kernel? or libc? I don't know much about it.

Actually, I find it strange that the softfloat version on the wiki failed. Looking it up, it looks like it has the same type of processor (ARM Cortex-A8) that my Nook Color has. http://wiki.debian.org/EfikaMX

What was the exact error with that version?

mattlewis said...

Difficult to say. Try something like:

$ /lib/ld-linux.so --list ./eui 

That should show you what might be missing.

Matt

Actually, try

LD_DEBUG=all /lib/ld.so  ./eui 

That should produce a lot more output.

Also, we can use the readelf command, which will go down to the individual symbol level.

readelf -d ./eui 

It'd be nice to be able to compare that output to something like this:

readelf -d /bin/sh 

Here's what I have done:

I written a simple hello.c application I compile the file on the EfikaMX and crosscompile it on my ubuntu 12.04 desktop. The file compiled on the Efika works no problem. For the version cross compiled I get different result depending on the method used to load it. here some screen capture. the hello-xc is the cross compiled one (trying to run on Efika):

jacques@efikamx:~/Téléchargements$ ./hello-xc 
-bash: ./hello-xc: No such file or directory 
jacques@efikamx:~/Téléchargements$ /lib/ld.so ./hello-xc 
hello world! from xcompile on ubuntu 12.04  # ************that way it works**************** 
jacques@efikamx:~/Téléchargements$ /lib/ld.so hello-xc 
hello-xc: error while loading shared libraries: hello-xc: cannot open shared object file: No such file or directory 
jacques@efikamx:~/Téléchargements$  
The problem is with linux configuration or maybe libraries version. The Efika as older kernel and libc dans RaspberryPi linaro project.
jacques@efikamx:~/Téléchargements$ file /lib/ld-linux.so.3 
/lib/ld-linux.so.3: symbolic link to `ld-2.11.3.so' 
jacques@efikamx:~/Téléchargements$ file /lib/ld-2.11.3.so 
/lib/ld-2.11.3.so: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, stripped 
jacques@efikamx:~/Téléchargements$ uname -a 
Linux efikamx 2.6.31.14.27-efikamx #1 Tue Feb 21 15:43:17 UTC 2012 armv7l GNU/Linux 

readelf -d hello and readelf -d hello-xc gives same result except for entry point values.

jacques@efikamx:~/Téléchargements$ readelf -d hello-xc 
 
Dynamic section at offset 0x4f0 contains 24 entries: 
  Tag        Type                         Name/Value 
 0x00000001 (NEEDED)                     Shared library: [libc.so.6] 
 0x0000000c (INIT)                       0x82a0 
 0x0000000d (FINI)                       0x84a0 
 0x00000019 (INIT_ARRAY)                 0x104e4 
 0x0000001b (INIT_ARRAYSZ)               4 (bytes) 
 0x0000001a (FINI_ARRAY)                 0x104e8 
 0x0000001c (FINI_ARRAYSZ)               4 (bytes) 
 0x00000004 (HASH)                       0x8194 
 0x00000005 (STRTAB)                     0x820c 
 0x00000006 (SYMTAB)                     0x81bc 
 0x0000000a (STRSZ)                      65 (bytes) 
 0x0000000b (SYMENT)                     16 (bytes) 
 0x00000015 (DEBUG)                      0x0 
 0x00000003 (PLTGOT)                     0x105d8 
 0x00000002 (PLTRELSZ)                   32 (bytes) 
 0x00000014 (PLTREL)                     REL 
 0x00000017 (JMPREL)                     0x8280 
 0x00000011 (REL)                        0x8278 
 0x00000012 (RELSZ)                      8 (bytes) 
 0x00000013 (RELENT)                     8 (bytes) 
 0x6ffffffe (VERNEED)                    0x8258 
 0x6fffffff (VERNEEDNUM)                 1 
 0x6ffffff0 (VERSYM)                     0x824e 
 0x00000000 (NULL)                       0x0 
jacques@efikamx:~/Téléchargements$ readelf -d hello 
 
Dynamic section at offset 0x4b0 contains 25 entries: 
  Tag        Type                         Name/Value 
 0x00000001 (NEEDED)                     Shared library: [libc.so.6] 
 0x0000000c (INIT)                       0x82c4 
 0x0000000d (FINI)                       0x8464 
 0x00000019 (INIT_ARRAY)                 0x104a4 
 0x0000001b (INIT_ARRAYSZ)               4 (bytes) 
 0x0000001a (FINI_ARRAY)                 0x104a8 
 0x0000001c (FINI_ARRAYSZ)               4 (bytes) 
 0x00000004 (HASH)                       0x818c 
 0x6ffffef5 (GNU_HASH)                   0x81b4 
 0x00000005 (STRTAB)                     0x8230 
 0x00000006 (SYMTAB)                     0x81e0 
 0x0000000a (STRSZ)                      65 (bytes) 
 0x0000000b (SYMENT)                     16 (bytes) 
 0x00000015 (DEBUG)                      0x0 
 0x00000003 (PLTGOT)                     0x105a0 
 0x00000002 (PLTRELSZ)                   32 (bytes) 
 0x00000014 (PLTREL)                     REL 
 0x00000017 (JMPREL)                     0x82a4 
 0x00000011 (REL)                        0x829c 
 0x00000012 (RELSZ)                      8 (bytes) 
 0x00000013 (RELENT)                     8 (bytes) 
 0x6ffffffe (VERNEED)                    0x827c 
 0x6fffffff (VERNEEDNUM)                 1 
 0x6ffffff0 (VERSYM)                     0x8272 
 0x00000000 (NULL)                       0x0 
 

Jacques

new topic     » goto parent     » topic index » view message » categorize

24. Re: ARM Updates

coconut said...

Here's what I have done:

I written a simple hello.c application I compile the file on the EfikaMX and crosscompile it on my ubuntu 12.04 desktop. The file compiled on the Efika works no problem.

Thanks for helping to get to the bottom of this.

coconut said...

For the version cross compiled I get different result depending on the method used to load it.

That is weird.

coconut said...

The problem is with linux configuration or maybe libraries version. The Efika as older kernel and libc dans RaspberryPi linaro project.

I'm inclined to agree here.

coconut said...

jacques@efikamx:~/Téléchargements$ /lib/ld.so hello-xc 
hello-xc: error while loading shared libraries: hello-xc: cannot open shared object file: No such file or directory 
jacques@efikamx:~/Téléchargements$  

That's normal. ld.so / ld-linux.so won't look in the current directory by default - it only searches the PATH.

coconut said...

here some screen capture. the hello-xc is the cross compiled one (trying to run on Efika):

jacques@efikamx:~/Téléchargements$ ./hello-xc 
-bash: ./hello-xc: No such file or directory 
jacques@efikamx:~/Téléchargements$ /lib/ld.so ./hello-xc 
hello world! from xcompile on ubuntu 12.04  # ************that way it works**************** 

I wonder why that worked. Makes me think that the cross-compiled version uses something different (maybe a.out vs ELF? or ld.so supports the older ARMEL instead of ARMHF as ld-linux-arm-hf.so does?) It's like /lib/ld.so points to a completely different loader altogether.

coconut said...

jacques@efikamx:~/Téléchargements$ file /lib/ld-linux.so.3 
/lib/ld-linux.so.3: symbolic link to `ld-2.11.3.so' 
jacques@efikamx:~/Téléchargements$ file /lib/ld-2.11.3.so 
/lib/ld-2.11.3.so: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, stripped 
jacques@efikamx:~/Téléchargements$ uname -a 
Linux efikamx 2.6.31.14.27-efikamx #1 Tue Feb 21 15:43:17 UTC 2012 armv7l GNU/Linux 

What about file /lib/ld.so ?

coconut said...

readelf -d hello and readelf -d hello-xc gives same result except for entry point values.

jacques@efikamx:~/Téléchargements$ readelf -d hello-xc 
 
Dynamic section at offset 0x4f0 contains 24 entries: 
  Tag        Type                         Name/Value 
 0x00000001 (NEEDED)                     Shared library: [libc.so.6] 
 0x0000000c (INIT)                       0x82a0 
 0x0000000d (FINI)                       0x84a0 
 0x00000019 (INIT_ARRAY)                 0x104e4 
 0x0000001b (INIT_ARRAYSZ)               4 (bytes) 
 0x0000001a (FINI_ARRAY)                 0x104e8 
 0x0000001c (FINI_ARRAYSZ)               4 (bytes) 
 0x00000004 (HASH)                       0x8194 
 0x00000005 (STRTAB)                     0x820c 
 0x00000006 (SYMTAB)                     0x81bc 
 0x0000000a (STRSZ)                      65 (bytes) 
 0x0000000b (SYMENT)                     16 (bytes) 
 0x00000015 (DEBUG)                      0x0 
 0x00000003 (PLTGOT)                     0x105d8 
 0x00000002 (PLTRELSZ)                   32 (bytes) 
 0x00000014 (PLTREL)                     REL 
 0x00000017 (JMPREL)                     0x8280 
 0x00000011 (REL)                        0x8278 
 0x00000012 (RELSZ)                      8 (bytes) 
 0x00000013 (RELENT)                     8 (bytes) 
 0x6ffffffe (VERNEED)                    0x8258 
 0x6fffffff (VERNEEDNUM)                 1 
 0x6ffffff0 (VERSYM)                     0x824e 
 0x00000000 (NULL)                       0x0 
jacques@efikamx:~/Téléchargements$ readelf -d hello 
 
Dynamic section at offset 0x4b0 contains 25 entries: 
  Tag        Type                         Name/Value 
 0x00000001 (NEEDED)                     Shared library: [libc.so.6] 
 0x0000000c (INIT)                       0x82c4 
 0x0000000d (FINI)                       0x8464 
 0x00000019 (INIT_ARRAY)                 0x104a4 
 0x0000001b (INIT_ARRAYSZ)               4 (bytes) 
 0x0000001a (FINI_ARRAY)                 0x104a8 
 0x0000001c (FINI_ARRAYSZ)               4 (bytes) 
 0x00000004 (HASH)                       0x818c 
 0x6ffffef5 (GNU_HASH)                   0x81b4 
 0x00000005 (STRTAB)                     0x8230 
 0x00000006 (SYMTAB)                     0x81e0 
 0x0000000a (STRSZ)                      65 (bytes) 
 0x0000000b (SYMENT)                     16 (bytes) 
 0x00000015 (DEBUG)                      0x0 
 0x00000003 (PLTGOT)                     0x105a0 
 0x00000002 (PLTRELSZ)                   32 (bytes) 
 0x00000014 (PLTREL)                     REL 
 0x00000017 (JMPREL)                     0x82a4 
 0x00000011 (REL)                        0x829c 
 0x00000012 (RELSZ)                      8 (bytes) 
 0x00000013 (RELENT)                     8 (bytes) 
 0x6ffffffe (VERNEED)                    0x827c 
 0x6fffffff (VERNEEDNUM)                 1 
 0x6ffffff0 (VERSYM)                     0x8272 
 0x00000000 (NULL)                       0x0 
 

Jacques

That looks normal.

new topic     » goto parent     » topic index » view message » categorize

25. Re: ARM Updates

coconut said...

jacques@efikamx:~/Téléchargements$ file /lib/ld-linux.so.3 
/lib/ld-linux.so.3: symbolic link to `ld-2.11.3.so' 
jacques@efikamx:~/Téléchargements$ file /lib/ld-2.11.3.so 
/lib/ld-2.11.3.so: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, stripped 
jacques@efikamx:~/Téléchargements$ uname -a 
Linux efikamx 2.6.31.14.27-efikamx #1 Tue Feb 21 15:43:17 UTC 2012 armv7l GNU/Linux 

What about file /lib/ld.so ?

[/quote]

That looks normal.

[/quote]

ld.so is a soft link I created to save keystrokes. It point to /lib/ld-linux-2.11.3.so

Jacques

new topic     » goto parent     » topic index » view message » categorize

26. Re: ARM Updates

coconut said...
coconut said...

jacques@efikamx:~/Téléchargements$ file /lib/ld-linux.so.3 
/lib/ld-linux.so.3: symbolic link to `ld-2.11.3.so' 
jacques@efikamx:~/Téléchargements$ file /lib/ld-2.11.3.so 
/lib/ld-2.11.3.so: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, stripped 
jacques@efikamx:~/Téléchargements$ uname -a 
Linux efikamx 2.6.31.14.27-efikamx #1 Tue Feb 21 15:43:17 UTC 2012 armv7l GNU/Linux 

What about file /lib/ld.so ?

That looks normal.

[/quote]

ld.so is a soft link I created to save keystrokes. It point to /lib/ld-linux-2.11.3.so

Jacques

[/quote]

Hmm. What's the relationship between /lib/ld-2.11.3.so and /lib/ld-linux-2.11.3.so ?

new topic     » goto parent     » topic index » view message » categorize

27. Re: ARM Updates

jimcbrown said...
coconut said...
coconut said...

jacques@efikamx:~/Téléchargements$ file /lib/ld-linux.so.3 
/lib/ld-linux.so.3: symbolic link to `ld-2.11.3.so' 
jacques@efikamx:~/Téléchargements$ file /lib/ld-2.11.3.so 
/lib/ld-2.11.3.so: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, stripped 
jacques@efikamx:~/Téléchargements$ uname -a 
Linux efikamx 2.6.31.14.27-efikamx #1 Tue Feb 21 15:43:17 UTC 2012 armv7l GNU/Linux 

What about file /lib/ld.so ?

That looks normal.

ld.so is a soft link I created to save keystrokes. It point to /lib/ld-linux-2.11.3.so

Jacques

[/quote]

Hmm. What's the relationship between /lib/ld-2.11.3.so and /lib/ld-linux-2.11.3.so ?

[/quote]

/lib/ld-linux-so.3 is hard link to /lib/ld-2.11.3.so

there is no /lib/ld-linux-2.11.3.so

Jacques

new topic     » goto parent     » topic index » view message » categorize

28. Re: ARM Updates

Who has built this one? http://openeuphoria.org/eubins/linux/4.1.0/arm-32-bit/eubin-arm-cortex-a8-2012-01-13-ee49c6b8a340.tar.gz This is the only one that load and run on my EfikaMX. It run somes of the demos but crash sanity.ex at 4% (poke(), peek() test).

What was the build environment?

All others build generate segmentation fault when loaded with /lib/ld-linux.3.so ./eui

Jacques

new topic     » goto parent     » topic index » view message » categorize

29. Re: ARM Updates

coconut said...

Yes there is a version of eubins that run up to 4% of sanity.ex that's the best I got up to now. It fail at the poke, peek test.

coconut said...

Who has built this one? http://openeuphoria.org/eubins/linux/4.1.0/arm-32-bit/eubin-arm-cortex-a8-2012-01-13-ee49c6b8a340.tar.gz This is the only one that load and run on my EfikaMX.

Jacques, the two eubins you referred to are two different abi's: hard and soft. We should really know what your system is and then work from there. With the 'hello.c' program you wrote, can you do the following on your EfikaMX:

gcc -v 
gcc hello.c -o hello 
readelf -A hello 

This is just a quick test to check the abi settings of your native compiler.

Thanks,
Ira

new topic     » goto parent     » topic index » view message » categorize

30. Re: ARM Updates

Jerome said...
coconut said...

Yes there is a version of eubins that run up to 4% of sanity.ex that's the best I got up to now. It fail at the poke, peek test.

coconut said...

Who has built this one? http://openeuphoria.org/eubins/linux/4.1.0/arm-32-bit/eubin-arm-cortex-a8-2012-01-13-ee49c6b8a340.tar.gz This is the only one that load and run on my EfikaMX.

Jacques, the two eubins you referred to are two different abi's: hard and soft. We should really know what your system is and then work from there. With the 'hello.c' program you wrote, can you do the following on your EfikaMX:

gcc -v 
gcc hello.c -o hello 
readelf -A hello 

This is just a quick test to check the abi settings of your native compiler.

Thanks,
Ira

done:

jacques@efikamx:~/Téléchargements$ gcc -v 
Using built-in specs. 
Target: arm-linux-gnueabi 
Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.5-8' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --disable-sjlj-exceptions --enable-checking=release --build=arm-linux-gnueabi --host=arm-linux-gnueabi --target=arm-linux-gnueabi 
Thread model: posix 
gcc version 4.4.5 (Debian 4.4.5-8)  
jacques@efikamx:~/Téléchargements$ gcc hello.c -ohello 
jacques@efikamx:~/Téléchargements$ readelf -A hello 
Attribute Section: aeabi 
File Attributes 
  Tag_CPU_name: "ARM9TDMI" 
  Tag_CPU_arch: v4T 
  Tag_ARM_ISA_use: Yes 
  Tag_THUMB_ISA_use: Thumb-1 
  Tag_ABI_PCS_wchar_t: 4 
  Tag_ABI_FP_denormal: Needed 
  Tag_ABI_FP_exceptions: Needed 
  Tag_ABI_FP_number_model: IEEE 754 
  Tag_ABI_align8_needed: Yes 
  Tag_ABI_align8_preserved: Yes, except leaf SP 
  Tag_ABI_enum_size: int 
no hardfload! but the i.MX515 has a FPU

what it give with eui for eui from eubins-armv6hf

jacques@efikamx:~/Téléchargements/eubin-armv6hf$ readelf -A eui 
Attribute Section: aeabi 
File Attributes 
  Tag_CPU_name: "6" 
  Tag_CPU_arch: v6 
  Tag_ARM_ISA_use: Yes 
  Tag_THUMB_ISA_use: Thumb-1 
  Tag_VFP_arch: VFPv2 
  Tag_ABI_PCS_wchar_t: 4 
  Tag_ABI_FP_denormal: Needed 
  Tag_ABI_FP_exceptions: Needed 
  Tag_ABI_FP_number_model: IEEE 754 
  Tag_ABI_align8_needed: Yes 
  Tag_ABI_align8_preserved: Yes, except leaf SP 
  Tag_ABI_enum_size: int 
  Tag_ABI_HardFP_use: SP and DP 
  Tag_ABI_VFP_args: VFP registers 
  Tag_CPU_unaligned_access: v6 
  Tag_DIV_use: Not allowed 

What can I do from here?

Jacques

P.S. no need to answer I found the softfloat compiler in rpi tools directory and launched a cross-compile with it.

Thanks Ira for pointing me in the right direction.

new topic     » goto parent     » topic index » view message » categorize

31. Re: ARM Updates

coconut said...

Who has built this one? http://openeuphoria.org/eubins/linux/4.1.0/arm-32-bit/eubin-arm-cortex-a8-2012-01-13-ee49c6b8a340.tar.gz This is the only one that load and run on my EfikaMX.

I built it.

I've built a newer version from the same system here: http://openeuphoria.org/eubins/linux/4.1.0/arm-32-bit/eubin-arm-cortex-a8-2013-04-10-e767d3c187d1.tar.gz

This is using a revision from today, and should have all the latest updates and fixes that were committed to trunk.

new topic     » goto parent     » topic index » view message » categorize

32. Re: ARM Updates

coconut said...

done:

jacques@efikamx:~/Téléchargements$ gcc -v 
Using built-in specs. 
Target: arm-linux-gnueabi 
Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.5-8' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --disable-sjlj-exceptions --enable-checking=release --build=arm-linux-gnueabi --host=arm-linux-gnueabi --target=arm-linux-gnueabi 
Thread model: posix 
gcc version 4.4.5 (Debian 4.4.5-8)  
jacques@efikamx:~/Téléchargements$ gcc hello.c -ohello 
jacques@efikamx:~/Téléchargements$ readelf -A hello 
Attribute Section: aeabi 
File Attributes 
  Tag_CPU_name: "ARM9TDMI" 
  Tag_CPU_arch: v4T 
  Tag_ARM_ISA_use: Yes 
  Tag_THUMB_ISA_use: Thumb-1 
  Tag_ABI_PCS_wchar_t: 4 
  Tag_ABI_FP_denormal: Needed 
  Tag_ABI_FP_exceptions: Needed 
  Tag_ABI_FP_number_model: IEEE 754 
  Tag_ABI_align8_needed: Yes 
  Tag_ABI_align8_preserved: Yes, except leaf SP 
  Tag_ABI_enum_size: int 
no hardfload! but the i.MX515 has a FPU

It's a software issue as well - your libraries (libc and so on, if not the kernel itself) need to be built with hardfloat support on. You can't mix and match hardfloat and softfloat object files together.

(In addition to hardfloat and 100% software float emulation, there's also something called VFP. Urgh.)

So, if your distro is using all softfloat libraries, then the binaries that you build need to be the same.

coconut said...

what it give with eui for eui from eubins-armv6hf

jacques@efikamx:~/Téléchargements/eubin-armv6hf$ readelf -A eui 
Attribute Section: aeabi 
File Attributes 
  Tag_CPU_name: "6" 
  Tag_CPU_arch: v6 
  Tag_ARM_ISA_use: Yes 
  Tag_THUMB_ISA_use: Thumb-1 
  Tag_VFP_arch: VFPv2 
  Tag_ABI_PCS_wchar_t: 4 
  Tag_ABI_FP_denormal: Needed 
  Tag_ABI_FP_exceptions: Needed 
  Tag_ABI_FP_number_model: IEEE 754 
  Tag_ABI_align8_needed: Yes 
  Tag_ABI_align8_preserved: Yes, except leaf SP 
  Tag_ABI_enum_size: int 
  Tag_ABI_HardFP_use: SP and DP 
  Tag_ABI_VFP_args: VFP registers 
  Tag_CPU_unaligned_access: v6 
  Tag_DIV_use: Not allowed 

What can I do from here?

Jacques

P.S. no need to answer I found the softfloat compiler in rpi tools directory and launched a cross-compile with it.

Thanks Ira for pointing me in the right direction.

Brilliant! That's good to know. Someone should probably add a EfikaMX Debian 4.4.5-8 specific note to the wiki about this.

new topic     » goto parent     » topic index » view message » categorize

33. Re: ARM Updates

jimcbrown said...
coconut said...

Who has built this one? http://openeuphoria.org/eubins/linux/4.1.0/arm-32-bit/eubin-arm-cortex-a8-2012-01-13-ee49c6b8a340.tar.gz This is the only one that load and run on my EfikaMX.

I built it.

I've built a newer version from the same system here: http://openeuphoria.org/eubins/linux/4.1.0/arm-32-bit/eubin-arm-cortex-a8-2013-04-10-e767d3c187d1.tar.gz

This is using a revision from today, and should have all the latest updates and fixes that were committed to trunk.

Load and run but still crash sanity.ex at same point poke() peek() test.

Jacques

new topic     » goto parent     » topic index » view message » categorize

34. Re: ARM Updates

coconut said...

Who has built this one? http://openeuphoria.org/eubins/linux/4.1.0/arm-32-bit/eubin-arm-cortex-a8-2012-01-13-ee49c6b8a340.tar.gz This is the only one that load and run on my EfikaMX. It run somes of the demos but crash sanity.ex at 4% (poke(), peek() test).

What was the build environment?

All others build generate segmentation fault when loaded with /lib/ld-linux.3.so ./eui

Jacques

I built it. The build environment was a Ubuntu 9.10 image wth kernel 2.6.32.9 and PREEMPT on armv7l running via chroot under an Android 2.2 system (so 2.6.32.9 is actually the Android kernel) - a Nook Color tablet, to be precise.

new topic     » goto parent     » topic index » view message » categorize

35. Re: ARM Updates

coconut said...

Load and run but still crash sanity.ex at same point poke() peek() test.

Jacques

Um, wow. It's happening for me too. This is so embarrassing.

new topic     » goto parent     » topic index » view message » categorize

36. Re: ARM Updates

jimcbrown said...
coconut said...

Load and run but still crash sanity.ex at same point poke() peek() test.

Jacques

Um, wow. It's happening for me too. This is so embarrassing.

I'll have to get my pi fired up in the morning. I haven't thought about sanity.ex in a long time. What about unit tests? Specifically, t_machine.e, t_convert.e, t_text.e and t_literal.e?

Matt

new topic     » goto parent     » topic index » view message » categorize

37. Re: ARM Updates

coconut said...

P.S. no need to answer I found the softfloat compiler in rpi tools directory and launched a cross-compile with it. Thanks Ira for pointing me in the right direction.

Jacques, I'm glad this helped!

jimcbrown said...

Someone should probably add a EfikaMX Debian 4.4.5-8 specific note to the wiki about this.

I really like the way Archlinux handles their ARM developement http://archlinuxarm.org/developers/distcc-cross-compiling, we could have eubins for ARMv5, ARMv6, and ARMv7 with hard and soft float clearly specified. The different eubins are easy to generate with cross-compiling scripts.

Thanks,
Ira

new topic     » goto parent     » topic index » view message » categorize

38. Re: ARM Updates

mattlewis said...
jimcbrown said...
coconut said...

Load and run but still crash sanity.ex at same point poke() peek() test.

Jacques

Um, wow. It's happening for me too. This is so embarrassing.

I'll have to get my pi fired up in the morning. I haven't thought about sanity.ex in a long time. What about unit tests? Specifically, t_machine.e, t_convert.e, t_text.e and t_literal.e?

OK, I get that sanity.ex failure, too. Lots going on in that bit. It's definitely going into our unit tests.

 
	poke(addr, {77, -1, 5.1, -1.1}) 
	if compare(peek({addr, 4}), {77, 255, 5, 255}) then 
	crash(generic_msg) 

Matt

new topic     » goto parent     » topic index » view message » categorize

39. Re: ARM Updates

coconut said...

Load and run but still crash sanity.ex at same point poke() peek() test.

I just pushed up a fix. It's another difference in how ARM and x86 cast doubles to ints. We'll need to do the same fix for other poke sizes. I added a test to t_machine.e, and it now passes interpreted and translated.

I also ifdef'd pit the call() test in sanity.ex. I'm not sure what the equivalent ARM version should be to return immediately. Now sanity.ex passes on my Pi.

Matt

new topic     » goto parent     » topic index » view message » categorize

40. Re: ARM Updates

mattlewis said...

I also ifdef'd pit the call() test in sanity.ex. I'm not sure what the equivalent ARM version should be to return immediately.

Just guessing here, but I think it's #CB00 - http://infocenter.arm.com/help/topic/com.arm.doc.faqs/ka9568.html

Edit: I am assuming that this should be a near function call, though - http://infocenter.arm.com/help/topic/com.arm.doc.faqs/ka9225.html

I think that the bugfix confirms my initial suspicions after all - this was a minor peek/poke bug that didn't affect the big picture (i.e. the ability to boostrap the interpreter). Though hindsight is 20/20 I guess.

new topic     » goto parent     » topic index » view message » categorize

41. Re: ARM Updates

jimcbrown said...
mattlewis said...

I also ifdef'd pit the call() test in sanity.ex. I'm not sure what the equivalent ARM version should be to return immediately.

Just guessing here, but I think it's #CB00 - http://infocenter.arm.com/help/topic/com.arm.doc.faqs/ka9568.html

Edit: I am assuming that this should be a near function call, though - http://infocenter.arm.com/help/topic/com.arm.doc.faqs/ka9225.html

I think that the bugfix confirms my initial suspicions after all - this was a minor peek/poke bug that didn't affect the big picture (i.e. the ability to boostrap the interpreter). Though hindsight is 20/20 I guess.

Nope. After an objdump on some test code, I found the following works:

addr = allocate_code({0xe52db004, 0xe8bd0800, 0xe12fff1e}, 4) 

...which objdump tells me is:

e52db004        push    {fp}            ; (str fp, [sp, #-4]!) 
e8bd0800        pop     {fp} 
e12fff1e        bx      lr 

Matt

new topic     » goto parent     » topic index » view message » categorize

42. Re: ARM Updates

Bingo!

added in config.gnu

MSIZE= -mcpu=cortex-a8

the build result in a hardfloat but it works.

jacques@efikamx:~$ readelf -A $EUDIR/bin/eui 
Attribute Section: aeabi 
File Attributes 
  Tag_CPU_name: "Cortex-A8" 
  Tag_CPU_arch: v7 
  Tag_CPU_arch_profile: Application 
  Tag_ARM_ISA_use: Yes 
  Tag_THUMB_ISA_use: Thumb-2 
  Tag_VFP_arch: VFPv2 
  Tag_ABI_PCS_wchar_t: 4 
  Tag_ABI_FP_denormal: Needed 
  Tag_ABI_FP_exceptions: Needed 
  Tag_ABI_FP_number_model: IEEE 754 
  Tag_ABI_align8_needed: Yes 
  Tag_ABI_align8_preserved: Yes, except leaf SP 
  Tag_ABI_enum_size: int 
  Tag_ABI_HardFP_use: SP and DP 
  Tag_CPU_unaligned_access: v6 
  Tag_DIV_use: Not allowed 
  Tag_Virtualization_use: TrustZone 
 
jacques@efikamx:~$ eui --version 
Euphoria Interpreter v4.1.0 development 
   32-bit Linux, Using System Memory 
   Revision Date: 2013-04-11 11:32:27, Id: 6100:1973ffe5a389 
jacques@efikamx:~$ eui $EUDIR/demo/sanity.ex 
 
                   Euphoria SANITY TEST ...  
 100% 
PASSED (100%) 
 

Thanks guys you have been very helpfull.

Jacques

new topic     » goto parent     » topic index » view message » categorize

43. Re: ARM Updates

coconut said...

Bingo!

Thanks guys you have been very helpfull.

Jacques

I know I'm being greedy here, but is there any way you can send the eubins to us? Or share them with the rest of the world?

new topic     » goto parent     » topic index » view message » categorize

44. Re: ARM Updates

jimcbrown said...
coconut said...

Bingo!

Thanks guys you have been very helpfull.

Jacques

I know I'm being greedy here, but is there any way you can send the eubins to us? Or share them with the rest of the world?

No problem,

eubins-cortex-a8-2013-04-11.tar.gz

Jacques

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu