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,6 +429,27 @@ esac
|
|||
#
|
||||
# Make modem config folder and copy firmware config to that folder for RIL
|
||||
#
|
||||
if [ -f /data/vendor/mbnconfig/image/modem_pr/mcfg/configs/mbn_build_utc.txt ]; then
|
||||
# for mbnota design
|
||||
if [ -f /data/vendor/modem_config/mbn_build_utc.txt ]; then
|
||||
prev_version_info=`cat /data/vendor/modem_config/mbn_build_utc.txt`
|
||||
else
|
||||
prev_version_info=""
|
||||
fi
|
||||
|
||||
cur_version_info=`cat /data/vendor/mbnconfig/image/modem_pr/mcfg/configs/mbn_build_utc.txt`
|
||||
if [ "$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 /data/vendor/mbnconfig/image/modem_pr/mcfg/configs/* /data/vendor/modem_config
|
||||
cp --preserve=m -d /data/vendor/mbnconfig/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
|
||||
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
|
||||
|
@ -447,6 +468,7 @@ if [ ! -f /vendor/firmware_mnt/verinfo/ver_info.txt -o "$prev_version_info" != "
|
|||
# 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
|
||||
chmod g-w /data/vendor/modem_config
|
||||
setprop ro.vendor.ril.mbn_copy_completed 1
|
||||
|
||||
|
|
Loading…
Reference in a new issue