[OE-core] Staging machine specific kernel headers in sysroot

Mike Looijmans mike.looijmans at topic.nl
Tue Apr 5 06:11:14 UTC 2016


On 02-04-16 10:48, Richard Purdie wrote:
> On Fri, 2016-04-01 at 20:38 -0700, Andre McCurdy wrote:
>> Say I have a kernel driver with a user space API (simple struct and
>> ioctl definitions) defined in a header file which is part of my
>> machine specific kernel. The header file is not found in the upstream
>> kernel, so doesn't clash with anything in linux-libc-headers.
>>
>> Is it OK to use something like the following in my kernel recipe?
>>
>>    sysroot_stage_all_append () {
>>      install -d ${SYSROOT_DESTDIR}/${includedir}/linux
>>      install -m644 ${S}/include/linux/foo.h
>> ${SYSROOT_DESTDIR}/${includedir}/linux/
>>    }
>>
>> I've tested it and everything seems to work fine, but I'm wondering
>> if
>> bypassing do_install like that is going to cause problems somehow?
>
> You can probably just do it in do_install to be honest, then on target
> development would also work.

A simple method to get around the header being "kernel" related is to create a 
second recipe referring the same repository as the module, but that just 
installs the header. That turns it into a simple "library" dependency instead 
of making things machine-specific.




Kind regards,

Mike Looijmans
System Expert

TOPIC Embedded Products
Eindhovenseweg 32-C, NL-5683 KH Best
Postbus 440, NL-5680 AK Best
Telefoon: +31 (0) 499 33 69 79
E-mail: mike.looijmans at topicproducts.com
Website: www.topicproducts.com

Please consider the environment before printing this e-mail








More information about the Openembedded-core mailing list