aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2022-11-23 15:30:14 -0500
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2022-12-14 16:27:39 +0000
commitd666d4921f2c09cc6b64150d9f1b7d8d3c36e995 (patch)
treed1358c46e1caf24c84700b41d3da75785cf9d5f4
parent0994f23f0a7f9f5ea6887705079880a91697b623 (diff)
weston-ini-conf: rework to add KVM host version
Add a canned weston.ini template and install it with the appropriate guest VM app ids as weston-ini-conf-kvm. The guest VM images/ids can be overriden with the variables GUEST_VM1_IMAGE and GUEST_VM2_IMAGE (from e.g. site.conf). Bug-AGL: SPEC-4618 Change-Id: I053a956fd5af78b13095f15b6e6c40e81a0ff0c9 Signed-off-by: Scott Murray <scott.murray@konsulko.com> (cherry picked from commit 6e5c561e962d0b900b8f6225f27467a193c43dee)
-rw-r--r--recipes-graphics/wayland/weston-ini-conf.bbappend2
-rw-r--r--recipes-graphics/wayland/weston-ini-conf/weston.ini.kvm.in18
-rw-r--r--recipes-graphics/wayland/weston-ini-conf_agldemo.inc48
-rw-r--r--recipes-graphics/wayland/weston-ini-conf_aglflutter.inc26
4 files changed, 67 insertions, 27 deletions
diff --git a/recipes-graphics/wayland/weston-ini-conf.bbappend b/recipes-graphics/wayland/weston-ini-conf.bbappend
index b509b38e1..423a46944 100644
--- a/recipes-graphics/wayland/weston-ini-conf.bbappend
+++ b/recipes-graphics/wayland/weston-ini-conf.bbappend
@@ -1 +1 @@
-require ${@bb.utils.contains('AGL_FEATURES', 'agl-flutter', 'weston-ini-conf_aglflutter.inc', '', d)}
+require ${@bb.utils.contains('AGL_FEATURES', 'agldemo', 'weston-ini-conf_agldemo.inc', '', d)}
diff --git a/recipes-graphics/wayland/weston-ini-conf/weston.ini.kvm.in b/recipes-graphics/wayland/weston-ini-conf/weston.ini.kvm.in
new file mode 100644
index 000000000..79ca30cd4
--- /dev/null
+++ b/recipes-graphics/wayland/weston-ini-conf/weston.ini.kvm.in
@@ -0,0 +1,18 @@
+[core]
+backend=drm-backend.so
+require-input=false
+modules=systemd-notify.so
+
+[shell]
+locking=true
+panel-position=none
+
+# A display is connected to HDMI-A-1
+[output]
+name=HDMI-A-1
+agl-shell-app-id=@GUEST_VM1_IMAGE@
+
+# A display is connected to HDMI-A-2
+[output]
+name=HDMI-A-2
+agl-shell-app-id=@GUEST_VM2_IMAGE@
diff --git a/recipes-graphics/wayland/weston-ini-conf_agldemo.inc b/recipes-graphics/wayland/weston-ini-conf_agldemo.inc
new file mode 100644
index 000000000..21d801455
--- /dev/null
+++ b/recipes-graphics/wayland/weston-ini-conf_agldemo.inc
@@ -0,0 +1,48 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/weston-ini-conf:"
+
+SRC_URI += "file://weston.ini.kvm.in"
+
+GUEST_VM1_IMAGE ?= "agl-demo-platform"
+GUEST_VM2_IMAGE ?= "agl-cluster-demo-platform"
+
+do_compile:append() {
+ # Put all of our cfg files together for a default portrait
+ # orientation configuration
+ rm -f ${WORKDIR}/weston.ini.flutter
+ for F in ${WESTON_FRAGMENTS}; do
+ cat ${WORKDIR}/${F}.cfg >> ${WORKDIR}/weston.ini.flutter
+ if grep -q '\[output\]' ${WORKDIR}/${F}.cfg; then
+ echo "activation-area=1080x1600+0,160" >> ${WORKDIR}/weston.ini.flutter
+ fi
+ echo >> ${WORKDIR}/weston.ini.flutter
+ done
+ sed -i -e '$ d' ${WORKDIR}/weston.ini.flutter
+
+ # Start with a canned configuration for a KVM host, filling in
+ # the guest VM application ids to pin them to specific outputs.
+ rm -f ${WORKDIR}/weston.ini.kvm
+ sed -e "s/@GUEST_VM1_IMAGE@/${GUEST_VM1_IMAGE}/g" \
+ -e "s/@GUEST_VM2_IMAGE@/${GUEST_VM2_IMAGE}/g" \
+ ${WORKDIR}/weston.ini.kvm.in > ${WORKDIR}/weston.ini.kvm
+}
+
+do_install:append() {
+ install -m 0644 ${WORKDIR}/weston.ini.flutter ${D}${weston_ini_dir}/
+ install -m 0644 ${WORKDIR}/weston.ini.kvm ${D}${weston_ini_dir}/
+}
+
+PACKAGE_BEFORE_PN += "${PN}-flutter ${PN}-kvm"
+
+FILES:${PN}-flutter = "${weston_ini_dir}/weston.ini.flutter"
+
+RPROVIDES:${PN}-flutter = "weston-ini"
+RCONFLICTS:${PN}-flutter = "${PN}"
+ALTERNATIVE:${PN}-flutter = "weston.ini"
+ALTERNATIVE_TARGET_${PN}-flutter = "${weston_ini_dir}/weston.ini.flutter"
+
+FILES:${PN}-kvm = "${weston_ini_dir}/weston.ini.kvm"
+
+RPROVIDES:${PN}-kvm = "weston-ini"
+RCONFLICTS:${PN}-kvm = "${PN}"
+ALTERNATIVE:${PN}-kvm = "weston.ini"
+ALTERNATIVE_TARGET_${PN}-kvm = "${weston_ini_dir}/weston.ini.kvm"
diff --git a/recipes-graphics/wayland/weston-ini-conf_aglflutter.inc b/recipes-graphics/wayland/weston-ini-conf_aglflutter.inc
deleted file mode 100644
index 84e88e198..000000000
--- a/recipes-graphics/wayland/weston-ini-conf_aglflutter.inc
+++ /dev/null
@@ -1,26 +0,0 @@
-do_compile:append() {
- # Put all of our cfg files together for a default portrait
- # orientation configuration
- rm -f ${WORKDIR}/weston.ini.flutter
- for F in ${WESTON_FRAGMENTS}; do
- cat ${WORKDIR}/${F}.cfg >> ${WORKDIR}/weston.ini.flutter
- if grep -q '\[output\]' ${WORKDIR}/${F}.cfg; then
- echo "activation-area=1080x1600+0,160" >> ${WORKDIR}/weston.ini.flutter
- fi
- echo >> ${WORKDIR}/weston.ini.flutter
- done
- sed -i -e '$ d' ${WORKDIR}/weston.ini.flutter
-}
-
-do_install:append() {
- install -m 0644 ${WORKDIR}/weston.ini.flutter ${D}${weston_ini_dir}/
-}
-
-PACKAGE_BEFORE_PN += "${PN}-flutter"
-
-FILES:${PN}-flutter = "${weston_ini_dir}/weston.ini.flutter"
-
-RPROVIDES:${PN}-flutter = "weston-ini"
-RCONFLICTS:${PN}-flutter = "${PN}"
-ALTERNATIVE:${PN}-flutter = "weston.ini"
-ALTERNATIVE_TARGET_${PN}-flutter = "${weston_ini_dir}/weston.ini.flutter"