kernel config
Hi,
How can I add a new module or submenu to kernel config menu? Do I need to modify Makefile or Config.in? Thank you. Jim |
what exactly do you mean by adding?
have you created a new module or do you want to compile a standard kernel module that was disabled in your old kernel? |
I ran
make cloneconfig make oldconfig to generate a new .config file. Then I noticed this in the Makefile Code:
# Read in dependencies to all Kconfig* files, make sure to run /usr/src/linux-2.6.16.13-4/Documentation/kbuild/modules.txt /usr/src/linux-2.6.16.13-4/Documentation/HOWTO /usr/src/linux-2.6.16.13-4/Documentation/kernel-docs.txt After running "make pdfdocs" /usr/src/linux-2.6.16.13-4/Documentation/DocBook/kernel-hacking.pdf Be sure to work in a copy of the kernel source before you do your hacking. However, why not look at how ndiswrapper or nvidia produces externel loadable modules in the /lib/modules/ tree if your kernel module could be a loadable module using the standard kernel. I hope I made at least some sense. |
I have a new device driver module and I want to add it as SUPPORT_MY_NEW_DEVICE_DRIVER to the kernel config menu. By running make menuconfig, it displays existing modules and submenus. I can select or remove modules by keys, but how can I add a new module SUPPORT_MY_NEW_DEVICE_DRIVER to the menu?
Thanks. Jim |
Running "make oldconfig" will prompt for new items in the kernel. Then subsequently when you run "make xconfig" those items will show up.
What you need to do to get these items to show up when you run "make oldconfig" are explained on page 23 of the kernel_hacking.pdf document I mentioned in my previous post. For most device modules, I still think that an external build process, such as nvidia and ndiswrapper uses to build a kernel module without the need to recompile the kernel is a better way to go. What kind of device is this for? |
After looking at kernel structure, I guess that kernel 2.6 is now using Kconfig (equivalent to Config.in in kernel 2.4, right??) for module / menu configuration. New modules should be added to Kconfig, is it correct?
Thank you. Jim |
All times are GMT -5. The time now is 02:52 PM. |