To allow usefully depending on the native-shell-client "homescreen"
application from the systemd units running QEMU, tweak things to
drop the use of agl-session from the agl-kvm-demo-platform host
image. The motivation for this is to have the VM guest start up
ordering work as expected, avoiding unnecessary delays from race
failures on boot.
Changes:
- Rework agl-kvm template to use conf/include/agl-kvm.inc include
file to match other featurs and simplify development.
- Add include files for the host ("default" in BitBake) and guest
(so agl-kvm-guest) multiconfigs to allow disabling the agl-demo
feature in the host build, which disables agl-session.
- Update native-shell-client systemd unit to run at system scope
and depend upon agl-compositor directly.
- Update agl-qemu-runner systemd template unit to depend directly
on native-shell-client.
Note that a consequence of these changes is that building images
other than agl-kvm-demo-platform when the "agl-kvm" feature is used
will likely not yield the desired results. Future work will
investigate avoiding this problem, or forcing explicit compatibility
errors to avoid user confusion.
Bug-AGL: SPEC-4618
Change-Id: I7f2f2ad9a453b5d99bed4cfc33d99eb3002bcceb
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
--- /dev/null
+DISTRO_FEATURES:append = " virtualization"
+
+BBMULTICONFIG = "agl-kvm-guest"
+
+AGL_FEATURES:append = " agl-kvm"
+
+# Override remote display network configuration to use KVM demo's
+# network configuration
+TRANSMITTER_OUTPUT_HOST = "172.16.10.3"
+
+# Override cluster dashboard VIS server host for KVM demo's network
+# configuration
+CLUSTER_DEMO_VISS_HOSTNAME = "172.16.10.2"
+
+include mc-conf-${BB_CURRENT_MC}.inc
--- /dev/null
+# Override the default virtio-can configuration, as we do not have
+# a backend to be able to use it.
+CANBUS_NETWORK_CONFIG:virtio-all = "canbus-can.network"
--- /dev/null
+# We don't want the app framework bits (specifically the user session) in
+# the KVM host image.
+AGL_FEATURES:remove = "agl-app-fw"
-Requires=agl-compositor.service
-After=agl-compositor.service
+Requires=weston.service
+After=weston.service
+Environment=XDG_RUNTIME_DIR=/run/user/200
ExecStart=/usr/bin/native-shell-client
Restart=on-failure
[Install]
ExecStart=/usr/bin/native-shell-client
Restart=on-failure
[Install]
-WantedBy=agl-session.target
+WantedBy=multi-user.target
SRC_URI += "file://native-shell-client.service"
SRC_URI += "file://native-shell-client.service"
+inherit systemd
+
+SYSTEMD_SERVICE:${PN} = "${BPN}.service"
+
- install -d ${D}${systemd_user_unitdir}/agl-session.target.wants
- install -m0644 ${WORKDIR}/native-shell-client.service ${D}${systemd_user_unitdir}/native-shell-client.service
- ln -s ../native-shell-client.service ${D}${systemd_user_unitdir}/agl-session.target.wants/native-shell-client.service
+ install -D -m 0644 ${WORKDIR}/native-shell-client.service ${D}${systemd_system_unitdir}/native-shell-client.service
-FILES:${PN} += " ${systemd_user_unitdir}"
-
RCONFLICTS:${PN} = "homescreen"
RCONFLICTS:${PN} = "homescreen"
fi
export SDL_VIDEODRIVER=wayland
fi
export SDL_VIDEODRIVER=wayland
-export XDG_RUNTIME_DIR=/run/user/1001
+export XDG_RUNTIME_DIR=/run/user/200
# The following may be needed if the socket is not wayland-0, as SDL
# seems to lack detection logic for that case.
#export WAYLAND_DISPLAY=wayland-1
# The following may be needed if the socket is not wayland-0, as SDL
# seems to lack detection logic for that case.
#export WAYLAND_DISPLAY=wayland-1
-Requires=agl-session@agl-driver.service
-After=agl-session@agl-driver.service
+Requires=native-shell-client.service
+After=native-shell-client.service
-DISTRO_FEATURES:append = " virtualization"
-
-BBMULTICONFIG = "agl-kvm-guest"
-
+#see meta-agl-demo/conf/include/agl-kvm.inc
+require conf/include/agl-kvm.inc
The following features are pulled:
* agl-demo
The following features are pulled:
* agl-demo
+
+Note that enabling this feature results in a configuration where building images
+other than agl-kvm-demo-platform will likely not give the desired results.