This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

dm368 appro方案 编译驱动失败

报错内容:

drivers/char/irqk.o: In function `init_module':
irqk.c:(.init.text+0x0): multiple definition of `init_module'
drivers/char/edmak.o:edmak.c:(.init.text+0x0): first defined here
drivers/char/irqk.o: In function `cleanup_module':
irqk.c:(.exit.text+0x0): multiple definition of `cleanup_module'
drivers/char/edmak.o:edmak.c:(.exit.text+0x0): first defined here
drivers/char/dm365mmap.o: In function `init_module':
dm365mmap.c:(.init.text+0x0): multiple definition of `init_module'
drivers/char/edmak.o:edmak.c:(.init.text+0x0): first defined here
drivers/char/dm365mmap.o: In function `cleanup_module':
dm365mmap.c:(.exit.text+0x0): multiple definition of `cleanup_module'
drivers/char/edmak.o:edmak.c:(.exit.text+0x0): first defined here
drivers/char/cmemk.o: In function `init_module':
cmemk.c:(.init.text+0x0): multiple definition of `init_module'
drivers/char/edmak.o:edmak.c:(.init.text+0x0): first defined here
drivers/char/cmemk.o: In function `cleanup_module':
cmemk.c:(.exit.text+0x0): multiple definition of `cleanup_module'
drivers/char/edmak.o:edmak.c:(.exit.text+0x0): first defined here
make[6]: *** [drivers/char/built-in.o] Error 1

Makefile部分配置,直接编译到内核:

obj-y += edmak.o
obj-y += irqk.o
obj-y += dm365mmap.o
obj-y += cmemk.o

麻烦各位帮忙看看,thx