Symbol dependencies between out-of-tree kernel modules
Hi,
I'm trying to write recipes for two out-of-tree kernel modules, one ("u-dma-buf-mgr") requires the Module.symvers of the other ("u-dma-buf").
module.bbclass already has some kind of inter-module dependency detection [0], but I can't use it b/c it assumes that the Module.symvers is installed in the sysroot under "${STAGING_INCDIR}/kernel-module-u-dma-buf/Module.symvers", while it is installed under "${includedir}/${BPN}/Module.symvers" [1] where BPN is "u-dma-buf" in my case, not "kernel-module-u-dma-buf".
I worked around this by overriding KBUILD_EXTRA_SYMBOLS in the depending module recipe:
d.setVar('KBUILD_EXTRA_SYMBOLS', os.path.join(d.getVar('RECIPE_SYSROOT'), 'usr', 'include', 'udmabuf', 'Module.symvers'))
feels hackish, is there a better way?
[0] https://github.com/yoctoproject/poky/blob/3e95f268ce04b49ba6731fd4bbc53b1693c21963/meta/classes-recipe/module.bbclass#L14-L21
[1] https://github.com/yoctoproject/poky/blob/3e95f268ce04b49ba6731fd4bbc53b1693c21963/meta/classes-recipe/module.bbclass#L67