Reputation: 415
i have an original module in debian 10 on a beaglebone black and now i am running it on debian 9.5 with a different kernel. So when i try to insert the module i get this error:
insmod: ERROR: could not insert module gpio_test.ko: Invalid module format
My current kernel version is:
uname -r 4.4.155-ti-rt-r155
I have tried to follow the solution posted here but with no luck: insmod error: inserting './hello.ko': -1 Invalid module format"
my current Makefile contents are:
obj-m+=gpio_test.o
all:
make -C /lib/modules/$(shell uname -r)/build/ M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build/ M=$(PWD) clean
when i run this make file i get this error:
make -C /lib/modules/4.4.155-ti-rt-r155/build/ M=/home/machinekit/BeagleBoneBlack-Program-Files/LKM_Interrupt_Practice/LED_Button_IRQ modules
make[1]: *** /lib/modules/4.4.155-ti-rt-r155/build/: No such file or directory. Stop.
Makefile:4: recipe for target 'all' failed
make: *** [all] Error 2
Any help will be appreciated, thank you.
Upvotes: 0
Views: 386