Mismatch between linux-imx-headers version and toradex kernel in current git master


Carlos Rafael Giani
 

When building code with support for DMA-BUF heaps ( https://github.com/torvalds/linux/blob/master/include/uapi/linux/dma-heap.h ), I noticed that my code was detecting the dma-heap.h userspace API header in the Yocto SDK, while on the running system, no dma-heap was found.

It turns out that the linux-imx-headers (which contain the dma-heap.h header) are from linux-imx 5.10, while the Toradex kernel is at 5.4.

This makes me wonder how to address this. I can think of two options:

1. Recipes of software that supports DMA-BUF heaps needs to have a "dma-heap" packageconfig that is explicitly disabled on systems with pre-5.6 kernels (5.6 is when DMA-BUF heaps were added as part of the userspace API).

2. Somehow check for the actual kernel version in the recipe and turn off DMA-BUF heaps if the version is <5.6.

Furthermore, I am concerned that such version mismatches between these two recipes could lead to other subtle errors.

Is a linux-toradex upgrade to 5.10 planned? Or is there a smarter way to address such version discrepancies?

Carlos

Join meta-freescale@lists.yoctoproject.org to automatically receive all group messages.