echo off
echo ""
echo S2600GZ Integrated BMC Firmware Update rev BMC_i_0123r7783
echo Performing a signed image update of the Integrated BMC Firmware.
echo ""
.\WinPEUtils_x86\FWPIAUPD\Devicesetup.exe remove *IPI0001
.\WinPEUtils_x86\FWPIAUPD\DeviceSetup install .\WinPEUtils_x86\FWPIAUPD\IMBDrv.inf *IMBDRV
.\WinPEUtils_x86\FWPIAUPD\FWPIAUPD -u -bin -ni -b -o -pia -nopc -if=usb BMC_i_0123r7783.bin

echo "Update BIOS to R02.05.0004"
.\WinPEUtils_x86\IFlash32\DeviceSetup install .\WinPEUtils_x86\IFlash32\flashud.inf *int0800
.\WinPEUtils_x86\IFlash32\DeviceSetup install .\WinPEUtils_x86\IFlash32\IBSMUtil.inf *IntelUtilDeV
.\WinPEUtils_x86\IFlash32\IFlash32 /u /ni R02.05.0004.cap

echo ""
echo "Flashing MEComplete_02.01.07.328..."
.\WinPEUtils_x86\IFlash32\IFlash32 /u /ni MEComplete_02.01.07.328.cap
echo ""
echo "MEComplete_02.01.07.328 update completed..."

echo "Update FRUSDR using FRUSDR utility"
.\WinPEUtils_x86\FRUSDR\DeviceSetup.exe install .\WinPEUtils_x86\FRUSDR\imbdrv.inf *IMBDRV
.\WinPEUtils_x86\FRUSDR\DeviceSetup.exe install .\WinPEUtils_x86\FRUSDR\IBSMUtil.inf *IntelUtilDeV
.\WinPEUtils_x86\FRUSDR\frusdr -cfg master.cfg

echo "Updates completed. Please reboot using the front panel button."

echo on
