Skip to content

Commit 4893e2c

Browse files
committed
meta-qcom: security: Add minkipc library for security feature support
Add minkipc library for security feature support. Minkipc is designed to facilitate secure communication between different domains. Signed-off-by: Jiaxing Li <[email protected]>
1 parent 821d24c commit 4893e2c

File tree

5 files changed

+140
-0
lines changed

5 files changed

+140
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
SUMMARY = "Mink IDL compiler (prebuilt binary)"
2+
DESCRIPTION = " \
3+
Mink IDL is used to describe programming interfaces that can be used to communicate across security domain boundaries. \
4+
Once an interface is described in an IDL source file, the Mink IDL compiler can generate target language header files. \
5+
"
6+
HOMEPAGE = "https://github.com/quic/mink-idl-compiler"
7+
SECTION = "devel"
8+
9+
LICENSE = "CLOSED"
10+
LIC_FILES_CHKSUM = ""
11+
12+
SRC_URI = "https://github.com/quic/mink-idl-compiler/releases/download/v0.2.0/idlc;downloadfilename=minkidlc;unpack=0"
13+
SRC_URI[sha256sum] = "2a6dd5b2fdad5e307489849b3a4ce56daf241ff517e89e1eb207813008e558d7"
14+
15+
inherit native
16+
17+
COMPATIBLE_HOST = "x86_64.*-linux"
18+
19+
do_install() {
20+
install -d ${D}${bindir}
21+
install -m 0755 ${UNPACKDIR}/minkidlc ${D}${bindir}/minkidlc
22+
}
23+
24+
FILES:${PN} += "${bindir}/minkidlc"
25+
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
From 9f4e0d9d611ee8580eedb61fce4af8686f926a9c Mon Sep 17 00:00:00 2001
2+
From: Jiaxing Li <[email protected]>
3+
Date: Thu, 9 Oct 2025 16:47:54 +0800
4+
Subject: [PATCH] minkipc:compilation: Fix compilation issue
5+
6+
- To fix compilation error: #warning "<cstdbool> is deprecated in C++17, remove the #include" [-Werror=cpp].
7+
- Disable downloading minkidlc in CMakeLists.txt.
8+
9+
Signed-off-by: Jiaxing Li <[email protected]>
10+
Upstream-Status: Inappropriate [meta-qcom specific]
11+
---
12+
CMakeLists.txt | 15 +++++++++------
13+
1 file changed, 9 insertions(+), 6 deletions(-)
14+
15+
diff --git a/CMakeLists.txt b/CMakeLists.txt
16+
index 346e1bc..7f12f3f 100644
17+
--- a/CMakeLists.txt
18+
+++ b/CMakeLists.txt
19+
@@ -17,19 +17,22 @@ option(BUILD_GPFS_LISTENER "Build GP File system Listener" TRUE)
20+
21+
include(GNUInstallDirs)
22+
23+
-set(MINKIDLC_BIN_DIR ${CMAKE_CURRENT_SOURCE_DIR}/minkidlc)
24+
+set(MINKIDLC_BIN_DIR "${CMAKE_CURRENT_SOURCE_DIR}/minkidlc" CACHE PATH "Directory containing the minkidlc executable")
25+
26+
-file(DOWNLOAD
27+
- https://github.com/quic/mink-idl-compiler/releases/download/v0.2.0/idlc
28+
- ${MINKIDLC_BIN_DIR}/minkidlc
29+
-)
30+
+if ("${MINKIDLC_BIN_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}/minkidlc")
31+
+ file(DOWNLOAD
32+
+ https://github.com/quic/mink-idl-compiler/releases/download/v0.2.0/idlc
33+
+ ${MINKIDLC_BIN_DIR}/minkidlc
34+
+ )
35+
36+
-file(CHMOD ${MINKIDLC_BIN_DIR}/minkidlc PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ)
37+
+ file(CHMOD ${MINKIDLC_BIN_DIR}/minkidlc PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ)
38+
+endif()
39+
40+
add_compile_options(
41+
-Wall -Wextra -Werror -Wshadow -Wcast-align
42+
-Wmissing-declarations -Wformat-security -Wmissing-noreturn
43+
-Wdeprecated -fPIC
44+
+ -Wno-error=cpp
45+
)
46+
47+
add_subdirectory(libminkadaptor)
48+
--
49+
2.34.1
50+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[Unit]
2+
Description=QTEE Supplicant Service
3+
4+
[Service]
5+
Type=exec
6+
ExecStart=/usr/bin/qtee_supplicant
7+
8+
[Install]
9+
WantedBy=multi-user.target
10+
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
SUMMARY = "Qualcomm MinkIPC applications and library"
2+
DESCRIPTION = " \
3+
MINK ('Mink is Not a Kernel') is a capability-based security framework, \
4+
which is a synchronous message passing facility based on the Object-Capability model, \
5+
designed to facilitate secure communication between different domains. \
6+
qteesupplicant service is designed for invocation dispatch and handling callbacks. \
7+
"
8+
HOMEPAGE = "https://github.com/qualcomm/minkipc.git"
9+
SECTION = "libs"
10+
11+
LICENSE = "BSD-3-Clause"
12+
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2b1366ebba1ebd9ae25ad19626bbca93"
13+
14+
inherit cmake systemd lib_package
15+
16+
SRC_URI += "\
17+
git://github.com/qualcomm/minkipc.git;branch=main;protocol=https \
18+
file://0001-minkipc-compilation-Fix-compilation-issue.patch \
19+
file://qteesupplicant.service \
20+
"
21+
SRCREV = "cd0355987595a0619e7689aec50dc4c91153b169"
22+
PV = "0.0+git"
23+
DEPENDS = " qcbor qcomtee minkidlc-native"
24+
25+
PACKAGES += "${PN}-systemd"
26+
RRECOMMENDS:${PN} += "${PN}-systemd"
27+
SYSTEMD_PACKAGES = "${PN} ${PN}-systemd"
28+
SYSTEMD_SERVICE:${PN}-systemd = "qteesupplicant.service"
29+
SYSTEMD_AUTO_ENABLE:${PN}-systemd = "disable"
30+
31+
EXTRA_OECMAKE = " -DBUILD_UNITTEST=ON -DMINKIDLC_BIN_DIR=${STAGING_BINDIR_NATIVE}"
32+
do_install:append() {
33+
install -d ${D}${bindir}
34+
install -m 0755 ${WORKDIR}/build/qtee_supplicant/qtee_supplicant ${D}${bindir}/
35+
install -m 0755 ${WORKDIR}/build/libminkteec/tests/gp_test_client/gp_test_client ${D}${bindir}/
36+
install -m 0755 ${WORKDIR}/build/libminkadaptor/tests/smcinvoke_client/smcinvoke_client ${D}${bindir}/
37+
38+
install -d ${D}${systemd_unitdir}/system
39+
install -m 0644 ${UNPACKDIR}/qteesupplicant.service ${D}${systemd_unitdir}/system/
40+
}
41+
42+
lib_package = "${PN}-lib"
43+
FILES:${lib_package} = "${libdir}/*.so.*"
44+
FILES:${PN} += " ${bindir}/qtee_supplicant"
45+
FILES:${PN}-dev += "${libdir}/*.so"
46+
FILES:${PN}-bin += " \
47+
${bindir}/gp_test_client \
48+
${bindir}/smcinvoke_client \
49+
"
50+

recipes-security/packagegroups/packagegroup-qcom-secure.bb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,14 @@ DESCRIPTION = "QCOM security components provide smcinvoke functionalty"
44
inherit packagegroup
55

66
PACKAGES = " \
7+
${PN} \
78
${PN}-tests \
89
"
910

11+
RDEPENDS:${PN} += " \
12+
minkipc \
13+
"
14+
1015
RDEPENDS:${PN}-test += " \
1116
qcomtee-bin \
1217
qcbor-bin \

0 commit comments

Comments
 (0)