@echo off
SET WORKSPACE=%cd%

@del /s /q %WORKSPACE%\BIOS

@if not exist %WORKSPACE%\isflash.bin (
REM K9B08B	echo  Please Rebiuld BIOS 8 MB ROM and Sign bios modify File Name NL4050GU.bin \n
	echo  Please Rebiuld BIOS 8 MB ROM and Sign bios modify File Name W517GU1.bin \n
	echo  1.StitchRebuild pitch Rebuild.bat create 8 MB BIOS \n
	echo  2.SIGN_BIOS pitch signSample.bat/signSample32.bat Create SIGN Bios Name isflash.bin \n
	echo  3.Please Copy Sign ROM : Signbios.rom to Pack_Tool Folder \n
	PAUSE
	goto end
)

REM K9B08B	iFdPacker.exe -winsrc %WORKSPACE%\Tool\FFT_WIN -b 64 -dossrc %WORKSPACE%\TOOL\FFT_DOS dosini -fv %WORKSPACE%\isflash.bin -arg -fv -output %WORKSPACE%\BIOS\NL4050GU.exe
iFdPacker.exe -winsrc %WORKSPACE%\Tool\FFT_WIN -b 64 -dossrc %WORKSPACE%\TOOL\FFT_DOS dosini -fv %WORKSPACE%\isflash.bin -output %WORKSPACE%\BIOS\W517GU1.exe

REM K9B08B	iFdPacker.exe -shlsrc %WORKSPACE%\Tool\FFT_EFI -shlini -b 64 -fv %WORKSPACE%\isflash.bin -arg -fv -output %WORKSPACE%\BIOS\NL4050GU.efi
iFdPacker.exe -shlsrc %WORKSPACE%\Tool\FFT_EFI -shlini -b 64 -fv %WORKSPACE%\isflash.bin -argfilter "-ft" -output %WORKSPACE%\BIOS\W517GU1.efi

:end
