From cbb9502193d49293e7cac62370d3649cdba9ba62 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Fri, 2 Sep 2016 12:46:16 +0300 Subject: beaglebone: start qtlauncher only after /dev/fb0 exists Beaglebone creates /dev/fb0 late in the boot process, which causes Qt applications to crash if started too early. Make systemd notice fb0 creation and bind application startup to it. (cherry picked from commit 300a9420bce2bcf4e0fffe30dae5cb0504e2cadb) Change-Id: I8875334407c5a01bd6597e2c4fc1af96e396c639 Reviewed-by: Kalle Viironen --- meta-ti-extras/recipes/libgles/libgles-omap3/99-fb.rules | 1 + meta-ti-extras/recipes/libgles/libgles-omap3_4.10.00.01.bb | 5 +++++ recipes-qt/b2qt-addons/b2qt-launcher/beaglebone/b2qt.service | 11 +++++++++++ .../b2qt-addons/b2qt-launcher/beaglebone/qtlauncher.service | 11 +++++++++++ 4 files changed, 28 insertions(+) create mode 100644 meta-ti-extras/recipes/libgles/libgles-omap3/99-fb.rules create mode 100644 recipes-qt/b2qt-addons/b2qt-launcher/beaglebone/b2qt.service create mode 100644 recipes-qt/b2qt-addons/b2qt-launcher/beaglebone/qtlauncher.service diff --git a/meta-ti-extras/recipes/libgles/libgles-omap3/99-fb.rules b/meta-ti-extras/recipes/libgles/libgles-omap3/99-fb.rules new file mode 100644 index 0000000..ca5ebc8 --- /dev/null +++ b/meta-ti-extras/recipes/libgles/libgles-omap3/99-fb.rules @@ -0,0 +1 @@ +KERNEL=="fb0", TAG+="systemd" diff --git a/meta-ti-extras/recipes/libgles/libgles-omap3_4.10.00.01.bb b/meta-ti-extras/recipes/libgles/libgles-omap3_4.10.00.01.bb index 1b1bf22..fe484f5 100644 --- a/meta-ti-extras/recipes/libgles/libgles-omap3_4.10.00.01.bb +++ b/meta-ti-extras/recipes/libgles/libgles-omap3_4.10.00.01.bb @@ -38,6 +38,7 @@ SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gf file://cputype \ file://rc.pvr \ file://99-bufferclass.rules \ + file://99-fb.rules \ " SRC_URI[md5sum] := "${@base_contains('TUNE_FEATURES', 'callconvention-hard', '${MD5SUM_HARDFP}', '${MD5SUM_SOFTFP}', d)}" @@ -53,3 +54,7 @@ do_configure_append() { sed -i -e s:\$\(PLAT_CC\):\$\(CC\):g $mak done } + +do_install_append() { + install -m 0644 ${WORKDIR}/99-fb.rules ${D}${sysconfdir}/udev/rules.d/ +} diff --git a/recipes-qt/b2qt-addons/b2qt-launcher/beaglebone/b2qt.service b/recipes-qt/b2qt-addons/b2qt-launcher/beaglebone/b2qt.service new file mode 100644 index 0000000..cdf6480 --- /dev/null +++ b/recipes-qt/b2qt-addons/b2qt-launcher/beaglebone/b2qt.service @@ -0,0 +1,11 @@ +[Unit] +Description=B2Qt user application +BindsTo=dev-fb0.device +After=dev-fb0.device +ConditionPathExists=/usr/bin/b2qt + +[Service] +ExecStart=-/usr/bin/appcontroller /usr/bin/b2qt + +[Install] +WantedBy=multi-user.target diff --git a/recipes-qt/b2qt-addons/b2qt-launcher/beaglebone/qtlauncher.service b/recipes-qt/b2qt-addons/b2qt-launcher/beaglebone/qtlauncher.service new file mode 100644 index 0000000..1094675 --- /dev/null +++ b/recipes-qt/b2qt-addons/b2qt-launcher/beaglebone/qtlauncher.service @@ -0,0 +1,11 @@ +[Unit] +Description=B2Qt Launcher Demo +BindsTo=dev-fb0.device +After=dev-fb0.device +ConditionPathExists=!/usr/bin/b2qt + +[Service] +ExecStart=-/usr/bin/appcontroller /usr/bin/qtlauncher --applications-root /data/user/qt + +[Install] +WantedBy=multi-user.target -- cgit v1.2.3-54-g00ecf