Pavunkumar Pavunkumar - 1 month ago 14
Linux Question

Loading 64-bit module to a 32-bit kernel using insmod

Is is possible to load a

.ko
file (kernel object file) which was compiled in 64-bit processor system into 32 bit processor system?

Actually I am getting following error when I issue the insmod command in my system:

insmod: error inserting 'be2net.ko': -1 Invalid module format

Answer Source

It is not possible to run 64-bit code in a 32-bit system. Depending on the requirements, the reverse can be true (running 32-bit software or libraries in a 64-bit system), but a 32-bit architecture cannot understand 64-bit code. You will need to compile the module on your system.

First download the kernel source from kernel.org. Then extract, and cd into

linux/drivers/net/benet

Once there, type (as your regular user)

make

and then

sudo insmod be2net.ko

That should work for you.