Exporting custom kernel header file to SDK #kernel #sdk


Lukasz Domowy
 

Hello,
 
I wrote a kernel driver which exposes some header to userspace application. Application engineers use generated SDK, so I'd like to export that header file as part of SDK.
I added my header to <kernel>/include/uapi/linux/ and thought it would be enouogh - as during SDK generation it would be copied to SDK. 
 
I use Yocto 3.2.2 and custom recipe for kernel 5.10.
 
I generated SDK and installed it, but to my surprise:
- my header is missing at <SDK install path>/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/include/linux/
- <SDK install path>/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/include/linux/version.h contains:
        #define LINUX_VERSION_CODE 329728
which means kernel version 5.8 (why not 5.10?)

It looks like SDK takes default Yocto gatesgarth kernel version (5.8) to SDK, not my kernel version. PREFERRED_PROVIDER_virtual/kernel is properly set and right kernel version is built (at tmp/deploy/images)
What am I doing wrong?

I would appreciate any hints. Thank you in advance.

Best regards,
Lukasz