[meta-xilinx] cross-compiling

2016-10-10 Thread Edward Wingate
I cross-compiled an application to run on Linux on the Zynq-7020.
Trying to execute it gives "No such file or directory" error.

# file app_hello.elf
app_hello.elf: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV),
dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for
GNU/Linux 4.4.0,
BuildID[sha1]=06498863e79d3eabe670610b2cbb0440272f047e, not stripped

I don't have /lib/ld-linux-armhf.so.3, but I do have
/lib/ld-linux.so.3.  I symlinked ld-linux-armhf.so.3 to ld-linux.so.3
and my application runs fine now.

Where did things go wrong?  Is my Yocto build not properly creating
ld-linux-armhf.so.3?  Or is my application cross-compilation using the
wrong ld-linux?  I'm using Xilinx SDK 2016.2 to cross-compile the
Linux application.

Thanks for any help.

Ed
-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


Re: [meta-xilinx] cross-compiling

2016-10-11 Thread Mike Looijmans

On 11-10-16 08:51, Edward Wingate wrote:

I cross-compiled an application to run on Linux on the Zynq-7020.
Trying to execute it gives "No such file or directory" error.

# file app_hello.elf
app_hello.elf: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV),
dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for
GNU/Linux 4.4.0,
BuildID[sha1]=06498863e79d3eabe670610b2cbb0440272f047e, not stripped

I don't have /lib/ld-linux-armhf.so.3, but I do have
/lib/ld-linux.so.3.  I symlinked ld-linux-armhf.so.3 to ld-linux.so.3
and my application runs fine now.

Where did things go wrong?  Is my Yocto build not properly creating
ld-linux-armhf.so.3?  Or is my application cross-compilation using the
wrong ld-linux?  I'm using Xilinx SDK 2016.2 to cross-compile the
Linux application.


I suspect one of your toolchains is using hard-float ABI and the other 
soft-float. This will work fine if you don't exchange any floating-point data.


The solution is to use the same toolchain for everything. Don't use the Yocto 
toolchain for the rootfs and then the Xilinx toolchain for an executable.




Kind regards,

Mike Looijmans
System Expert

TOPIC Products
Materiaalweg 4, NL-5681 RJ Best
Postbus 440, NL-5680 AK Best
Telefoon: +31 (0) 499 33 69 79
E-mail: mike.looijm...@topicproducts.com
Website: www.topicproducts.com

Please consider the environment before printing this e-mail





--
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


Re: [meta-xilinx] cross-compiling

2016-10-11 Thread Nathan Rossi
On Tue, Oct 11, 2016 at 5:17 PM, Mike Looijmans  wrote:
> On 11-10-16 08:51, Edward Wingate wrote:
>>
>> I cross-compiled an application to run on Linux on the Zynq-7020.
>> Trying to execute it gives "No such file or directory" error.
>>
>> # file app_hello.elf
>> app_hello.elf: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV),
>> dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for
>> GNU/Linux 4.4.0,
>> BuildID[sha1]=06498863e79d3eabe670610b2cbb0440272f047e, not stripped
>>
>> I don't have /lib/ld-linux-armhf.so.3, but I do have
>> /lib/ld-linux.so.3.  I symlinked ld-linux-armhf.so.3 to ld-linux.so.3
>> and my application runs fine now.
>>
>> Where did things go wrong?  Is my Yocto build not properly creating
>> ld-linux-armhf.so.3?  Or is my application cross-compilation using the
>> wrong ld-linux?  I'm using Xilinx SDK 2016.2 to cross-compile the
>> Linux application.
>
>
> I suspect one of your toolchains is using hard-float ABI and the other
> soft-float. This will work fine if you don't exchange any floating-point
> data.

Xilinx changed their default toolchain provided by XSDK to arm hard
float in a recent version (v2016.1?).

As such meta-xilinx also switched (krogoth and newer) to defaulting to
hard-float as there was no longer a need to default to soft-fp for
compatibility. You can read a bit about it here:

https://lists.yoctoproject.org/pipermail/meta-xilinx/2016-February/001466.html

>
> The solution is to use the same toolchain for everything. Don't use the
> Yocto toolchain for the rootfs and then the Xilinx toolchain for an
> executable.

This is definitely recommended, you can build an "SDK" with Yocto if
you need the toolchain for standalone development.

Some reference links:
http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#cross-development-toolchain-generation
http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#sdk-dev-environment

Regards,
Nathan

>
>
>
> Kind regards,
>
> Mike Looijmans
> System Expert
>
> TOPIC Products
> Materiaalweg 4, NL-5681 RJ Best
> Postbus 440, NL-5680 AK Best
> Telefoon: +31 (0) 499 33 69 79
> E-mail: mike.looijm...@topicproducts.com
> Website: www.topicproducts.com
>
> Please consider the environment before printing this e-mail
>
>
>
>
>
>
> --
> ___
> meta-xilinx mailing list
> meta-xilinx@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-xilinx
-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


Re: [meta-xilinx] cross-compiling

2016-10-11 Thread Edward Wingate
Thanks Nathan and Mike, I just installed the SDK from Yocto and the
Linux executables it generates are working fine.


On Tue, Oct 11, 2016 at 12:31 AM, Nathan Rossi  wrote:
> On Tue, Oct 11, 2016 at 5:17 PM, Mike Looijmans  
> wrote:
>> I suspect one of your toolchains is using hard-float ABI and the other
>> soft-float. This will work fine if you don't exchange any floating-point
>> data.
>
> Xilinx changed their default toolchain provided by XSDK to arm hard
> float in a recent version (v2016.1?).
>
> As such meta-xilinx also switched (krogoth and newer) to defaulting to
> hard-float as there was no longer a need to default to soft-fp for
> compatibility. You can read a bit about it here:
>
> https://lists.yoctoproject.org/pipermail/meta-xilinx/2016-February/001466.html
>
>>
>> The solution is to use the same toolchain for everything. Don't use the
>> Yocto toolchain for the rootfs and then the Xilinx toolchain for an
>> executable.
>
> This is definitely recommended, you can build an "SDK" with Yocto if
> you need the toolchain for standalone development.
>
> Some reference links:
> http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#cross-development-toolchain-generation
> http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#sdk-dev-environment
>
-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx