LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   building external module, howto override CONFIG_ option? (https://www.linuxquestions.org/questions/linux-kernel-70/building-external-module-howto-override-config_-option-912876/)

Meson 11-10-2011 01:44 PM

building external module, howto override CONFIG_ option?
 
I'm patching and rebuilding psmouse.ko. The patch contains a config option and I'd like to be able to easily set it.

My make call:
Code:

KDIR=/lib/modules/$(uname -r)/build
make -C $KDIR M="$PWD/drivers/input/mouse" psmouse.ko

I've tried to just set the the option on the command line like
Code:

make CONFIG_OPTION=y ...
I've also tried copying the config file over
Code:

cp $KDIR/.config config
echo CONFIG_OPTION=y >> config
export KCONFIG_CONFIG=$PWD/config
make ...

So far the only thing that works, which feels messy is to rsync the kernel headers from KDIR on top of the source I'm building.

Any ideas?

jthill 11-12-2011 02:34 PM

Why not just make menuconfig as needed and make drivers/input/mouse/psmouse.ko? If your config option isn't in drivers/input/mouse/Kconfig just pop that file open and put it in.

Meson 11-12-2011 02:44 PM

This is for an automated PKGBUILD for Arch. What you're suggesting is similar to my attempt to use KCONFIG_CONFIG, but that variable doesn't seem to do anything for making a module. For now (and probably permanently) I've just removed the CONFIG option from the patch.

For reference: https://github.com/mmonaco/synaptics-led


All times are GMT -5. The time now is 02:04 PM.