A new preconfigured demo image for Unified HMI has been added.
By building and launching the images for both the sender and receiver,
and executing a few commands, you can display the application across
two displays.
It supports three boards: qemu-x86-64, raspberrypi4, and agl-refhw.
Bug-AGL: SPEC-5321
Change-Id: Idc4e6d4b7e36245a239148607f6fe08f3be28a25
Signed-off-by: Kenta <murakami.kenta002@jp.panasonic.com>
--- /dev/null
+# Unified HMI preconfigured demo images
+
+## Introduction
+Unified HMI needs a litle complex environment setup, so here we provide a recipe that allow you to create a pre-configured images.
+
+## Unified HMI frameworks
+For a detailed explanation of Unified HMI, please refer to the [AGL Documentation](https://docs.automotivelinux.org/en/master/#06_Component_Documentation/11_Unified_HMI/)
+
+## Demo environment
+Demo images supports three boards: qemux-86-64, raspberrypi4, and agl-refhw.
+Please prepare two boards, one is the sender and the other is the receiver, on any boards and build the respective images for each.
+
+* sender
+```
+IP: 192.168.0.100
+HOSTNAME: agl-host0
+```
+
+* receiver
+```
+IP: 192.168.0.101
+HOSTNAME: agl-host1
+```
+
+## How to build
+Follow the [AGL documentation](https://docs.automotivelinux.org/en/master/#01_Getting_Started/02_Building_AGL_Image/01_Build_Process_Overview/) for the build process, and set up the "[Initializing Your Build Environment](https://docs.automotivelinux.org/en/master/#01_Getting_Started/02_Building_AGL_Image/04_Initializing_Your_Build_Environment/)" section as described below to enable the AGL feature 'agl-uhmi-demo'.
+
+For example:
+```
+$ cd $AGL_TOP/master
+$ source ./meta-agl/scripts/aglsetup.sh -m qemux86-64 -b qemux86-64 agl-devel agl-uhmi-demo
+```
+
+After adding the feature, execute the bitbake command:
+
+for sender
+```
+$ bitbake agl-uhmi-demo-preconfigured-sender
+```
+
+for receiver
+```
+$ bitbake agl-uhmi-demo-preconfigured-receiver
+```
+
+## How to use
+After both the sender and receiver have successfully booted, you can execute the following commands on the sender to confirm that the application is displayed across two displays each connected to diferrent boards.
+
+on sender (IP:192.168.0.100, hostname:agl-host0):
+```
+$ cat /var/local/uhmi-app/glmark2/app.json | ucl-distrib-com /etc/uhmi-framework/virtual-screen-def.json
+$ cat /var/local/uhmi-app/glmark2/initial_vscreen.json | ula-distrib-com
+```
\ No newline at end of file
--- /dev/null
+How to Report a Potential Vulnerability?
+========================================
+
+If you would like to report a public issue (for example, one with a released
+CVE number), please report it to security AT automotivelinux DOT org
+
+If you are dealing with a not-yet released or urgent issue, please send a
+message to security AT automotivelinux DOT org, including as many details as
+possible: the layer or software module affected, the recipe and its version,
+and any example code, if available.
+
+Branches maintained with security fixes
+---------------------------------------
+
+See [https://wiki.automotivelinux.org/schedule this page]
+for detailed info regarding the policies and maintenance of Stable branches.
+
+The [https://wiki.automotivelinux.org/agl-distro/release-notes Release page]
+contains a list of all releases of Automotive Grade Linux.
--- /dev/null
+# We have a conf and classes directory, add to BBPATH
+BBPATH =. "${LAYERDIR}:"
+
+# We have recipes-* directories, add to BBFILES
+BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
+ ${LAYERDIR}/recipes-*/*/*.bbappend"
+
+BBFILE_COLLECTIONS += "agl-uhmi-demo-layer"
+BBFILE_PATTERN_agl-uhmi-demo-layer = "^${LAYERDIR}/"
+BBFILE_PRIORITY_agl-uhmi-demo-layer = "70"
+
+LAYERSERIES_COMPAT_agl-uhmi-demo-layer = "scarthgap"
+
+LAYERDEPENDS_agl-uhmi-demo-layer = "agldemo"
--- /dev/null
+customize_uhmi_ivi_wm() {
+ sed -i "s/XDG_RUNTIME_DIR=\/run\/user\/1001/XDG_RUNTIME_DIR=\/run\/user\/200/" ${IMAGE_ROOTFS}/${systemd_system_unitdir}/uhmi-ivi-wm.service
+ sed -i "s/WAYLAND_DISPLAY=wayland-0/WAYLAND_DISPLAY=wayland-1/" ${IMAGE_ROOTFS}/${systemd_system_unitdir}/uhmi-ivi-wm.service
+}
+ROOTFS_POSTPROCESS_COMMAND:append = " customize_uhmi_ivi_wm;"
--- /dev/null
+{
+ "format_v1": {
+ "command_type" : "remote_virtio_gpu",
+ "appli_name" : "glmark2",
+ "sender" : {
+ "launcher" : "agl-host0",
+ "command" : "/usr/bin/ucl-virtio-gpu-wl-send",
+ "frontend_params" : {
+ "scanout_x" : 0,
+ "scanout_y" : 0,
+ "scanout_w" : 1920,
+ "scanout_h" : 1080,
+ "server_port" : 33445
+ },
+ "appli" : "/usr/bin/glmark2-es2-wayland -s 1920x1080",
+ "env" : "LD_LIBRARY_PATH=/usr/lib/mesa-virtio"
+ },
+ "receivers" : [
+ {
+ "launcher" : "agl-host0",
+ "command" : "/usr/bin/ucl-virtio-gpu-wl-recv",
+ "backend_params" : {
+ "ivi_surface_id" : 101000,
+ "scanout_x" : 0,
+ "scanout_y" : 0,
+ "scanout_w" : 1920,
+ "scanout_h" : 1080,
+ "listen_port" : 33445,
+ "initial_screen_color" : "0x33333333"
+ },
+ "env" : "XDG_RUNTIME_DIR=/run/user/200 WAYLAND_DISPLAY=wayland-1"
+ },
+ {
+ "launcher" : "agl-host1",
+ "command" : "/usr/bin/ucl-virtio-gpu-wl-recv",
+ "backend_params" : {
+ "ivi_surface_id" : 101000,
+ "scanout_x" : 0,
+ "scanout_y" : 0,
+ "scanout_w" : 1920,
+ "scanout_h" : 1080,
+ "listen_port" : 33445,
+ "initial_screen_color" : "0x33333333"
+ },
+ "env" : "XDG_RUNTIME_DIR=/run/user/200 WAYLAND_DISPLAY=wayland-1"
+ }
+ ]
+ }
+}
--- /dev/null
+{
+ "command": "initial_vscreen",
+ "vlayer": [
+ {
+ "VID": 1010000,
+ "coord": "global",
+ "virtual_w": 1920, "virtual_h": 1080,
+ "vsrc_x": 0, "vsrc_y": 0, "vsrc_w": 1920, "vsrc_h": 1080,
+ "vdst_x": 960, "vdst_y": 0, "vdst_w": 1920, "vdst_h": 1080,
+ "vsurface": [
+ {
+ "VID": 101000,
+ "pixel_w": 1920, "pixel_h": 1080,
+ "psrc_x": 0, "psrc_y": 0, "psrc_w": 1920, "psrc_h": 1080,
+ "vdst_x": 0, "vdst_y": 0, "vdst_w": 1920, "vdst_h": 1080
+ }
+ ]
+ }
+ ]
+}
--- /dev/null
+[Match]
+Name=eth* en*
+
+[Network]
+Address=192.168.0.101/24
--- /dev/null
+[Match]
+Name=eth* en*
+
+[Network]
+Address=192.168.0.100/24
--- /dev/null
+set_hostname() {
+ UHMI_HOSTNAME=${UHMI_HOSTNAME:-agl-host}
+ echo "${UHMI_HOSTNAME}" > ${IMAGE_ROOTFS}/${sysconfdir}/hostname
+}
+ROOTFS_POSTPROCESS_COMMAND:append = " set_hostname;"
--- /dev/null
+SUMMARY = "Setting files for UHMI receiver"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+SRC_URI = " \
+ file://wired-receiver.network \
+"
+
+do_install() {
+ install -d ${D}${sysconfdir}/systemd/network/
+ install -m 644 ${WORKDIR}/wired-receiver.network ${D}${sysconfdir}/systemd/network/wired.network
+}
+
+FILES:${PN} += " \
+ ${sysconfdir}/systemd/network/* \
+"
--- /dev/null
+SUMMARY = "Setting files for UHMI sender"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+SRC_URI = " \
+ file://app.json \
+ file://initial_vscreen.json \
+ file://wired-sender.network \
+"
+
+do_install() {
+ install -d ${D}${sysconfdir}/systemd/network/
+ install -m 644 ${WORKDIR}/wired-sender.network ${D}${sysconfdir}/systemd/network/wired.network
+
+ install -d ${D}/var/local/uhmi-app/glmark2
+ install -m 644 ${WORKDIR}/app.json ${D}/var/local/uhmi-app/glmark2/
+ install -m 644 ${WORKDIR}/initial_vscreen.json ${D}/var/local/uhmi-app/glmark2/
+}
+
+FILES:${PN} += " \
+ ${sysconfdir}/systemd/network/* \
+ /var/local/uhmi-app/glmark2 \
+"
--- /dev/null
+[core]
+shell=ivi-shell.so
+modules=ivi-controller.so
+require-input=false
+
+[output]
+name=HDMI-A-1
+mode=1920x1080@60
+
+[output]
+name=HDMI-A-2
+mode=1920x1080@60
+
+[output]
+name=HDMI-A-3
+mode=1920x1080@60
+
+[output]
+name=DSI-1
+mode=1920x1080@60
+
+[output]
+name=DSI-2
+mode=1920x1080@60
+
+[output]
+name=DP-1
+mode=1920x1080@60
+
+[output]
+name=Virtual-1
+mode=1920x1080
+
+[output]
+name=Virtual-2
+mode=1920x1080
+
+[output]
+name=VGA-1
+mode=1920x1080
+
+[output]
+name=VGA-2
+mode=1920x1080
+
+[ivi-shell]
+ivi-input-module=ivi-input-controller.so
+#ivi-client-name=/usr/bin/simple-weston-client
+bkgnd-surface-id=1000000
+bkgnd-color=0xFF000000
--- /dev/null
+FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
+
+WESTON_INIT_IVI_SHELL ?= "weston_ivi-shell.ini"
+
+SRC_URI:append = " \
+ file://${WESTON_INIT_IVI_SHELL} \
+"
+
+do_install:append () {
+ install -d ${D}/${sysconfdir}/xdg/weston
+ install -m 644 ${WORKDIR}/${WESTON_INIT_IVI_SHELL} ${D}/${sysconfdir}/xdg/weston/
+ ln -nfs ${sysconfdir}/xdg/weston/${WESTON_INIT_IVI_SHELL} ${D}/${sysconfdir}/xdg/weston/weston.ini
+}
--- /dev/null
+SUMMARY = "AGL Unified HMI demo preconfigured weston receiver image"
+LICENSE = "MIT"
+
+DEPENDS = "uhmi-ivi-wm"
+
+require recipes-platform/images/agl-image-weston.bb
+
+IMAGE_FEATURES += "ssh-server-openssh"
+
+# Add packages for Unified HMI demo platform here
+IMAGE_INSTALL += " \
+ packagegroup-rvgpu \
+ packagegroup-ddfw \
+ uhmi-config-receiver \
+"
+
+UHMI_HOSTNAME ?= "agl-host1"
+require recipes-config/uhmi-config/set-hostname.inc
+require recipes-config/uhmi-config/customize-uhmi-ivi-wm.inc
--- /dev/null
+SUMMARY = "AGL Unified HMI demo preconfigured weston sender image"
+LICENSE = "MIT"
+
+DEPENDS = "uhmi-ivi-wm"
+
+require recipes-platform/images/agl-image-weston.bb
+
+IMAGE_FEATURES += "ssh-server-openssh"
+
+# Add packages for Unified HMI demo platform here
+IMAGE_INSTALL += " \
+ packagegroup-rvgpu \
+ packagegroup-ddfw \
+ uhmi-config-sender \
+ glmark2 \
+"
+
+UHMI_HOSTNAME ?= "agl-host0"
+require recipes-config/uhmi-config/set-hostname.inc
+require recipes-config/uhmi-config/customize-uhmi-ivi-wm.inc
--- /dev/null
+BBLAYERS =+ " \
+ ${METADIR}/meta-agl-demo/meta-agl-uhmi-demo \
+"
--- /dev/null
+AGL_EXTRA_IMAGE_FSTYPES = "ext4"
--- /dev/null
+agl-demo
+agl-uhmi