Invalid module format

I’m trying to build a new driver for a Realtek 8821C for the PocketBeagle, and although I have managed to cross-compile the module, it fails to load with an “invalid format” error, which I think means it thinks I compiled with a different kernel version.

My PB is still running “4.14-ti”, and I downloaded Robert’s “rt-4.14” branch onto my build machine thinking that “4.14” should be close enough. Is my problem the “ti” branch vs the “rt” branch? I guess I can build it on the PB if I have to, but it is much faster to build on my desktop and, theoretically, easier to keep track of.

sudo apt install linux-headers-`uname -r`

Regards,

Thanks, Robert. That would work if I were compiling on the PB, but cross-compiling on my Debian VM was different. There may be an easier way, but what I did was follow this: http://phwl.org/2021/building-bbg-kernel/ to checkout the exact kernel I have on my PB, compile it, and then point my driver Makefile to this directory. This at least appears to work.

Okay, that would also work..

Regards,