포팅하려고 하는데https://github.com/kenballus/fl2000_drm_519, Linux 5.19용으로 설계되었으며 Linux 6.2.11에서 작동하지만 아래 첨부된 패치를 적용한 후 이 오류가 발생하며 해결 방법을 모르겠습니다.
$ 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
다른 가져오기 오류를 해결하기 위해 이 방법으로 패치했습니다 .
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"
답변1
오류에 따르면 해당 네임스페이스를 가져와야 합니다.
적절한 패치는 다음과 같습니다:
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);