summaryrefslogtreecommitdiffstats
path: root/meta-egvirt/recipes-kernel/kernel-module-virtio-video/files/Makefile
diff options
context:
space:
mode:
authorVasyl Vavrychuk <vasyl.vavrychuk@opensynergy.com>2021-11-22 12:38:06 +0100
committerVasyl Vavrychuk <vasyl.vavrychuk@opensynergy.com>2021-12-07 20:47:22 +0100
commit87b7cce6fb8a0afde96227423b3385d36e6fe0a1 (patch)
tree052311f8fd70ed9ed4efa0fc2f43bc2d5c452b85 /meta-egvirt/recipes-kernel/kernel-module-virtio-video/files/Makefile
parent3c2b0cdba520c260a4342d9b968d9efb7892a643 (diff)
virtualization: Add virtio-video driver as external module.
This driver should conform WIP spec v3 [1] with some updates for spec v4 [2], and, some unspecified features such as VIRTIO_VIDEO_DEVICE_CAMERA. Imported from internal OpenSynergy's revision: bcc33b6b9e0156b381a70c54d2df02c57b63d270 Kernel was configured with necessary features for this driver: enable MEDIA_SUPPORT disable MEDIA_SUBDRV_AUTOSELECT enable MEDIA_PLATFORM_SUPPORT enable VIDEO_VIRTIO Keep driver as an external module to simplify future updates. [1]: https://lists.oasis-open.org/archives/virtio-dev/202002/msg00002.html [2]: https://lists.oasis-open.org/archives/virtio-dev/202006/msg00072.html Bug-AGL: SPEC-4148 Change-Id: Iea339194b22443f67b3e2ffddca84118357a2f15 Signed-off-by: Vasyl Vavrychuk <vasyl.vavrychuk@opensynergy.com>
Diffstat (limited to 'meta-egvirt/recipes-kernel/kernel-module-virtio-video/files/Makefile')
-rw-r--r--meta-egvirt/recipes-kernel/kernel-module-virtio-video/files/Makefile33
1 files changed, 33 insertions, 0 deletions
diff --git a/meta-egvirt/recipes-kernel/kernel-module-virtio-video/files/Makefile b/meta-egvirt/recipes-kernel/kernel-module-virtio-video/files/Makefile
new file mode 100644
index 00000000..e5a34b76
--- /dev/null
+++ b/meta-egvirt/recipes-kernel/kernel-module-virtio-video/files/Makefile
@@ -0,0 +1,33 @@
+#
+# Makefile for mod coqos
+#
+KDIR ?= $(KERNEL_SRC)
+ifeq ($(KDIR),)
+$(error "KDIR must be specified.")
+endif
+
+# The variable "M" is used to point to the location of this module, and it is
+# passed to kbuild to build this module.
+#
+# Allow to specify variable "M" from outside. It is needed to set it to the
+# relative path to this module. It must be relative to the kernel source
+# directory.
+#
+# If kernel is built with "O" option then setting "M" to the relative path
+# empowers the build system to put output/object files (.o, .ko.) into a
+# directory different from the module source directory.
+M ?= $$PWD
+
+# Some build systems may rsync module sources out of git repository to have
+# sources directory untouched during build. Then, they should specify Git
+# repository directory separately for 'git describe' to work properly.
+MODULE_GIT_REPOSITORY_DIR ?= $(M)
+
+default:
+ $(MAKE) -C $(KDIR) M=$(M) MODULE_GIT_REPOSITORY_DIR=$(MODULE_GIT_REPOSITORY_DIR)
+
+modules_install:
+ $(MAKE) -C $(KDIR) M=$(M) $@
+
+clean:
+ $(MAKE) -C $(KDIR) M=$(M) $@