qcom: Add init.qcom.rc to start up remoteproc services/wifi
cherry-picked from upstream device/linaro/dragonboard project.
Adds the init.qcom.rc file to the build so the qcom remoteproc
userland code can be started and wifi can be initialized.
This pach was split out from earlier patch by Amit Pundir
<amit.pundir@linaro.org>
Change-Id: I2032e7c2d3d5d3a10b7afd387f97a93235a908cf
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Amit Pundir <pundiramit@gmail.com>
diff --git a/aosp_beryllium/device.mk b/aosp_beryllium/device.mk
index fabb3b1..d2dece1 100644
--- a/aosp_beryllium/device.mk
+++ b/aosp_beryllium/device.mk
@@ -40,3 +40,6 @@
qrtr-lookup \
rmtfs \
tqftpserv
+
+PRODUCT_COPY_FILES += \
+ device/xiaomi/beryllium/qcom/init.qcom.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.qcom.rc
diff --git a/qcom/init.qcom.rc b/qcom/init.qcom.rc
new file mode 100644
index 0000000..303fc9a
--- /dev/null
+++ b/qcom/init.qcom.rc
@@ -0,0 +1,43 @@
+service qrtr-ns /vendor/bin/qrtr-ns -f 1
+ class core
+ user root
+ group system
+ disabled
+ oneshot
+
+service pd_mapper /vendor/bin/pd-mapper
+ class core
+ user root
+ group system
+ disabled
+ oneshot
+
+service tqftpserv /vendor/bin/tqftpserv
+ class core
+ user root
+ group system
+ disabled
+ oneshot
+
+service rmtfs /vendor/bin/rmtfs -o /dev/block/platform/soc@0/1d84000.ufshc/by-name -P -r -s
+ class core
+ user root
+ group system
+ disabled
+ oneshot
+
+on early-init
+ exec - root -- /vendor/bin/qrtr-cfg 1
+ start qrtr-ns
+ start pd_mapper
+
+on post-fs-data
+ mkdir /data/vendor
+ mkdir /data/vendor/tmp
+ mkdir /data/vendor/readwrite
+ mkdir /data/vendor/readonly
+ mkdir /data/vendor/readonly/firmware
+ mkdir /data/vendor/readonly/firmware/image
+ write /sys/class/firmware/timeout 1
+ start tqftpserv
+ start rmtfs