I used spidev module from JetPack.
The version is:
cat /etc/nv_tegra_release | head -1
# R31 (release), REVISION: 0.2, GCID: 12860113, BOARD: t186ref, EABI: aarch64, DATE: Sat Sep 29 05:14:38 UTC 2018
I compared the version of the kernel with the module.
The kernel version is:
$ uname -r
4.9.108-tegra
and the module version is:
$ modinfo spidev
filename: /lib/modules/4.9.108-tegra/kernel/drivers/spi/spidev.ko
alias: spi:spidev
license: GPL
description: User mode SPI device interface
author: Andrea Paterniani, <a.paterniani@swapp-eng.it>
alias: of:N*T*Clineartechnology,ltc2488C*
alias: of:N*T*Clineartechnology,ltc2488
alias: of:N*T*Crohm,dh2228fvC*
alias: of:N*T*Crohm,dh2228fv
alias: of:N*T*CspidevC*
alias: of:N*T*Cspidev
depends:
vermagic: 4.9.108-tegra SMP preempt mod_unload modversions aarch64
parm: bufsiz:data bytes in biggest supported SPI message (uint)
They seem the same version.
I attempted to rebuild the module from the latest source (L4T 31.0.2: https://developer.nvidia.com/embedded/dlc/l4t-sources-31-0-2 ), but the same error occurred when doing insmod.
And I tried modprobe command with f option, I got a different error message.
$ sudo modprobe -f spidev
modprobe: ERROR: could not insert 'spidev': Exec format error
Although this error seems to occur when the version is different, I think that it is the same version in my environment.
What are other possible causes?