$ make make -C /lib/modules/2.6.18-1.2798a_FC6/build SUBDIRS=/home/njc/stuff/linux-labjack/driver/linux-2.6 modules
make[1]: Entering directory `/usr/src/redhat/BUILD/kernel-2.6.181.2798a_FC6' CC [M] /home/njc/stuff/linux-labjack/driver/linux-2.6/labjack.o /home/njc/stuff/linux-labjack/driver/linux-2.6/labjack.c:43:26: error: linux/config.h: No such file or directory
make[2]: *** [/home/njc/stuff/linux-labjack/driver/linux-2.6/labjack.o]
Error 1 make[1]: *** [_module_/home/njc/stuff/linux-labjack/driver/linux-2.6]
Error 2 make[1]: Leaving directory `/usr/src/redhat/BUILD/kernel-2.6.181.2798a_FC6'
make: ***[default] Error 2 A solution, which I based from a discussion in this blog
http://www.phoronix.com/redblog/?p=blog&;i=NTUwMA, would be to copy a config.h header file to your /lib/modules/KERNEL-VERSION/build/include/linux directory.
If you have a previous kernel build on your computer you can copy the file from your /lib/modules/OLD-KERNEL-VERSION/build/include/linux directory. Alternatively you can just copy the code below into a self made config.h file
CODE
#ifndef _LINUX_CONFIG_H
#define _LINUX_CONFIG_H
#include #endif
转自:嵌入式Android_Linux开发
本帖最后由 paulhyde 于 2014-9-15 08:55 编辑