ifneq ($(KERNELRELEASE),)
EXTRA_CFLAGS += -DDEBUG
else
PWD := $(shell pwd)
KVER := $(shell uname -r)
KDIR := /lib/modules/$(KVER)/build
all:
..........
..........
..........
.........
EXTRA_CFLAGS += -DDEBUG
else
PWD := $(shell pwd)
KVER := $(shell uname -r)
KDIR := /lib/modules/$(KVER)/build
all:
$(MAKE) -C $(KDIR) M=$(PWD) modules
clean:
rm -rf *.o *.mod.c *.mod.o *.ko *.symvers *.order *.a
endif
modify kernel module make file in source code directory.
and execute make in source code directory.
need to copy *.ko to directory
/lib/modules/$(KVER)/kernel/***
and restart system.