Re: Custom kernel headers and SDK

Vuille, Martin (Martin) <vmartin@...>

Hi Valentin,

When we first encountered the need for custom kernel headers, I asked
a similar question to yours on this list. And what I learned from some of the
responses was that modifying the standard headers was fraught with
problems, including the issue that you raise.

Fortunately, we got away without having to modify and export any standard
headers, so I dodged that bullet.

Some ideas that come to mind:

- Can you install your customized version in ${includedir}/XXX and use the
include path search order to make sure the compiler sees it first?

- Can you include the standard header in a "wrapper" header and make your
customizations in the wrapper instead?


-----Original Message-----
From: Longchamp, Valentin [mailto:Valentin.Longchamp@...]
Sent: December 10, 2015 4:47 AM
To: Vuille, Martin (Martin); yocto@...
Cc: Brunck, Holger
Subject: RE: Custom kernel headers and SDK

Hi Martin,

Thanks a lot for the suggestion. I had in the meantime come to a simliar
solution: define a linux-XXX-headers recipe in our own meta layer where I
install the missing kernel headers and then I add this linux-XXX-headers-dev
package to our SDK's sysroot thanks to TARGET_TOOLCHAIN_TASK.
Your implementation looks fine and I am going to pick some ideas from it.

However, I have stumbled upon another problem with this approach: it
works well if you add new files to the kernel headers. We unforntunately
have at least one uapi file (i2c.h to name it) that is present in the standard
kernel headers where we have our own version with some
additions/extensions. If I install our version from ou linux-XXX-headers
recipe, bitbake (correctly) complains that this file is provided by 2 packages
(linux-libc-headers and linux-XXX-headers). And here I really don't know how
to solve this issue. Any ideas/suggestions ?



Join { to automatically receive all group messages.