@echo off
SET WORKSPACE=%cd%

@del /s /q %WORKSPACE%\BIOS

@if not exist %WORKSPACE%\isflash.bin (
echo  Please Rebiuld BIOS 16 MB ROM and Sign bios modify File Name %BIOS_NAME%.bin \n
echo  1.SIGN_BIOS pitch signSample.bat Create SIGN Bios Name isflash.bin \n
echo  2.Please Copy Sign ROM : isflash.bin to Pack_Tool Folder \n
PAUSE
goto end
)

iFdPacker.exe -winsrc %WORKSPACE%\Tool\FFT_WIN -b 64 -fv %WORKSPACE%\isflash.bin -arg -fv -output %WORKSPACE%\BIOS\%BIOS_NAME%.exe
iFdPacker.exe -shlsrc %WORKSPACE%\Tool\FFT_EFI -shlini -b 64 -fv %WORKSPACE%\isflash.bin -argfilter "-ft: -alp -unvs" -output %WORKSPACE%\BIOS\%BIOS_NAME%.efi
..\SIGN_BIOS\iEFIFlashSigner.exe signefi -n "Secure Certificate" -in %WORKSPACE%\BIOS\%BIOS_NAME%.efi

:end
@echo on
