编译驱动.ko模块时候报如下错误:
warning: "mxs_spi_setup" [/mnt/hgfs/share/work/lcmxo2-2000hc/cpld_lcmxo2-2000hc.ko] undefined!
warning: "mxs_spi_transfer" [/mnt/hgfs/share/work/lcmxo2-2000hc/cpld_lcmxo2-2000hc.ko] undefined!
cc /mnt/hgfs/share/work/lcmxo2-2000hc/cpld_lcmxo2-2000hc.mod.o
ld [m] /mnt/hgfs/share/work/lcmxo2-2000hc/cpld_lcmxo2-2000hc.ko
make[2]: warning: clock skew detected. your build may be incomplete.
make[1]: leaving directory `/home/666/ltib/rpm/build/linux-2.6.35.3'
解决办法:
出现这种情况是"mxs_spi_setup"和""mxs_spi_transfer"函数对应的符号没有export_symbol或者没有在驱动模块源码中添加export_symbol_gpl()导致的。
在 "mxs_spi_setup"和"mxs_spi_transfer"函数所在文件中添加export_symbol(mxs_spi_setup);和export_symbol(mxs_spi_transfer);
阅读(9398) | 评论(1) | 转发(0) |