【发布时间】:2021-09-06 02:21:24
【问题描述】:
目标
我想将linux kernel source tree 中可用的触摸屏驱动程序添加到我的 Yocto 图像(该链接将您带到goodix.c)。我基本上需要将其添加为内核模块。
解决方案
我遵循 Yocto Mega 手册的 Incorporating Out-of-Tree Modules 部分。我基于他们的示例内核模块配方,称为hello-mod。
- 在配方中
goodix-9271_0.1.bb:RPROVIDES_${PN} = "kernel-module-goodix" - 在
layer.conf:MACHINE_EXTRA_RDEPENDS += "kernel-module-goodix"
问题
我的构建在do_rootfs 中总是失败,原因是:
Error:
Problem: package packagegroup-base-1.0-r83.imx6ul_var_dart requires packagegroup-machine-base, but none of the providers can be installed
- package packagegroup-base-extended-1.0-r83.imx6ul_var_dart requires packagegroup-base, but none of the providers can be installed
- package packagegroup-machine-base-1.0-r83.imx6ul_var_dart requires kernel-module-goodix, but none of the providers can be installed
- conflicting requests
- nothing provides kernel-module-goodix-5.4.3-imx6ul+gb40ccfdb73ea needed by goodix-9271-0.1-r0.imx6ul_var_dart
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
阅读本节的文档后,我无法理解为什么会发生此错误。我尝试调整配方名称(删除内核模块前缀等),但似乎没有任何效果。出了什么问题?
来源
inherit module logging
# Driver for Goodix touchscreens
SUMMARY = "Generic driver for Goodix touchscreens"
DESCRIPTION = "Support for Goodix 1151, 5663, 5688, 917S, 9286, 911, 9271, 9110, 927, 928, 912, 9147, and 967 touchscreens"
# License
LICENSE = "GPL-2.0"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
# Compatibility
COMPATIBLE_MACHINE = "(imx)"
# Package name
RPROVIDES_${PN} = "kernel-module-goodix"
# Source
S = "${WORKDIR}"
SRC_URI = "file://Makefile \
file://goodix.c"
# Functions
do_install() {
bbwarn "Installing Goodix kernel module ..."
bbwarn "KERNEL_SRC = ${KERNEL_SRC}"
bbwarn "KERNEL_VERSION = ${KERNEL_VERSION}"
bbwarn "WORKDIR = ${WORKDIR}"
cd ${S}
xz goodix.ko
install --verbose -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/input/touchscreen
install --verbose -m 0644 goodix.ko.xz ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/input/touchscreen
}
# Reference included files
FILES_${PN} = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/input/touchscreen/*"
编辑
- 该错误基本上表示未提供
kernel-module-goodix-5.3.4-imx6ul+gb40ccfdb73ea。我没有那样命名我的包裹。那么它为什么要在那里寻找后缀为5.3.4-imx6ul+gb40ccfdb73ea的东西呢?
编辑(解决方案)
对于阅读本文但对接受的答案不满意的任何人。只要知道我原来的食谱有什么问题是我没有命名我的实际食谱"kernel-module-<name>.bb"。这实际上是需要的。
【问题讨论】:
-
您是否尝试过使用
RPROVIDES_${PN} +=而不是=? -
是的,不幸的是它没有帮助。
-
修补内核并在内核配置中启用它不是更容易吗?
-
@OleksandrKravchuk 也许是这样。我真的很想了解为什么这不起作用。对于它的价值,如果我只是复制编辑中显示的后缀并将其添加到
RPROVIDES,我就可以构建它。但这似乎只是在回避其他地方的错误,我想知道原因是什么。 -
@OleksandrKravchuk 另外,内核配置没有这个驱动程序(至少它在我的中不可用)。
标签: embedded-linux yocto kernel-module bitbake