summaryrefslogtreecommitdiffstats
path: root/recipes-demo-hmi/unicens/unicens_0.1.bb
diff options
context:
space:
mode:
authorTadao Tanikawa <tanikawa.tadao@jp.panasonic.com>2016-12-20 21:34:46 +0900
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2016-12-22 15:29:37 +0000
commitaf4a22aeda5e5dfede3dd3f1a65165ccb5632ce0 (patch)
treeb0833207c9fdb09902a56f46cee78e717d918cef /recipes-demo-hmi/unicens/unicens_0.1.bb
parent6511c88c7e2a515441d22bd583b1386b104b93b5 (diff)
Support systemd services of MOST for CES2017 Demo
This change is for booting all stuff for MOST automatically after WindowManager launched. All services except insmod are in systemd user mode. Change-Id: I15043493c797511275e4f02173a85f06a7298ca0 Signed-off-by: Tadao Tanikawa <tanikawa.tadao@jp.panasonic.com>
Diffstat (limited to 'recipes-demo-hmi/unicens/unicens_0.1.bb')
-rw-r--r--recipes-demo-hmi/unicens/unicens_0.1.bb38
1 files changed, 30 insertions, 8 deletions
diff --git a/recipes-demo-hmi/unicens/unicens_0.1.bb b/recipes-demo-hmi/unicens/unicens_0.1.bb
index 176baa402..0fc0afc93 100644
--- a/recipes-demo-hmi/unicens/unicens_0.1.bb
+++ b/recipes-demo-hmi/unicens/unicens_0.1.bb
@@ -10,18 +10,40 @@ DEPENDS += "libxml2"
SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/unicens;protocol=https"
SRC_URI += "file://0001-Fix-cross-compilation-with-yocto.patch"
+SRC_URI += "file://0001-Support-booting-by-systemd.patch \
+ file://most-network-startup.service \
+ file://most-network-manager.service"
S = "${WORKDIR}/git"
#SRCREV = "8c5f2324d7aa61669324aec1a0ad091fe1379489"
SRCREV = "${AUTOREV}"
do_install() {
- install -m 0755 -d ${D}${bindir} ${D}/home/root
- install -m 0755 ${S}/NetworkManager ${D}${bindir}/MostNetworkManager
- install -m 0644 ${S}/scripts/config-agl.xml ${D}/home/root
- install -m 0644 ${S}/scripts/camera-os88122-ts.script ${D}/home/root
- install -m 0644 ${S}/scripts/i2c-slim-amplifier-v2.3.script ${D}/home/root
- install -m 0644 ${S}/scripts/i2c-uda1388-v2.3.script ${D}/home/root
- install -m 0755 ${S}/scripts/loadDriver.sh ${D}/home/root
+ install -m 0755 -d ${D}/usr/AGL/most
+ install -m 0755 ${S}/NetworkManager ${D}/usr/AGL/most/MostNetworkManager
+ install -m 0644 ${S}/scripts/config-agl.xml ${D}/usr/AGL/most/
+ install -m 0644 ${S}/scripts/camera-os88122-ts.script ${D}/usr/AGL/most/
+ install -m 0644 ${S}/scripts/i2c-slim-amplifier-v2.3.script ${D}/usr/AGL/most/
+ install -m 0644 ${S}/scripts/i2c-uda1388-v2.3.script ${D}/usr/AGL/most
+ install -m 0755 ${S}/scripts/loadDriver.sh ${D}/usr/AGL/most
+
+ # Install MOST network startup systemd service (user)
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ install -m 644 -p -D ${WORKDIR}/most-network-startup.service ${D}${systemd_user_unitdir}/most-network-startup.service
+ install -m 644 -p -D ${WORKDIR}/most-network-manager.service ${D}${systemd_user_unitdir}/most-network-manager.service
+
+ # Execute install manually for root user on behalf of systemctl script
+ # because it doesn't support user mode of systemd.
+ install -m 0755 -d ${D}/home/root/.config/systemd/user/default.target.wants/
+ ln -sf ${systemd_user_unitdir}/most-network-startup.service ${D}/home/root/.config/systemd/user/default.target.wants/most-network-startup.service
+ ln -sf ${systemd_user_unitdir}/most-network-manager.service ${D}/home/root/.config/systemd/user/default.target.wants/most-network-manager.service
+ fi
}
-FILES_${PN} += "/home/root*"
+
+FILES_${PN} += " \
+ /usr/AGL/most \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_user_unitdir}/most-network-startup.service', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_user_unitdir}/most-network-manager.service', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '/home/root/.config/systemd/user/default.target.wants/most-network-startup.service', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '/home/root/.config/systemd/user/default.target.wants/most-network-manager.service', '', d)} \
+ "