Integrate out-of-tree driver in kernel and rebuild yocto project image

一世执手 提交于 2019-12-11 04:44:41

问题


I have a question regarding best practices for Yocto Project.

What i want to do is to add sources for a driver from github in kernel and rebuild the whole yocto image, but i am not sure what's the best way of doing that. I am thinking of two options possible here.

  1. Fork the kernel sources into my own repo, then add the driver sources, update the Makefile and Kconfig and provide my own defconfig file. (this definitely works)

  2. The second thing that crosses my mind is to use the initial kernel sources and just create a recipe that fetches the driver code into place (drivers/net/...) and create a patch that adds the driver to the Makefile and Kconfig and replaces the defconfig file and then rebuild. (I am not sure about this, if it is possible to fetch a driver sources into a specific place in the kernel sources)

So my question is if the second way would be possible and it's common to have it this way.

But if i am thinking again maybe that is not possible because i have the recipe for the kernel which fetches the kernel sources then compile them, so i think that it may not be possible to have a kernel recipe that fetches the kernel sources then another recipe that fetches the driver sources, applies the patch and only after this the kernel is compiled. Am i right? or this should be possible somehow?

Thanks.

来源:https://stackoverflow.com/questions/41614079/integrate-out-of-tree-driver-in-kernel-and-rebuild-yocto-project-image

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!