diff options
author | Stefan Stanacar <stefanx.stanacar@intel.com> | 2013-10-18 10:23:44 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-10-18 15:58:16 +0100 |
commit | d3cb36936521b69c826f2a6da4ccdf2b278b529d (patch) | |
tree | 31dca9d76e4362a8149fe453212f7156e073adbe /meta/lib/oeqa/runtime/files | |
parent | 67378fbcbe8a418c81ef42589fb6fba704c36bdf (diff) | |
download | poky-d3cb36936521b69c826f2a6da4ccdf2b278b529d.tar.gz |
lib/oeqa/runtime: build kernel module on target test
Builds a simple Hello World module on target.
Added to the defaults for core-image-sato-sdk.
(From OE-Core rev: c61c3dee162aa1f5bf31b2a09d8b916dc1712056)
Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/runtime/files')
-rw-r--r-- | meta/lib/oeqa/runtime/files/hellomod.c | 19 | ||||
-rw-r--r-- | meta/lib/oeqa/runtime/files/hellomod_makefile | 8 |
2 files changed, 27 insertions, 0 deletions
diff --git a/meta/lib/oeqa/runtime/files/hellomod.c b/meta/lib/oeqa/runtime/files/hellomod.c new file mode 100644 index 0000000000..a383397e93 --- /dev/null +++ b/meta/lib/oeqa/runtime/files/hellomod.c | |||
@@ -0,0 +1,19 @@ | |||
1 | #include <linux/module.h> | ||
2 | #include <linux/kernel.h> | ||
3 | #include <linux/init.h> | ||
4 | |||
5 | static int __init hello_init(void) | ||
6 | { | ||
7 | printk(KERN_INFO "Hello world!\n"); | ||
8 | return 0; | ||
9 | } | ||
10 | |||
11 | static void __exit hello_cleanup(void) | ||
12 | { | ||
13 | printk(KERN_INFO "Cleaning up hellomod.\n"); | ||
14 | } | ||
15 | |||
16 | module_init(hello_init); | ||
17 | module_exit(hello_cleanup); | ||
18 | |||
19 | MODULE_LICENSE("GPL"); | ||
diff --git a/meta/lib/oeqa/runtime/files/hellomod_makefile b/meta/lib/oeqa/runtime/files/hellomod_makefile new file mode 100644 index 0000000000..b92d5c8fe0 --- /dev/null +++ b/meta/lib/oeqa/runtime/files/hellomod_makefile | |||
@@ -0,0 +1,8 @@ | |||
1 | obj-m := hellomod.o | ||
2 | KDIR := /usr/src/kernel | ||
3 | |||
4 | all: | ||
5 | $(MAKE) -C $(KDIR) M=$(PWD) modules | ||
6 | |||
7 | clean: | ||
8 | $(MAKE) -C $(KDIR) M=$(PWD) clean | ||