Sorry for being imprecise, I'm in firefighting mode right now.
My post above is showing the complexity of stuff I had to review to discover this feature. Build process should have informed me or die instead of doing silently something inconsequent. Short point summary on image populating process in case somebody stumbles upon this like I did:
kernel buit-in drivers marked y in menuconfig/buildroot packages are always in image (as kernel is)
loadable kernel modules marked m in menuconfig/buildroot packages are being installed in openwrt/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/root-ramips and are available after build as ipkg packages, but are not being placed in build directory (openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/root-ramips) which is data source for building image
kernel module names to be transferred to build directory from staging directory must be within openwrt/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/pkginfo/linux.default.install file
linux.default.install is being populated by openwrt/include/package-ipkg.mk makefile
following patch for package-ipkg.mk causes LKM's to be copied into build_dir:
From 8f2f0df1499f3a91e97ca15c0ae77163ad963e6a Mon Sep 17 00:00:00 2001
From: egal <egal@egal.egal>
Date: Sun, 4 Dec 2016 13:21:54 +0100
Subject: [PATCH 3/3] Bugfix LKM installing into rootfs in build_dir. Build_dir is source for image rootfs.
---
include/package-ipkg.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/package-ipkg.mk b/include/package-ipkg.mk
index eb4c874..b7ee957 100644
--- a/include/package-ipkg.mk
+++ b/include/package-ipkg.mk
@@ -102,7 +102,7 @@ ifeq ($(DUMP),)
compile: $(PKG_INFO_DIR)/$(1).version
endif
- ifeq ($(CONFIG_PACKAGE_$(1)),y)
+ ifeq ($(CONFIG_PACKAGE_$(1)),$(filter $(CONFIG_PACKAGE_$(1)),y m))
.PHONY: $(PKG_INSTALL_STAMP).$(1)
compile: $(PKG_INSTALL_STAMP).$(1)
$(PKG_INSTALL_STAMP).$(1):
--
1.9.1
Regards