commit | author | age
|
17e726
|
1 |
/********************************************************************************* |
G |
2 |
* Copyright: (C) 2024 LingYun IoT System Studio. |
|
3 |
* All rights reserved. |
|
4 |
* |
|
5 |
* Filename: hello.c |
|
6 |
* Description: This file is hello example kernel module build in yocto |
|
7 |
* |
|
8 |
* Version: 1.0.0(2024/07/14) |
|
9 |
* Author: Guo Wenxue <guowenxue@gmail.com> |
|
10 |
* ChangeLog: 1, Release initial version on "2024/07/14 10:34:45" |
|
11 |
* |
|
12 |
********************************************************************************/ |
|
13 |
|
|
14 |
#include <linux/module.h> |
|
15 |
#include <linux/kernel.h> |
|
16 |
#include <linux/init.h> |
|
17 |
|
|
18 |
int hello_init(void) |
|
19 |
{ |
|
20 |
printk("Hello, hello-module loaded!\n"); |
|
21 |
return 0; |
|
22 |
} |
|
23 |
|
|
24 |
void hello_exit(void) |
|
25 |
{ |
|
26 |
printk("Goodbye, hello-module unloaded!\n"); |
|
27 |
} |
|
28 |
|
|
29 |
module_init(hello_init); |
|
30 |
module_exit(hello_exit); |
|
31 |
|
|
32 |
MODULE_LICENSE("GPL"); |
|
33 |
MODULE_AUTHOR("Guo Wenxue"); |
|
34 |
MODULE_DESCRIPTION("A Simple Hello Kernel Module"); |