echo off
echo ""
echo S4600LH Integrated BMC Firmware Update rev BMC_i_0122r6890
echo Performing a signed image update of the Integreated 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 BMC_i_0122r6890.bin

echo "Update BIOS to R02.04.0003"
.\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 R02.04.0003.cap

echo ""
echo "Flashing MMEComplete_02.01.07.328_LHP..."
.\WinPEUtils_x64\IFlash32\IFlash32 /u /ni MEComplete_02.01.07.328_LHP.cap
echo ""
echo "ME MEComplete_02.01.07.328_LHP update completed..."

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
