hello2.c 335 B

1234567891011121314151617181920
  1. /* https://cirosantilli.com/linux-kernel-module-cheat#qemu-buildroot-setup-getting-started */
  2. #include <linux/module.h>
  3. #include <linux/kernel.h>
  4. static int myinit(void)
  5. {
  6. pr_info("hello2 init\n");
  7. return 0;
  8. }
  9. static void myexit(void)
  10. {
  11. pr_info("hello2 exit\n");
  12. }
  13. module_init(myinit)
  14. module_exit(myexit)
  15. MODULE_LICENSE("GPL");