凌云实验室推出的ARM Linux物联网网关开发板IGKBoard(IoT Gateway Kit Board)项目源码
guowenxue
2022-10-06 38bd35f7da86a93378f3e77da18bb3d8d1a01f02
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
REM This bat script used to flash u-boot or linux system image to EMMC
 
REM uuu.exe official address:  https://github.com/NXPmicro/mfgtools
REM LingYun download address:  http://weike-iot.com:2211/imx6ull/tools
 
REM Goes into fastboot mode command:  fastboot 0
REM Erase u-boot command in u-boot :  mmc dev 1 1 && mmc erase 0 40000
 
@echo off
 
REM Boot media should be emmc or sd
set Media=emmc
 
setlocal enabledelayedexpansion
set /a i=0
 
echo Image Download Choices:
echo.
 
REM Scan u-boot file
for %%f in (*.imx) do (
   SET /a i+=1
   echo  [!i!]: %%f
   set ImgArr[!i!]=%%f
   set ImgUboot=%%f
)
 
REM Scan all the system image files
for %%f in (*.img,*.wic) do (
   SET /a i+=1
   echo  [!i!]: %%f
   set ImgArr[!i!]=%%f
)
 
if "%ImgUboot%" == "" (
    echo ERROR: U-boot image not found!
    pause
    exit;
)
 
echo.
set /p choice= Please Input Your Choice: 
call set image=%%ImgArr[%choice%]%%
echo.
 
echo %image% | findstr /i "u-boot" > nul
if %errorlevel% equ 0 (
    echo Start burn u-boot image: "%image%"
    echo.
    uuu -b %Media% %ImgUboot%
) else (
    echo Start burn system image: "%image%"
    echo.
    uuu -b %Media%_all %ImgUboot% %image%
)