summaryrefslogtreecommitdiffstats
path: root/meta-skeleton/recipes-kernel/hello-mod
diff options
context:
space:
mode:
Diffstat (limited to 'meta-skeleton/recipes-kernel/hello-mod')
-rw-r--r--meta-skeleton/recipes-kernel/hello-mod/files/hello.c23
-rw-r--r--meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb5
2 files changed, 10 insertions, 18 deletions
diff --git a/meta-skeleton/recipes-kernel/hello-mod/files/hello.c b/meta-skeleton/recipes-kernel/hello-mod/files/hello.c
index f3c0d372eb..4f73455d20 100644
--- a/meta-skeleton/recipes-kernel/hello-mod/files/hello.c
+++ b/meta-skeleton/recipes-kernel/hello-mod/files/hello.c
@@ -2,32 +2,23 @@
2 * 2 *
3 * Copyright (C) 2011 Intel Corporation. All rights reserved. 3 * Copyright (C) 2011 Intel Corporation. All rights reserved.
4 * 4 *
5 * This program is free software; you can redistribute it and/or modify 5 * SPDX-License-Identifier: GPL-2.0-only
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; version 2 of the License.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
12 * the GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 * 6 *
18 *****************************************************************************/ 7 *****************************************************************************/
19 8
20#include <linux/module.h> 9#include <linux/module.h>
21 10
22int init_module(void) 11static int __init hello_init(void)
23{ 12{
24 printk("Hello World!\n"); 13 pr_info("Hello World!\n");
25 return 0; 14 return 0;
26} 15}
27 16
28void cleanup_module(void) 17static void __exit hello_exit(void)
29{ 18{
30 printk("Goodbye Cruel World!\n"); 19 pr_info("Goodbye Cruel World!\n");
31} 20}
32 21
22module_init(hello_init);
23module_exit(hello_exit);
33MODULE_LICENSE("GPL"); 24MODULE_LICENSE("GPL");
diff --git a/meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb b/meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb
index 3d33446500..a2fb212a68 100644
--- a/meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb
+++ b/meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb
@@ -1,5 +1,6 @@
1SUMMARY = "Example of how to build an external Linux kernel module" 1SUMMARY = "Example of how to build an external Linux kernel module"
2LICENSE = "GPLv2" 2DESCRIPTION = "${SUMMARY}"
3LICENSE = "GPL-2.0-only"
3LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e" 4LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
4 5
5inherit module 6inherit module
@@ -14,4 +15,4 @@ S = "${WORKDIR}"
14# The inherit of module.bbclass will automatically name module packages with 15# The inherit of module.bbclass will automatically name module packages with
15# "kernel-module-" prefix as required by the oe-core build environment. 16# "kernel-module-" prefix as required by the oe-core build environment.
16 17
17RPROVIDES_${PN} += "kernel-module-hello" 18RPROVIDES:${PN} += "kernel-module-hello"