summaryrefslogtreecommitdiffstats
path: root/recipes-demo-hmi/unicens/unicens_0.1.bb
diff options
context:
space:
mode:
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)} \
+ "