* [PATCHv2 RESEND] dkms: Add new recipe for supporting dkms
@ 2017-07-24 10:19 Alexandru Vasiu
2017-07-24 18:41 ` Khem Raj
0 siblings, 1 reply; 2+ messages in thread
From: Alexandru Vasiu @ 2017-07-24 10:19 UTC (permalink / raw)
To: openembedded-core; +Cc: will.page
Dkms is a tool used to compile out of tree modules directly on
target devices (sometimes you have sources or binaries which
need to be compiled directly on target, outside OE).
I used a simple module and a dkms config to test it, and dkms
compiled and installed the module on target.
For example:
.
├── dkms.conf
└── src
├── hello.c
└── Makefile
hello.c:
#include <linux/module.h>
int init_module(void)
{
printk("Hello World!\n");
return 0;
}
void cleanup_module(void)
{
printk("Goodbye Cruel World!\n");
}
MODULE_LICENSE("GPL");
Makefile:
obj-m += hello.o
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
install:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
clean:
rm -rf *.o *.ko *~ core .depend .*.cmd *.mod.c modules.order Module.symvers
dkms.conf:
MAKE="make -C src/ KERNELDIR=/lib/modules/${kernelver}/build"
CLEAN="make -C src/ clean"
BUILT_MODULE_NAME=hello
DEST_MODULE_LOCATION=/kernel/drivers/scsi
BUILT_MODULE_LOCATION=src/
PACKAGE_NAME=hello
PACKAGE_VERSION=0.1
AUTOINSTALL=yes
REMAKE_INITRD=yes
All files should be in /usr/src/<package-name>-<package-version>,
in our case in /urs/src/hello-0.1.
Signed-off-by: Alexandru Vasiu <alexandru.vasiu@ni.com>
---
meta/recipes-kernel/dkms/dkms_2.4.0.bb | 12 ++++++++++++
1 file changed, 12 insertions(+)
create mode 100644 meta/recipes-kernel/dkms/dkms_2.4.0.bb
diff --git a/meta/recipes-kernel/dkms/dkms_2.4.0.bb b/meta/recipes-kernel/dkms/dkms_2.4.0.bb
new file mode 100644
index 0000000000..78b23c43e9
--- /dev/null
+++ b/meta/recipes-kernel/dkms/dkms_2.4.0.bb
@@ -0,0 +1,12 @@
+SUMMARY = "DKMS Recipe - Adds DKMS tool for target"
+HOMEPAGE = "https://github.com/dell/dkms/"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
+
+SRC_URI = "https://github.com/dell/${PN}/archive/v${PV}.tar.gz"
+
+SRC_URI[md5sum] = "d2e74dd79086c564a924b5763794091b"
+
+RDEPENDS_${PN} += "bash kmod gcc make patch"
+
+inherit autotools-brokensep
--
2.13.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCHv2 RESEND] dkms: Add new recipe for supporting dkms
2017-07-24 10:19 [PATCHv2 RESEND] dkms: Add new recipe for supporting dkms Alexandru Vasiu
@ 2017-07-24 18:41 ` Khem Raj
0 siblings, 0 replies; 2+ messages in thread
From: Khem Raj @ 2017-07-24 18:41 UTC (permalink / raw)
To: Alexandru Vasiu, openembedded-core; +Cc: will.page
[-- Attachment #1: Type: text/plain, Size: 2843 bytes --]
On Mon, Jul 24, 2017 at 3:19 AM Alexandru Vasiu <alexandru.vasiu@ni.com>
wrote:
> Dkms is a tool used to compile out of tree modules directly on
> target devices (sometimes you have sources or binaries which
> need to be compiled directly on target, outside OE).
> I used a simple module and a dkms config to test it, and dkms
> compiled and installed the module on target.
>
> For example:
> .
> ├── dkms.conf
> └── src
> ├── hello.c
> └── Makefile
>
> hello.c:
> #include <linux/module.h>
>
> int init_module(void)
> {
> printk("Hello World!\n");
> return 0;
> }
>
> void cleanup_module(void)
> {
> printk("Goodbye Cruel World!\n");
> }
>
> MODULE_LICENSE("GPL");
>
> Makefile:
> obj-m += hello.o
>
> KERNELDIR ?= /lib/modules/$(shell uname -r)/build
>
> PWD := $(shell pwd)
>
> install:
> $(MAKE) -C $(KERNELDIR) M=$(PWD) modules
>
> clean:
> rm -rf *.o *.ko *~ core .depend .*.cmd *.mod.c
> modules.order Module.symvers
>
> dkms.conf:
> MAKE="make -C src/ KERNELDIR=/lib/modules/${kernelver}/build"
> CLEAN="make -C src/ clean"
> BUILT_MODULE_NAME=hello
> DEST_MODULE_LOCATION=/kernel/drivers/scsi
> BUILT_MODULE_LOCATION=src/
> PACKAGE_NAME=hello
> PACKAGE_VERSION=0.1
> AUTOINSTALL=yes
> REMAKE_INITRD=yes
>
> All files should be in /usr/src/<package-name>-<package-version>,
> in our case in /urs/src/hello-0.1.
>
> Signed-off-by: Alexandru Vasiu <alexandru.vasiu@ni.com>
> ---
> meta/recipes-kernel/dkms/dkms_2.4.0.bb | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
> create mode 100644 meta/recipes-kernel/dkms/dkms_2.4.0.bb
>
> diff --git a/meta/recipes-kernel/dkms/dkms_2.4.0.bb
> b/meta/recipes-kernel/dkms/dkms_2.4.0.bb
> new file mode 100644
> index 0000000000..78b23c43e9
> --- /dev/null
> +++ b/meta/recipes-kernel/dkms/dkms_2.4.0.bb
> @@ -0,0 +1,12 @@
> +SUMMARY = "DKMS Recipe - Adds DKMS tool for target"
> +HOMEPAGE = "https://github.com/dell/dkms/"
> +LICENSE = "GPLv2"
> +LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
> +
> +SRC_URI = "https://github.com/dell/${PN}/archive/v${PV}.tar.gz"
> +
> +SRC_URI[md5sum] = "d2e74dd79086c564a924b5763794091b"
> +
> +RDEPENDS_${PN} += "bash kmod gcc make patch"
> +
Perhaps you also need kernel-dev package
>
> +inherit autotools-brokensep
> --
> 2.13.3
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
[-- Attachment #2: Type: text/html, Size: 4466 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-24 18:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-24 10:19 [PATCHv2 RESEND] dkms: Add new recipe for supporting dkms Alexandru Vasiu
2017-07-24 18:41 ` Khem Raj
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.