for post #2:
the kernel options for the modules are simply not selected in the default kernel config file in target/linux/brcm47xx-2.6/config/default. to fix this run 'make kernel_menuconfig' select the options and you are done. kernel_menuconfig changes the kernel .config file and copies the changes back to target/linux/brcm47xx-2.6/config/default so that kernel changes are persistent over a 'make clean'.
1. run 'make kernel_menuconfig' and select:
-> Device Drivers
-> Multi-device support (RAID and LVM) -> set to y (CONFIG_MD)
-> Device mapper support -> set to m (result is: CONFIG_BLK_DEV_DM, dm-mod.ko)
-> Crypt target support -> set to m (result is: CONFIG_DM_CRYPT, dm-crypt.ko)
2. fix your entries in package/kernel/modules/others.mk like the one below. the layout for the menus is still not perfect, but your modules are built and packaged. you can also add AUTOLOAD.
define KernelPackage/dm-mod
TITLE:=dm-mod
DESCRIPTION:=A description
SUBMENU:=My Modules
KCONFIG:=$(CONFIG_BLK_DEV_DM)
endef
define KernelPackage/dm-mod/2.6
FILES:=$(LINUX_DIR)/drivers/md/dm-mod.$(LINUX_KMOD_SUFFIX)
endef
$(eval $(call KernelPackage,dm-mod))
define KernelPackage/dm-crypt
TITLE:=dm-crypt
DESCRIPTION:=A description
SUBMENU:=My Modules
KCONFIG:=$(CONFIG_DM_CRYPT)
endef
define KernelPackage/dm-crypt/2.6
FILES:=$(LINUX_DIR)/drivers/md/dm-crypt.$(LINUX_KMOD_SUFFIX)
endef
$(eval $(call KernelPackage,dm-crypt))
3. rebuild. remove the tmp/ and bin/ directory and run menuconfig (save and exit) to rebuild the dependencies.
rm -rf tmp/ bin/
make menuconfig
make target/linux-clean world
4. check the result
ubuntu@DevEnv:~/trunk$ find build_mipsel/linux-2.6-brcm47xx/ -name dm-*.ko
build_mipsel/linux-2.6-brcm47xx/linux-2.6.21.1/drivers/md/dm-mod.ko
build_mipsel/linux-2.6-brcm47xx/linux-2.6.21.1/drivers/md/dm-crypt.ko
build_mipsel/linux-2.6-brcm47xx/packages/ipkg/kmod-dm-mod/lib/modules/2.6.21.1/dm-mod.ko
build_mipsel/linux-2.6-brcm47xx/packages/ipkg/kmod-dm-crypt/lib/modules/2.6.21.1/dm-crypt.ko
ubuntu@DevEnv:~/trunk$
ubuntu@DevEnv:~/trunk$ ll -h bin/packages/kmod-dm*
-rw-r--r-- 1 ubuntu ubuntu 9,0K 2007-06-10 21:49 bin/packages/kmod-dm-crypt_2.6.21.1-brcm47xx-1_mipsel.ipk
-rw-r--r-- 1 ubuntu ubuntu 32K 2007-06-10 21:49 bin/packages/kmod-dm-mod_2.6.21.1-brcm47xx-1_mipsel.ipk
ubuntu@DevEnv:~/trunk$
to create a patch do:
svn diff target/linux/brcm47xx-2.6/config/default package/kernel/modules/others.mk > add-dm.patch
(Last edited by forum2006 on 10 Jun 2007, 22:21)