insmod error: inserting './hello.ko': -1 Invalid module format"

后端 未结 3 1274
失恋的感觉
失恋的感觉 2020-12-09 19:46

I have just made my first driver module, the hello world module following LDD3. However unfortunately encountered this error:

insmod: error inserting \'./hel         


        
3条回答
  •  执笔经年
    2020-12-09 20:27

    You did everything correctly but did not booted your system with the kernel you compiled so the first step is you should boot with it. If you are using Ubuntu you can hold shift button at the time of booting and you will be given a list of compiled kernel in your system from there select linux-source-2.6.38 and then try to build your module and install it with your way ,than you won't find any problem. GoodLuck.

提交回复
热议问题