aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-support/fastrpc/fastrpc/mount-dsp.sh26
-rw-r--r--recipes-support/fastrpc/fastrpc/usr-lib-rfsa.service16
-rw-r--r--recipes-support/fastrpc/fastrpc_git.bb21
3 files changed, 61 insertions, 2 deletions
diff --git a/recipes-support/fastrpc/fastrpc/mount-dsp.sh b/recipes-support/fastrpc/fastrpc/mount-dsp.sh
new file mode 100644
index 0000000..1bacfb8
--- /dev/null
+++ b/recipes-support/fastrpc/fastrpc/mount-dsp.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+set -e
+
+if [ -r /sys/devices/soc0/machine ] ; then
+ MACHINE=`cat /sys/devices/soc0/machine`
+ case $MACHINE in
+ SM8250|QRB5160)
+ WHAT=/lib/firmware/qcom/sm8250/dspso.bin
+ ;;
+ esac
+fi
+
+if [ -z "$WHAT" -o ! -r "$WHAT"] ; then
+ if [ -h /dev/disk/by-partlabel/dsp_a ] ; then
+ WHAT=/dev/disk/by-partlabel/dsp_a
+ else
+ WHAT=/dev/disk/by-partlabel/dsp
+ fi
+fi
+
+if [ -e "$WHAT" ] ; then
+ mount $WHAT /usr/lib/rfsa -o ro
+else
+ echo "Not mounting /usr/lib/rfsa, partition/image not found" 1>&2
+fi
diff --git a/recipes-support/fastrpc/fastrpc/usr-lib-rfsa.service b/recipes-support/fastrpc/fastrpc/usr-lib-rfsa.service
new file mode 100644
index 0000000..f5fc76a
--- /dev/null
+++ b/recipes-support/fastrpc/fastrpc/usr-lib-rfsa.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Mount DSP partition to /usr/lib/rfsa
+DefaultDependencies=false
+Before=umount.target local-fs.target
+After=local-pre-fs.target
+Conflicts=umount.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=Yes
+TimeoutSec=0
+ExecStart=/usr/sbin/mount-dsp.sh
+ExecStop=/bin/umount /usr/lib/rfsa
+
+[Install]
+WantedBy=local-fs.target
diff --git a/recipes-support/fastrpc/fastrpc_git.bb b/recipes-support/fastrpc/fastrpc_git.bb
index ea41bd8..da0225c 100644
--- a/recipes-support/fastrpc/fastrpc_git.bb
+++ b/recipes-support/fastrpc/fastrpc_git.bb
@@ -6,15 +6,32 @@ LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://src/fastrpc_apps_user.c;beginline=1;endline=29;md5=f94f3a7beba14ae2f59f817e9634f891"
SRCREV = "bc36c705c9b057ca880a423021d3c19f02edeadd"
-SRC_URI = "git://git.linaro.org/landing-teams/working/qualcomm/fastrpc.git;branch=automake;protocol=https"
+SRC_URI = "\
+ git://git.linaro.org/landing-teams/working/qualcomm/fastrpc.git;branch=automake;protocol=https \
+ file://usr-lib-rfsa.service \
+ file://mount-dsp.sh \
+"
PV = "0.0+${SRCPV}"
S = "${WORKDIR}/git"
-inherit autotools
+inherit autotools systemd
+
+SYSTEMD_SERVICE_${PN} = "usr-lib-rfsa.service"
+
+do_install_append() {
+ install -d ${D}${libdir}/rfsa
+
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/usr-lib-rfsa.service ${D}${systemd_unitdir}/system
+
+ install -d ${D}${sbindir}
+ install -m 0755 ${WORKDIR}/mount-dsp.sh ${D}${sbindir}
+}
FILES_${PN} += " \
+ ${libdir}/rfsa \
${libdir}/libadsp_default_listener.so \
${libdir}/libcdsp_default_listener.so \
${libdir}/libadsprpc.so \