diff options
-rw-r--r-- | recipes-support/rmtfs/files/rmtfs.service | 14 | ||||
-rw-r--r-- | recipes-support/rmtfs/rmtfs_git.bb | 10 |
2 files changed, 24 insertions, 0 deletions
diff --git a/recipes-support/rmtfs/files/rmtfs.service b/recipes-support/rmtfs/files/rmtfs.service new file mode 100644 index 0000000..4d2e601 --- /dev/null +++ b/recipes-support/rmtfs/files/rmtfs.service @@ -0,0 +1,14 @@ +[Unit] +Description=RMTFS setup +After=systemd-remount-fs.service +Requires=qrtr.service + +[Service] +ExecStartPre=/bin/sh -c "[ ! -f /boot/modem_fs1 ] && dd if=/dev/zero of=/boot/modem_fs1 bs=1M count=2 || :" +ExecStartPre=/bin/sh -c "[ ! -f /boot/modem_fs2 ] && dd if=/dev/zero of=/boot/modem_fs2 bs=1M count=2 || :" +ExecStartPre=/bin/sh -c "[ ! -f /boot/modem_fsc ] && dd if=/dev/zero of=/boot/modem_fsc bs=1M count=2 || :" +ExecStartPre=/bin/sh -c "[ ! -f /boot/modem_fsg ] && dd if=/dev/zero of=/boot/modem_fsg bs=1M count=2 || :" +ExecStart=/usr/bin/rmtfs -v + +[Install] +WantedBy=multi-user.target diff --git a/recipes-support/rmtfs/rmtfs_git.bb b/recipes-support/rmtfs/rmtfs_git.bb index 0968742..d3b7c46 100644 --- a/recipes-support/rmtfs/rmtfs_git.bb +++ b/recipes-support/rmtfs/rmtfs_git.bb @@ -5,8 +5,11 @@ SECTION = "devel" LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=ca25dbf5ebfc1a058bfc657c895aac2f" +inherit systemd + SRCREV = "dc7de6ef564d082cb89e0ac8b7649079ab231263" SRC_URI = "git://github.com/andersson/${BPN}.git;branch=master;protocol=https" +SRC_URI += "file://rmtfs.service" DEPENDS = "qmic-native qrtr" PV = "0.0+${SRCPV}" @@ -17,4 +20,11 @@ EXTRA_OEMAKE = "'LDFLAGS=${TARGET_LDFLAGS} -L${STAGING_LIBDIR} -lqrtr'" do_install () { oe_runmake install DESTDIR=${D} prefix=${prefix} + + sed -i -e s:/usr/bin:${bindir}:g ${WORKDIR}/rmtfs.service + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${WORKDIR}/rmtfs.service ${D}${systemd_unitdir}/system } + +SYSTEMD_SERVICE_${PN} = "rmtfs.service" +RDEPENDS_${PN} += "qrtr" |