大家好  我是使用了Windriver框架开发linux ubuntu18.10上的驱动,根据例子,使用等待队列增加了 include了 <linux/wait.h> 就会有  asm/linkage.h No such file or directory错误,怎么处理呢?谢谢

解决方案 »

  1.   

    root@nea-Z370-HD3:/usr/src/WinDriver/samples/pci_diag/kp_pci# sudo make
    cc -c -O2 -D__KERNEL__ -DMODULE -Wstrict-prototypes -Wno-trigraphs             -fno-common -fno-omit-frame-pointer -pipe -O2 -Wdeclaration-after-statement -funit-at-a-time -march=k8 -mno-red-zone -mcmodel=kernel             -fno-reorder-blocks -Wno-sign-compare             -fno-asynchronous-unwind-tables -fno-strict-aliasing -fno-pie -DLINUX   -I/lib/modules/4.18.0-25-generic/build/include -I/usr/include -I/usr/src/WinDriver/include -I/usr/src/WinDriver -I/usr/src/WinDriver/redist -c -o LINUX.4.18.0-25-generic.x86_64/kp_pci.o kp_pci.c
    In file included from /lib/modules/4.18.0-25-generic/build/include/linux/kernel.h:7,
                     from /lib/modules/4.18.0-25-generic/build/include/linux/list.h:9,
                     from /lib/modules/4.18.0-25-generic/build/include/linux/wait.h:7,
                     from kp_pci.c:15:
    /lib/modules/4.18.0-25-generic/build/include/linux/linkage.h:8:10: fatal error: asm/linkage.h: No such file or directory
     #include <asm/linkage.h>
              ^~~~~~~~~~~~~~~
    compilation terminated.
    make: *** [Makefile:52: LINUX.4.18.0-25-generic.x86_64/kp_pci.o] Error 1