首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Modpost:“模块…使用名称空间…中的符号…”将FL2000_DRM驱动程序移植到更新版本时出错

Modpost:“模块…使用名称空间…中的符号…”将FL2000_DRM驱动程序移植到更新版本时出错
EN

Unix & Linux用户
提问于 2023-05-14 18:20:05
回答 1查看 37关注 0票数 0

我正在尝试将为Linux5.19设计的https://github.com/kenballus/fl2000_drm_五百一十九移植到Linux6.2.11,但是在应用了下面所附的修补程序之后,我得到了这个错误,我不知道如何修复它:

代码语言:javascript
复制
$ make
make CHECK="/usr/bin/sparse" -C /lib/modules/6.2.11-300.fc38.x86_64/build M=/home/guillem/Downloads/fl2000_drm_519 modules
make[1]: Entering directory '/usr/src/kernels/6.2.11-300.fc38.x86_64'
  MODPOST /home/guillem/Downloads/fl2000_drm_519/Module.symvers
ERROR: modpost: module fl2000 uses symbol dma_buf_end_cpu_access from namespace DMA_BUF, but does not import it.
ERROR: modpost: module fl2000 uses symbol dma_buf_begin_cpu_access from namespace DMA_BUF, but does not import it.
make[2]: *** [scripts/Makefile.modpost:138: /home/guillem/Downloads/fl2000_drm_519/Module.symvers] Error 1
make[1]: *** [Makefile:1977: modpost] Error 2
make[1]: Leaving directory '/usr/src/kernels/6.2.11-300.fc38.x86_64'
make: *** [Makefile:21: modules] Error 2

我用这种方式修补了fl2000.h,以解决其他导入错误:

代码语言:javascript
复制
diff --git a/fl2000.h b/fl2000.h
index 718e247..c4a6910 100644
--- a/fl2000.h
+++ b/fl2000.h
@@ -23,6 +23,7 @@
 #include <linux/dma-mapping.h>
 #include <linux/time.h>
 #include <linux/device.h>
+#include <linux/dma-buf.h>
 #include <drm/drm_gem.h>
 #include <drm/drm_prime.h>
 #include <drm/drm_vblank.h>
@@ -37,6 +38,8 @@
 #include <drm/drm_probe_helper.h>
 #include <drm/drm_damage_helper.h>
 #include <drm/drm_gem_atomic_helper.h>
+#include <drm/drm_framebuffer.h>
+#include <drm/drm_fbdev_generic.h>

#include "fl2000_registers.h"
EN

回答 1

Unix & Linux用户

发布于 2023-05-14 19:06:27

正如错误提示的那样,您需要导入该命名空间。

适当的修补程序是:

代码语言:javascript
复制
diff --git a/fl2000_drv.c b/fl2000_drv.c
index 31b7ef4..218b87a 100644
--- a/fl2000_drv.c
+++ b/fl2000_drv.c
@@ -195,3 +195,4 @@ module_usb_driver(fl2000_driver);
 MODULE_AUTHOR("Artem Mygaiev");
 MODULE_DESCRIPTION("FL2000 USB display driver");
 MODULE_LICENSE("GPL v2");
+MODULE_IMPORT_NS(DMA_BUF);
票数 2
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/745872

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档