i have just compiled a custom kernel without wireless module and install it , when i use new kernel , i found the iwm module automatically loaded. and i check the /boot/kernel directory , there is if_iwm.ko file , what's the wrong? why the if_iwm.ko put the /boot/kernel ? there is not any wireless module in my kernel configuration file. i delete the wireless module from /boot/kernel/ ,then i could load it by hand actually the module should be installed into /boot/modules directory when i did not include the wireless module in kernel configuration file.
Look at hier(7) manual: kernel/ pure kernel executable (the operating system loaded into memory at boot time) and kernel modules modules/ third-party loadable kernel modules, such as the ones installed from ports(7) If you don't want kernel modules to be loaded automatically, look at the rc.conf(5) manual and devmatch_enable option. If you don't want to build kernel modules with your kernel, look at the make.conf(5) manual and MODULES_OVERRIDE option.