Makefile for Linux kernel module?

前端 未结 3 2248
醉话见心
醉话见心 2021-02-20 09:32

I was just reading The Linux Kernel Module Programming Guide and and got stuck on character device drivers example.

Makefiles for previous examples were provided, but no

3条回答
  •  情深已故
    2021-02-20 09:35

    actually driver gets loaded by the macro MODULE_INIT(my_init); here "my_init" can be the user specified function and MUDULE_EXIT(my_cleanup); here my_exit can be the user specified function . those two macros are missing in the above code.

    Makefile: the obj-m += chardev.o is to be replaced with obj-m := chardev.o.

    I am also a beginner to LLD. If any mistake is there please let me know.

提交回复
热议问题