Skip to contentSkip to conversation

igt-gpu-tools: add new package

PATCH Superseded Arthur She 2 participants 3 messages Jun 19, 2020

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Arthur She

author
#0 lore raw

PATCH v2 1/1 igt-gpu-tools: add new package

igt-gpu-tools is a collection of tools for development and testing of the DRM drivers. (https://gitlab.freedesktop.org/drm/igt-gpu-tools)
This recipe is originally copied from meta-intel and added the following modifications
1. Enable ARM architecture
2. Enable igt-runner and Chamelium
3. Build git HEAD code instead of a specific version
The original recipe in the meta-intel will be removed and replaced by this one to avoid having a duplicate recipe.
It is applicable to be submitted to oe-core, because it provides a core validation functionality that is needed by all providing DRM drivers and not just to a single arch.

---
 .../igt-gpu-tools/igt-gpu-tools_git.bb        | 47 +++++++++++++++++++
 1 file changed, 47 insertions(+)
 create mode 100644 meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools_git.bb
meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools_git.bb new file +47 -0
new file mode 100644
index 0000000000..dc9537c9e3
@@ -0,0 +1,47 @@
+SUMMARY = "IGT GPU Tools"
+DESCRIPTION = "IGT GPU Tools is a collection of tools for development and testing of the DRM drivers"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=67bfee4df38fa6ecbe3a675c552d4c08"
+
+LICENSE = "MIT"
+
+inherit meson
+
+SRCREV = "d16ad07e7f2a028e14d61f570931c87fa5ce404c"
+PV = "1.25+git${SRCPV}"
+
+SRC_URI = "git://gitlab.freedesktop.org/drm/igt-gpu-tools.git;protocol=https"
+
+S = "${WORKDIR}/git"
+
+DEPENDS += "libdrm libpciaccess cairo udev glib-2.0 procps libunwind kmod openssl xmlrpc-c gsl elfutils alsa-lib json-c bison-native"
+RDEPENDS_${PN} += "bash"
+RDEPENDS_${PN}-tests += "bash"
+
+PACKAGE_BEFORE_PN = "${PN}-benchmarks ${PN}-tests"
+
+EXTRA_OEMESON = "-Ddocs=disabled -Drunner=enabled -Dchamelium=enabled"
+COMPATIBLE_HOST = "(x86_64.*|i.86.*|arm.*|aarch64).*-linux"
+COMPATIBLE_HOST_libc-musl_class-target = "null"
+SECURITY_LDFLAGS = "${SECURITY_X_LDFLAGS}"
+
+gputools_sysroot_preprocess() {
+	rm -f ${SYSROOT_DESTDIR}${libdir}/pkgconfig/intel-gen4asm.pc
+}
+SYSROOT_PREPROCESS_FUNCS += "gputools_sysroot_preprocess"
+
+do_install_append() {
+    install -d ${D}/usr/share/${BPN}/scripts
+    install ${S}/scripts/run-tests.sh ${D}/usr/share/${BPN}/scripts
+    install -d ${D}/usr/share/${BPN}/runner
+    install -D ${B}/runner/igt_runner ${D}/usr/share/${BPN}/runner
+    install -D ${B}/runner/igt_resume ${D}/usr/share/${BPN}/runner
+}
+
+FILES_${PN}-benchmarks += "${libexecdir}/${BPN}/benchmarks"
+FILES_${PN}-tests += "\
+        ${libexecdir}/${BPN}/*\
+        ${datadir}/${BPN}/1080p-right.png\
+        ${datadir}/${BPN}/1080p-left.png\
+        ${datadir}/${BPN}/pass.png\
+        ${datadir}/${BPN}/test-list.txt"
Signature · 1 line
2.25.1
#1 lore raw

You also need to add a maintainers.inc entry (this will be used by auto upgrade helper to send version upgrade patches or reminders to upgrade).

Alex

Quoted 83 lines · Arthur She

igt-gpu-tools is a collection of tools for development and testing of the DRM
drivers. (https://gitlab.freedesktop.org/drm/igt-gpu-tools)
This recipe is originally copied from meta-intel and added the following modifications
1. Enable ARM architecture
2. Enable igt-runner and Chamelium
3. Build git HEAD code instead of a specific version
The original recipe in the meta-intel will be removed and replaced by this one to avoid having a duplicate recipe.
It is applicable to be submitted to oe-core, because it provides a core validation functionality that is needed by all providing DRM drivers and not just to a single arch.

---
 .../igt-gpu-tools/igt-gpu-tools_git.bb        | 47 +++++++++++++++++++
 1 file changed, 47 insertions(+)
 create mode 100644 meta/recipes-graphics/igt-gpu-tools/

igt-gpu-tools_git.bb

meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools_git.bb new file +2 -0
new file mode 100644
index 0000000000..dc9537c9e3
@@ -0,0 +1,47 @@
+SUMMARY = "IGT GPU Tools"
+DESCRIPTION = "IGT GPU Tools is a collection of tools for development and

testing of the DRM drivers"

meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools_git.bb new file +11 -0
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=67bfee4df38fa6ecbe3a675c552d4c08"
+
+LICENSE = "MIT"
+
+inherit meson
+
+SRCREV = "d16ad07e7f2a028e14d61f570931c87fa5ce404c"
+PV = "1.25+git${SRCPV}"
+
+SRC_URI = "git://

gitlab.freedesktop.org/drm/igt-gpu-tools.git;protocol=https"

meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools_git.bb new file +4 -0
+
+S = "${WORKDIR}/git"
+
+DEPENDS += "libdrm libpciaccess cairo udev glib-2.0 procps libunwind kmod

openssl xmlrpc-c gsl elfutils alsa-lib json-c bison-native"

meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools_git.bb new file +30 -1
+RDEPENDS_${PN} += "bash"
+RDEPENDS_${PN}-tests += "bash"
+
+PACKAGE_BEFORE_PN = "${PN}-benchmarks ${PN}-tests"
+
+EXTRA_OEMESON = "-Ddocs=disabled -Drunner=enabled -Dchamelium=enabled"
+COMPATIBLE_HOST = "(x86_64.*|i.86.*|arm.*|aarch64).*-linux"
+COMPATIBLE_HOST_libc-musl_class-target = "null"
+SECURITY_LDFLAGS = "${SECURITY_X_LDFLAGS}"
+
+gputools_sysroot_preprocess() {
+       rm -f ${SYSROOT_DESTDIR}${libdir}/pkgconfig/intel-gen4asm.pc
+}
+SYSROOT_PREPROCESS_FUNCS += "gputools_sysroot_preprocess"
+
+do_install_append() {
+    install -d ${D}/usr/share/${BPN}/scripts
+    install ${S}/scripts/run-tests.sh ${D}/usr/share/${BPN}/scripts
+    install -d ${D}/usr/share/${BPN}/runner
+    install -D ${B}/runner/igt_runner ${D}/usr/share/${BPN}/runner
+    install -D ${B}/runner/igt_resume ${D}/usr/share/${BPN}/runner
+}
+
+FILES_${PN}-benchmarks += "${libexecdir}/${BPN}/benchmarks"
+FILES_${PN}-tests += "\
+        ${libexecdir}/${BPN}/*\
+        ${datadir}/${BPN}/1080p-right.png\
+        ${datadir}/${BPN}/1080p-left.png\
+        ${datadir}/${BPN}/pass.png\
+        ${datadir}/${BPN}/test-list.txt"
--

2.25.1

author
#2 lore raw

Hi Alex,
Since Anuj is the original maintainer, I'll put his name on it.

Thanks,
Arthur

Quoted 91 lines · Alexander Kanavin

You also need to add a maintainers.inc entry (this will be used by auto upgrade helper to send version upgrade patches or reminders to upgrade).

Alex

Quoted 83 lines · Arthur She

igt-gpu-tools is a collection of tools for development and testing of the DRM
drivers. (https://gitlab.freedesktop.org/drm/igt-gpu-tools)
This recipe is originally copied from meta-intel and added the following modifications
1. Enable ARM architecture
2. Enable igt-runner and Chamelium
3. Build git HEAD code instead of a specific version
The original recipe in the meta-intel will be removed and replaced by this one to avoid having a duplicate recipe.
It is applicable to be submitted to oe-core, because it provides a core validation functionality that is needed by all providing DRM drivers and not just to a single arch.

---
 .../igt-gpu-tools/igt-gpu-tools_git.bb        | 47 +++++++++++++++++++
 1 file changed, 47 insertions(+)
 create mode 100644 meta/recipes-graphics/igt-gpu-tools/

igt-gpu-tools_git.bb

meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools_git.bb new file +2 -0
new file mode 100644
index 0000000000..dc9537c9e3
@@ -0,0 +1,47 @@
+SUMMARY = "IGT GPU Tools"
+DESCRIPTION = "IGT GPU Tools is a collection of tools for development

and testing of the DRM drivers"

meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools_git.bb new file +11 -0
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=67bfee4df38fa6ecbe3a675c552d4c08"
+
+LICENSE = "MIT"
+
+inherit meson
+
+SRCREV = "d16ad07e7f2a028e14d61f570931c87fa5ce404c"
+PV = "1.25+git${SRCPV}"
+
+SRC_URI = "git://

gitlab.freedesktop.org/drm/igt-gpu-tools.git;protocol=https"

meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools_git.bb new file +4 -0
+
+S = "${WORKDIR}/git"
+
+DEPENDS += "libdrm libpciaccess cairo udev glib-2.0 procps libunwind

kmod openssl xmlrpc-c gsl elfutils alsa-lib json-c bison-native"

meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools_git.bb new file +30 -1
+RDEPENDS_${PN} += "bash"
+RDEPENDS_${PN}-tests += "bash"
+
+PACKAGE_BEFORE_PN = "${PN}-benchmarks ${PN}-tests"
+
+EXTRA_OEMESON = "-Ddocs=disabled -Drunner=enabled -Dchamelium=enabled"
+COMPATIBLE_HOST = "(x86_64.*|i.86.*|arm.*|aarch64).*-linux"
+COMPATIBLE_HOST_libc-musl_class-target = "null"
+SECURITY_LDFLAGS = "${SECURITY_X_LDFLAGS}"
+
+gputools_sysroot_preprocess() {
+       rm -f ${SYSROOT_DESTDIR}${libdir}/pkgconfig/intel-gen4asm.pc
+}
+SYSROOT_PREPROCESS_FUNCS += "gputools_sysroot_preprocess"
+
+do_install_append() {
+    install -d ${D}/usr/share/${BPN}/scripts
+    install ${S}/scripts/run-tests.sh ${D}/usr/share/${BPN}/scripts
+    install -d ${D}/usr/share/${BPN}/runner
+    install -D ${B}/runner/igt_runner ${D}/usr/share/${BPN}/runner
+    install -D ${B}/runner/igt_resume ${D}/usr/share/${BPN}/runner
+}
+
+FILES_${PN}-benchmarks += "${libexecdir}/${BPN}/benchmarks"
+FILES_${PN}-tests += "\
+        ${libexecdir}/${BPN}/*\
+        ${datadir}/${BPN}/1080p-right.png\
+        ${datadir}/${BPN}/1080p-left.png\
+        ${datadir}/${BPN}/pass.png\
+        ${datadir}/${BPN}/test-list.txt"
--

2.25.1