init: Add init.qcom.post_fs.sh script.
Some of the qcom services require to remount system partition with read-write permission. But since all of them running as independent asyncronous services so this can cause some issue. init.post_fs.sh is responsible to call all such services syncronously and in the end remount system partition as read-only. Change-Id: I4c03a67df5eb429b2ede633f81135e8b5c457673
This commit is contained in:
parent
b1ec2c8c5c
commit
385037aa45
|
@ -118,6 +118,7 @@ INIT += init.qcom.bt.sh
|
||||||
INIT += init.qcom.coex.sh
|
INIT += init.qcom.coex.sh
|
||||||
INIT += init.qcom.fm.sh
|
INIT += init.qcom.fm.sh
|
||||||
INIT += init.qcom.post_boot.sh
|
INIT += init.qcom.post_boot.sh
|
||||||
|
INIT += init.qcom.post_fs.sh
|
||||||
INIT += init.qcom.rc
|
INIT += init.qcom.rc
|
||||||
INIT += init.qcom.sdio.sh
|
INIT += init.qcom.sdio.sh
|
||||||
INIT += init.qcom.sh
|
INIT += init.qcom.sh
|
||||||
|
|
|
@ -108,3 +108,10 @@ LOCAL_SRC_FILES := etc/ueventd.qcom.rc
|
||||||
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
||||||
include $(BUILD_PREBUILT)
|
include $(BUILD_PREBUILT)
|
||||||
|
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
LOCAL_MODULE := init.qcom.post_fs.sh
|
||||||
|
LOCAL_MODULE_TAGS := optional eng
|
||||||
|
LOCAL_MODULE_CLASS := ETC
|
||||||
|
LOCAL_SRC_FILES := etc/init.qcom.post_fs.sh
|
||||||
|
include $(BUILD_PREBUILT)
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,48 @@
|
||||||
|
#!/system/bin/sh
|
||||||
|
# Copyright (c) 2012, Code Aurora Forum. All rights reserved.
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions are met:
|
||||||
|
# * Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# * Redistributions in binary form must reproduce the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer in the
|
||||||
|
# documentation and/or other materials provided with the distribution.
|
||||||
|
# * Neither the name of Code Aurora nor
|
||||||
|
# the names of its contributors may be used to endorse or promote
|
||||||
|
# products derived from this software without specific prior written
|
||||||
|
# permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||||
|
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||||
|
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||||
|
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||||
|
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
#
|
||||||
|
|
||||||
|
# This should be the first command
|
||||||
|
# remount system as read-write.
|
||||||
|
mount -o rw,remount,barrier=1 /system
|
||||||
|
|
||||||
|
# Run modem link script
|
||||||
|
/system/bin/sh /system/etc/init.qcom.modem_links.sh
|
||||||
|
|
||||||
|
# Run mdm link script
|
||||||
|
/system/bin/sh /system/etc/init.qcom.mdm_links.sh
|
||||||
|
|
||||||
|
# Run thermal script
|
||||||
|
/system/bin/sh /system/etc/init.qcom.thermald_conf.sh
|
||||||
|
|
||||||
|
# Run wifi script
|
||||||
|
/system/bin/sh /system/etc/init.qcom.wifi.sh
|
||||||
|
|
||||||
|
# This should be the last command
|
||||||
|
# remount system as read-only.
|
||||||
|
mount -o ro,remount,barrier=1 /system
|
||||||
|
|
|
@ -140,6 +140,7 @@ on boot
|
||||||
# import cne init file
|
# import cne init file
|
||||||
on post-fs
|
on post-fs
|
||||||
export_rc /persist/init.cne.rc
|
export_rc /persist/init.cne.rc
|
||||||
|
start qcom-post-fs
|
||||||
|
|
||||||
# msm specific files that need to be created on /data
|
# msm specific files that need to be created on /data
|
||||||
on post-fs-data
|
on post-fs-data
|
||||||
|
@ -463,6 +464,12 @@ on property:drmdiag.load=1
|
||||||
on property:drmdiag.load=0
|
on property:drmdiag.load=0
|
||||||
stop drmdiag
|
stop drmdiag
|
||||||
|
|
||||||
|
service qcom-post-fs /system/bin/sh /system/etc/init.qcom.post_fs.sh
|
||||||
|
class core
|
||||||
|
user root
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
service qcom-sh /system/bin/sh /init.qcom.sh
|
service qcom-sh /system/bin/sh /init.qcom.sh
|
||||||
class late_start
|
class late_start
|
||||||
user root
|
user root
|
||||||
|
@ -474,10 +481,6 @@ service qcom-post-boot /system/bin/sh /system/etc/init.qcom.post_boot.sh
|
||||||
disabled
|
disabled
|
||||||
oneshot
|
oneshot
|
||||||
|
|
||||||
service qcom-wifi /system/bin/sh /system/etc/init.qcom.wifi.sh
|
|
||||||
class late_start
|
|
||||||
oneshot
|
|
||||||
|
|
||||||
service wifi-sdio-on /system/bin/sh /system/etc/init.qcom.sdio.sh
|
service wifi-sdio-on /system/bin/sh /system/etc/init.qcom.sdio.sh
|
||||||
class late_start
|
class late_start
|
||||||
group wifi inet
|
group wifi inet
|
||||||
|
|
|
@ -42,23 +42,19 @@ case "$target" in
|
||||||
case "$wlanchip" in
|
case "$wlanchip" in
|
||||||
"AR6004-USB")
|
"AR6004-USB")
|
||||||
setprop wlan.driver.ath 2
|
setprop wlan.driver.ath 2
|
||||||
mount -t vfat -o remount,rw,barrier=0 /dev/block/mtdblock1 /system
|
|
||||||
rm /system/lib/modules/wlan.ko
|
rm /system/lib/modules/wlan.ko
|
||||||
rm /system/lib/modules/cfg80211.ko
|
rm /system/lib/modules/cfg80211.ko
|
||||||
ln -s /system/lib/modules/ath6kl-3.5/ath6kl_usb.ko /system/lib/modules/wlan.ko
|
ln -s /system/lib/modules/ath6kl-3.5/ath6kl_usb.ko /system/lib/modules/wlan.ko
|
||||||
ln -s /system/lib/modules/ath6kl-3.5/cfg80211.ko /system/lib/modules/cfg80211.ko
|
ln -s /system/lib/modules/ath6kl-3.5/cfg80211.ko /system/lib/modules/cfg80211.ko
|
||||||
mount -t vfat -o remount,ro,barrier=0 /dev/block/mtdblock1 /system
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "*** WI-FI chip ID is not specified in /persist/wlan_chip_id **"
|
echo "*** WI-FI chip ID is not specified in /persist/wlan_chip_id **"
|
||||||
echo "*** Use the default WCN driver. **"
|
echo "*** Use the default WCN driver. **"
|
||||||
setprop wlan.driver.ath 0
|
setprop wlan.driver.ath 0
|
||||||
mount -t vfat -o remount,rw,barrier=0 /dev/block/mtdblock1 /system
|
|
||||||
rm /system/lib/modules/wlan.ko
|
rm /system/lib/modules/wlan.ko
|
||||||
rm /system/lib/modules/cfg80211.ko
|
rm /system/lib/modules/cfg80211.ko
|
||||||
ln -s /system/lib/modules/prima/prima_wlan.ko /system/lib/modules/wlan.ko
|
ln -s /system/lib/modules/prima/prima_wlan.ko /system/lib/modules/wlan.ko
|
||||||
ln -s /system/lib/modules/prima/cfg80211.ko /system/lib/modules/cfg80211.ko
|
ln -s /system/lib/modules/prima/cfg80211.ko /system/lib/modules/cfg80211.ko
|
||||||
mount -t vfat -o remount,ro,barrier=0 /dev/block/mtdblock1 /system
|
|
||||||
|
|
||||||
# The property below is used in Qcom SDK for softap to determine
|
# The property below is used in Qcom SDK for softap to determine
|
||||||
# the wifi driver config file
|
# the wifi driver config file
|
||||||
|
@ -114,30 +110,24 @@ case "$target" in
|
||||||
case "$wlanchip" in
|
case "$wlanchip" in
|
||||||
"ATH6KL")
|
"ATH6KL")
|
||||||
setprop wlan.driver.ath 1
|
setprop wlan.driver.ath 1
|
||||||
mount -t vfat -o remount,rw,barrier=0 /dev/block/mtdblock1 /system
|
|
||||||
rm /system/lib/modules/wlan.ko
|
rm /system/lib/modules/wlan.ko
|
||||||
rm /system/lib/modules/cfg80211.ko
|
rm /system/lib/modules/cfg80211.ko
|
||||||
ln -s /system/lib/modules/ath6kl/ath6kl_sdio.ko /system/lib/modules/wlan.ko
|
ln -s /system/lib/modules/ath6kl/ath6kl_sdio.ko /system/lib/modules/wlan.ko
|
||||||
ln -s /system/lib/modules/ath6kl/cfg80211.ko /system/lib/modules/cfg80211.ko
|
ln -s /system/lib/modules/ath6kl/cfg80211.ko /system/lib/modules/cfg80211.ko
|
||||||
mount -t vfat -o remount,ro,barrier=0 /dev/block/mtdblock1 /system
|
|
||||||
;;
|
;;
|
||||||
"WCN1314")
|
"WCN1314")
|
||||||
setprop wlan.driver.ath 0
|
setprop wlan.driver.ath 0
|
||||||
mount -t vfat -o remount,rw,barrier=0 /dev/block/mtdblock1 /system
|
|
||||||
rm /system/lib/modules/wlan.ko
|
rm /system/lib/modules/wlan.ko
|
||||||
rm /system/lib/modules/cfg80211.ko
|
rm /system/lib/modules/cfg80211.ko
|
||||||
ln -s /system/lib/modules/volans/WCN1314_rf.ko /system/lib/modules/wlan.ko
|
ln -s /system/lib/modules/volans/WCN1314_rf.ko /system/lib/modules/wlan.ko
|
||||||
ln -s /system/lib/modules/volans/cfg80211.ko /system/lib/modules/cfg80211.ko
|
ln -s /system/lib/modules/volans/cfg80211.ko /system/lib/modules/cfg80211.ko
|
||||||
mount -t vfat -o remount,ro,barrier=0 /dev/block/mtdblock1 /system
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
setprop wlan.driver.ath 1
|
setprop wlan.driver.ath 1
|
||||||
mount -t vfat -o remount,rw,barrier=0 /dev/block/mtdblock1 /system
|
|
||||||
rm /system/lib/modules/wlan.ko
|
rm /system/lib/modules/wlan.ko
|
||||||
rm /system/lib/modules/cfg80211.ko
|
rm /system/lib/modules/cfg80211.ko
|
||||||
ln -s /system/lib/modules/ath6kl/ath6kl_sdio.ko /system/lib/modules/wlan.ko
|
ln -s /system/lib/modules/ath6kl/ath6kl_sdio.ko /system/lib/modules/wlan.ko
|
||||||
ln -s /system/lib/modules/ath6kl/cfg80211.ko /system/lib/modules/cfg80211.ko
|
ln -s /system/lib/modules/ath6kl/cfg80211.ko /system/lib/modules/cfg80211.ko
|
||||||
mount -t vfat -o remount,ro,barrier=0 /dev/block/mtdblock1 /system
|
|
||||||
echo "********************************************************************"
|
echo "********************************************************************"
|
||||||
echo "*** Error:WI-FI chip ID is not specified in /persist/wlan_chip_id **"
|
echo "*** Error:WI-FI chip ID is not specified in /persist/wlan_chip_id **"
|
||||||
echo "******* WI-FI may not work ***********************************"
|
echo "******* WI-FI may not work ***********************************"
|
||||||
|
@ -150,16 +140,12 @@ case "$target" in
|
||||||
echo "The WLAN Chip ID is $wlanchip"
|
echo "The WLAN Chip ID is $wlanchip"
|
||||||
case "$wlanchip" in
|
case "$wlanchip" in
|
||||||
"WCN1314")
|
"WCN1314")
|
||||||
mount -t vfat -o remount,rw,barrier=0 /dev/block/mtdblock1 /system
|
|
||||||
ln -s /system/lib/modules/volans/WCN1314_rf.ko /system/lib/modules/wlan.ko
|
ln -s /system/lib/modules/volans/WCN1314_rf.ko /system/lib/modules/wlan.ko
|
||||||
mount -t vfat -o remount,ro,barrier=0 /dev/block/mtdblock1 /system
|
|
||||||
;;
|
;;
|
||||||
"WCN1312")
|
"WCN1312")
|
||||||
mount -t vfat -o remount,rw,barrier=0 /dev/block/mtdblock1 /system
|
|
||||||
ln -s /system/lib/modules/libra/libra.ko /system/lib/modules/wlan.ko
|
ln -s /system/lib/modules/libra/libra.ko /system/lib/modules/wlan.ko
|
||||||
ln -s /data/hostapd/qcom_cfg.ini /etc/firmware/wlan/qcom_cfg.ini
|
ln -s /data/hostapd/qcom_cfg.ini /etc/firmware/wlan/qcom_cfg.ini
|
||||||
ln -s /persist/qcom_wlan_nv.bin /etc/firmware/wlan/qcom_wlan_nv.bin
|
ln -s /persist/qcom_wlan_nv.bin /etc/firmware/wlan/qcom_wlan_nv.bin
|
||||||
mount -t vfat -o remount,ro,barrier=0 /dev/block/mtdblock1 /system
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "********************************************************************"
|
echo "********************************************************************"
|
||||||
|
@ -169,10 +155,8 @@ case "$target" in
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
msm7627*)
|
msm7627*)
|
||||||
mount -t vfat -o remount,rw,barrier=0 /dev/block/mtdblock1 /system
|
|
||||||
ln -s /data/hostapd/qcom_cfg.ini /etc/firmware/wlan/qcom_cfg.ini
|
ln -s /data/hostapd/qcom_cfg.ini /etc/firmware/wlan/qcom_cfg.ini
|
||||||
ln -s /persist/qcom_wlan_nv.bin /etc/firmware/wlan/qcom_wlan_nv.bin
|
ln -s /persist/qcom_wlan_nv.bin /etc/firmware/wlan/qcom_wlan_nv.bin
|
||||||
mount -t vfat -o remount,ro,barrier=0 /dev/block/mtdblock1 /system
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
|
|
Loading…
Reference in New Issue