Le 12/01/2013 16:08, darius a écrit :
> Hello,
>
> Simple question for those who know. I do 'make kernel_menuconfig' then select 
> some needed features in kernel and then do 'make -j3' in topdir. After image 
> is done, I install it on the router, but my kernel features are still not 
> available. So I suppose I've done something wrong with kernel compilation. 
> Could someone guide my about compiling custom kernel ?
>
> -- 
> Darius

Hello,

Features selected with '*' in make kernel_menuconfig are statically linked
to the kernel, so they should be available in your image.

Features selected with 'M' in make kernel_menuconfig are compiled as
modules, and those modules are NOT copied into the modules package unless
the same module is selected in make menuconfig. If you miss a specific
module, you can change one of the file in openwrt/package/kernel/modules/
to include the missing module (using the other lines as samples) and
propose the patch to the mailing list. This is just a matter of adding:

===
define KernelPackage/the-module-I-want-to-add
  SUBMENU:=$(A_MENU_VARIABLE)
  TITLE:=The module description
  KCONFIG:=CONFIG_MODULE_SELECTION_SYMBOL
  FILES:=$(LINUX_DIR)/path.to/module.ko
  AUTOLOAD:=$(call AutoLoad,the_module_order,module)
endef

define KernelPackage/the-module-I-want-to-add/description
  Description
endef

$(eval $(call KernelPackage,the-module-I-want-to-add))
===

Available menu variables are defined in the various *.mk files in the
openwrt/package/kernel/modules/ directory. The module order is an integer
(from 00 to 99) which will be used to create the script that will be used
to load the module. Since OpenWRT does not use any module dependency
management tool, you have to handle this by yourself, meaning that you
must make sure that you module

* is insmoded after the module it depends on.
* is insmoded before the modules that depends on it.

Once you added the correct lines, you can do another "make menuconfig" -
and your module will show up.

Best regards,

-- Emmanuel Deloget

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to