$ cat all.sh
# get branch name from "repo branch"
BRANCHNUM=$(repo branch | grep -c "* ")
if [ "$BRANCHNUM" == "1" ]
then
BRANCHNAME=$(repo branch | grep ^* | grep "in all projects" | cut -f3 -d " ")
if [ "$BRANCHNAME" == "" ]
then
echo -e "\033[34mPlease check the branch status, need to comfirm check out to \033[31msame branch in all projects.\033[0m"
else
./revert.sh
source build/envsetup.sh
lunch rk3399_mid-user
./kernel.sh
./uboot.sh
./image.sh
./mkimage.sh ota
# get create image command name
IMGNAME=$0
# get image compile date time
DATATIME=$(cat out/target/product/$TARGET_PRODUCT/system/build.prop | grep ^ro\.build\.version\.incremental= | awk -F '.' '{print $6"."$7}')
# create file name, add date time
FILENAME=nougat_rk3399_$(echo $BRANCHNAME)_$(echo ${IMGNAME%.*} | cut -c 3-)_$(echo $DATATIME)
echo -e "\033[34mCompile finished, do you upload this manifest? \033[33m(y/N)\033[0m"
read CHECK
if [ "$CHECK" == "y" ] || [ "$CHECK" == "Y" ]
then
echo -e "\033[34mYou select upload the manifest!\033[0m"
# create manifest xml file
repo manifest -r -o RKTools/pubxml/$FILENAME.xml
# upload the manifest xml file
cd RKTools
git add pubxml/$FILENAME.xml
git commit -m "add public XML file: $FILENAME.xml."
git push rk $BRANCHNAME
cd ..
else
echo -e "\033[32mYou select NOT upload the manifest!\033[0m"
fi
# create image name file
echo update_$(echo $FILENAME)_release.img > RKTools/windows/AndroidTool/rockdev/Image/filename.txt
fi
else
echo -e "\033[34mPlease check the branch status, need to comfirm check out to \033[31msame branch in all projects.\033[0m"
fi
说明:
./mkimage.sh ota #用于生成OTA固件升级包update.zip
./all.sh 运行成功后,在目录 out/target/product/rk3399_firefly_box/下生成rk3399_mid_user-ota-eng.root.zip
所生成的这个rk3399_mid_user-ota-eng.root.zip改名为 update.zip 即可用于完整包固件升级。
把update.zip放到板子/sdcard目录或者拷贝到sd卡,重启系统,系统自动检测升级包,点击install进行升级。