echo off

echo "Update S5400SF BMC flash using FWPIAUPD utility"
.\WinPEUtils_x64\FWPIAUPD\DeviceSetup install .\WinPEUtils_x64\FWPIAUPD\IMBDrv.inf *IMBDRV
.\WinPEUtils_x64\FWPIAUPD\fwpiaupd -u -o -pia -ni -p SFBMC11.hex

echo "Update S5400SF 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 "Update S5400SF 4U SAS Backplane Firmware using FWPIAUPD utility"
.\WinPEUtils_x64\FWPIAUPD\fwpiaupd -u -b DOW209.hex

echo "Update S5400SF BIOS"
.\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 /ni R0033.Cap

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

echo on