aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-support/fastrpc/fastrpc/mount-dsp.sh
blob: a76e485a2aca0b344948ca7829949fe047c6502b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh

set -e

modprobe socinfo || true

if [ -r /sys/devices/soc0/machine ] ; then
	MACHINE=`cat /sys/devices/soc0/machine`
	case $MACHINE in
		SM8250|QRB5165)
			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