模块make clean方法后第二次编译提示找不到文件了.
发表于 : 2009-03-11 10:41
我有个模块第一次编译成功了,并且加载也没错.不过insmod后提示是[permanent]。重启后发现他不在modules列表中,就想重新编译下。
第一次:
在编译的时候用的命令是:make -C /lib/modules/`uname -r`/build M=`pwd` modules
安装模块:make -C /lib/modules/`uname -r`/build M=`pwd` modules_install
加载模块时用:modprobe redirfs。但是这个没成功,用insmod搞定了。
然后模仿网上有个帖子clean了一下:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
这个时候发现目录下的编译模块的文件并没有删除(或许删除了个别文件我没发现,但是大部分都还在)。删掉这个目录,又拿源文件就是没有编译过的,重新编译。但是却提示少了文件:
boluor@boluor-laptop:~/SoftWares/redirfs-0.6$ make -C /lib/modules/`uname -r`/build M=`pwd` modules
make:进入目录'/usr/src/linux-headers-2.6.27-11-generic'
CC [M] /home/boluor/SoftWares/redirfs-0.6/rfs_path.o
In file included from include/linux/gfp.h:4,
from include/linux/slab.h:12,
from include/linux/percpu.h:5,
from include/linux/rcupdate.h:39,
from include/linux/sem.h:81,
from include/linux/sched.h:69,
from /home/boluor/SoftWares/redirfs-0.6/rfs.h:29,
from /home/boluor/SoftWares/redirfs-0.6/rfs_path.c:24:
include/linux/mmzone.h:18:26: error: linux/bounds.h: 没有该文件或目录
include/linux/mmzone.h:197:5: warning: "MAX_NR_ZONES" is not defined
In file included from include/linux/gfp.h:4,
from include/linux/slab.h:12,
from include/linux/percpu.h:5,
from include/linux/rcupdate.h:39,
from include/linux/sem.h:81,
from include/linux/sched.h:69,
from /home/boluor/SoftWares/redirfs-0.6/rfs.h:29,
from /home/boluor/SoftWares/redirfs-0.6/rfs_path.c:24:
include/linux/mmzone.h:218: 错误: ‘MAX_NR_ZONES’未声明(不在函数内)
make[1]: *** [/home/boluor/SoftWares/redirfs-0.6/rfs_path.o] 错误 1
make: *** [_module_/home/boluor/SoftWares/redirfs-0.6] 错误 2
---------------------------------------
谁能告诉我是什么原因阿?难道那个clean方法把bounds.h给删掉了?
第一次:
在编译的时候用的命令是:make -C /lib/modules/`uname -r`/build M=`pwd` modules
安装模块:make -C /lib/modules/`uname -r`/build M=`pwd` modules_install
加载模块时用:modprobe redirfs。但是这个没成功,用insmod搞定了。
然后模仿网上有个帖子clean了一下:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
这个时候发现目录下的编译模块的文件并没有删除(或许删除了个别文件我没发现,但是大部分都还在)。删掉这个目录,又拿源文件就是没有编译过的,重新编译。但是却提示少了文件:
boluor@boluor-laptop:~/SoftWares/redirfs-0.6$ make -C /lib/modules/`uname -r`/build M=`pwd` modules
make:进入目录'/usr/src/linux-headers-2.6.27-11-generic'
CC [M] /home/boluor/SoftWares/redirfs-0.6/rfs_path.o
In file included from include/linux/gfp.h:4,
from include/linux/slab.h:12,
from include/linux/percpu.h:5,
from include/linux/rcupdate.h:39,
from include/linux/sem.h:81,
from include/linux/sched.h:69,
from /home/boluor/SoftWares/redirfs-0.6/rfs.h:29,
from /home/boluor/SoftWares/redirfs-0.6/rfs_path.c:24:
include/linux/mmzone.h:18:26: error: linux/bounds.h: 没有该文件或目录
include/linux/mmzone.h:197:5: warning: "MAX_NR_ZONES" is not defined
In file included from include/linux/gfp.h:4,
from include/linux/slab.h:12,
from include/linux/percpu.h:5,
from include/linux/rcupdate.h:39,
from include/linux/sem.h:81,
from include/linux/sched.h:69,
from /home/boluor/SoftWares/redirfs-0.6/rfs.h:29,
from /home/boluor/SoftWares/redirfs-0.6/rfs_path.c:24:
include/linux/mmzone.h:218: 错误: ‘MAX_NR_ZONES’未声明(不在函数内)
make[1]: *** [/home/boluor/SoftWares/redirfs-0.6/rfs_path.o] 错误 1
make: *** [_module_/home/boluor/SoftWares/redirfs-0.6] 错误 2
---------------------------------------
谁能告诉我是什么原因阿?难道那个clean方法把bounds.h给删掉了?