From 92d67bf9c0385ce2513bf7bf0001f27223d750fd Mon Sep 17 00:00:00 2001 From: Damian Hobson-Garcia Date: Fri, 8 Jan 2021 17:03:00 +0900 Subject: Add agl-drm-lease feature The agl-drm-lease feature will add the DRM lease manager and client library to the current image. DRM lease support is also added to the kmscube test utility if it is installed. Bug-AGL: SPEC-3729 Signed-off-by: Damian Hobson-Garcia Change-Id: I75cfbc363724916202ec15bb71813f49d6b560eb --- .../drm-lease-manager/drm-lease-manager.service | 6 ++++ .../drm-lease-manager/drm-lease-manager/run-ptest | 10 +++++++ .../drm-lease-manager/drm-lease-manager_git.bb | 35 ++++++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 meta-agl-drm-lease/recipes-graphics/drm-lease-manager/drm-lease-manager/drm-lease-manager.service create mode 100644 meta-agl-drm-lease/recipes-graphics/drm-lease-manager/drm-lease-manager/run-ptest create mode 100644 meta-agl-drm-lease/recipes-graphics/drm-lease-manager/drm-lease-manager_git.bb (limited to 'meta-agl-drm-lease/recipes-graphics/drm-lease-manager') diff --git a/meta-agl-drm-lease/recipes-graphics/drm-lease-manager/drm-lease-manager/drm-lease-manager.service b/meta-agl-drm-lease/recipes-graphics/drm-lease-manager/drm-lease-manager/drm-lease-manager.service new file mode 100644 index 00000000..9984d2c5 --- /dev/null +++ b/meta-agl-drm-lease/recipes-graphics/drm-lease-manager/drm-lease-manager/drm-lease-manager.service @@ -0,0 +1,6 @@ +[Unit] +Description=DRM Lease Manager + +[Service] +ExecStart=drm-lease-manager +RuntimeDirectory=drm-lease-manager diff --git a/meta-agl-drm-lease/recipes-graphics/drm-lease-manager/drm-lease-manager/run-ptest b/meta-agl-drm-lease/recipes-graphics/drm-lease-manager/drm-lease-manager/run-ptest new file mode 100644 index 00000000..c799763c --- /dev/null +++ b/meta-agl-drm-lease/recipes-graphics/drm-lease-manager/drm-lease-manager/run-ptest @@ -0,0 +1,10 @@ +#!/bin/sh + +for i in $(ls ./*-test) ; do + $i &> /dev/null + if [ $? -eq 0 ]; then + echo "PASS: $i" + else + echo "FAIL: $i" + fi +done diff --git a/meta-agl-drm-lease/recipes-graphics/drm-lease-manager/drm-lease-manager_git.bb b/meta-agl-drm-lease/recipes-graphics/drm-lease-manager/drm-lease-manager_git.bb new file mode 100644 index 00000000..3b1f5aaf --- /dev/null +++ b/meta-agl-drm-lease/recipes-graphics/drm-lease-manager/drm-lease-manager_git.bb @@ -0,0 +1,35 @@ +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/drm-lease-manager;protocol=https;branch=${AGL_BRANCH} \ + file://drm-lease-manager.service \ + file://run-ptest \ + " + +PV = "0.1+git${SRCPV}" +SRCREV = "f991de200799118355fd75237a740321bda7aaa7" + +S = "${WORKDIR}/git" + +inherit meson +inherit systemd +inherit ptest + +DEPENDS = "libdrm libcheck fff" + +do_install_append() { + install -d ${D}/${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/drm-lease-manager.service ${D}/${systemd_unitdir}/system + rm -rf ${D}/${localstatedir} +} + +SYSTEMD_SERVICE_${PN} = "drm-lease-manager.service" + +EXTRA_OEMESON += "${@bb.utils.contains('PTEST_ENABLED', '1', '-Denable-tests=true', '', d)}" +RDEPENDS_${PN}-ptest = "libcheck" + +do_install_ptest() { + install ${B}/libdlmclient/test/libdlmclient-test ${D}${PTEST_PATH} + install ${B}/drm-lease-manager/test/lease-server-test ${D}${PTEST_PATH} + install ${B}/drm-lease-manager/test/lease-manager-test ${D}${PTEST_PATH} +} -- cgit 1.2.3-korg