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

echo "Update BIOS to R0013
.\WinPEUtils_x64\IFlash32\DeviceSetup install .\WinPEUtils_x64\IFlash32\flashud.inf *int0800
.\WinPEUtils_x64\IFlash32\DeviceSetup install .\WinPEUtils_x64\IFlash32\IBSMUx64.inf *IntelUtilDeV
.\WinPEUtils_x64\IFlash32\IFlash32 -u R0013_Production_ACM_TXT_BOOT.signed.cap UpdateBackupBios -ni

echo ""
echo "Flashing R0013_ME..."
.\WinPEUtils_x64\IFlash32\IFlash32 /u /ni R0013_Production_ACM_TXT_ME.signed.cap
echo ""
echo "RE009_Production_ACM_TXT_ME.signed update completed..."

echo "Update Flash Descriptor to R0013_FD"
.\WinPEUtils_x64\IFlash32\IFlash32 /u /ni R0013_Production_ACM_TXT_FD.signed.cap

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

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

echo on
