Driver can not be inserted with error "inserting gedv0.ko: -1 Invalid mosule format"
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
make -C $(KERNELDIR) SUBDIRS=$(PWD) ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- modules
After run make following erros occured:
Building modules, stage 2.
MODPOST 0 modules
/bin/sh: scripts/mod/modpost: No such file or directory
make:***[modules] Error 2
make:***Leaving directory 'usr/iNetPLC5x/Source/kernel/linux-184.108.40.206'
make: ***[call-kernel-build-system] Error 2
For some reason the modpost tool has not been built yet. Do the following: Go to the kernel source directory and enter "make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- SUBDIRS=scripts/mod". This command should build the modpost tool. Normally this tool is created, when you build the kernel. Check if the executable scripts/mod/modpost exists and try again.
You have to make the change from ko -> o. The .ko file will be created then. modpost will create a file gedrv0.mod.c this file will contain all needed version information. This file is compiled and linked with gedrv0.o to give the .ko-file.
When using obj-m := ...ko you will get the warning
target `...' doesn't match the target pattern
The file Module.symvers is normally created when compiling the kernel for the target system. Perhaps you can find it in the original compilation directory. It will tell modpost to on which modules your module depends. If it is not present, the module should be created anyway and should be usable.
make -C ../../kernel/linux-220.127.116.11 SUBDIRS=/usr/iNetPLC5x/Source/drivers/ge_io ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- modules
make: Entering directory '/usr/iNetPLC5x/source/kernel/linux-18.104.22.168'
WARNING: Symbol version dump /usr/iNetPLC5x/Source/kernel/linux-22.214.171.124/Module.symvers is missing; modules will have no dependencies and modversions.