编译内核模块出现 include/linux/autoconf.h or include/config/auto.conf are missing.解决方法

宿主机:Ubuntu14.04 64位


编译arm内核模块出现如下错误

lxiang@lxiang-Aspire-5750G:~/workplace/arm_device_driver/code_enjoy/2-4-2$ make

make -C ../2-3-1/GQ2440/linux-2.6.32.2 M=/home/lxiang/workplace/arm_device_driver/code_enjoy/2-4-2 modules ARCH=arm CROSS_COMPILE=arm-linux-
make[1]: Entering directory `/home/lxiang/workplace/arm_device_driver/code_enjoy/2-3-1/GQ2440/linux-2.6.32.2'

  ERROR: Kernel configuration is invalid.
         include/linux/autoconf.h or include/config/auto.conf are missing.
         Run 'make oldconfig && make prepare' on kernel src to fix it.


  WARNING: Symbol version dump /home/lxiang/workplace/arm_device_driver/code_enjoy/2-3-1/GQ2440/linux-2.6.32.2/Module.symvers
           is missing; modules will have no dependencies and modversions.

  Building modules, stage 2.
/home/lxiang/workplace/arm_device_driver/code_enjoy/2-3-1/GQ2440/linux-2.6.32.2/scripts/Makefile.modpost:42: include/config/auto.conf: No such file or directory
make[2]: *** No rule to make target `include/config/auto.conf'.  Stop.
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/home/lxiang/workplace/arm_device_driver/code_enjoy/2-3-1/GQ2440/linux-2.6.32.2'
make: *** [all] Error 2

经过上网查找之后发现说是内核没有编译。

Makefile文件

ifneq ($(KERNELRELEASE),)

obj-m := mylist.o

else
	
KDIR := ../2-3-1/GQ2440/linux-2.6.32.2
all:
	make -C $(KDIR) M=$(PWD) modules ARCH=arm CROSS_COMPILE=arm-linux-
clean:
	rm -f *.ko *.o *.mod.o *.mod.c *.symvers  modul*

endif


你可能感兴趣的:(mini2440相关)