ubuntu 版本:18.04
make直接编译报错:
make[1]: Entering directory '/usr/src/linux-headers-5.4.0-150-generic'
make[2]: *** No rule to make target 'arch/x86/tools/relocs_32.c', needed by 'arch/x86/tools/relocs_32.o'. Stop.
arch/x86/Makefile:236: recipe for target 'archscripts' failed
make[1]: *** [archscripts] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-150-generic'
Makefile:6: recipe for target 'default' failed
make: *** [default] Error 2
解决方法:
将makefile文件里SUBDIRS= $(PWD) 修改为 M=$(shell pwd)
编译时报错:
/sunxi-livesuite/awusb/awusb.c:376:8: error: implicit declaration of function ‘signal_pending’; did you mean ‘timer_pending’? [-Werror=implicit-function-declaration]
if (signal_pending(current)) {
^~~~~~~~~~~~~~
timer_pending
cc1: some warnings being treated as errors
scripts/Makefile.build:270: recipe for target '/home/wang/Downloads/sunxi-livesuite/awusb/awusb.o' failed
解决方法:
在awusb.c里添加 #include <linux/sched/signal.h>
modeprobe时报错
modprobe awusb
modprobe: FATAL: Module awusb not found in directory /lib/modules/5.4.0-150-generic
解决方法:
在/lib/modules/5.4.0-150-generic目录下执行sudo depmod