@ECHO OFF

ECHO ================= Update Both 1st + 2nd BIOS Region =================

REM for non-boot image
IF EXIST "../../../flash_G.rom" (
	AFUWIN.EXE ../../../flash_G.rom /p /b /n /k /l /RLC:EJ /SSB:{NONBOOT16M}
)

REM for boot image
AFUWIN.EXE ../../../flash_T.rom /p /b /n /k /l /RLC:EJ

if not %lasterror% == 0 then
if not %lasterror% == 0x64 then
ECHO ============ Update 1st BIOS FAIL =============
goto EXIT1
endif
endif

afuwin.exe /OEMCMD:2B

ECHO ============ Update Both 1st + 2nd BIOS Region Complete =============

:EXIT1