@echo -off
mode 80 25
;foundimage section is simply to locate the correct drive
cls
if exist .\ipmi.efi then
 goto FOUNDIMAGE
endif
if exist fs0:\ipmi.efi then
 fs0:
 echo Found Update Packages on fs0:
 goto FOUNDIMAGE
endif
if exist fs1:\ipmi.efi then
 fs1:
 echo Found Update Packages on fs1:
 goto FOUNDIMAGE
endif
if exist fs2:\ipmi.efi then
 fs2:
 echo Found Update Packages on fs2:
 goto FOUNDIMAGE
endif
 echo "Unable to find Update Packages".  
 echo "Please mount the drive with the update package".
 echo ""
 goto END
:FOUNDIMAGE
echo ==========================================================================
echo "This utility will allow you to update the BIOS and firmware."
echo "If you want to do all these functions, press Enter. If not, hit 'q'."
echo "if you want to update single components like BMC/BIOS seperately,"
echo "please go to the EFIscripts folder and execute the specified scripts"
echo "seperately."  
echo "Do NOT reboot during this process until you see Updates completed."
echo "Pre release updates may take significant time with a 20 minute HSC update."

echo ==========================================================================
pause
echo ""

echo S3210SH IBMC rev 00.31 Firmware Update
echo ""
fwpiaupd -u -o -ni -pia -p -noverify -nopc 3210SH31.hex
echo ""
echo This update does not alter LAN or User settings.
echo ""


echo "Update FRUSDR using FRUSDR utility"
frusdr -cfg MASTER.CFG

echo "Update BIOS"
iFlash32 R0046.cap /u /ni

mm 43 1 ;IO :B6
mm 42 1 ;IO :3
mm 42 1 ;IO :3
mm 61 1 ;IO :3B
stall 500000
mm 61 1 ;IO :38
stall 200000
mm 61 1 ;IO :3B
stall 500000
mm 61 1 ;IO :38
stall 200000


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

:END


