Linux Device Driver
解決"fatal error: asm/rwonce.h file not found"問題
參考資訊:
1. list
問題:
In file included from samples/bpf/xdp_adjust_tail_kern.c:15: In file included from ./include/linux/in.h:19: In file included from ./include/uapi/linux/in.h:24: In file included from ./include/linux/socket.h:8: In file included from ./include/linux/uio.h:8: In file included from ./include/linux/kernel.h:8: In file included from ./include/linux/linkage.h:7: In file included from ./include/linux/export.h:43: ./include/linux/compiler.h:248:10: fatal error: 'asm/rwonce.h' file not found #include <asm/rwonce.h> ^~~~~~~~~~~~~~ 1 error generated. ^Cmake[1]: *** [samples/bpf/Makefile:315: samples/bpf/xdp_adjust_tail_kern.o] Interrupt
解法:
$ vim tools/bpf/Makefile +11 CFLAGS += -Wall -O2 -I$(srctree)/usr/include