#modinfo drivers/block/floppy.ko
filename: drivers/block/floppy.ko
alias: block-major-2-*
license: GPL
author: Alain L. Knaff
srcversion: 4FE4A1303A32321170C1A4F
depends:
vermagic: 2.6.32-358.23.2.el6.x86_64 SMP mod_unload modversions
parm: floppy:charp
parm: FLOPPY_IRQ:int
parm: FLOPPY_DMA:int
#modinfo floppy
filename: /lib/modules/2.6.32-358.23.2.el6.x86_64/kernel/drivers/block/floppy.ko
alias: block-major-2-*
license: GPL
author: Alain L. Knaff
srcversion: 4FE4A1303A32321170C1A4F
depends:
vermagic: 2.6.32-358.23.2.el6.x86_64 SMP mod_unload modversions
parm: floppy:charp
parm: FLOPPY_IRQ:int
parm: FLOPPY_DMA:int
#dmesg
[175003.432326] floppy: no symbol version for module_layout
[175222.050988] nvme: no symbol version for module_layout
仔细排查,发现编译驱动时,提示Module.symvers文件缺失。
#make SUBDIRS=drivers/block/ modules
WARNING: Symbol version dump /home/2.6.32-358.23.2.el6.x86_64/Module.symvers
is missing; modules will have no dependencies and modversions.
CC [M] drivers/block/floppy.o
CC [M] drivers/block/loop.o
CC [M] drivers/block/cciss.o
于是尝试将当前内核目录下的Module.symvers文件拷贝到目录下,重新编译驱动。
#cp /usr/src/kernels/2.6.32-358.23.2.el6.x86_64/Module.symvers .
#make SUBDIRS=drivers/block/ modules
CC [M] drivers/block/floppy.o
CC [M] drivers/block/loop.o
CC [M] drivers/block/cciss.o
CC [M] drivers/block/pktcdvd.o
CC [M] drivers/block/nvme-core.o
CC [M] drivers/block/nvme-scsi.o
LD [M] drivers/block/nvme.o
CC [M] drivers/block/osdblk.o
CC [M] drivers/block/cryptoloop.o
CC [M] drivers/block/virtio_blk.o
CC [M] drivers/block/sx8.o
CC [M] drivers/block/xen-blkfront.o
CC [M] drivers/block/mtip32xx/mtip32xx.o
Building modules, stage 2.
MODPOST 11 modules
驱动重新编译后,再次加载,问题解决。
Pages: 1 2
你现在解决了吗?怎么解决的啊
主要是我在我的内核里面没有找到这个文件Module.symvers,希望得到您的回复,谢谢
安装kernel-devel.x86_64,在/usr/src/kernels//目录下就会有这个文件。