diff options
author | Darren Hart <dvhart@linux.intel.com> | 2011-03-01 14:18:32 -0800 |
---|---|---|
committer | Saul Wold <sgw@linux.intel.com> | 2011-03-04 14:34:31 -0800 |
commit | 1b11ff7752122dd3f162fc08a80f8ddeb568c11d (patch) | |
tree | a3ecafe8b6125be62a6f15e15de550cc5499ce8e /meta/recipes-kernel/hello-mod/files/Makefile | |
parent | 101ce7109eee3af44d2e4999085d6dfcfd782587 (diff) | |
download | poky-1b11ff7752122dd3f162fc08a80f8ddeb568c11d.tar.gz |
hello-mod: add a module for testing module.bbclass
The following patch creates a hello-mod recipe for building a trivial
out-of-tree kernel module, hello-mod.ko. This demonstrates the hostprogs
build modifications added to module.bbclass. When loaded and unloaded,
the module prints a simple string to the console to demonstrate it was
compiled correctly.
Tested on qemux86 poky-image-sato and beagleboard poky-image-minimal
(after adding hello-mod to the images).
(From OE-Core rev: d4765569d51448e8918bb15e7ab342983344074a)
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
CC: Gary Thomas <gary@mlbassoc.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel/hello-mod/files/Makefile')
-rw-r--r-- | meta/recipes-kernel/hello-mod/files/Makefile | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/meta/recipes-kernel/hello-mod/files/Makefile b/meta/recipes-kernel/hello-mod/files/Makefile new file mode 100644 index 0000000000..4ded35fbc3 --- /dev/null +++ b/meta/recipes-kernel/hello-mod/files/Makefile | |||
@@ -0,0 +1,14 @@ | |||
1 | obj-m := hello.o | ||
2 | |||
3 | SRC := $(shell pwd) | ||
4 | |||
5 | all: | ||
6 | $(MAKE) -C $(KERNEL_SRC) M=$(SRC) | ||
7 | |||
8 | modules_install: | ||
9 | $(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install | ||
10 | |||
11 | clean: | ||
12 | rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c | ||
13 | rm -f Module.markers Module.symvers modules.order | ||
14 | rm -rf .tmp_versions Modules.symvers | ||