ECHO -off
ECHO "================= Update Both 1st + 2nd BIOS Region ================="

#for non-Boot image
if exist "flash_G.rom" then
	SPI_UPD\AfuEfix64.efi flash_G.rom /p /b /n /k /l /RLC:EJ /SSB:{NONBOOT16M}
endif

#for Boot image
SPI_UPD\AfuEfix64.efi 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

SPI_UPD\AfuEfix64.efi /OEMCMD:2B

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

:EXIT1