From ae4d6c4408d7b6b698af18c6e6773ab723bcdf72 Mon Sep 17 00:00:00 2001 From: Seth Foster Date: Fri, 8 Mar 2024 10:49:20 -0500 Subject: [PATCH 1/8] layers/meta-opentrons: update xdg and wayland env values --- .../opentrons-robot-app/robot-app-wayland-launch_1.0.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layers/meta-opentrons/recipes-robot/opentrons-robot-app/robot-app-wayland-launch_1.0.bb b/layers/meta-opentrons/recipes-robot/opentrons-robot-app/robot-app-wayland-launch_1.0.bb index 4b194c00..9f0653dc 100644 --- a/layers/meta-opentrons/recipes-robot/opentrons-robot-app/robot-app-wayland-launch_1.0.bb +++ b/layers/meta-opentrons/recipes-robot/opentrons-robot-app/robot-app-wayland-launch_1.0.bb @@ -23,7 +23,7 @@ SRC_URI = " \ FILESEXTRAPATHS:prepend := "${THISDIR}/files:" -APPLICATION_ENVIRONMENT := '\"DISPLAY=\:0\:0\" \"XDG_SESSION_TYPE=wayland\" \"XDG_SESSION_DESKTOP=kiosk\" \"PYTHONPATH=/opt/opentrons-robot-server\"' +APPLICATION_ENVIRONMENT := '\"WAYLAND_DISPLAY=wayland-0\" \"XDG_RUNTIME_DIR=/run/user/0\" \"DISPLAY=\:0\:0\" \"XDG_SESSION_TYPE=wayland\" \"XDG_SESSION_DESKTOP=kiosk\" \"PYTHONPATH=/opt/opentrons-robot-server\"' WAYLAND_APPLICATION := "/opt/opentrons-app/opentrons --disable-gpu --remote-debugging-port=9222 --discovery.candidates=localhost --discovery.ipFilter=\"127.0.0.1\" --isOnDevice=1 --no-sandbox --enable-features=UseOzonePlatform --ozone-platform=wayland --in-process-gpu --python.pathToPythonOverride=/usr/bin/python3" From d549c670167f83b21606aff82026cf155e1af092 Mon Sep 17 00:00:00 2001 From: Seth Foster Date: Fri, 8 Mar 2024 10:58:06 -0500 Subject: [PATCH 2/8] app requires vulkan now possibly --- .../recipes-robot/opentrons-robot-app/opentrons-robot-app.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/layers/meta-opentrons/recipes-robot/opentrons-robot-app/opentrons-robot-app.bb b/layers/meta-opentrons/recipes-robot/opentrons-robot-app/opentrons-robot-app.bb index b21d1460..80fd3e9b 100644 --- a/layers/meta-opentrons/recipes-robot/opentrons-robot-app/opentrons-robot-app.bb +++ b/layers/meta-opentrons/recipes-robot/opentrons-robot-app/opentrons-robot-app.bb @@ -76,5 +76,7 @@ RDEPENDS:${PN} = "udev \ libxcomposite libx11 libxrender libxext libx11-xcb libxi \ libxtst libxcursor libxrandr libxscrnsaver \ atk at-spi2-atk\ - cups" + cups \ + vulkan-loader vulkan-tools \ + " DEPENDS = " nodejs-native udev openssl-native " From bafd84252bb983f7771f8d865127e63a2f8168e4 Mon Sep 17 00:00:00 2001 From: Seth Foster Date: Tue, 12 Mar 2024 10:59:36 -0400 Subject: [PATCH 3/8] symlink libs instead of removing, older vulkan --- layers/meta-opentrons/conf/distro/opentrons.conf | 3 +++ .../opentrons-robot-app/opentrons-robot-app.bb | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/layers/meta-opentrons/conf/distro/opentrons.conf b/layers/meta-opentrons/conf/distro/opentrons.conf index 9d5e5131..9aec336e 100644 --- a/layers/meta-opentrons/conf/distro/opentrons.conf +++ b/layers/meta-opentrons/conf/distro/opentrons.conf @@ -17,3 +17,6 @@ PREFERRED_VERSION_python3-setuptools = "62.3.1" PREFERRED_VERSION_python3-jupyter-packaging = "0.12.0" PREFERRED_VERSION_nodejs = "18.18.2" PREFERRED_VERSION_python3-wrapt = "1.16.0" +PREFERRED_VERSION_vulkan-tools = "1.2.182.0" +PREFERRED_VERSION_vulkan-headers = "1.2.182.0" +PREFERRED_VERSION_vulkan-loader = "1.2.182.0" diff --git a/layers/meta-opentrons/recipes-robot/opentrons-robot-app/opentrons-robot-app.bb b/layers/meta-opentrons/recipes-robot/opentrons-robot-app/opentrons-robot-app.bb index 80fd3e9b..522d8747 100644 --- a/layers/meta-opentrons/recipes-robot/opentrons-robot-app/opentrons-robot-app.bb +++ b/layers/meta-opentrons/recipes-robot/opentrons-robot-app/opentrons-robot-app.bb @@ -58,7 +58,11 @@ fakeroot do_install(){ # really system utilities and (in the case of wayland) actually can break # communication with the system because it uses a weird RPC thing and # really needs to get the system version. So we remove the local versions. - rm ${DESTDIR}/libEGL.so ${DESTDIR}/libGLESv2.so ${DESTDIR}/libvulkan.so.1 + # however, chrome for some reason opens these libraries via direct calls + # or has a strict rpath or something so we need to symlink them explicitly + ln -s /usr/lib/libEGL.so ${DESTDIR}/libEGL.so + ln -s /usr/lib/libGLESv2.so ${DESTDIR}/libGLESv2.so + ln -s /usr/lib/libvulkan.so.1 ${DESTDIR}/libvulkan.so.1 } From 97e174d27eeb064e672c8887bee5d19d525b9957 Mon Sep 17 00:00:00 2001 From: Seth Foster Date: Tue, 12 Mar 2024 11:38:23 -0400 Subject: [PATCH 4/8] gotta remove them first --- .../recipes-robot/opentrons-robot-app/opentrons-robot-app.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/layers/meta-opentrons/recipes-robot/opentrons-robot-app/opentrons-robot-app.bb b/layers/meta-opentrons/recipes-robot/opentrons-robot-app/opentrons-robot-app.bb index 522d8747..6e304f79 100644 --- a/layers/meta-opentrons/recipes-robot/opentrons-robot-app/opentrons-robot-app.bb +++ b/layers/meta-opentrons/recipes-robot/opentrons-robot-app/opentrons-robot-app.bb @@ -60,6 +60,7 @@ fakeroot do_install(){ # really needs to get the system version. So we remove the local versions. # however, chrome for some reason opens these libraries via direct calls # or has a strict rpath or something so we need to symlink them explicitly + rm ${DESTDIR}/libEGL.so ${DESTDIR}/libGLESv2.so ${DESTDIR}/libvulkan.so.1 ln -s /usr/lib/libEGL.so ${DESTDIR}/libEGL.so ln -s /usr/lib/libGLESv2.so ${DESTDIR}/libGLESv2.so ln -s /usr/lib/libvulkan.so.1 ${DESTDIR}/libvulkan.so.1 From df70b8397be30677c24b5767ca2171176f83521f Mon Sep 17 00:00:00 2001 From: Seth Foster Date: Tue, 12 Mar 2024 16:19:26 -0400 Subject: [PATCH 5/8] disable a qa check for the symlinks --- .../recipes-robot/opentrons-robot-app/opentrons-robot-app.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/layers/meta-opentrons/recipes-robot/opentrons-robot-app/opentrons-robot-app.bb b/layers/meta-opentrons/recipes-robot/opentrons-robot-app/opentrons-robot-app.bb index 6e304f79..5d2a59af 100644 --- a/layers/meta-opentrons/recipes-robot/opentrons-robot-app/opentrons-robot-app.bb +++ b/layers/meta-opentrons/recipes-robot/opentrons-robot-app/opentrons-robot-app.bb @@ -9,6 +9,8 @@ inherit features_check inherit insane +INSANE_SKIP:${PN} += "dev-so" + do_configure(){ npm install -g yarn cd ${S} From 9f50f6e976ef502536abed7d19fbee313c55e6bf Mon Sep 17 00:00:00 2001 From: Seth Foster Date: Wed, 13 Mar 2024 09:53:50 -0400 Subject: [PATCH 6/8] stoooop --- .../recipes-robot/opentrons-robot-app/opentrons-robot-app.bb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/layers/meta-opentrons/recipes-robot/opentrons-robot-app/opentrons-robot-app.bb b/layers/meta-opentrons/recipes-robot/opentrons-robot-app/opentrons-robot-app.bb index 5d2a59af..b610d478 100644 --- a/layers/meta-opentrons/recipes-robot/opentrons-robot-app/opentrons-robot-app.bb +++ b/layers/meta-opentrons/recipes-robot/opentrons-robot-app/opentrons-robot-app.bb @@ -7,9 +7,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" inherit features_check -inherit insane - -INSANE_SKIP:${PN} += "dev-so" +INSANE_SKIP:${PN} += " dev-so " do_configure(){ npm install -g yarn From 4aa1b5efa5984078ad5df6b13b5d518ff63bfed3 Mon Sep 17 00:00:00 2001 From: Seth Foster Date: Wed, 13 Mar 2024 15:24:31 -0400 Subject: [PATCH 7/8] a fool i'm a fool --- .../recipes-robot/opentrons-robot-app/opentrons-robot-app.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layers/meta-opentrons/recipes-robot/opentrons-robot-app/opentrons-robot-app.bb b/layers/meta-opentrons/recipes-robot/opentrons-robot-app/opentrons-robot-app.bb index b610d478..16f593dc 100644 --- a/layers/meta-opentrons/recipes-robot/opentrons-robot-app/opentrons-robot-app.bb +++ b/layers/meta-opentrons/recipes-robot/opentrons-robot-app/opentrons-robot-app.bb @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" inherit features_check -INSANE_SKIP:${PN} += " dev-so " +inherit insane do_configure(){ npm install -g yarn @@ -70,7 +70,7 @@ fakeroot do_install(){ REQUIRED_DISTRO_FEATURES = "x11" do_install[depends] += "virtual/fakeroot-native:do_populate_sysroot" -INSANE_SKIP:${PN} = " already-stripped file-rdeps" +INSANE_SKIP:${PN} = " already-stripped file-rdeps dev-so " FILES:${PN} = "/opt/opentrons-app/* /opt/opentrons-app/**/*" # todo figure out how to not need cups RDEPENDS:${PN} = "udev \ From e0503cdc7a6876cd817313a94384ef00602866a6 Mon Sep 17 00:00:00 2001 From: Seth Foster Date: Mon, 18 Mar 2024 14:14:26 -0400 Subject: [PATCH 8/8] allow devtool remote access --- .../robot-app-wayland-launch_1.0.bb | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/layers/meta-opentrons/recipes-robot/opentrons-robot-app/robot-app-wayland-launch_1.0.bb b/layers/meta-opentrons/recipes-robot/opentrons-robot-app/robot-app-wayland-launch_1.0.bb index 9f0653dc..99609af6 100644 --- a/layers/meta-opentrons/recipes-robot/opentrons-robot-app/robot-app-wayland-launch_1.0.bb +++ b/layers/meta-opentrons/recipes-robot/opentrons-robot-app/robot-app-wayland-launch_1.0.bb @@ -25,7 +25,19 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/files:" APPLICATION_ENVIRONMENT := '\"WAYLAND_DISPLAY=wayland-0\" \"XDG_RUNTIME_DIR=/run/user/0\" \"DISPLAY=\:0\:0\" \"XDG_SESSION_TYPE=wayland\" \"XDG_SESSION_DESKTOP=kiosk\" \"PYTHONPATH=/opt/opentrons-robot-server\"' -WAYLAND_APPLICATION := "/opt/opentrons-app/opentrons --disable-gpu --remote-debugging-port=9222 --discovery.candidates=localhost --discovery.ipFilter=\"127.0.0.1\" --isOnDevice=1 --no-sandbox --enable-features=UseOzonePlatform --ozone-platform=wayland --in-process-gpu --python.pathToPythonOverride=/usr/bin/python3" +WAYLAND_APPLICATION := "/opt/opentrons-app/opentrons \ + --disable-gpu \ + --remote-allow-origin=* \ + --remote-debugging-port=9222 \ + --discovery.candidates=localhost \ + --discovery.ipFilter=\"127.0.0.1\" \ + --isOnDevice=1 \ + --no-sandbox \ + --enable-features=UseOzonePlatform \ + --ozone-platform=wayland \ + --in-process-gpu \ + --python.pathToPythonOverride=/usr/bin/python3\ + " do_compile () { sed -e "s:@@wayland-application@@:${WAYLAND_APPLICATION}:" -e "s:@@initial-path@@:${INITIAL_PATH}:" opentrons-robot-app.sh.in > opentrons-robot-app.sh