I have created a custom Linux driver (basically a miscdevice) for my hardware using:
$ petalinux-create -t modules--name myip --enable
The driver consists of a myip.c file and a myip.h header with the IOCTL definitions and other uapi stuff.
The driver compiles fine and is getting loaded with no issues during the kernel boot.
I'm now trying to write a test app for the driver. I created the app with:
$ petalinux-create -t apps -n test_myip --template install --enable
This app just has a test_myip.c file but it needs the myip.h header.
If I #ifdef out all the stuff provided by myip.h the test app compiles and is installed to the rootfs. And it runs fine when the system is booted.
But if I try to include the myip.h I get a compile error. I have tried a number of paths ("myip.h", <myip.h>, <linux/myip.h>, etc.) but no luck.
I tried searching the <plnx-proj-root> for the myip.h file and it is only found at project-spec/meta-user/recipes-modules/myip/files/myip.h.
What do I need to do to get the myip.h header installed in the build tree so that the test_myip.c file can include it?
Thanks