From 1b5cc91d5164f593a62b91a9709ab6b644734bb7 Mon Sep 17 00:00:00 2001 From: Ram Sargar Date: Thu, 17 Sep 2026 00:32:09 +0530 Subject: [PATCH 1/3] qcom-rtss-mailbox-dlkm: add recipe for RTSS mailbox and UAPI Notice Add the qcom-rtss-mailbox-dlkm recipe to build the RTSS mailbox kernel driver (DLKM), exposing the IPC path between APSS and RTSS via /dev/rtssmb with DAC support using rtssmb group. Also add qcom-rtss-mailbox-uapi-headers to package the ioctl/struct UAPI (rtss_mailbox_uapi.h) standalone, so userspace can build against it without depending on the kernel module recipe. Both recipes share SRC_URI/SRCREV/LICENSE via qcom-rtss-mailbox-module-common.inc, since they come from the same upstream tree (rtss-mailbox-kmd). NOTICE: this driver is still being upstreamed and its uAPI (rtss_mailbox_uapi.h) is not yet frozen and may change before upstream acceptance -- see rtss-mailbox-kmd's README for details. The "rtssmb" DAC group name is likewise not guaranteed stable long term -- it may be renamed or split per-pipe if/when this driver moves to per-use-case device nodes. Signed-off-by: Ram Sargar --- .../qcom-rtss-mailbox-dlkm/rtssmb.rules | 1 + .../qcom-rtss-mailbox-dlkm_1.0.0.bb | 23 +++++++++++++++++++ .../qcom-rtss-mailbox-module-common.inc | 6 +++++ .../qcom-rtss-mailbox-uapi-headers_1.0.0.bb | 18 +++++++++++++++ 4 files changed, 48 insertions(+) create mode 100644 recipes-kernel/qcom-rtss-mailbox-module/qcom-rtss-mailbox-dlkm/rtssmb.rules create mode 100644 recipes-kernel/qcom-rtss-mailbox-module/qcom-rtss-mailbox-dlkm_1.0.0.bb create mode 100644 recipes-kernel/qcom-rtss-mailbox-module/qcom-rtss-mailbox-module-common.inc create mode 100644 recipes-kernel/qcom-rtss-mailbox-module/qcom-rtss-mailbox-uapi-headers_1.0.0.bb diff --git a/recipes-kernel/qcom-rtss-mailbox-module/qcom-rtss-mailbox-dlkm/rtssmb.rules b/recipes-kernel/qcom-rtss-mailbox-module/qcom-rtss-mailbox-dlkm/rtssmb.rules new file mode 100644 index 000000000..4a0010736 --- /dev/null +++ b/recipes-kernel/qcom-rtss-mailbox-module/qcom-rtss-mailbox-dlkm/rtssmb.rules @@ -0,0 +1 @@ +KERNEL=="rtssmb", GROUP="rtssmb", MODE="0660" diff --git a/recipes-kernel/qcom-rtss-mailbox-module/qcom-rtss-mailbox-dlkm_1.0.0.bb b/recipes-kernel/qcom-rtss-mailbox-module/qcom-rtss-mailbox-dlkm_1.0.0.bb new file mode 100644 index 000000000..669ec2ba1 --- /dev/null +++ b/recipes-kernel/qcom-rtss-mailbox-module/qcom-rtss-mailbox-dlkm_1.0.0.bb @@ -0,0 +1,23 @@ +SUMMARY = "Qualcomm RTSS Mailbox Kernel Driver Module" +DESCRIPTION = "Dynamically Loadable Kernel Module (DLKM) for RTSS mailbox communication. \ +Provides mailbox IPC communication between APSS and RTSS. \ +NOTICE / LIMITATIONS: this driver is still being upstreamed and its uAPI \ +(rtss_mailbox_uapi.h) is not yet frozen and may change before upstream \ +acceptance - see rtss-mailbox-kmd's README for details." + +require qcom-rtss-mailbox-module-common.inc + +inherit module useradd + +COMPATIBLE_MACHINE = "qcs8300|qcs9100|qcom-armv8a" + +SRC_URI += "file://rtssmb.rules" + +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM:${PN} = "-r rtssmb" + +do_install:append() { + install -m 0644 ${UNPACKDIR}/rtssmb.rules -D ${D}${nonarch_base_libdir}/udev/rules.d/rtssmb.rules +} + +FILES:${PN} += "${nonarch_base_libdir}/udev/rules.d" diff --git a/recipes-kernel/qcom-rtss-mailbox-module/qcom-rtss-mailbox-module-common.inc b/recipes-kernel/qcom-rtss-mailbox-module/qcom-rtss-mailbox-module-common.inc new file mode 100644 index 000000000..019a02482 --- /dev/null +++ b/recipes-kernel/qcom-rtss-mailbox-module/qcom-rtss-mailbox-module-common.inc @@ -0,0 +1,6 @@ +HOMEPAGE = "https://github.com/qualcomm-linux/rtss-mailbox-kmd" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e" + +SRC_URI = "git://github.com/qualcomm-linux/rtss-mailbox-kmd.git;branch=rtss-mailbox-kernel.le.0.0;protocol=https;tag=v${PV}" +SRCREV = "9ce7c2f1ad860beb86e922e62b14fdcd178e129f" diff --git a/recipes-kernel/qcom-rtss-mailbox-module/qcom-rtss-mailbox-uapi-headers_1.0.0.bb b/recipes-kernel/qcom-rtss-mailbox-module/qcom-rtss-mailbox-uapi-headers_1.0.0.bb new file mode 100644 index 000000000..270d498cd --- /dev/null +++ b/recipes-kernel/qcom-rtss-mailbox-module/qcom-rtss-mailbox-uapi-headers_1.0.0.bb @@ -0,0 +1,18 @@ +SUMMARY = "Qualcomm RTSS Mailbox UAPI headers" +DESCRIPTION = "IOCTL/struct definitions shared between the RTSS mailbox kernel \ +driver (rtss-mailbox-kmd) and userspace (rtss-mailbox-umd). Packaged \ +standalone so userspace can build against the UAPI without depending on \ +the kernel module recipe. \ +NOTICE / LIMITATIONS: this uAPI is not yet frozen and may change before \ +upstream acceptance - see rtss-mailbox-kmd's README for details." + +require qcom-rtss-mailbox-module-common.inc + +LICENSE = "GPL-2.0-with-Linux-syscall-note" + +do_configure[noexec] = "1" +do_compile[noexec] = "1" + +do_install() { + oe_runmake headers_install INSTALL_HDR_PATH=${D}${exec_prefix} +} From 7dabc5612f568238bb2cc77baa2e25ed628a483b Mon Sep 17 00:00:00 2001 From: Ram Sargar Date: Thu, 17 Sep 2026 00:33:20 +0530 Subject: [PATCH 2/3] qcom-rtss-mailbox-umd: add recipe for RTSS mailbox userspace middleware Add the qcom-rtss-mailbox-umd recipe, which builds the userspace middleware and tools for RTSS mailbox IPC communication between APSS and RTSS. This produces the shared libraries that mediate access to the qcom-rtss-mailbox-dlkm kernel driver, along with command-line utilities packaged separately in qcom-rtss-mailbox-umd-utils. It depends on qcom-rtss-mailbox-uapi-headers for the shared ioctl/struct definitions and recommends kernel-module-rtss-mailbox at runtime. Signed-off-by: Ram Sargar --- .../qcom-rtss-mailbox-umd_1.0.0.bb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 recipes-support/qcom-rtss-mailbox-umd/qcom-rtss-mailbox-umd_1.0.0.bb diff --git a/recipes-support/qcom-rtss-mailbox-umd/qcom-rtss-mailbox-umd_1.0.0.bb b/recipes-support/qcom-rtss-mailbox-umd/qcom-rtss-mailbox-umd_1.0.0.bb new file mode 100644 index 000000000..7cf541afa --- /dev/null +++ b/recipes-support/qcom-rtss-mailbox-umd/qcom-rtss-mailbox-umd_1.0.0.bb @@ -0,0 +1,19 @@ +SUMMARY = "Qualcomm RTSS Mailbox userspace middleware and tools" +DESCRIPTION = "Userspace middleware libraries and utilities for RTSS mailbox \ +IPC communication between APSS and RTSS." +HOMEPAGE = "https://github.com/qualcomm-linux/rtss-mailbox-umd" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=223037c4be0bfc6cf757035432adf983" + +SRC_URI = "git://github.com/qualcomm-linux/rtss-mailbox-umd.git;branch=rtss-mailbox-usr.le.0.0;protocol=https;tag=v${PV}" +SRCREV = "667fbda29be9e4d09ff5dd1b35e8dfda17a6ed63" + +inherit cmake + +DEPENDS = "qcom-rtss-mailbox-uapi-headers glib-2.0" + +PACKAGE_BEFORE_PN += "${PN}-utils" + +RRECOMMENDS:${PN} += "kernel-module-rtss-mailbox" + +FILES:${PN}-utils = "${bindir}" From 62a4c9b5477a807a73b17b3f3a5c973921adf9c0 Mon Sep 17 00:00:00 2001 From: Ram Sargar Date: Thu, 17 Sep 2026 00:33:40 +0530 Subject: [PATCH 3/3] qcom-qcs8300/qcs9100/qcom-armv8a: add RTSS mailbox via MACHINE_EXTRA_RRECOMMENDS Add qcom-rtss-mailbox-dlkm and qcom-rtss-mailbox-umd-utils via MACHINE_EXTRA_RRECOMMENDS in qcom-qcs8300.inc, qcom-qcs9100.inc, and qcom-armv8a.conf instead, alongside the existing packagegroup-qcom-boot-additional entry. This mechanism feeds packagegroup-machine-base, which sets PACKAGE_ARCH = "${MACHINE_ARCH}" and is machine-specific, so it carries no allarch signature. Signed-off-by: Ram Sargar --- conf/machine/include/qcom-qcs8300.inc | 2 ++ conf/machine/include/qcom-qcs9100.inc | 2 ++ conf/machine/qcom-armv8a.conf | 2 ++ 3 files changed, 6 insertions(+) diff --git a/conf/machine/include/qcom-qcs8300.inc b/conf/machine/include/qcom-qcs8300.inc index c35db27dc..b6ea2d150 100644 --- a/conf/machine/include/qcom-qcs8300.inc +++ b/conf/machine/include/qcom-qcs8300.inc @@ -18,4 +18,6 @@ MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \ MACHINE_EXTRA_RRECOMMENDS += " \ packagegroup-qcom-boot-additional \ + qcom-rtss-mailbox-dlkm \ + qcom-rtss-mailbox-umd-utils \ " diff --git a/conf/machine/include/qcom-qcs9100.inc b/conf/machine/include/qcom-qcs9100.inc index 28c00b4f0..521342294 100644 --- a/conf/machine/include/qcom-qcs9100.inc +++ b/conf/machine/include/qcom-qcs9100.inc @@ -14,6 +14,8 @@ MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \ MACHINE_EXTRA_RRECOMMENDS += " \ packagegroup-qcom-boot-additional \ + qcom-rtss-mailbox-dlkm \ + qcom-rtss-mailbox-umd-utils \ " # Memory layout needed by the SPL FIT boot flow. diff --git a/conf/machine/qcom-armv8a.conf b/conf/machine/qcom-armv8a.conf index 8262eec64..1400b166a 100644 --- a/conf/machine/qcom-armv8a.conf +++ b/conf/machine/qcom-armv8a.conf @@ -88,6 +88,8 @@ MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \ MACHINE_EXTRA_RRECOMMENDS += " \ packagegroup-qcom-boot-additional \ + qcom-rtss-mailbox-dlkm \ + qcom-rtss-mailbox-umd-utils \ " # Modules and firmware for all supported machines