The problem is:
I just write a simple char dev module. call it mod1. I put the source file mod1.c in the $(LINUX_DIR)/drivers/char/ directory. But when I tried to build the image, the build system complaint:
ERROR: module '/home/zhbn/openwrt/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7620/linux-3.18.45/drivers/char/mod1.ko' is missing.
what should i do to include my own modules in the build
What I tried was:
add these lines in package/kernel/linux/modules/other.mk:
916 define KernelPackage/mod1
917 SUBMENU:=$(OTHER_MENU)
918 TITLE:=Practice module of char device driver
919 KCONFIG:= \
920 CONFIG_MOD1=y
921 FILES:=$(LINUX_DIR)/drivers/char/mod1.ko
922 endef
and these in build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7620/linux-3.18.45/drivers/char/Makefile
5 obj-$(CONFIG_MOD1) += mod1.o
and something into build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7620/linux-3.18.45/drivers/char/Kconfig
9 config MOD1
10 bool "char device driver practice"
11 default n
12 help
13 This is just a practice. don't select this