我正在尝试构建模块。
但是这里有一些问题。
错误:内核配置无效。缺少 include/generated/autoconf.h 或 include/config/auto.conf。在内核 src 上运行“make oldconfig && make prepare”来修复它。
警告:符号版本转储 ./Module.symvers 丢失;模块将没有依赖项和 modversions。`
这是我的 makefile
ifeq ($(KERNELRELEASE),)
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
modules:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
modules_install:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install
clean:
rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions
.PHONY: modules modules_install clean
else
# called from kernel build system: just declare what our modules are
obj-m := hello.o hellop.o seq.o jit.o jiq.o sleepy.o complete.o \
silly.o …Run Code Online (Sandbox Code Playgroud)