Skip to content

Commit 13c23ab

Browse files
committed
change lod tool to python
1 parent f871c9e commit 13c23ab

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

build.bat

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,15 @@ if "%1%"x =="demo"x (
105105
:run_fota
106106
if exist "%2%" (
107107
if exist "%3%" (
108-
echo waiting for making fota pack...
109-
echo this will take a few minutes
110-
REM platform\compilation\fota\fotacreate.exe 4194304 65536 0.lod 1.lod 0.pack
111-
platform\compilation\fota\fotacreate.exe 4194304 65536 %2% % %3% % %4%
108+
echo [OTA] waiting for making fota pack...
109+
echo this will take a few minutes...
110+
md hex/tmp
111+
set old_ota_path=hex/tmp/old_ota_lod.lod
112+
set new_ota_path=hex/tmp/new_ota_lod.lod
113+
python platform/compilation/lodtool.py gen_ota --lod %2% --out %old_ota_path%
114+
python platform/compilation/lodtool.py gen_ota --lod %3% --out %new_ota_path%
115+
platform\compilation\fota\fotacreate.exe 4194304 65536 %old_ota_path% % %new_ota_path% %4%
116+
rd /q /s hex/tmp
112117
) else (
113118
echo usage: 'build.bat fota old.lod new.lod fota.pack'
114119
)

build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ elif [[ $paramNum -eq 4 ]]; then
138138
if [[ "$1x" == "fotax" ]]; then
139139
if [ -f "$2" ]; then
140140
if [ -f "$3" ]; then
141-
echo "waiting for making fota pack..."
142-
echo "this will take a few minutes"
141+
echo "[OTA] waiting for making fota pack..."
142+
echo " this will take a few minutes..."
143143
mkdir -p hex/tmp
144144
old_ota_path=hex/tmp/old_ota_lod.lod
145145
new_ota_path=hex/tmp/new_ota_lod.lod

0 commit comments

Comments
 (0)