From 2c05932416e5f6b421f79a3250d88ffe4ce495c2 Mon Sep 17 00:00:00 2001 From: Vasyl Vavrychuk Date: Tue, 1 Nov 2022 22:04:36 +0100 Subject: virtualization: Add virtio-can driver as external module. This driver should conform RFC spec draft v2 [1]. This driver is based on RFC version [2]. Imported from internal OpenSynergy's revision: 3918336a7caab95a72442c33945a193ca893d5e8 Supply build file `Kbuild` and do not supply makefile [3] since external kernel module could be built without it. On the other hand, module BitBake class relies on wrapper makefile presence, therefore `MAKE_TARGETS` and `MODULES_INSTALL_TARGET` had to be set to specify arguments per [3]. Add driver as an external module to avoid unnecessary kernel rebuild and simplify future updates. [1]: https://lists.oasis-open.org/archives/virtio-dev/202208/msg00159.html [2]: https://lists.oasis-open.org/archives/virtio-dev/202208/msg00160.html [3]: https://www.kernel.org/doc/html/v6.0/kbuild/modules.html Change-Id: I9b654f58cc0c34983cd4103a5f7836263db79ec7 Bug-AGL: SPEC-4597 Signed-off-by: Vasyl Vavrychuk --- .../kernel-module-virtio-can.bb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 meta-egvirt/recipes-kernel/kernel-module-virtio-can/kernel-module-virtio-can.bb (limited to 'meta-egvirt/recipes-kernel/kernel-module-virtio-can/kernel-module-virtio-can.bb') diff --git a/meta-egvirt/recipes-kernel/kernel-module-virtio-can/kernel-module-virtio-can.bb b/meta-egvirt/recipes-kernel/kernel-module-virtio-can/kernel-module-virtio-can.bb new file mode 100644 index 00000000..e8327de4 --- /dev/null +++ b/meta-egvirt/recipes-kernel/kernel-module-virtio-can/kernel-module-virtio-can.bb @@ -0,0 +1,20 @@ +SUMMARY = "VIRTIO CAN device driver" + +LICENSE = "BSD-3-Clause & GPL-2.0-only" +LIC_FILES_CHKSUM = " \ + file://virtio_can.h;endline=4;md5=d93ffb4ab090b382cbcda4cb2c0e5c9c \ + file://virtio_can.c;endline=5;md5=06e45bdf8cb26f6a72e240cb1b0c18c2 \ +" + +inherit module + +SRC_URI = " \ + file://Kbuild \ + file://virtio_can.c \ + file://virtio_can.h \ +" + +S = "${WORKDIR}" + +MAKE_TARGETS = "-C ${STAGING_KERNEL_DIR} M=${WORKDIR} MODULE_GIT_REPOSITORY_DIR=${METADIR}/meta-agl-devel" +MODULES_INSTALL_TARGET = "-C ${STAGING_KERNEL_DIR} M=${WORKDIR} modules_install" -- cgit 1.2.3-korg