当前位置: 首页 > 工具软件 > ko > 使用案例 >

WARNING: "***" [***.ko] undefined!

秦伯寅
2023-12-01

来自:http://blog.chinaunix.net/uid-27041925-id-3627176.html

编译驱动.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);

 类似资料: