s32k单片机升级内核的批处理脚本
说明
因为要来回升级单片机的内核版本,索性写一个脚本。
22年在别的社区写的文章搬运过来。
内容
@echo off
echo 检查文件 ...
if exist *boot.img echo 镜像文件存在 ... &goto tes
echo 缺少.img文件,确认脚本在正确的文件夹...
ping 127.0.0.1 -n 5 >nul 2>nul
exit
:tes
if exist *sysfs.ubi echo 数据文件存在 ... &goto tes2
echo 缺少.ubi文件,确认脚本在正确的文件夹...
ping 127.0.0.1 -n 5 >nul 2>nul
exit
:tes2
adb kill-server
adb devices |findstr "\<device\>"
if errorlevel 1 echo 错误!&goto end
echo 稍后开始 ...
ping 127.0.0.1 -n 5 >nul 2>nul
echo ====================== start ========================
echo 进入BootLoader烧写模式 ...
adb reboot bootloader
if errorlevel 1 echo 错误!&goto end
echo 开始烧写boot分区 ...
fastboot flash boot *boot.img
echo 开始烧写recovery分区 ...
fastboot flash recovery *boot.img
echo 开始烧写数据分区 ...
fastboot flash system *sysfs.ubi
echo 烧写完成 ... 准备重启 ...
fastboot reboot
echo ====================== sucess ========================
echo 成功 ...正在退出 ...
ping 127.0.0.1 -n 10 >nul 2>nul
exit
:end
echo 没有连接到adb ...
echo 失败!正在退出 ...
ping 127.0.0.1 -n 10 >nul 2>nul
exit
执行图示:

本文来自博客园,作者:杨旭0324,转载请注明原文链接:https://www.cnblogs.com/allalonewithyou/p/19362238,个人邮箱:yaonie4444@foxmail.com

浙公网安备 33010602011771号