How do I create a Linux kernel module?

How do I create a Linux kernel module?
Answer
Example: hello.c module
  1. hello.c C source code. …
  2. Add following c source code to it: …
  3. Save the file. …
  4. Save and close the file.
  5. Compile hello.c module: …
  6. Become a root user (use su or sudo) and load the module: …
  7. Verify that module loaded: …
  8. See message in /var/log/message file:
 

Tìm kiếm

Back
Top