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% )