From 6ce8a90c1cdf0af96f4734c652b203fce8bf1929 Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Fri, 7 Dec 2018 11:53:32 -0500 Subject: Rework mapviewer and mapviewer-demo Rework the mapviewer and mapviewer-demo recipes to get mapviewer working out of the box for the cluster demo: - Remove the old on/off scripts, as the intent is that the cluster demo work out of the box on an image built with the agl-cluster-demo-support feature. - The separate weston systemd unit has been replaced with a drop-in over-ride file. - A new systemd unit is installed to configure the network connection to the cluster board. This is required now because the weston unit no longer runs as root. - A systemd drop-in is added to have afm-api-windowmanager@.service depend on weston-ready. This is a bit of a workaround ATM, as the windowmanager service was consistently failing due to Weston taking longer to start with the gst-record feature enabled. It is likely that making this more generic should be investigated. - The mapviewer systemd unit has been updated. Its Install target is now afm-user-session@.target; in my testing this seemed the least invasive solution, as there are some dependency loop issues that currently prevent adding it to multi-user.target. As well, its dependencies have been updated from weston and HomeScreen to afm-api-windowmanager@, which is not entirely ideal, but is about the best that can be done ATM given that mapviewer interacts with the other windowmanager users via Weston, but is not an app framework application. Change-Id: I8826e670ae156edd461cc657acefc86e7836a916 Signed-off-by: Scott Murray --- .../mapviewer-demo/mapviewer-demo-network-conf.service | 15 +++++++++++++++ .../mapviewer-demo/switch_off_mapviewer-demo.sh | 5 ----- .../mapviewer-demo/switch_on_mapviewer-demo.sh | 6 ------ .../navigation/mapviewer-demo/weston-mapviewer-demo.conf | 11 +++++++++++ .../mapviewer-demo/weston-mapviewer-demo.service | 16 ---------------- .../navigation/mapviewer-demo/weston-ready.conf | 4 ++++ 6 files changed, 30 insertions(+), 27 deletions(-) create mode 100644 recipes-demo-hmi/navigation/mapviewer-demo/mapviewer-demo-network-conf.service delete mode 100755 recipes-demo-hmi/navigation/mapviewer-demo/switch_off_mapviewer-demo.sh delete mode 100755 recipes-demo-hmi/navigation/mapviewer-demo/switch_on_mapviewer-demo.sh create mode 100644 recipes-demo-hmi/navigation/mapviewer-demo/weston-mapviewer-demo.conf delete mode 100644 recipes-demo-hmi/navigation/mapviewer-demo/weston-mapviewer-demo.service create mode 100644 recipes-demo-hmi/navigation/mapviewer-demo/weston-ready.conf (limited to 'recipes-demo-hmi/navigation/mapviewer-demo') diff --git a/recipes-demo-hmi/navigation/mapviewer-demo/mapviewer-demo-network-conf.service b/recipes-demo-hmi/navigation/mapviewer-demo/mapviewer-demo-network-conf.service new file mode 100644 index 000000000..1a6e2d8b7 --- /dev/null +++ b/recipes-demo-hmi/navigation/mapviewer-demo/mapviewer-demo-network-conf.service @@ -0,0 +1,15 @@ +[Unit] +Description=Configure dedicated link for cluster demo network +After=sys-subsystem-net-devices-eth1.device +Requires=sys-subsystem-net-devices-eth1.device +Before=network.target + +[Service] +# Note that this is done as opposed to using connman as configuring an +# interface on a second network separate from the rest of the interfaces +# is non-trivial in connman and needs further investigation. +ExecStart=/sbin/ifconfig eth1 192.168.20.93 +Type=oneshot + +[Install] +WantedBy=network.target diff --git a/recipes-demo-hmi/navigation/mapviewer-demo/switch_off_mapviewer-demo.sh b/recipes-demo-hmi/navigation/mapviewer-demo/switch_off_mapviewer-demo.sh deleted file mode 100755 index 22fa16c7c..000000000 --- a/recipes-demo-hmi/navigation/mapviewer-demo/switch_off_mapviewer-demo.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -/bin/systemctl disable weston-mapviewer-demo.service -/bin/systemctl enable weston.service -/bin/systemctl disable mapviewer.service diff --git a/recipes-demo-hmi/navigation/mapviewer-demo/switch_on_mapviewer-demo.sh b/recipes-demo-hmi/navigation/mapviewer-demo/switch_on_mapviewer-demo.sh deleted file mode 100755 index f61cdc700..000000000 --- a/recipes-demo-hmi/navigation/mapviewer-demo/switch_on_mapviewer-demo.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -/bin/systemctl disable weston.service -/bin/systemctl enable weston-mapviewer-demo.service -/bin/systemctl enable mapviewer.service - diff --git a/recipes-demo-hmi/navigation/mapviewer-demo/weston-mapviewer-demo.conf b/recipes-demo-hmi/navigation/mapviewer-demo/weston-mapviewer-demo.conf new file mode 100644 index 000000000..8bccffd29 --- /dev/null +++ b/recipes-demo-hmi/navigation/mapviewer-demo/weston-mapviewer-demo.conf @@ -0,0 +1,11 @@ +[Unit] +# Add dependency on network, since the recorder feature requires it +After=network.target +Requires=network.target + +[Service] +# GSM? +ExecStartPre=/bin/sleep 2 +# Replace default ExecStart line with one that uses the cluster demo specific ini +ExecStart= +ExecStart=/usr/bin/weston --idle-time=0 --tty=1 --gst-record --config=weston-mapviewer-demo.ini --log=/run/platform/display/weston.log diff --git a/recipes-demo-hmi/navigation/mapviewer-demo/weston-mapviewer-demo.service b/recipes-demo-hmi/navigation/mapviewer-demo/weston-mapviewer-demo.service deleted file mode 100644 index 65275cc03..000000000 --- a/recipes-demo-hmi/navigation/mapviewer-demo/weston-mapviewer-demo.service +++ /dev/null @@ -1,16 +0,0 @@ -[Unit] -Description=Weston reference Wayland compositor -Conflicts=getty@tty1.service -After=dbus.service rc.pvr.service - -[Service] -ExecStartPre=/sbin/ifconfig eth0 192.168.20.93 -ExecStartPre=/bin/rm -rf /home/root/.cache/gstreamer-1.0 -#ExecStartPre=/bin/sleep 10 -ExecStart=/usr/bin/weston-launch -u root -- --idle-time=4294967 --gst-record --config=weston-mapviewer-demo.ini -ExecStop=/usr/bin/killall -s KILL weston -Type=simple - -[Install] -WantedBy=multi-user.target -Alias=weston.service diff --git a/recipes-demo-hmi/navigation/mapviewer-demo/weston-ready.conf b/recipes-demo-hmi/navigation/mapviewer-demo/weston-ready.conf new file mode 100644 index 000000000..e90eed5f8 --- /dev/null +++ b/recipes-demo-hmi/navigation/mapviewer-demo/weston-ready.conf @@ -0,0 +1,4 @@ +[Unit] +Requires=weston-ready.service +After=weston-ready.service + -- cgit 1.2.3-korg