Re: [OpenWrt-Devel] Compiling custom kernel for latest trunk
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
Re: [OpenWrt-Devel] Compiling custom kernel for latest trunk
On 15.01.2013 16:41, Emmanuel Deloget wrote: 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 ? do not forget to make target/linux/{clean,compile} V=99 after you changed your kernel settings. you might leave out the cleaning if you just switched something on/off. ..ede ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Compiling custom kernel for latest trunk
Thank you both so much for help. It was quite difficult for me to find an information. I've pasted similar question on other forums and seems like people don't like to answer to 'how to questions'. Well I'd be glad to read about everything, but with OpenWRT finding some developer related information looks more like reverse engineering by studying existing rules and makefiles :) What I wanted in reality is just add addrtype match for iptables. The only possibility to enable it was only in kernel_menuconfig, but in the end it turns out that this is not kernel module, but userspace module instead. So I was really lost. But now with help from other forums I've found how to add line in include/netfilter.mk on order to be able to add addrtype match to one of the existing iptables modules. OpenWRT is not my job, its just hobby and I really like this project and I really want to participate here. I'm programmer in real life (not linux), so it's nice for me to be here, but sometimes I'm losing hope when want to find some information. Is there any source of information where I can read about those makefiles, build structure and so on ? Wifi doesn't have in-depth information. Is it only way to know about it is just study existing makefiles ? It would be super nice if someone could guide me into this nice world :) For example, I have cross compiled PIM routing daemon called pimd for openwrt, but still it is on my computer because of gap in knowledge about OpenWRT build root structure, makefiles and rules. It would be nice to add this pimd into OpenWRT. I have another question which I was unable to answer. For example, iptables-mod-extra has match type called owner. in .config file there is line like 'CONFIG_NETFILTER_XT_MATCH_OWNER=m'. So the question is: where is the rule which makes this match type to autoselect as module (m) ? This match is included with IPT-EXTRA, so not possible to select it as standalone. Somehow buildroot 'knows' that this is module and that it should be autoselected as M ? I was unable to find a script or rule which is responsible for updating .config file with this line. Now, this is good example of finding information. It's not on the wiki and not in anywhere, so how to get that kind of information ? On Tue, Jan 15, 2013 at 6:03 PM, edgar.sol...@web.de wrote: On 15.01.2013 16:41, Emmanuel Deloget wrote: 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 ? do not forget to make target/linux/{clean,compile} V=99 after you changed your kernel settings. you might leave out the cleaning if you just switched something on/off. ..ede ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel -- Darius ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] Compiling custom kernel for latest trunk
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 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel