Replace agl-demo* features with preconfigured images 66/29866/2
authorScott Murray <scott.murray@konsulko.com>
Wed, 1 May 2024 20:57:17 +0000 (16:57 -0400)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Mon, 27 May 2024 13:15:38 +0000 (13:15 +0000)
Changes:
- Remove the agl-demo-preload and agl-demo-cluster-support setup
  features.
- Make the agl-weston-remoting setup feature a dependency of the
  agl-demo feature.  To accommodate this with respect to avoiding
  putting the remote-output display configuration into generated
  weston.ini files when not required, the logic for that has been
  moved from meta-agl-core's weston-ini-conf recipe, and extra
  weston-ini-conf-* packages with the remote output support enabled
  are now generated to be used in images when required.
- Add *-preconfigured versions of the images useful in a full demo
  setup (i.e. with "green machine" for tradeshows).  These images
  have the configuration tweaks that the build setup features
  enabled with conditional logic baked in.
- Remove now unnecessary connman-conf bbappend, we now assume that
  the IVI and cluster IP addresses are assigned as 192.168.10.2
  and 192.168.10.3 via DHCP in a full demo setup.

Notes:
- The cluster support in the *-preconfigured images assumes that
  the IVI board is at IP address 192.168.10.2, and both boards are
  in the 192.168.10.x subnet.

Bug-AGL: SPEC-5138

Change-Id: Icc472c6b602fa8fa5570af6cb0acaef853cbfa0f
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl-demo/+/29866
ci-image-build: Jenkins Job builder account
Tested-by: Jenkins Job builder account
ci-image-boot-test: Jenkins Job builder account
Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
21 files changed:
recipes-connectivity/connman/connman-conf.bbappend [deleted file]
recipes-connectivity/connman/connman-conf_agldemo.inc [deleted file]
recipes-graphics/wayland/weston-ini-conf/remote-output.cfg.in [new file with mode: 0644]
recipes-graphics/wayland/weston-ini-conf_agldemo.inc
recipes-platform/images/agl-cluster-demo-flutter-preconfigured.bb [new file with mode: 0644]
recipes-platform/images/agl-cluster-demo-flutter.bb
recipes-platform/images/agl-cluster-demo-qt-preconfigured.bb [new file with mode: 0644]
recipes-platform/images/agl-cluster-demo-qt.bb
recipes-platform/images/agl-ivi-demo-features.inc
recipes-platform/images/agl-ivi-demo-flutter-preconfigured.bb [new file with mode: 0644]
recipes-platform/images/agl-ivi-demo-qt-preconfigured.bb [new file with mode: 0644]
recipes-platform/images/agl-ivi-demo-qt.bb
recipes-platform/images/agl-ivi-image-flutter.bb
recipes-platform/packagegroups/packagegroup-agl-demo-preload.bb [deleted file]
templates/feature/agl-demo-cluster-support/50_local.conf.inc [deleted file]
templates/feature/agl-demo-cluster-support/README_feature_agl-demo-cluster-support.md [deleted file]
templates/feature/agl-demo-cluster-support/included.dep [deleted file]
templates/feature/agl-demo-preload/50_local.conf.inc [deleted file]
templates/feature/agl-demo-preload/README_feature_agl-demo-preload.md [deleted file]
templates/feature/agl-demo/included.dep
templates/feature/agl-kvm/included.dep

diff --git a/recipes-connectivity/connman/connman-conf.bbappend b/recipes-connectivity/connman/connman-conf.bbappend
deleted file mode 100644 (file)
index 39792fd..0000000
+++ /dev/null
@@ -1 +0,0 @@
-require ${@bb.utils.contains('AGL_FEATURES', 'agldemo', 'connman-conf_agldemo.inc', '', d)}
diff --git a/recipes-connectivity/connman/connman-conf_agldemo.inc b/recipes-connectivity/connman/connman-conf_agldemo.inc
deleted file mode 100644 (file)
index 7b736ec..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-do_install:append() {
-    # Need to ignore eth1 in cluster demo setup
-    if ${@bb.utils.contains('AGL_FEATURES', 'agl-demo-cluster-support', 'true', 'false', d)}; then
-        sed -i 's/^\(NetworkInterfaceBlacklist=.*\)/\1,eth1/' ${D}${sysconfdir}/connman/main.conf
-    fi
-}
diff --git a/recipes-graphics/wayland/weston-ini-conf/remote-output.cfg.in b/recipes-graphics/wayland/weston-ini-conf/remote-output.cfg.in
new file mode 100644 (file)
index 0000000..940cbdd
--- /dev/null
@@ -0,0 +1,5 @@
+[remote-output]
+name=remote-1
+mode=640x720@30
+host=192.168.10.3
+port=5005
index 5c7b9fe..11818f6 100644 (file)
 FILESEXTRAPATHS:prepend := "${THISDIR}/weston-ini-conf:"
 
-SRC_URI += "file://weston.ini.kvm.in"
+SRC_URI += " \
+    file://remote-output.cfg.in \
+    file://weston.ini.kvm.in \
+"
 
+# Options for the user to change in local.conf
+# e.g. REMOTING_OUTPUT_MODE = "1080x1488"
+REMOTING_OUTPUT_MODE ??= "640x720@30"
+REMOTING_OUTPUT_HOST ??= "192.168.10.3"
+REMOTING_OUTPUT_PORT ??= "5005"
+
+# Default app IDs for KVM guests
 GUEST_VM1_IMAGE ?= "agl-ivi-demo-flutter"
 GUEST_VM2_IMAGE ?= "agl-cluster-demo-flutter"
 
+do_configure:append() {
+    # Standalone cluster support version
+    sed -e "s#host=.*#host=${REMOTING_OUTPUT_HOST}#" \
+        -e "s#port=.*#port=${REMOTING_OUTPUT_PORT}#" \
+        ${WORKDIR}/remote-output.cfg.in  > ${WORKDIR}/remote-output.cfg
+
+    # KVM guest cluster version
+    sed -e "s#host=.*#host=172.16.10.3#" \
+        -e "s#port=.*#port=${REMOTING_OUTPUT_PORT}#" \
+        ${WORKDIR}/remote-output.cfg.in  > ${WORKDIR}/remote-output-kvm.cfg
+}
+
 do_compile:append() {
-    # Start with a canned configuration for a KVM host, filling in
+    # Create regular and KVM remoting enabled versions of the default
+    # portrait and landscape demo IVI configurations
+    for c in weston.ini.default weston.ini.landscape; do
+        cp ${WORKDIR}/$c ${WORKDIR}/${c}-remoting
+        echo >> ${WORKDIR}/${c}-remoting
+        cat ${WORKDIR}/remote-output.cfg >> ${WORKDIR}/${c}-remoting
+
+        cp ${WORKDIR}/$c ${WORKDIR}/${c}-remoting-kvm
+        echo >> ${WORKDIR}/${c}-remoting-kvm
+        cat ${WORKDIR}/remote-output-kvm.cfg >> ${WORKDIR}/${c}-remoting-kvm
+    done
+
+    # Create a canned configuration for the 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" \
+    sed -e "s/@GUEST_VM1_ID@/${GUEST_VM1_IMAGE}/g" \
+        -e "s/@GUEST_VM2_ID@/${GUEST_VM2_IMAGE}/g" \
         ${WORKDIR}/weston.ini.kvm.in > ${WORKDIR}/weston.ini.kvm
 }
 
 do_install:append() {
+    install -m 0644 ${WORKDIR}/weston.ini.default-remoting ${D}${weston_ini_dir}/
+    install -m 0644 ${WORKDIR}/weston.ini.default-remoting-kvm ${D}${weston_ini_dir}/
+    install -m 0644 ${WORKDIR}/weston.ini.landscape-remoting ${D}${weston_ini_dir}/
+    install -m 0644 ${WORKDIR}/weston.ini.landscape-remoting-kvm ${D}${weston_ini_dir}/
     install -m 0644 ${WORKDIR}/weston.ini.kvm ${D}${weston_ini_dir}/
 }
 
-PACKAGE_BEFORE_PN += "${PN}-kvm"
+# remoting
 
-FILES:${PN}-kvm = "${weston_ini_dir}/weston.ini.kvm"
+PACKAGE_BEFORE_PN += "${PN}-remoting"
+FILES:${PN}-remoting = "${weston_ini_dir}/weston.ini.default-remoting"
+RPROVIDES:${PN}-remoting = "weston-ini"
+ALTERNATIVE:${PN}-remoting = "weston.ini"
+ALTERNATIVE_TARGET_${PN}-remoting = "${weston_ini_dir}/weston.ini.default-remoting"
+ALTERNATIVE_PRIORITY_${PN}-remoting = "30"
+
+# remoting-kvm
 
+PACKAGE_BEFORE_PN += "${PN}-remoting-kvm"
+FILES:${PN}-remoting-kvm = "${weston_ini_dir}/weston.ini.default-remoting-kvm"
+RPROVIDES:${PN}-remoting-kvm = "weston-ini"
+ALTERNATIVE:${PN}-remoting-kvm = "weston.ini"
+ALTERNATIVE_TARGET_${PN}-remoting-kvm = "${weston_ini_dir}/weston.ini.default-remoting-kvm"
+ALTERNATIVE_PRIORITY_${PN}-remoting-kvm = "35"
+
+# landscape-remoting
+
+PACKAGE_BEFORE_PN += "${PN}-landscape-remoting"
+FILES:${PN}-landscape-remoting = "${weston_ini_dir}/weston.ini.landscape-remoting"
+RPROVIDES:${PN}-landscape-remoting = "weston-ini"
+ALTERNATIVE:${PN}-landscape-remoting = "weston.ini"
+ALTERNATIVE_TARGET_${PN}-landscape-remoting = "${weston_ini_dir}/weston.ini.landscape-remoting"
+ALTERNATIVE_PRIORITY_${PN}-landscape-remoting = "31"
+
+# landscape-remoting-kvm
+
+PACKAGE_BEFORE_PN += "${PN}-landscape-remoting-kvm"
+FILES:${PN}-landscape-remoting-kvm = "${weston_ini_dir}/weston.ini.landscape-remoting-kvm"
+RPROVIDES:${PN}-landscape-remoting-kvm = "weston-ini"
+ALTERNATIVE:${PN}-landscape-remoting-kvm = "weston.ini"
+ALTERNATIVE_TARGET_${PN}-landscape-remoting-kvm = "${weston_ini_dir}/weston.ini.landscape-remoting-kvm"
+ALTERNATIVE_PRIORITY_${PN}-landscape-remoting-kvm = "36"
+
+# kvm
+
+PACKAGE_BEFORE_PN += "${PN}-kvm"
+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"
+ALTERNATIVE_PRIORITY_${PN}-kvm = "40"
diff --git a/recipes-platform/images/agl-cluster-demo-flutter-preconfigured.bb b/recipes-platform/images/agl-cluster-demo-flutter-preconfigured.bb
new file mode 100644 (file)
index 0000000..5532c3e
--- /dev/null
@@ -0,0 +1,20 @@
+require agl-cluster-demo-flutter.bb
+
+SUMMARY = "AGL Cluster preconfigured demo Flutter image"
+
+# We do not want a local databroker instance
+IMAGE_FEATURES:remove = "kuksa-val-databroker"
+
+# The cluster screen is rotated in the full demo setup, so the
+# default compositor configuration needs to be replaced.
+IMAGE_INSTALL:remove = "weston-ini-conf-landscape"
+
+# Cluster application configuration needs to be replaced for
+# the full demo to handle different databroker configuration.
+IMAGE_INSTALL:remove = "flutter-cluster-dashboard-conf"
+
+IMAGE_INSTALL += " \
+    psplash-inverted-config \
+    weston-ini-conf-landscape-inverted \
+    flutter-cluster-dashboard-conf-demo \
+"
index 5cf3daf..b2581f8 100644 (file)
@@ -7,31 +7,27 @@ require agl-demo-features.inc
 
 IMAGE_FEATURES += "splash package-management ssh-server-openssh"
 
-# KUKSA.val databroker is not installed with "agl-demo-preload"
-# feature enabled, since demo unit configuration points at the
-# databroker on the IVI board in that setup.
 IMAGE_FEATURES += " \
     kuksa-val-databroker-client \
-    ${@bb.utils.contains("AGL_FEATURES", "agl-demo-preload", "", "kuksa-val-databroker", d)} \
+    kuksa-val-databroker \
 "
 
 # Generic
 IMAGE_INSTALL += "\
-    ${@bb.utils.contains("AGL_FEATURES", "agl-demo-preload", "psplash-inverted-config", "", d)} \
-    ${@bb.utils.contains("AGL_FEATURES", "agl-demo-preload", "weston-ini-conf-landscape-inverted", "weston-ini-conf-landscape", d)} \
+    weston-ini-conf-landscape \
     \
     packagegroup-agl-networking \
     cluster-receiver \
     \
     simple-can-simulator \
-    "
+"
 
 # Flutter
 IMAGE_INSTALL += "\
+    flutter-auto \
     flutter-cluster-dashboard \
-    ${@bb.utils.contains("AGL_FEATURES", "agl-demo-preload", "flutter-cluster-dashboard-conf-demo", "flutter-cluster-dashboard-conf", d)} \
+    flutter-cluster-dashboard-conf \
     cluster-demo-config-flutter \
-    flutter-auto \
-    "
+"
 
 CLANGSDK = "1"
diff --git a/recipes-platform/images/agl-cluster-demo-qt-preconfigured.bb b/recipes-platform/images/agl-cluster-demo-qt-preconfigured.bb
new file mode 100644 (file)
index 0000000..c993406
--- /dev/null
@@ -0,0 +1,18 @@
+require agl-cluster-demo-qt.bb
+
+SUMMARY = "AGL Cluster preconfigured demo Qt image"
+
+# We do not want a local databroker instance
+IMAGE_FEATURES:remove = "kuksa-val-databroker"
+
+# We do not want weston-terminal visible
+IMAGE_INSTALL:remove = "weston-terminal-conf"
+
+# The cluster screen is rotated in the full demo setup, so the
+# default compositor configuration needs to be replaced.
+IMAGE_INSTALL:remove = "weston-ini-conf-landscape"
+
+IMAGE_INSTALL += " \
+    cluster-demo-config \
+    weston-ini-conf-landscape-inverted \
+"
index c427af6..03dfb36 100644 (file)
@@ -11,19 +11,15 @@ inherit features_check
 
 REQUIRED_DISTRO_FEATURES = "wayland"
 
-# KUKSA.val databroker is not installed with "agl-demo-preload"
-# feature enabled, since demo unit configuration points at the
-# databroker on the IVI board in that setup.
 IMAGE_FEATURES += " \
     kuksa-val-databroker-client \
-    ${@bb.utils.contains("AGL_FEATURES", "agl-demo-preload", "", "kuksa-val-databroker", d)} \
+    kuksa-val-databroker \
 "
 
 # add packages for cluster demo platform (include demo apps) here
 IMAGE_INSTALL += " \
     packagegroup-agl-cluster-demo-platform \
     kuksa-certificates-agl-ca \
-    ${@bb.utils.contains("AGL_FEATURES", "agl-demo-preload", "cluster-demo-config", "", d)} \
-    ${@bb.utils.contains("AGL_FEATURES", "agl-demo-preload", "weston-ini-conf-landscape-inverted", "weston-ini-conf-landscape", d)} \
+    weston-ini-conf-landscape \
     ${@bb.utils.contains("AGL_FEATURES", "AGLCI", "qemu-set-display", "", d)} \
-    "
+"
index 9aabaaf..ecf3cd9 100644 (file)
@@ -1,19 +1,13 @@
 require agl-demo-features.inc
 
-FEATURE_PACKAGES_agl-demo-preload = "packagegroup-agl-demo-preload"
-
 FEATURE_PACKAGES_agl-demo-cluster-support = " \
     tbtnavi \
     ${@bb.utils.contains("AGL_FEATURES", "agl-kvm-host-kuksa", "tbtnavi-conf-kvm-demo", "tbtnavi-conf", d)} \
     ${@bb.utils.contains("AGL_FEATURES", "agl-kvm-host-kuksa", "", "kuksa-databroker-agl-demo-cluster", d)} \
 "
 
-IMAGE_FEATURES += " \
-    ${@bb.utils.contains("DISTRO_FEATURES", "agl-devel", "can-test-tools" , "", d)} \
-    ${@bb.utils.filter("AGL_FEATURES", "agl-demo-preload agl-demo-cluster-support", d)} \
-"
-
 IMAGE_FEATURES += " \
     kuksa-val-databroker-client \
+    ${@bb.utils.contains("DISTRO_FEATURES", "agl-devel", "can-test-tools" , "", d)} \
     ${@bb.utils.contains("AGL_FEATURES", "agl-kvm-host-kuksa", "", "kuksa-val-databroker", d)} \
 "
diff --git a/recipes-platform/images/agl-ivi-demo-flutter-preconfigured.bb b/recipes-platform/images/agl-ivi-demo-flutter-preconfigured.bb
new file mode 100644 (file)
index 0000000..7d76f4c
--- /dev/null
@@ -0,0 +1,14 @@
+require agl-ivi-demo-flutter.bb
+
+SUMMARY = "AGL IVI preconfigured demo Flutter image"
+
+IMAGE_FEATURES += "agl-demo-cluster-support"
+
+# We do not want weston-terminal visible
+IMAGE_INSTALL:remove = "weston-terminal-conf"
+
+IMAGE_INSTALL += " \
+    weston-ini-conf-remoting \
+    demo-i2c-udev-conf \
+    simple-can-simulator \
+"
diff --git a/recipes-platform/images/agl-ivi-demo-qt-preconfigured.bb b/recipes-platform/images/agl-ivi-demo-qt-preconfigured.bb
new file mode 100644 (file)
index 0000000..fa1313e
--- /dev/null
@@ -0,0 +1,14 @@
+require agl-ivi-demo-qt.bb
+
+SUMMARY = "AGL IVI preconfigured demo Qt image"
+
+IMAGE_FEATURES += "agl-demo-cluster-support"
+
+# We do not want weston-terminal visible
+IMAGE_INSTALL:remove = "weston-terminal-conf"
+
+IMAGE_INSTALL += " \
+    weston-ini-conf-remoting \
+    demo-i2c-udev-conf \
+    simple-can-simulator \
+"
\ No newline at end of file
index 2f0e942..7964079 100644 (file)
@@ -18,6 +18,6 @@ AGL_APPS_INSTALL += " \
 
 IMAGE_INSTALL += " \
     packagegroup-agl-demo-platform \
-    ${@bb.utils.contains("AGL_FEATURES", "agl-demo-preload", "", "weston-terminal-conf", d)} \
+    weston-terminal-conf \
 "
 
index 56a8b2f..0c227f0 100644 (file)
@@ -4,5 +4,5 @@ SUMMARY = "AGL IVI demo base Flutter image"
 
 IMAGE_INSTALL += " \
     packagegroup-agl-demo-platform-flutter \
-    ${@bb.utils.contains("AGL_FEATURES", "agl-demo-preload", "", "weston-terminal-conf", d)} \
+    weston-terminal-conf \
 "
diff --git a/recipes-platform/packagegroups/packagegroup-agl-demo-preload.bb b/recipes-platform/packagegroups/packagegroup-agl-demo-preload.bb
deleted file mode 100644 (file)
index 808c93c..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "Extra software and configuration for tradeshow demo with AGL IVI profile demo platform"
-LICENSE = "MIT"
-
-inherit packagegroup
-
-PROVIDES = "${PACKAGES}"
-PACKAGES = " \
-    packagegroup-agl-demo-preload \
-"
-
-# NOTES:
-# - demo-i2c-udev-conf:
-#     Adds udev configuration and scripts for supporting USB attached
-#     I2C devices for RTC and HVAC LED support.
-# - simple-can-simulator:
-#     CAN message simulator for vehicle and engine speed message
-#     generation, with some support for the cruise control events from
-#     the steering wheel used in the demo setup.
-#
-RDEPENDS:${PN} = "\
-    demo-i2c-udev-conf \
-    simple-can-simulator \
-"
diff --git a/templates/feature/agl-demo-cluster-support/50_local.conf.inc b/templates/feature/agl-demo-cluster-support/50_local.conf.inc
deleted file mode 100644 (file)
index 188d8e8..0000000
+++ /dev/null
@@ -1 +0,0 @@
-AGL_FEATURES:append = " agl-demo-cluster-support"
diff --git a/templates/feature/agl-demo-cluster-support/README_feature_agl-demo-cluster-support.md b/templates/feature/agl-demo-cluster-support/README_feature_agl-demo-cluster-support.md
deleted file mode 100644 (file)
index a9ff2cf..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
----
-description: Feature agl-demo-cluster-support
-authors: Scott Murray <scott.murray@konsulko.com>
----
-       
-### Feature agl-demo-cluster-support
-        
-Enables support for remote navigation display on a connected board running
-the agl-cluster-demo-platform image.  The configuration is in large part
-intended for use with the AGL tradeshow demo setup.
-
-#### Dependent features pulled by agl-demo-cluster-support
-
-The following features are pulled:
-
-* agl-weston-remoting
-
diff --git a/templates/feature/agl-demo-cluster-support/included.dep b/templates/feature/agl-demo-cluster-support/included.dep
deleted file mode 100644 (file)
index 1e9b35f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-agl-weston-remoting
diff --git a/templates/feature/agl-demo-preload/50_local.conf.inc b/templates/feature/agl-demo-preload/50_local.conf.inc
deleted file mode 100644 (file)
index 00ff3b7..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#see meta-agl-demo/conf/include/agl-demo-preload.inc
-require conf/include/agl-demo-preload.inc
diff --git a/templates/feature/agl-demo-preload/README_feature_agl-demo-preload.md b/templates/feature/agl-demo-preload/README_feature_agl-demo-preload.md
deleted file mode 100644 (file)
index e5ec847..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
----
-description: Feature agl-demo-preload
-authors: Scott Murray <scott.murray@konsulko.com>
----
-       
-### Feature agl-demo-preload
-        
-*Description is missing - please complete file meta-agl-demo/templates/feature/agl-demo-preload/README_feature_agl-demo-preload.md*
-
index e94759e..a81b5a4 100644 (file)
@@ -1 +1 @@
-agl-pipewire agl-app-framework agl-selinux agl-flutter
+agl-pipewire agl-app-framework agl-selinux agl-flutter agl-weston-remoting
index f61c6e0..82639da 100644 (file)
@@ -1 +1 @@
-agl-demo agl-demo-cluster-support agl-demo-preload
+agl-demo