diff options
Diffstat (limited to 'meta-skeleton/recipes-kernel/hello-mod')
-rw-r--r-- | meta-skeleton/recipes-kernel/hello-mod/files/hello.c | 23 | ||||
-rw-r--r-- | meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb | 8 |
2 files changed, 13 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 @@ * * Copyright (C) 2011 Intel Corporation. All rights reserved. * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See - * the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * SPDX-License-Identifier: GPL-2.0-only * *****************************************************************************/ #include <linux/module.h> -int init_module(void) +static int __init hello_init(void) { - printk("Hello World!\n"); + pr_info("Hello World!\n"); return 0; } -void cleanup_module(void) +static void __exit hello_exit(void) { - printk("Goodbye Cruel World!\n"); + pr_info("Goodbye Cruel World!\n"); } +module_init(hello_init); +module_exit(hello_exit); MODULE_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 b140b0ac8e..79f2e8a092 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 @@ SUMMARY = "Example of how to build an external Linux kernel module" -LICENSE = "GPLv2" +DESCRIPTION = "${SUMMARY}" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e" inherit module @@ -9,7 +10,10 @@ SRC_URI = "file://Makefile \ file://COPYING \ " -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" # The inherit of module.bbclass will automatically name module packages with # "kernel-module-" prefix as required by the oe-core build environment. + +RPROVIDES:${PN} += "kernel-module-hello" |