summaryrefslogtreecommitdiffstats
path: root/meta-skeleton/recipes-kernel
diff options
context:
space:
mode:
Diffstat (limited to 'meta-skeleton/recipes-kernel')
-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
-rw-r--r--meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb6
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
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"
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 @@
1SUMMARY = "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
57SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git;protocol=git;nocheckout=1;name=machine" 57SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git;protocol=git;nocheckout=1;name=machine"
58 58
59LINUX_VERSION ?= "4.2" 59LINUX_VERSION ?= "4.2"
60LINUX_VERSION_EXTENSION_append = "-custom" 60LINUX_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
65SRCREV_machine="64291f7db5bd8150a74ad2036f1037e6a0428df2" 65SRCREV_machine="64291f7db5bd8150a74ad2036f1037e6a0428df2"
66 66
67PV = "${LINUX_VERSION}+git${SRCPV}" 67PV = "${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.