最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

yocto - How to add a recipes-graphics for DRM? - Stack Overflow

programmeradmin5浏览0评论

I have a yocto project, the kernel version is 6.1.55. With generated kernel source, it fails to compile my driver code, and generates errors:

error: ‘drm_ioctl’ undeclared here (not in a function); 

And found drm_ioctl.h is missing from the kernel built with yocto. recipes-graphics has libdrm_2.4.115.imx.bb configured. And drm/drm_gem_cma_helper.h is also missing.

How to configure recipes-graphics so that it generates DRM dev package for my driver to be compiled with kernel drm (drm/dma) support?

I have a yocto project, the kernel version is 6.1.55. With generated kernel source, it fails to compile my driver code, and generates errors:

error: ‘drm_ioctl’ undeclared here (not in a function); 

And found drm_ioctl.h is missing from the kernel built with yocto. recipes-graphics has libdrm_2.4.115.imx.bb configured. And drm/drm_gem_cma_helper.h is also missing.

How to configure recipes-graphics so that it generates DRM dev package for my driver to be compiled with kernel drm (drm/dma) support?

Share Improve this question edited Mar 19 at 13:30 genpfault 52.2k12 gold badges91 silver badges151 bronze badges asked Mar 19 at 13:19 dxyzhou-tigerdxyzhou-tiger 12 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

The error indicates that your driver needs DRM support in the kernel, but some essential headers like drm_ioctl.h and drm/drm_gem_cma_helper.h are missing from your Yocto-built kernel.

Here's how to properly configure your Yocto project to include the necessary DRM support:

  1. First, you need to ensure the kernel has DRM support enabled. Create a kernel fragment file or modify your existing one:

    # In your layer, create or modify a .cfg file, for example:

    # meta-yourlayer/recipes-kernel/linux/linux-yocto/drm.cfg

    CONFIG_DRM=y

    CONFIG_DRM_KMS_HELPER=y

    CONFIG_DRM_GEM_CMA_HELPER=y

    CONFIG_DRM_KMS_FB_HELPER=y

    CONFIG_DRM_FBDEV_EMULATION=y

    And Please Make sure this kernel configuration fragment is included in your kernel recipe. Add to your kernel recipe (e.g.,

    FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"

    SRC_URI += "file://drm.cfg"

发布评论

评论列表(0)

  1. 暂无评论