1

I have a hollowworld.c :

/* hello.c */
#include <linux/kernel.h>
#include <linux/module.h>
MODULE_LICENSE("GPL");

int init_module(void)
{
  printk("Hello world!\n"); /* printk = kernel printf, to the console */

  return 0;
}

void cleanup_module(void)
{
  printk("Goodbye world!\n");

  return;
}

how create a makefile for program.c and how to compile and execute in Real Time Application Interface ?

BkarimCe
  • 65
  • 7

1 Answers1

2

To compile a kernel module, refer to other drivers in the kernel source tree. You will find it the Makefile as simple as one line in your example:

obj-M += hollowworld.o
fluter
  • 13,238
  • 8
  • 62
  • 100