1、Makefile 与 CodeBlocks 编译单元对齐,补 make pack / BURN_KEY,增加 build.bat 与固件打包脚本

2、下载脚本同时生成无 Key / 带 Key 镜像,USB 默认烧无 Key,build.bat key 烧带 Key
3、配对超时从 60s 改为 120s
4、增加需求文档
This commit is contained in:
2026-08-26 17:06:28 +08:00
parent 93c1943992
commit 4ee0f86d13
11 changed files with 493 additions and 251 deletions
@@ -10,10 +10,57 @@ copy ..\..\ota.bin .
copy ..\..\anc_coeff.bin .
copy ..\..\anc_gains.bin .
..\..\isd_download.exe ..\..\isd_config.ini -tonorflash -dev br28 -boot 0x120000 -div8 -wait 300 -uboot ..\..\uboot.boot -app ..\..\app.bin -res ..\..\cfg_tool.bin tone.cfg p11_code.bin -uboot_compress -key RS-5B88.key
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"
:: -format all
::-reboot 2500
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 keep default names as nokey for tools that still look for jl_isd.fw
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
@rem delete temp files
if exist *.mp3 del *.mp3
@@ -22,15 +69,6 @@ if exist *.TAB del *.TAB
if exist *.res del *.res
if exist *.sty del *.sty
..\..\ufw_maker.exe -fw_to_ufw jl_isd.fw
copy jl_isd.ufw update.ufw
del jl_isd.ufw
@rem generate config ufw (disabled)
::ufw_maker.exe -chip AC800X %ADD_KEY% -output config.ufw -res bt_cfg.cfg
::IF EXIST jl_696x.bin del jl_696x.bin
if exist script.ver del script.ver
if exist tone.cfg del tone.cfg
if exist p11_code.bin del p11_code.bin
@@ -39,9 +77,9 @@ 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
@rem -format cfg
@rem -format 0x3f0-2
@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
IF EXIST null del null