Pergunta

I have been trying to cross compile a loadable kernel module and I have been getting warning message that I would like to get help.

Below is the warning message

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'

Below is the 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

I am suspecting that the makefile is finding the header file for "omap_device_build" and "omap_hwmod_lookup" functions.

Appreciate your help, and thank you advance.

Foi útil?

Solução

Thank you to mbratch and artless noise for their comments

To address the WARNINGS, the symbols need to be exported. For the above question place

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

and compile the kernel. Then compile the loadable kernel module against the compiled kernel. Perform the following to verify if the symbols have been exported

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

For more details reference the following links

Comments are welcome

Thank you

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top