UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Participant cb_cross
Participant
594 Views
Registered: ‎08-10-2018

what is proper config for rootfs for libopenamp?

Jump to solution

So, collating multiple sources of info including Chapter 3 of UG1186 I was able to get the Matrix Multiply Demo running on my ZCU104 using the pre-built binaries.

 

Now I want to compile the demo myself so I have a working baseline for custom development.

 

In the SDK, setting up the R5 half of the demo is simple.  The A53 half of the demo, however is not so simple.  You have to know to grab the C file from here: https://github.com/Xilinx/meta-openamp/tree/rel-v2018.2/recipes-openamp/rpmsg-examples/rpmsg-mat-mul

and not here: https://github.com/OpenAMP/open-amp/tree/master/apps/examples/matrix_multiply

 

So, the A53 matrix_multiply.c compiles, but fails to link thusly:

Building target: a53_mmult_demo.elf
Invoking: ARM v8 Linux gcc linker
aarch64-linux-gnu-gcc -L"/opt/projects/xilinx/xilinx-zcu104-2018.2/images/linux/sdk/sysroots/aarch64-xilinx-linux/usr/lib" -L"/opt/projects/xilinx/xilinx-zcu104-2018.2/images/linux/sdk/sysroots/aarch64-xilinx-linux/lib" --sysroot=/opt/projects/xilinx/xilinx-zcu104-2018.2/images/linux/sdk/sysroots/aarch64-xilinx-linux -o "a53_mmult_demo.elf"  ./src/matrix_multiply.o   -lopen_amp -lpthread -lmetal
/opt/projects/xilinx/xilinx-zcu104-2018.2/images/linux/sdk/sysroots/aarch64-xilinx-linux/usr/lib/libopen_amp.so: undefined reference to `fw_table_size'
/opt/projects/xilinx/xilinx-zcu104-2018.2/images/linux/sdk/sysroots/aarch64-xilinx-linux/usr/lib/libopen_amp.so: undefined reference to `fw_table'
collect2: error: ld returned 1 exit status
makefile:36: recipe for target 'a53_mmult_demo.elf' failed
make: *** [a53_mmult_demo.elf] Error 1

My question is:  How should I configure my rootfs (`petalinux-config -c rootfs`) such that I don't have missing objects.

And yes, I do `petalinux-build -s` and `petalinux-package --sysroot` after each time I change the config.

 

0 Kudos
1 Solution

Accepted Solutions
Moderator
Moderator
570 Views
Registered: ‎05-10-2017

Re: what is proper config for rootfs for libopenamp?

Jump to solution

The only library you need to build that demo is lpthread. You can also see the makefile that is used to build the demo.

You do not need to set sysroot in this case. Just add the -lpthread library to your C/C++ build settings.

 

 

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
mat_mul_demo_linux.PNG
1 Reply
Moderator
Moderator
571 Views
Registered: ‎05-10-2017

Re: what is proper config for rootfs for libopenamp?

Jump to solution

The only library you need to build that demo is lpthread. You can also see the makefile that is used to build the demo.

You do not need to set sysroot in this case. Just add the -lpthread library to your C/C++ build settings.

 

 

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
mat_mul_demo_linux.PNG