完整错误信息来自make
:
In file included from /home/username/linux-5.0.0/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h:496,
from /home/username/linux-5.0.0/drivers/gpu/drm/amd/amdgpu/amdgpu_trace_points.c:29:
./include/trace/define_trace.h:89:42: fatal error: ../../drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h: No such file or directory
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
^
compilation terminated.
(替换username
为上面的我的主文件夹名称)
我一直在努力追随这修改、构建并将amdgpu
模块插入到已构建的内核中,而不必像往常一样构建整个内核,因为这个错误。
make -C /lib/modules/$(uname -r)/build M=$(pwd) modules
当我从目录运行时就会发生这种情况~/linux-4.18.0/drivers/gpu/drm/amd/amdgpu/
。
答案1
编辑amdgpu_trace.h
文件,并更改行:
#define TRACE_INCLUDE_PATH ../../drivers/gpu/drm/amd/amdgpu
到
#define TRACE_INCLUDE_PATH ../../../../../drivers/gpu/drm/amd/amdgpu