forked from Openwrt/openwrt
9c262b2aa4
rmtfs is a system daemon that boots the modem on qualcomm devices. It allows the modem cpu to access the EFS data on the persistent storage such as emmc partition. Signed-off-by: Nikita Travkin <nikita@trvn.ru>
24 lines
543 B
Bash
Executable File
24 lines
543 B
Bash
Executable File
#!/bin/sh /etc/rc.common
|
|
|
|
USE_PROCD=1
|
|
START=25
|
|
|
|
# FIXME: rmtfs expects these from udev
|
|
populate_disk_labels() {
|
|
mkdir -p /dev/disk/by-partlabel/
|
|
|
|
for part in /sys/block/mmcblk*/mmcblk*p*
|
|
do
|
|
DEVNAME="$(grep DEVNAME "$part"/uevent | sed 's/DEVNAME=//g')"
|
|
PARTNAME="$(grep PARTNAME "$part"/uevent | sed 's/PARTNAME=//g')"
|
|
ln -s /dev/$DEVNAME /dev/disk/by-partlabel/$PARTNAME
|
|
done
|
|
}
|
|
|
|
start_service() {
|
|
populate_disk_labels
|
|
procd_open_instance
|
|
procd_set_param command /usr/sbin/rmtfs -P -r -s
|
|
procd_close_instance
|
|
}
|