RPi-Distro / rpi-source

Raspberry Pi kernel source installer
MIT License
140 stars 39 forks source link

insmod fails with "Invalid module format" #28

Open akohlsmith opened 8 months ago

akohlsmith commented 8 months ago

I've got an rpi4 running Raspbian.

$ uname -a
Linux bbbridge 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch64 GNU/Linux

Following the directions in README.md (I am actually trying to recompile the mcp251xfd driver). Everything builds fine and installs fine, but when I try to load the module I get the following message:

$ sudo modprobe mcp251xfd
modprobe: ERROR: could not insert 'mcp251xfd': Exec format error

dmesg shows mcp251xfd: disagrees about version of symbol module_layout

I did uncompress /proc/modules.gz and make prepare before executing KERNEL=kernel8 make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- KERNEL=kernel8 SUBDIRS=drivers/net/can/spi/mcp251xfd modules.

What am I doing wrong? Is the documentation out of date?