diff options
Diffstat (limited to 'meta-skeleton/recipes-kernel')
-rw-r--r-- | meta-skeleton/recipes-kernel/hello-mod/files/hello.c | 10 | ||||
-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 | 4 |
3 files changed, 11 insertions, 8 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..6b73a79524 100644 --- a/meta-skeleton/recipes-kernel/hello-mod/files/hello.c +++ b/meta-skeleton/recipes-kernel/hello-mod/files/hello.c @@ -19,15 +19,17 @@ #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..6062f8422c 100644 --- a/meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb +++ b/meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb @@ -1,6 +1,6 @@ +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. # @@ -57,7 +57,7 @@ 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. |