Unknown symbol camera_common_parse_ports


I built a module based on kernel_source/drivers/media/i2c/ov5693.c but when I try to insert it into the TX1 I get unknown symbol errors from camera_common. How do I get those symbols?

Unknown symbol camera_common_parse_ports (err 0)
Unknown symbol camera_common_parse_clocks (err 0)



i did try module build ov5693.c but fail dependency

Right, i’m including that in the module. But that file doesn’t seem to export its own symbols. Not sure how to get around it.

Did you build it as loader module by modify the Makefile to obj-m ?
Please reference to https://www.kernel.org/doc/Documentation/kbuild/makefiles.txt

— 3.3 Loadable module goals - obj-m

$(obj-m) specifies object files which are built as loadable
kernel modules.

A module may be built from one source file or several source
files. In the case of one source file, the kbuild makefile
simply adds the file to $(obj-m).

	obj-$(CONFIG_ISDN_PPP_BSDCOMP) += isdn_bsdcomp.o

Note: In this example $(CONFIG_ISDN_PPP_BSDCOMP) evaluates to 'm'

If a kernel module is built from several source files, you specify
that you want to build a module in the same way as above; however,
kbuild needs to know which object files you want to build your
module from, so you have to tell it by setting a $(<module_name>-y)

	obj-$(CONFIG_ISDN_I4L) += isdn.o
	isdn-y := isdn_net_lib.o isdn_v110.o isdn_common.o

Yes, I do build it as a module. I believe that’s where the problem is.

According to this: https://www.linux.com/learn/kernel-newbie-corner-kernel-symbols-whats-available-your-module-what-isnt loadable modules only have access to the symbols that are explicitly exported using “EXPORT_SYMBOL().” Not sure there’s any way around it besides modifying camera_common.c to export those symbols and recompiling the kernel.

I’ll keep messing with it.

The easy way is copy that easy function to this driver. That function only to parser the device tree to get information.