2009-03-10 11:19:36 location of header file which has to be shared by kernel space and userspace
abhrajit datta (INDIA)
Message: 70706
Hi,
Suppose i need to share a structure betwen kerel and userland for ioctl's. I need to share the header file. What would be the correct location of the header file ? Do i need to have more than one copy of the header file for kernel and userspace.
Thanks,
Abhri
QuoteReplyEditDelete
2009-03-10 15:11:31 Re: location of header file which has to be shared by kernel space and userspace
Mike Frysinger (UNITED STATES)
Message: 70716
if it's Blackfin-specific, then use the Blackfin-specific include dir, otherwise use the common linux dir
then just update the Kbuild file in the same dir
QuoteReplyEditDelete
2009-03-13 01:14:04 Re: location of header file which has to be shared by kernel space and userspace
abhrajit datta (INDIA)
Message: 70914
Hi Mike,
I must be missing something. This is what i did.
my driver is in linux-2.6.x/drivers/char/
my application is in user/blkfin-test/twi_accelerometer-test/
my header file to be shared bfin_twi_accelerometer.h is in
linux-2.6.x/include/linux/
and the Kbuild file in the same directory has been updated with
unifdef-y += bfin_twi_accelerometer.h
my application uses the following line to include the header file
#include <linux/bfin_twi_accelerometer.h>
and i get this file not found error.
I guess the include directory for application is different then. so i asked if we have to maintain more than one copies of the same header file.
Thanks
Abhri
QuoteReplyEditDelete
2009-03-13 02:22:17 Re: location of header file which has to be shared by kernel space and userspace
Mike Frysinger (UNITED STATES)
Message: 70917
if you dont actually install the kernel headers, then your toolchain wont be able to find it
you can manually copy the header to the toolchain dir if you like