Add device_info support(Default is enable).
Change-Id: I57e3edffd242ca7598d48a00d5a5ffed64a33d64
diff --git a/pack.sh b/pack.sh
index dd6e5b8..f028b93 100755
--- a/pack.sh
+++ b/pack.sh
@@ -8,6 +8,7 @@
BUILD_PARTITION=`cat build_version | grep PARTITION | cut -d '=' -f 2`
BUILD_CUSTOM=`cat build_version | grep CUSTOM | cut -d '=' -f 2`
SEC_SUPPORT=`cat build_version | grep SEC_SUPPORT | cut -d '=' -f 2`
+DEV_INFO_RESET=`cat build_version | grep DEV_INFO_RESET | cut -d '=' -f 2`
if [ -f mbtk/mbtk_version ];then
PATCH_INDEX=`cat mbtk/mbtk_version | grep PATCH_INDEX | cut -d '=' -f 2`
@@ -98,6 +99,10 @@
BIN_OTA_BLF="$BUILD_TARGAT"_"$BUILD_FLAG"_QSPINAND_Trusted_SDTIM_LPDDR2_OTA_BLF
fi
fi
+
+ if [ "$DEV_INFO_RESET" == "Y" ];then
+ BIN_BLF="$BIN_BLF"_DEV_INFO
+ fi
else
BUILD_TARGAT=asr1803
BUILD_FLAG=p401
@@ -278,6 +283,16 @@
fi
copy "$BUILD_TARGAT"_CP_ReliableData_CMCC.bin
+ else
+ if [ "$DEV_INFO_RESET" == "Y" ];then
+ date_str=`date "+%Y/%m/%d %H:%M:%S"`
+ asr_baseline=`cat $OUT_DIR/mversion`
+ echo $date_str
+
+ [ -f mbtk/device_info_generate ] && mbtk/device_info_generate -a ab -b $VERSION_STR_CN -d $BUILD_PROJECT -e $CUSTOM_MODEL -f cn -g "$date_str" -h 15 -i 7 -j $asr_baseline -o $MBTK_M1901_VERSION_DIR/dev_info_cn.bin
+ [ -f mbtk/device_info_generate ] && mbtk/device_info_generate -a ab -b $VERSION_STR_EU -d $BUILD_PROJECT -e $CUSTOM_MODEL -f eu -g "$date_str" -h 15 -i 7 -j $asr_baseline -o $MBTK_M1901_VERSION_DIR/dev_info_eu.bin
+ [ -f mbtk/device_info_generate ] && mbtk/device_info_generate -a ab -b $VERSION_STR_LA -d $BUILD_PROJECT -e $CUSTOM_MODEL -f sa -g "$date_str" -h 15 -i 7 -j $asr_baseline -o $MBTK_M1901_VERSION_DIR/dev_info_la.bin
+ fi
fi
copy "$BUILD_TARGAT"_AP_ReliableData.bin
@@ -315,8 +330,8 @@
copy swdl_linux
if [ "$SEC_SUPPORT" == "Y" ];then
copy "$BUILD_TARGAT"_tos.bin
- copy DDR_*
- copy DKB_timheader.bin
+# copy DDR_*
+# copy DKB_timheader.bin
fi
if [ -f marvell/swd/FALCON/logo.img ];then
cp marvell/swd/FALCON/logo.img $MBTK_M1901_VERSION_DIR
@@ -332,6 +347,19 @@
# 生成各地区的固件
if [ -n "$1" -a "$1" == "mobiletek" ] ;then
generate_version_bin
+ else
+ if [ "$DEV_INFO_RESET" == "Y" ];then
+ cp $MBTK_M1901_VERSION/$BIN_BLF.blf $MBTK_M1901_VERSION/"$BIN_BLF"_CN.blf
+ sed -i "s/dev_info.bin/dev_info_cn.bin/" $MBTK_M1901_VERSION/"$BIN_BLF"_CN.blf
+
+ cp $MBTK_M1901_VERSION/$BIN_BLF.blf $MBTK_M1901_VERSION/"$BIN_BLF"_EU.blf
+ sed -i "s/dev_info.bin/dev_info_eu.bin/" $MBTK_M1901_VERSION/"$BIN_BLF"_EU.blf
+
+ cp $MBTK_M1901_VERSION/$BIN_BLF.blf $MBTK_M1901_VERSION/"$BIN_BLF"_LA.blf
+ sed -i "s/dev_info.bin/dev_info_la.bin/" $MBTK_M1901_VERSION/"$BIN_BLF"_LA.blf
+
+ rm -f $MBTK_M1901_VERSION/$BIN_BLF.blf
+ fi
fi
zip -q -r $MBTK_M1901_VERSION.zip $MBTK_M1901_VERSION