diff options
Diffstat (limited to 'meta-skeleton/recipes-kernel')
-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 | 5 | ||||
-rw-r--r-- | meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb | 8 |
3 files changed, 14 insertions, 22 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 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 @@ 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 @@ -14,4 +15,4 @@ S = "${WORKDIR}" # 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" +RPROVIDES:${PN} += "kernel-module-hello" diff --git a/meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb b/meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb index 6194d4f8da..0879bb17b9 100644 --- a/meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb +++ b/meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb @@ -1,13 +1,13 @@ +SUMMARY = "An example kernel recipe that uses the linux-yocto and oe-core" # linux-yocto-custom.bb: # -# An example kernel recipe that uses the linux-yocto and oe-core # kernel classes to apply a subset of yocto kernel management to git # managed kernel repositories. # # To use linux-yocto-custom in your layer, copy this recipe (optionally # rename it as well) and modify it appropriately for your machine. i.e.: # -# COMPATIBLE_MACHINE_yourmachine = "yourmachine" +# COMPATIBLE_MACHINE:yourmachine = "yourmachine" # # You must also provide a Linux kernel configuration. The most direct # method is to copy your .config to files/defconfig in your layer, @@ -57,14 +57,14 @@ require recipes-kernel/linux/linux-yocto.inc SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git;protocol=git;nocheckout=1;name=machine" LINUX_VERSION ?= "4.2" -LINUX_VERSION_EXTENSION_append = "-custom" +LINUX_VERSION_EXTENSION:append = "-custom" # Modify SRCREV to a different commit hash in a copy of this recipe to # build a different release of the Linux kernel. # tag: v4.2 64291f7db5bd8150a74ad2036f1037e6a0428df2 SRCREV_machine="64291f7db5bd8150a74ad2036f1037e6a0428df2" -PV = "${LINUX_VERSION}+git${SRCPV}" +PV = "${LINUX_VERSION}+git" # Override COMPATIBLE_MACHINE to include your machine in a copy of this recipe # file. Leaving it empty here ensures an early explicit build failure. |