Advertisement
Guest User

Supermicro AFUDOS

a guest
Feb 21st, 2020
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.81 KB | None | 0 0
  1. příkaz k přeflashování:
  2. FLASH.BAT BIOSname.###
  3.  
  4. ================
  5. soubor FLASH.BAT
  6. ================
  7.  
  8. @echo off
  9.  
  10. if exist fdt.smc ren fdt.smc fdt.exe
  11. if exist afudosu.smc ren afudosu.smc afudos.exe
  12. if exist choice.smc ren choice.smc choice.exe
  13.  
  14. if "%1"=="" goto Err_Print
  15. if not exist %1  goto No_File
  16.  
  17.  
  18. rem ##Read CMOS50 value
  19. fdt -r 50
  20. if errorlevel 90 if not errorlevel 91 goto FDT_Different
  21. goto Compare_FDT_Table
  22.  
  23.  
  24. :Compare_FDT_Table
  25. echo ##########################################################################
  26. echo #
  27. echo #  Compare Flash Descriptor Table(FDT). Please wait...
  28. echo #
  29. echo ##########################################################################
  30. rem echo afudos %1 /ME
  31. fdt -w 50 A5
  32. afudos %1 /ME
  33. fdt -b 0
  34. fdt -r 50
  35. if errorlevel 165 if not errorlevel 166 goto Flash_BIOS
  36. if errorlevel 90 if not errorlevel 91 goto FDT_Different
  37.  
  38. :Flash_BIOS
  39. echo ##########################################################################
  40. echo #
  41. echo #   FDT is same. Program BIOS and ME (excluding FDT) regions...
  42. echo #
  43. echo ##########################################################################
  44. rem echo afudos %1 /P /B /N /K /R
  45. fdt -w 50 A5
  46. afudos %1 /P /B /N /K /R /ME
  47. fdt -w 50 00
  48. goto END
  49.  
  50. :FDT_Different
  51. fdt -r 51
  52. if errorlevel 24 if not errorlevel 25 goto Update_BIOS_ME
  53. if errorlevel 0 if not errorlevel 1 goto Modify_Autoexec
  54. goto CMOS51_Not_Equal_00h_OR_18h
  55.  
  56. :Update_BIOS_ME
  57. echo ##########################################################################
  58. echo #
  59. echo #   Program BIOS and ME (including FDT) regions...
  60. echo #
  61. echo ##########################################################################
  62. rem echo afudos %1 /P /B /N /K /R /ME
  63. fdt -w 50 A5
  64. afudos %1 /P /B /N /K /R /ME
  65. ren fdt.exe fdt.smc
  66. ren afudos.exe afudosu.smc
  67. ren choice.exe choice.smc
  68. cd\
  69. if exist autoexec.bat del autoexec.bat
  70. if exist a.bat ren a.bat autoexec.bat
  71. goto END1
  72.  
  73. :Modify_Autoexec
  74. fdt -b 0
  75. echo ##########################################################################
  76. echo ##########################################################################
  77. echo #
  78. echo #   FDT is different. Creating new autoexec.bat file...
  79. echo #
  80. echo ##########################################################################
  81. echo ##########################################################################
  82. fdt -mauto %1
  83.  
  84. :Reboot_System
  85. echo ##########################################################################
  86. echo #
  87. echo #   System will reboot to change the operating mode in 10 seconds....
  88. echo #   Or please press [Y] key to reboot now!!
  89. echo #
  90. echo ##########################################################################
  91. choice /C:Y /T:Y,10
  92. fdt -reset
  93.  
  94. :No_File
  95. echo ##########################################################################
  96. echo #
  97. echo #   %1 doesn't exist and please double check.
  98. echo #
  99. echo ##########################################################################
  100. goto END
  101.  
  102. :CMOS51_Not_Equal_00h_OR_18h
  103. rem echo CMOS51 doesn't equal 00h or 18h !
  104. rem echo ManufacturingMode is Disabled.
  105. echo ##########################################################################
  106. echo #
  107. echo #   Current BIOS or hardware does not support software controllable
  108. echo #   ME Manufactuing mode.
  109. echo #
  110. echo ##########################################################################
  111. ren fdt.exe fdt.smc
  112. ren afudos.exe afudosu.smc
  113. ren choice.exe choice.smc
  114. cd\
  115. if exist a.bat del autoexec.bat
  116. if exist a.bat ren a.bat autoexec.bat
  117. goto END1
  118.  
  119. :Err_Print
  120. echo ##########################################################################
  121. echo #
  122. echo #   Usage:
  123. echo #             flash.bat romfile
  124. echo #
  125. echo ##########################################################################
  126.  
  127.  
  128. :END
  129. ren fdt.exe fdt.smc
  130. ren afudos.exe afudosu.smc
  131. ren choice.exe choice.smc
  132.  
  133. :END1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement