拷贝AP镜像cpbin.sh
#/bin/bash
PROJECT=${1}
DIR="${2}"
if [ -d ${DIR} ];then
rm -rf ${DIR}
mkdir -p ${DIR}
else
mkdir -p ${DIR}
fi
help_info() {
echo
echo "#################################################################################"
echo "# Usage: #"
echo "# ./cpbin.sh project_name target_dir #"
echo "# Example: #"
echo "# ./cpbin.sh project-name my_img #"
echo "# If not exist directory my_img, it will be created in current directory. #"
echo "#################################################################################"
echo
}
if [ $# -lt 1 ];then
help_info
exit
elif [ "-h" = $1 ] || [ "help" = $1 ] || [ "-help" = $1 ];then
help_info
exit
fi
# Copy bin(s) for download
cp out/target/product/${PROJECT}/{*.txt,*.bin,*.img,DSP*,EBR1,EBR2,MBR} ./${DIR}/ -v
# Copy AP Database
#MTK_CGEN_AP_Editor_DB := $(MTK_CGEN_OUT_DIR)/APDB_$(MTK_PLATFORM)_$(MTK_CHIP_VER)_$(MTK_BRANCH)_$(MTK_WEEK_NO)
cp out/target/product/${PROJECT}/obj/CODEGEN/cgen/APDB_* ./${DIR}/ -v
# Copy Modem Database
cp out/target/product/${PROJECT}/system/etc/mddb/BPLG* ./${DIR}/ -v
本文介绍了一个用于复制AP镜像的bash脚本。该脚本可以根据指定的目标目录复制必要的bin文件、文本文件和数据库文件等。若目标目录不存在,则会自动创建。
2998

被折叠的 条评论
为什么被折叠?



