amdgpu_trace.h:尝试构建 amdgpu 时没有此文件或目录

amdgpu_trace.h:尝试构建 amdgpu 时没有此文件或目录

完整错误信息来自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

相关内容