Invalid module format

26 views
Skip to first unread message

Paul Beam

unread,
Jun 4, 2021, 5:20:35 PM6/4/21
to BeagleBoard
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.

Robert Nelson

unread,
Jun 4, 2021, 5:22:23 PM6/4/21
to Beagle Board
On Fri, Jun 4, 2021 at 4:20 PM Paul Beam <rpau...@gmail.com> wrote:
>
> 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,

--
Robert Nelson
https://rcn-ee.com/

Paul Beam

unread,
Jun 7, 2021, 9:23:48 AM6/7/21
to BeagleBoard
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.

Robert Nelson

unread,
Jun 7, 2021, 9:41:37 AM6/7/21
to Beagle Board
On Mon, Jun 7, 2021 at 8:23 AM Paul Beam <rpau...@gmail.com> wrote:
>
> 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..
Reply all
Reply to author
Forward
0 new messages