diff options
Diffstat (limited to 'meta-uhmi/meta-distributed-display-fw/recipes-core/ula-tools')
3 files changed, 112 insertions, 0 deletions
diff --git a/meta-uhmi/meta-distributed-display-fw/recipes-core/ula-tools/files/ula-node.service b/meta-uhmi/meta-distributed-display-fw/recipes-core/ula-tools/files/ula-node.service new file mode 100644 index 00000000..edf69f3d --- /dev/null +++ b/meta-uhmi/meta-distributed-display-fw/recipes-core/ula-tools/files/ula-node.service @@ -0,0 +1,15 @@ +[Unit] +Description=ula-node +Requires=uhmi-ivi-wm.service +After=uhmi-ivi-wm.service + +[Service] +Type=idle +ExecStart=/usr/bin/ula-node +KillSignal=SIGTERM +TimeoutStopSec=10 +Restart=always +RestartSec=2 + +[Install] +WantedBy=multi-user.target diff --git a/meta-uhmi/meta-distributed-display-fw/recipes-core/ula-tools/files/virtual-screen-def.json b/meta-uhmi/meta-distributed-display-fw/recipes-core/ula-tools/files/virtual-screen-def.json new file mode 100644 index 00000000..2917ca87 --- /dev/null +++ b/meta-uhmi/meta-distributed-display-fw/recipes-core/ula-tools/files/virtual-screen-def.json @@ -0,0 +1,25 @@ +{ + "virtual_screen_2d" : { + "size" : {"virtual_w" : 3840, "virtual_h": 1080}, + "virtual_displays" : [ + {"vdisplay_id":0, "disp_name": "AGL_SCREEN0", "virtual_x":0, "virtual_y":0, "virtual_w":1920, "virtual_h":1080}, + {"vdisplay_id":1, "disp_name": "AGL_SCREEN1", "virtual_x":1920, "virtual_y":0, "virtual_w":1920, "virtual_h":1080} + ] + }, + "virtual_screen_3d" : {}, + "real_displays" : [ + {"node_id":0, "vdisplay_id":0, "pixel_w":1920, "pixel_h":1080, "rdisplay_id" : 0}, + {"node_id":1, "vdisplay_id":1, "pixel_w":1920, "pixel_h":1080, "rdisplay_id" : 0} + ], + "node" : [ + {"node_id":0, "hostname":"agl-host0", "ip":"192.168.0.100"}, + {"node_id":1, "hostname":"agl-host1", "ip":"192.168.0.101"} + ], + "distributed_window_system" : { + "window_manager":{}, + "framework_node":[ + {"node_id":0, "ula": {"debug":false, "debug_port":8080, "port":10100}, "ucl": {"port":7654}}, + {"node_id":1, "ula": {"debug":false, "debug_port":8080, "port":10100}, "ucl": {"port":7654}} + ] + } +} diff --git a/meta-uhmi/meta-distributed-display-fw/recipes-core/ula-tools/ula-tools_git.bb b/meta-uhmi/meta-distributed-display-fw/recipes-core/ula-tools/ula-tools_git.bb new file mode 100644 index 00000000..9b945a3f --- /dev/null +++ b/meta-uhmi/meta-distributed-display-fw/recipes-core/ula-tools/ula-tools_git.bb @@ -0,0 +1,72 @@ +SUMMARY = "Unified HMI Layout Tools" +SECTION = "graphics" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://src/ula-tools/LICENSE.md;md5=e789951aab02a3028d2e58b90fc933ba" + +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" + +PN="ula-tools" +PROVIDES += "ula-tools" + +SRCREV = "4403efd88fd4e79b092787ac727afe996dd7ca12" +BRANCH ?= "main" +SRC_URI = " \ + git://github.com/unified-hmi/ula-tools.git;protocol=https;branch=${BRANCH} \ +" +PV = "0.0+git${SRCPV}" + +S = "${WORKDIR}/git" + + +export GO111MODULE="auto" + +GO_IMPORT = "ula-tools" +GO_INSTALL = " ${GO_IMPORT}/cmd/ula-distrib-com ${GO_IMPORT}/cmd/ula-node" + + +inherit go +RDEPENDS:${PN} = "jq bash" +RDEPENDS:${PN}-dev = "bash" + +inherit systemd + +SRC_URI += " \ + file://ula-node.service \ + file://virtual-screen-def.json \ + " + +REQUIRED_DISTRO_FEATURES = "systemd" +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE:${PN} = "ula-node.service" +SYSTEMD_AUTO_ENABLE:${PN} = "enable" +FILES:${PN} += " \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_system_unitdir}/${SYSTEMD_SERVICE}', '', d)} \ + /etc/uhmi-framework/virtual-screen-def.json \ + " + +do_compile:append() { + export CGO_ENABLED="1" + ${GO} build -buildmode=c-shared -o ${GOPATH}/pkg/libulaclient.so -v -ldflags '-extldflags "-Wl,-soname=libulaclient.so"' ${GO_IMPORT}/pkg/ula-client-lib +} + + +do_install:append() { + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -d ${D}${systemd_system_unitdir} + install -m 644 ${WORKDIR}/*.service ${D}/${systemd_system_unitdir} + fi + + install -d ${D}/etc/uhmi-framework + install -m 644 ${WORKDIR}/virtual-screen-def.json ${D}/etc/uhmi-framework + + install -d ${D}${libdir} + install -m 0755 ${GOPATH}/pkg/libulaclient.so ${D}${libdir} + + install -d ${D}${includedir} + install -m 644 ${GOPATH}/pkg/libulaclient.h ${D}${includedir} + +} + +FILES:${PN} += "${libdir}" +FILES:${PN} += "${includedir}" |