Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

domd: use drmkms in non weston build for libsdl2 #89

Open
wants to merge 3 commits into
base: kirkstone
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions meta-xt-control-domain-virtio/recipes-guest/doma/doma.bbappend
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

# virtio-env-weston.conf whould be used if we have the weston compositor in domd
# the product should redefine variable.

XT_DOMD_DISPLAY_SYSTEM ??= "weston"

SRC_URI += "\
file://virtio-env.conf \
file://virtio-env-weston.conf \
"

RDEPENDS:${PN} += " \
Expand All @@ -10,9 +16,16 @@ RDEPENDS:${PN} += " \

FILES:${PN} += " \
${sysconfdir}/systemd/system/doma.service.d/virtio-env.conf \
${@bb.utils.contains('XT_DOMD_DISPLAY_SYSTEM', 'weston', \
'${sysconfdir}/systemd/system/doma.service.d/virtio-env-weston.conf', \
'', d)} \
"

do_install:append() {
install -d ${D}${sysconfdir}/systemd/system/doma.service.d
install -m 0644 ${WORKDIR}/virtio-env.conf ${D}${sysconfdir}/systemd/system/doma.service.d

if ${@bb.utils.contains('XT_DOMD_DISPLAY_SYSTEM', 'weston', 'true', 'false', d)}; then
install -m 0644 ${WORKDIR}/virtio-env-weston.conf ${D}${sysconfdir}/systemd/system/doma.service.d
fi
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[Unit]
[email protected]
[email protected]
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
[Unit]
[email protected]
[email protected]

[Service]
Type=simple
ExecStart=
Expand Down
12 changes: 7 additions & 5 deletions meta-xt-control-domain-virtio/recipes-guest/domu/domu.bbappend
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

# virtio-env-weston.conf whould be used if we have the weston compositor in domd
# the product should redefine variable.

XT_DOMD_DISPLAY_SYSTEM ??= "weston"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, now you have this in two recipes... I believe it is better to move this variable definition to some common .inc file, to decrease code duplication.


SRC_URI += "\
file://virtio-env.conf \
file://virtio-env-weston.conf \
Expand All @@ -12,7 +17,7 @@ RDEPENDS:${PN} += " \

FILES:${PN} += " \
${sysconfdir}/systemd/system/domu.service.d/virtio-env.conf \
${@bb.utils.contains('MACHINE_FEATURES', 'gsx', \
${@bb.utils.contains('XT_DOMD_DISPLAY_SYSTEM', 'weston', \
'${sysconfdir}/systemd/system/domu.service.d/virtio-env-weston.conf', \
'${sysconfdir}/systemd/system/domu.service.d/virtio-env-no-weston.conf', d)} \
"
Expand All @@ -21,10 +26,7 @@ do_install:append() {
install -d ${D}${sysconfdir}/systemd/system/domu.service.d
install -m 0644 ${WORKDIR}/virtio-env.conf ${D}${sysconfdir}/systemd/system/domu.service.d

# this virtio-env-weston.conf whould be used if we have the 'wayland'
# distro feature inside DomU. But to avoid introducing new variable
# we can look on presence of GSX on the board.
if ${@bb.utils.contains('MACHINE_FEATURES', 'gsx', 'true', 'false', d)}; then
if ${@bb.utils.contains('XT_DOMD_DISPLAY_SYSTEM', 'weston', 'true', 'false', d)}; then
install -m 0644 ${WORKDIR}/virtio-env-weston.conf ${D}${sysconfdir}/systemd/system/domu.service.d
else
install -m 0644 ${WORKDIR}/virtio-env-no-weston.conf ${D}${sysconfdir}/systemd/system/domu.service.d
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

DEPENDS:remove = " qemu-native qemu-helper-native"

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

RDEPENDS:${PN}:remove = " nativesdk-qemu nativesdk-qemu-helper"

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[Manager]
DefaultEnvironment="SDL_VIDEODRIVER=kmsdrm"
10 changes: 8 additions & 2 deletions meta-xt-driver-domain/recipes-core/systemd/systemd_%.bbappend
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

SRC_URI:append = " \
file://ip_forward.conf \
file://sdl-env.conf \
file://sdl-env-wayland.conf \
file://sdl-env-kmsdrm.conf \
"

PACKAGECONFIG:append = " networkd"
Expand All @@ -14,5 +15,10 @@ USERADD_ERROR_DYNAMIC = "warn"
do_install:append() {
install -m 0644 ${WORKDIR}/ip_forward.conf ${D}${sysconfdir}/tmpfiles.d/
install -d ${D}${sysconfdir}/systemd/system.conf.d/
install -m 0644 ${WORKDIR}/sdl-env.conf ${D}${sysconfdir}/systemd/system.conf.d/
# Check if 'weston' is included in the DISTRO_FEATURES or PACKAGECONFIG
if ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'true', 'false', d)}; then
install -m 0644 ${WORKDIR}/sdl-env-wayland.conf ${D}${sysconfdir}/systemd/system.conf.d/sdl-env.conf
else
install -m 0644 ${WORKDIR}/sdl-env-kmsdrm.conf ${D}${sysconfdir}/systemd/system.conf.d/sdl-env.conf
fi
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

PACKAGECONFIG:append = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '', ' kmsdrm gles2 ', d)}"