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 ?
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.