sm8450-common: rootdir: Add mbnota support
Change-Id: Id503db81379785fef63444e26ee674faa7ae1a06
This commit is contained in:
parent
973b08b277
commit
60894cbcbe
1 changed files with 38 additions and 16 deletions
|
@ -429,23 +429,45 @@ esac
|
||||||
#
|
#
|
||||||
# Make modem config folder and copy firmware config to that folder for RIL
|
# Make modem config folder and copy firmware config to that folder for RIL
|
||||||
#
|
#
|
||||||
if [ -f /data/vendor/modem_config/ver_info.txt ]; then
|
if [ -f /data/vendor/mbnconfig/image/modem_pr/mcfg/configs/mbn_build_utc.txt ]; then
|
||||||
prev_version_info=`cat /data/vendor/modem_config/ver_info.txt`
|
# for mbnota design
|
||||||
else
|
if [ -f /data/vendor/modem_config/mbn_build_utc.txt ]; then
|
||||||
prev_version_info=""
|
prev_version_info=`cat /data/vendor/modem_config/mbn_build_utc.txt`
|
||||||
fi
|
else
|
||||||
|
prev_version_info=""
|
||||||
|
fi
|
||||||
|
|
||||||
cur_version_info=`cat /vendor/firmware_mnt/verinfo/ver_info.txt`
|
cur_version_info=`cat /data/vendor/mbnconfig/image/modem_pr/mcfg/configs/mbn_build_utc.txt`
|
||||||
if [ ! -f /vendor/firmware_mnt/verinfo/ver_info.txt -o "$prev_version_info" != "$cur_version_info" ]; then
|
if [ "$prev_version_info" != "$cur_version_info" ]; then
|
||||||
# add W for group recursively before delete
|
# add W for group recursively before delete
|
||||||
chmod g+w -R /data/vendor/modem_config/*
|
chmod g+w -R /data/vendor/modem_config/*
|
||||||
rm -rf /data/vendor/modem_config/*
|
rm -rf /data/vendor/modem_config/*
|
||||||
# preserve the read only mode for all subdir and files
|
# preserve the read only mode for all subdir and files
|
||||||
cp --preserve=m -dr /vendor/firmware_mnt/image/modem_pr/mcfg/configs/* /data/vendor/modem_config
|
cp --preserve=m -dr /data/vendor/mbnconfig/image/modem_pr/mcfg/configs/* /data/vendor/modem_config
|
||||||
cp --preserve=m -d /vendor/firmware_mnt/verinfo/ver_info.txt /data/vendor/modem_config/
|
cp --preserve=m -d /data/vendor/mbnconfig/image/modem_pr/mbn_ota.txt /data/vendor/modem_config/
|
||||||
cp --preserve=m -d /vendor/firmware_mnt/image/modem_pr/mbn_ota.txt /data/vendor/modem_config/
|
# the group must be root, otherwise this script could not add "W" for group recursively
|
||||||
# the group must be root, otherwise this script could not add "W" for group recursively
|
chown -hR radio.root /data/vendor/modem_config/*
|
||||||
chown -hR radio.root /data/vendor/modem_config/*
|
fi
|
||||||
|
else
|
||||||
|
# for legacy design
|
||||||
|
if [ -f /data/vendor/modem_config/ver_info.txt ]; then
|
||||||
|
prev_version_info=`cat /data/vendor/modem_config/ver_info.txt`
|
||||||
|
else
|
||||||
|
prev_version_info=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
cur_version_info=`cat /vendor/firmware_mnt/verinfo/ver_info.txt`
|
||||||
|
if [ ! -f /vendor/firmware_mnt/verinfo/ver_info.txt -o "$prev_version_info" != "$cur_version_info" ]; then
|
||||||
|
# add W for group recursively before delete
|
||||||
|
chmod g+w -R /data/vendor/modem_config/*
|
||||||
|
rm -rf /data/vendor/modem_config/*
|
||||||
|
# preserve the read only mode for all subdir and files
|
||||||
|
cp --preserve=m -dr /vendor/firmware_mnt/image/modem_pr/mcfg/configs/* /data/vendor/modem_config
|
||||||
|
cp --preserve=m -d /vendor/firmware_mnt/verinfo/ver_info.txt /data/vendor/modem_config/
|
||||||
|
cp --preserve=m -d /vendor/firmware_mnt/image/modem_pr/mbn_ota.txt /data/vendor/modem_config/
|
||||||
|
# the group must be root, otherwise this script could not add "W" for group recursively
|
||||||
|
chown -hR radio.root /data/vendor/modem_config/*
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
chmod g-w /data/vendor/modem_config
|
chmod g-w /data/vendor/modem_config
|
||||||
setprop ro.vendor.ril.mbn_copy_completed 1
|
setprop ro.vendor.ril.mbn_copy_completed 1
|
||||||
|
|
Loading…
Reference in a new issue