全部博文(385)
分类: LINUX
2012-03-16 09:15:26
SLES 解决module: no symbol version for module_layout 方法
问题:
在SLES中/usr/src/linux-3.0.13-0.27-obj/x86_64/default/目录下 make XX.ko, 拷贝ko到相应目录,然后modprobe XX
出现:module: no symbol version for module_layout
解决方法:
两步:
1.确保/usr/src/linux-obj/x86_64/default/Modules.symvers文件是完整的,
如果以前在/usr/src/linux-3.0.13-0.27-obj/x86_64/default/目录下 make XX.ko 的话,该文件会重新生成这个模块所导出的符号。
所以要检查一个这个文件,如果很多行,那就对了。
如果很少,就说明被覆盖了,需要重新安装kernel-default-devel rpm包。
Vsles11sp1 /mnt/Work/NOVELL/Product/SLES-11-SP1 #rpm -ivh kernel-default-devel-2.6.32.12-0.7.1.x86_64.rpm --forcemake: Leaving directory `/usr/src/linux-2.6.32.12-0.7-obj/x86_64/default'
2. 编译模块的方法:
Vsles11sp1 /opt/igb #make -C /usr/src/linux-2.6.32.12-0.7-obj/x86_64/default/ M=$(pwd) modulesVsles11sp1 /opt/igb #
又一例: 在内核原目录中去编译。
xen-sles11sp2:/opt/i915 # make -C /usr/src/linux-obj/x86_64/default/ M=$(pwd) modules
make: Entering directory `/usr/src/linux-3.0.13-0.27-obj/x86_64/default'
make -C /usr/src/linux-3.0.13-0.27 O=/usr/src/linux-3.0.13-0.27-obj/x86_64/default/. modules
CC [M] /opt/i915/i915_dma.o
/opt/i915/i915_dma.c:37:45: error: ../../../platform/x86/intel_ips.h: No such file or directory
/opt/i915/i915_dma.c: In function ‘ips_ping_for_i915_load’:
/opt/i915/i915_dma.c:1888: error: ‘ips_link_to_i915_driver’ undeclared (first use in this function)
/opt/i915/i915_dma.c:1888: error: (Each undeclared identifier is reported only once
/opt/i915/i915_dma.c:1888: error: for each function it appears in.)
/opt/i915/i915_dma.c:1888: warning: type defaults to ‘int’ in declaration of ‘type name’
/opt/i915/i915_dma.c:1888: warning: cast from pointer to integer of different size
/opt/i915/i915_dma.c:1888: warning: assignment makes pointer from integer without a cast
make[3]: *** [/opt/i915/i915_dma.o] Error 1
make[2]: *** [_module_/opt/i915] Error 2
make[1]: *** [sub-make] Error 2
make: *** [all] Error 2
make: Leaving directory `/usr/src/linux-3.0.13-0.27-obj/x86_64/default'
xen-sles11sp2:/opt/i915 # cd /usr/src/linux/drivers/gpu/drm/i915/
xen-sles11sp2:/usr/src/linux/drivers/gpu/drm/i915 # ls
dvo_ch7017.c i915_drv.c i915_ioc32.c intel_bios.c intel_hdmi.c intel_ringbuffer.h
dvo_ch7xxx.c i915_drv.h i915_irq.c intel_bios.h intel_i2c.c intel_sdvo.c
dvo.h i915_gem.c i915_mem.c intel_crt.c intel_lvds.c intel_sdvo_regs.h
dvo_ivch.c i915_gem_debug.c i915_reg.h intel_display.c intel_modes.c intel_tv.c
dvo_sil164.c i915_gem_evict.c i915_suspend.c intel_dp.c intel_opregion.c Makefile
dvo_tfp410.c i915_gem_execbuffer.c i915_trace.h intel_drv.h intel_overlay.c
i915_debugfs.c i915_gem_gtt.c i915_trace_points.c intel_dvo.c intel_panel.c
i915_dma.c i915_gem_tiling.c intel_acpi.c intel_fb.c intel_ringbuffer.c
xen-sles11sp2:/usr/src/linux/drivers/gpu/drm/i915 # make -C /usr/src/linux-3.0.13-0.27-obj/x86_64/default/ M=$(pwd) modules make: Entering directory `/usr/src/linux-3.0.13-0.27-obj/x86_64/default'
make -C /usr/src/linux-3.0.13-0.27 O=/usr/src/linux-3.0.13-0.27-obj/x86_64/default/. modules
CC [M] /usr/src/linux/drivers/gpu/drm/i915/i915_drv.o
CC [M] /usr/src/linux/drivers/gpu/drm/i915/i915_dma.o
CC [M] /usr/src/linux/drivers/gpu/drm/i915/i915_irq.o
CC [M] /usr/src/linux/drivers/gpu/drm/i915/i915_mem.o
CC [M] /usr/src/linux/drivers/gpu/drm/i915/i915_debugfs.o
CC [M] /usr/src/linux/drivers/gpu/drm/i915/i915_suspend.o
CC [M] /usr/src/linux/drivers/gpu/drm/i915/i915_gem.o
CC [M] /usr/src/linux/drivers/gpu/drm/i915/i915_gem_debug.o
CC [M] /usr/src/linux/drivers/gpu/drm/i915/i915_gem_evict.o
CC [M] /usr/src/linux/drivers/gpu/drm/i915/i915_gem_execbuffer.o
CC [M] /usr/src/linux/drivers/gpu/drm/i915/i915_gem_gtt.o
CC [M] /usr/src/linux/drivers/gpu/drm/i915/i915_gem_tiling.o
CC [M] /usr/src/linux/drivers/gpu/drm/i915/i915_trace_points.o
CC [M] /usr/src/linux/drivers/gpu/drm/i915/intel_display.o
CC [M] /usr/src/linux/drivers/gpu/drm/i915/intel_crt.o
CC [M] /usr/src/linux/drivers/gpu/drm/i915/intel_lvds.o
CC [M] /usr/src/linux/drivers/gpu/drm/i915/intel_bios.o
CC [M] /usr/src/linux/drivers/gpu/drm/i915/intel_dp.o
CC [M] /usr/src/linux/drivers/gpu/drm/i915/intel_hdmi.o
CC [M] /usr/src/linux/drivers/gpu/drm/i915/intel_sdvo.o
CC [M] /usr/src/linux/drivers/gpu/drm/i915/intel_modes.o
CC [M] /usr/src/linux/drivers/gpu/drm/i915/intel_panel.o
CC [M] /usr/src/linux/drivers/gpu/drm/i915/intel_i2c.o
CC [M] /usr/src/linux/drivers/gpu/drm/i915/intel_fb.o
CC [M] /usr/src/linux/drivers/gpu/drm/i915/intel_tv.o
CC [M] /usr/src/linux/drivers/gpu/drm/i915/intel_dvo.o
CC [M] /usr/src/linux/drivers/gpu/drm/i915/intel_ringbuffer.o
CC [M] /usr/src/linux/drivers/gpu/drm/i915/intel_overlay.o
CC [M] /usr/src/linux/drivers/gpu/drm/i915/intel_opregion.o
CC [M] /usr/src/linux/drivers/gpu/drm/i915/dvo_ch7xxx.o
CC [M] /usr/src/linux/drivers/gpu/drm/i915/dvo_ch7017.o
CC [M] /usr/src/linux/drivers/gpu/drm/i915/dvo_ivch.o
CC [M] /usr/src/linux/drivers/gpu/drm/i915/dvo_tfp410.o
CC [M] /usr/src/linux/drivers/gpu/drm/i915/dvo_sil164.o
CC [M] /usr/src/linux/drivers/gpu/drm/i915/i915_ioc32.o
CC [M] /usr/src/linux/drivers/gpu/drm/i915/intel_acpi.o
LD [M] /usr/src/linux/drivers/gpu/drm/i915/i915.o
Building modules, stage 2.
MODPOST 1 modules
CC /usr/src/linux/drivers/gpu/drm/i915/i915.mod.o
LD [M] /usr/src/linux/drivers/gpu/drm/i915/i915.ko
make: Leaving directory `/usr/src/linux-3.0.13-0.27-obj/x86_64/default'
insmod 正常。