From 160d190d1bb1c4873d7b918dffff6604c2e1dde8 Mon Sep 17 00:00:00 2001 From: Wuchuyuan <1917507415@qq.com> Date: Fri, 4 Sep 2026 15:13:17 +0800 Subject: [PATCH] =?UTF-8?q?download=5Fapp=5Fota.bat=20=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=20nokey/key=20=E5=8F=8C=E9=95=9C=E5=83=8F=E7=94=9F=E6=88=90?= =?UTF-8?q?=EF=BC=88gitignore=20=E5=BC=BA=E5=88=B6=E8=B7=9F=E8=B8=AA?= =?UTF-8?q?=EF=BC=8C=E5=AF=B9=E9=BD=90=E6=B8=A9=E6=B9=BF=E5=BA=A6=E9=A3=8E?= =?UTF-8?q?=E6=89=87=E5=AE=9E=E7=8E=B0=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../download/earphone/download_app_ota.bat | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 cpu/br28/tools/download/earphone/download_app_ota.bat diff --git a/cpu/br28/tools/download/earphone/download_app_ota.bat b/cpu/br28/tools/download/earphone/download_app_ota.bat new file mode 100644 index 0000000..2ac2160 --- /dev/null +++ b/cpu/br28/tools/download/earphone/download_app_ota.bat @@ -0,0 +1,95 @@ +@echo off + +cd %~dp0 + +copy ..\..\script.ver . +copy ..\..\tone.cfg . +copy ..\..\p11_code.bin . +copy ..\..\br28loader.bin . +copy ..\..\ota.bin . +copy ..\..\anc_coeff.bin . +copy ..\..\anc_gains.bin . + +set "ISD_CMD=..\..\isd_download.exe ..\..\isd_config.ini -dev br28 -boot 0x120000 -div8 -wait 300 -uboot ..\..\uboot.boot -app ..\..\app.bin -res ..\..\cfg_tool.bin tone.cfg p11_code.bin -uboot_compress" + +REM JL_BURN_KEY=1/key : USB flash keyed image; still generate nokey files +REM default / 0 / nokey : USB flash nokey image; still generate keyed files +set "NOKEY_FLASH=" +set "KEY_FLASH=" +if /i "%JL_BURN_KEY%"=="1" goto :usb_key +if /i "%JL_BURN_KEY%"=="key" goto :usb_key +if /i "%JL_BURN_KEY%"=="yes" goto :usb_key +set "NOKEY_FLASH=-tonorflash" +echo [download] USB burn: NO key +goto :do_isd + +:usb_key +set "KEY_FLASH=-tonorflash" +echo [download] USB burn: WITH key + +:do_isd +REM ---- nokey image ---- +%ISD_CMD% %NOKEY_FLASH% +if exist jl_isd.fw copy /y jl_isd.fw jl_isd_nokey.fw >nul +..\..\ufw_maker.exe -fw_to_ufw jl_isd.fw +if exist jl_isd.ufw ( + copy /y jl_isd.ufw update.ufw >nul + copy /y jl_isd.ufw update_nokey.ufw >nul + del jl_isd.ufw +) +if exist db_update_data.bin copy /y db_update_data.bin db_update_data_nokey.bin >nul + +REM ---- keyed image ---- +if exist RS-5B88.key ( + %ISD_CMD% %KEY_FLASH% -key RS-5B88.key + REM isd_download returns -11 when USB is offline; image is still generated + if exist jl_isd.fw copy /y jl_isd.fw jl_isd_key.fw >nul + ..\..\ufw_maker.exe -fw_to_ufw jl_isd.fw + if exist jl_isd.ufw ( + copy /y jl_isd.ufw update_key.ufw >nul + del jl_isd.ufw + ) + if exist db_update_data.bin copy /y db_update_data.bin db_update_data_key.bin >nul +) else ( + if /i not "%KEY_FLASH%"=="" ( + echo [download] ERROR: RS-5B88.key not found, cannot USB-burn keyed image + exit /b 1 + ) +) + +REM default burn image name: keyed (unless explicitly 0/nokey). Tools that look for +REM jl_isd.fw / update.ufw get the keyed image by default. +if /i "%JL_BURN_KEY%"=="0" goto :dflt_nokey +if /i "%JL_BURN_KEY%"=="nokey" goto :dflt_nokey +REM default / 1 / key / yes / empty -> keyed as default name +if exist jl_isd_key.fw copy /y jl_isd_key.fw jl_isd.fw >nul +if exist update_key.ufw copy /y update_key.ufw update.ufw >nul +if exist db_update_data_key.bin copy /y db_update_data_key.bin db_update_data.bin >nul +goto :dflt_end +:dflt_nokey +if exist jl_isd_nokey.fw copy /y jl_isd_nokey.fw jl_isd.fw >nul +if exist update_nokey.ufw copy /y update_nokey.ufw update.ufw >nul +if exist db_update_data_nokey.bin copy /y db_update_data_nokey.bin db_update_data.bin >nul +:dflt_end + +@rem delete temp files +if exist *.mp3 del *.mp3 +if exist *.PIX del *.PIX +if exist *.TAB del *.TAB +if exist *.res del *.res +if exist *.sty del *.sty + +if exist script.ver del script.ver +if exist tone.cfg del tone.cfg +if exist p11_code.bin del p11_code.bin +if exist br28loader.bin del br28loader.bin +if exist anc_coeff.bin del anc_coeff.bin +if exist anc_gains.bin del anc_gains.bin + +@rem common isd_download flags +@rem -format vm erase VM area +@rem -format cfg erase BT CFG area +@rem -format 0x3f0-2 erase 2 sectors from 0x3f0 (1st arg hex/dec, 2nd must be decimal) + +ping /n 2 127.1>null +IF EXIST null del null