0

我一直在尝试交叉编译可加载的内核模块,并且收到警告消息,我想获得帮助。

以下是警告信息

make[1]: Entering directory `/home/userid/rowboat-android/kernel'
   Building modules, stage 2.
   MODPOST 1 modules
WARNING: "omap_device_build" [/home/userid/myfiles/lcdc_load_device.ko] undefined!
WARNING: "omap_hwmod_lookup" [/home/userid/myfiles/lcdc_load_device.ko] undefined!
make[1]: Leaving directory `/home/userid/rowboat-android/kernel'

下面是Makefile

obj-m :=lcdc_load_device.o
lcdc_load_device-m := ../rowboat-android/kernel/arch/arm/plat-omap/omap_device.o
lcdc_load_device-m += ../rowboat-android/kernel/arch/arm/mach-omap2/omap_hwmod.o

ccflags-m := -I$(src)/../rowboat-android/kernel/arch/arm/plat-omap/include/plat/

KDIR := /home/userid/rowboat-android/kernel/
PWD := $(shell pwd)

default:
   $(MAKE) ARCH=arm CROSS_COMPILE=/home/userid/rowboat-android/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi- -C $(KDIR) SUBDIRS=$(PWD) modules

clean:
   $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) clean

我怀疑makefile正在寻找“omap_device_build”“omap_hwmod_lookup”函数的头文件。

感谢您的帮助,并提前感谢您。

4

1 回答 1

0

感谢mbratchartless noise的评论

要解决WARNINGS问题,需要导出符号。对于上述问题的地方

EXPORT_SYMBOL(omap_device_build) in omap_device.c 
EXPORT_SYMBOL(omap_hwmod_lookup) in omap_hwmod.c

并编译内核。然后针对已编译的内核编译可加载内核模块。执行以下操作以验证符号是否已导出

grep omap_device_build /proc/kallsyms
or
grep omap_device_build Module.symvers

有关更多详细信息,请参考以下链接

欢迎评论

谢谢

于 2013-11-05T16:54:39.510 回答