What is the DEPENDS flow at kernel module part?

Hi Masters,

What I face is kernel module is missing dependencies for the following libraries. I would like to figure out the depends flow. Please give me some tip.

On my development, for example, I have a wifi driver, let's call it as cypress, which depends on CONFIG_MMC, CONFIG_CFG80211 and CONFIG_RFKILL at kernel part.
So, I enable those options as module and anything is good when try to build it.
At openwrt part, I enable kmod-mmc, kmod-cfg80211 and kmod-rfkill.

Question 1: When I enable kmod-xxx at openwrt, does it mean openwrt will help me copy .ko to rootfs?
Question 2: If we have new kernel module driver, we should add it into modules.mk and enable, openwrt will help me to copy .ko to rootfs?
Question 3: When I enable kmod-rfkill at openwrt and enable CONFIG_RFKILL at kernel, sill have missing rfkill.ko issue, what should I do?
Question 4: Why xt_xxx.ko will be copy to build_dir? Where I can set the rule for my driver?

Please help. Thanks.

Just to cover the basics:

In make menuconfig, {*} will set it to ON, and bake it into the final image enabled, where-as {m} will build it as a Module and allow it to be loaded, but not active by default. AFAIK, Kernel configurations in menuconfig will override setting it in kernel_menuconfig, so enabling it in menuconfig will cover both.

That being said, missing dependencies mean, well.. missing deps.. When you set it to {m}, what does it say you are missing? Did you try and setting those missing deps to {m} as well?

Hi Grommish,

At openwrt part, I enable kmod-rfkill as {*}. At kernel part, I enable rfkill as {M}.
When I try to build cypress driver, still say missing rfkill.ko dependency.
Openwrt makes me confuse. Please help. Thanks.