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 thburghout
Participant
810 Views
Registered: ‎10-27-2017

Petalinux 2017.2 creating header only library

Hi,

 

For kernel/user-space communication as described in the sheets about "Linux DMA from User-Space" (Xilinx, 2014) I need to create a header only library with the definition of the struct used for communicating.

 

I created a new C apps, removed the Makefile and source file and created a header file with the struct definition. How would I go about including this in a module and another application?

 

I'm assuming I need to adjust the bb files, but I have no idea what I should adjust to create the dependency and assure the correct include parameters during the boot process (since the files are built in another directory).

 

I think this question is similar to https://forums.xilinx.com/t5/Embedded-Linux/Just-getting-started-with-Petalinux-2017-2-need-more/td-p/780793/page/2 . But the link provided by sandeepg only helps me slightly.

 

I added 

PROVIDES = "libdma-channel-if"

to the bb file of the header only library.

 

How would I go about "requiring" this during module compilation? Such that I can use

#include <libdma-channel-if/libdma-channel-if.h>

 

Thanks!

0 Kudos
2 Replies
Xilinx Employee
Xilinx Employee
793 Views
Registered: ‎08-01-2008

Re: Petalinux 2017.2 creating header only library

you can refer some example here
https://github.com/BarrelfishOS/barrelfish
Thanks and Regards
Balkrishan
--------------------------------------------------------------------------------------------
Please mark the post as an answer "Accept as solution" in case it helped resolve your query.
Give kudos in case a post in case it guided to the solution.
0 Kudos
Participant thburghout
Participant
785 Views
Registered: ‎10-27-2017

Re: Petalinux 2017.2 creating header only library

I don't need the header file to be present in the image. Just to be included during compilation.
0 Kudos