InES-HPMM / Lontium_lt6911uxc

Driver for HDMI to CSI converter lt6911uxc
45 stars 31 forks source link

insmod error happen #3

Closed paulkim103 closed 2 years ago

paulkim103 commented 2 years ago

Hello

I'm tested with Jetson Xavier NX to load module but it showed error as "Invalid module format" and dmesg said "lt6911uxc: disagrees about version of symbol module_layout" Hopefully, please help me to figure out loading problem.

here's steps *kernel version of Xavier NX is 4.9.253-tegra. 1.download L4T Release Package (32.4.3) 2.kernel build by NVIDIA kernel guidance 3.then try to make kernel object as "insert driver into kernel sources" after those steps, trying to insert module but fail happens as below

$ sudo insmod ./lt6911uxc.ko insmod: ERROR: could not insert module ./lt6911uxc.ko: Invalid module format $ dmesg lt6911uxc: disagrees about version of symbol module_layout

for more information, NX embedded module "tc358840.ko" could load successfully. each modinfo looks same as like

filename: /lib/modules/4.9.253-tegra/kernel/drivers/media/i2c/tc358840.ko license: GPL v2 author: Armin Weiss (weii@zhaw.ch) description: Driver for Toshiba TC358840 HDMI to CSI-2 Bridge alias: i2c:tc358840 alias: of:NTCtoshiba,tc358840C alias: of:NT*Ctoshiba,tc358840 depends:
intree: Y vermagic: 4.9.253-tegra SMP preempt mod_unload modversions aarch64 parm: debug:debug level (0-3) (int)

filename: /lib/modules/4.9.253-tegra/kernel/drivers/media/i2c/./lt6911uxc.ko license: GPL v2 author: Alexey Gromov groo@zhaw.ch author: Lukas Neuner neur@zhaw.ch description: Driver for Lontium lt6911uxc HDMI to CSI-2 Bridge alias: of:NTClontium,lt6911uxcC alias: of:NT*Clontium,lt6911uxc alias: i2c:lt6911uxc depends:
intree: Y vermagic: 4.9.253-tegra SMP preempt mod_unload modversions aarch64 parm: debug:debug level (0-3) (int)

alegroo commented 2 years ago

Dear paulkim103, Thank you for the information. Did you compile the driver on your host machine or the NX? If on the host, did you use the CROSSCOMPILER? Does the same happen, if you include the driver into the kernel? Best regards, groo

eric-lmi commented 2 years ago

I got the same issue. Compile on board, but I got lt6911uxc.o instead of .ko Also tried to compile on host, same error. Invalid module format.

Any suggestion?

isztldav commented 2 years ago

Good afternoon,

Please create a file called Makefile in the folder source and then insert the following:

MOD = lt6911uxc
WARN := -W -Wall -Wstrict-prototypes -Wmissing-prototypes
KPATH :=/lib/modules/$(shell uname -r)/build
PWD :=$(shell pwd)
obj-m = $(MOD).o

all:
    $(MAKE) -C $(KPATH) $(WARN) M=$(PWD) modules

clean:
    $(MAKE) -C $(KPATH) $(WARN) M=$(PWD) clean

Finally run make directly from the NX and then try to insert the module with sudo insmod lt6911uxc.ko