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 | 6 |
3 files changed, 13 insertions, 21 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 | ||
22 | int init_module(void) | 11 | static 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 | ||
28 | void cleanup_module(void) | 17 | static void __exit hello_exit(void) |
29 | { | 18 | { |
30 | printk("Goodbye Cruel World!\n"); | 19 | pr_info("Goodbye Cruel World!\n"); |
31 | } | 20 | } |
32 | 21 | ||
22 | module_init(hello_init); | ||
23 | module_exit(hello_exit); | ||
33 | MODULE_LICENSE("GPL"); | 24 | 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 @@ | |||
1 | SUMMARY = "Example of how to build an external Linux kernel module" | 1 | SUMMARY = "Example of how to build an external Linux kernel module" |
2 | LICENSE = "GPLv2" | 2 | DESCRIPTION = "${SUMMARY}" |
3 | LICENSE = "GPL-2.0-only" | ||
3 | LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e" | 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e" |
4 | 5 | ||
5 | inherit module | 6 | inherit 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 | ||
17 | RPROVIDES_${PN} += "kernel-module-hello" | 18 | 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..9437240fcf 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 @@ | |||
1 | SUMMARY = "An example kernel recipe that uses the linux-yocto and oe-core" | ||
1 | # linux-yocto-custom.bb: | 2 | # linux-yocto-custom.bb: |
2 | # | 3 | # |
3 | # An example kernel recipe that uses the linux-yocto and oe-core | ||
4 | # kernel classes to apply a subset of yocto kernel management to git | 4 | # kernel classes to apply a subset of yocto kernel management to git |
5 | # managed kernel repositories. | 5 | # managed kernel repositories. |
6 | # | 6 | # |
@@ -57,14 +57,14 @@ require recipes-kernel/linux/linux-yocto.inc | |||
57 | SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git;protocol=git;nocheckout=1;name=machine" | 57 | SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git;protocol=git;nocheckout=1;name=machine" |
58 | 58 | ||
59 | LINUX_VERSION ?= "4.2" | 59 | LINUX_VERSION ?= "4.2" |
60 | LINUX_VERSION_EXTENSION_append = "-custom" | 60 | LINUX_VERSION_EXTENSION:append = "-custom" |
61 | 61 | ||
62 | # Modify SRCREV to a different commit hash in a copy of this recipe to | 62 | # Modify SRCREV to a different commit hash in a copy of this recipe to |
63 | # build a different release of the Linux kernel. | 63 | # build a different release of the Linux kernel. |
64 | # tag: v4.2 64291f7db5bd8150a74ad2036f1037e6a0428df2 | 64 | # tag: v4.2 64291f7db5bd8150a74ad2036f1037e6a0428df2 |
65 | SRCREV_machine="64291f7db5bd8150a74ad2036f1037e6a0428df2" | 65 | SRCREV_machine="64291f7db5bd8150a74ad2036f1037e6a0428df2" |
66 | 66 | ||
67 | PV = "${LINUX_VERSION}+git${SRCPV}" | 67 | PV = "${LINUX_VERSION}+git" |
68 | 68 | ||
69 | # Override COMPATIBLE_MACHINE to include your machine in a copy of this recipe | 69 | # Override COMPATIBLE_MACHINE to include your machine in a copy of this recipe |
70 | # file. Leaving it empty here ensures an early explicit build failure. | 70 | # file. Leaving it empty here ensures an early explicit build failure. |