msm8937-common: rootdir: Use /data/vendor/radio for radio data folder

Use /data/vendor partition to hold vendor radio data. Modify radio
related init rc and scripts.

Change-Id: I6518e276f68d405151b1b124de6a0ca1b759d951
This commit is contained in:
Huaibin Yang 2017-05-03 14:06:55 -07:00 committed by Isaac Chen
parent 6e3f8d4dbf
commit 95b673a2dd
2 changed files with 28 additions and 25 deletions

View file

@ -197,6 +197,9 @@ on post-fs-data
mkdir /data/misc/audio/acdbdata 0770 media audio
mkdir /data/misc/audio/acdbdata/delta 0770 media audio
# Create directory for radio
mkdir /data/vendor/radio 0770 system radio
# Mounting of persist is moved to 'on emmc-fs' and 'on fs' sections
# We chown/chmod /persist again so because mount is run as root + defaults
chown root system /persist
@ -243,21 +246,21 @@ on post-fs-data
mkdir /data/misc/iop 0770 root system
# Mark the copy complete flag to not completed
write /data/misc/radio/copy_complete 0
chown radio radio /data/misc/radio/copy_complete
chmod 0660 /data/misc/radio/copy_complete
write /data/vendor/radio/copy_complete 0
chown radio radio /data/vendor/radio/copy_complete
chmod 0660 /data/vendor/radio/copy_complete
# copy prebuilt qcril.db files always
copy /system/vendor/qcril.db /data/misc/radio/qcril_prebuilt.db
chown radio radio /data/misc/radio/qcril_prebuilt.db
chmod 0660 /data/misc/radio/qcril_prebuilt.db
copy /vendor/radio/qcril_database/qcril.db /data/vendor/radio/qcril_prebuilt.db
chown radio radio /data/vendor/radio/qcril_prebuilt.db
chmod 0660 /data/vendor/radio/qcril_prebuilt.db
# File flags for prebuilt ril db file
write /data/misc/radio/prebuilt_db_support 1
chown radio radio /data/misc/radio/prebuilt_db_support
chmod 0400 /data/misc/radio/prebuilt_db_support
write /data/misc/radio/db_check_done 0
chown radio radio /data/misc/radio/db_check_done
chmod 0660 /data/misc/radio/db_check_done
write /data/vendor/radio/prebuilt_db_support 1
chown radio radio /data/vendor/radio/prebuilt_db_support
chmod 0400 /data/vendor/radio/prebuilt_db_support
write /data/vendor/radio/db_check_done 0
chown radio radio /data/vendor/radio/db_check_done
chmod 0660 /data/vendor/radio/db_check_done
# set aggressive read ahead for dm-0 and dm-1 during boot up
write /sys/block/dm-0/queue/read_ahead_kb 2048

View file

@ -33,27 +33,27 @@ chown -LR system.system /proc/touchpanel
# Copy qcril.db if needed for RIL
#
start_copying_prebuilt_qcril_db
echo 1 > /data/misc/radio/db_check_done
echo 1 > /data/vendor/radio/db_check_done
#
# Make modem config folder and copy firmware config to that folder for RIL
#
if [ -f /data/misc/radio/ver_info.txt ]; then
prev_version_info=`cat /data/misc/radio/ver_info.txt`
if [ -f /data/vendor/radio/ver_info.txt ]; then
prev_version_info=`cat /data/vendor/radio/ver_info.txt`
else
prev_version_info=""
fi
cur_version_info=`cat /firmware/verinfo/ver_info.txt`
if [ ! -f /firmware/verinfo/ver_info.txt -o "$prev_version_info" != "$cur_version_info" ]; then
rm -rf /data/misc/radio/modem_config
mkdir /data/misc/radio/modem_config
chmod 770 /data/misc/radio/modem_config
cp -r /firmware/image/modem_pr/mcfg/configs/* /data/misc/radio/modem_config
chown -hR radio.radio /data/misc/radio/modem_config
cp /firmware/verinfo/ver_info.txt /data/misc/radio/ver_info.txt
chown radio.radio /data/misc/radio/ver_info.txt
rm -rf /data/vendor/radio/modem_config
mkdir /data/vendor/radio/modem_config
chmod 770 /data/vendor/radio/modem_config
cp -r /firmware/image/modem_pr/mcfg/configs/* /data/vendor/radio/modem_config
chown -hR radio.radio /data/vendor/radio/modem_config
cp /firmware/verinfo/ver_info.txt /data/vendor/radio/ver_info.txt
chown radio.radio /data/vendor/radio/ver_info.txt
fi
cp /firmware/image/modem_pr/mbn_ota.txt /data/misc/radio/modem_config
chown radio.radio /data/misc/radio/modem_config/mbn_ota.txt
echo 1 > /data/misc/radio/copy_complete
cp /firmware/image/modem_pr/mbn_ota.txt /data/vendor/radio/modem_config
chown radio.radio /data/vendor/radio/modem_config/mbn_ota.txt
echo 1 > /data/vendor/radio/copy_complete