CN113064625B - Method, device, equipment and medium for upgrading BIOS (basic input output system) out of band - Google Patents

Method, device, equipment and medium for upgrading BIOS (basic input output system) out of band Download PDF

Info

Publication number
CN113064625B
CN113064625B CN202110453715.2A CN202110453715A CN113064625B CN 113064625 B CN113064625 B CN 113064625B CN 202110453715 A CN202110453715 A CN 202110453715A CN 113064625 B CN113064625 B CN 113064625B
Authority
CN
China
Prior art keywords
variable
old
bios
new
firmware
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110453715.2A
Other languages
Chinese (zh)
Other versions
CN113064625A (en
Inventor
杨少俊
罗鹏芳
陈思彤
钱慧娟
王兵
姚藩益
杨霖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Yingxin Computer Technology Co Ltd
Original Assignee
Shandong Yingxin Computer Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Yingxin Computer Technology Co Ltd filed Critical Shandong Yingxin Computer Technology Co Ltd
Priority to CN202110453715.2A priority Critical patent/CN113064625B/en
Publication of CN113064625A publication Critical patent/CN113064625A/en
Application granted granted Critical
Publication of CN113064625B publication Critical patent/CN113064625B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/654Updates using techniques specially adapted for alterable solid state memories, e.g. for EEPROM or flash memories
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a method, a device, equipment and a medium for upgrading BIOS in an out-of-band manner, comprising the following steps: acquiring BIOS firmware to be upgraded through a network; acquiring an old variable and an old variable structure from an old NVRAM firmware volume and an old user firmware volume of an old BIOS firmware respectively; acquiring a new variable structure body from the new user firmware volume of the BIOS firmware to be upgraded; wherein, the old variable structure body and the new variable structure body are both structures of UEFI variables related to BIOS setting; creating a new variable corresponding to the new variable structure based on the old variable structure, the old variable and the new variable structure, and writing the new variable into a new NVRAM firmware volume of the BIOS firmware to be upgraded; and performing BIOS upgrading by using the BIOS firmware to be upgraded. The time cost of BIOS upgrading can be reduced, so that the user experience is improved.

Description

Method, device, equipment and medium for upgrading BIOS (basic input output system) out of band
Technical Field
The present invention relates to the field of server technologies, and in particular, to a method, an apparatus, a device, and a medium for upgrading a BIOS out of band.
Background
During the running process of the server, because of the change of the application requirement or the need of repairing the firmware bug, the requirement of upgrading the firmware of the BIOS (i.e. Basic Input Output System, basic input output system) is that the server is providing service, and the upgrading of the firmware of the BIOS can be effective only after restarting, and the restarting Time belongs to the Down Time. The availability and serviceability of the server are seriously affected by the length of the Down time, and the quick completion of the firmware upgrade of the BIOS is an important requirement and index. After the server is delivered and operated, an administrator typically connects to the BMC (i.e., baseboard Management Controller, baseboard management controller) through a network, and manages and configures the server through the BMC to implement out-of-band management.
At present, the existing method for upgrading the BIOS outside the band is generally that the BIOS is started up last time to generate a current setting file and send the current setting file to the BMC, and before upgrading the BIOS, the BMC generates a future setting file according to the current setting file and then upgrades the BIOS. After the boot, the BIOS reads the future settings file from the BMC, then parses the future settings file, sets NVRAM (i.e., non-Volatile Random Access Memory, nonvolatile random access memory) written into the BIOS, deletes the future settings file, and restarts to take effect. And after the machine is started, the current setting file generated by the current setting is sent to the BMC to perform setting synchronization. After upgrading the BIOS, the BIOS also needs to generate a setting attribute file and send the setting attribute file to the BMC, the setting attribute file is quite large, and the generating and sending time is quite long. The disadvantages are: the time for generating the current setting file is long when the BIOS is started; the time for the BIOS to send the current setting file to the BMC is longer, and the time for the BIOS to read the setting file from the BMC is longer; the time for the BIOS to analyze the setting file and write the BIOS setting into NVRAM of the BIOS is long; restarting to take effect after the setting is completed, and the time consumption of the restarting process is long; the BIOS is restarted to generate the current setting configuration file again and synchronize the current setting configuration file to the BMC, so that the time consumption is long; the BIOS takes a long time to generate and send the setup attribute file to the BMC. Resulting in excessive downtime, severely impacting server availability and serviceability.
Disclosure of Invention
In view of this, the present application aims to provide a method, apparatus, device and medium for upgrading BIOS out of band, which can reduce the time overhead of BIOS upgrade, thereby improving user experience. The specific scheme is as follows:
in a first aspect, the present application discloses a method for upgrading a BIOS out of band, applied to a baseboard management controller, including:
acquiring BIOS firmware to be upgraded through a network;
acquiring an old variable and an old variable structure from an old NVRAM firmware volume and an old user firmware volume of an old BIOS firmware respectively;
acquiring a new variable structure body from the new user firmware volume of the BIOS firmware to be upgraded; wherein, the old variable structure body and the new variable structure body are both structures of UEFI variables related to BIOS setting;
creating a new variable corresponding to the new variable structure based on the old variable structure, the old variable and the new variable structure, and writing the new variable into a new NVRAM firmware volume of the BIOS firmware to be upgraded;
and performing BIOS upgrading by using the BIOS firmware to be upgraded.
Optionally, before the obtaining the old variable and the old variable structure body from the old NVRAM firmware volume and the old user firmware volume of the old BIOS firmware respectively, the method further includes:
the old NVRAM firmware volume and the old user firmware volume are searched according to the globally unique identifiers of the old NVRAM firmware volume and the old user firmware volume.
Optionally, the creating a new variable corresponding to the new variable structure based on the old variable structure, the old variable and the new variable structure includes:
analyzing the old variables by using the old variable structure body to obtain the value of each old member variable;
and creating a new variable corresponding to the new variable structure based on the new variable structure and the value of each old member variable.
Optionally, the creating a new variable corresponding to the new variable structure based on the new variable structure and the value of each old member variable includes:
obtaining a default value of each old member variable from an old NVRAM firmware volume, and obtaining a default value of each variable of BIOS firmware to be upgraded from a new NVRAM firmware volume;
comparing the value of each old member variable with the default value of the old member variable, if the values are inconsistent, creating a new variable corresponding to the new variable structure by using the value of the old member variable and the new variable structure; if the two variable structures are consistent, creating a new variable corresponding to the new variable structure by using the default value of the variable of the BIOS firmware to be upgraded corresponding to the old member variable and the new variable structure.
Optionally, the old variable structure and the new variable structure each include a member variable ID and a member variable data type, and the member variable ID is a corresponding variable name.
Optionally, after the BIOS firmware to be upgraded is utilized to perform BIOS upgrade, the method further includes:
acquiring a variable ID to be modified and a variable value to be modified, which are sent by a user terminal;
and updating corresponding variables in the new NVRAM firmware volume by using the new variable structure of the current BIOS and the value of the change to be repaired.
Optionally, before the obtaining the variable ID and the variable value to be modified sent by the user terminal, the method further includes:
acquiring a BIOS setting modification request sent by a user terminal;
and responding to the BIOS setting modification request, returning a variable ID to be modified and a variable settable range to the user terminal so that the user terminal can determine the variable value to be modified by utilizing the variable settable range, and sending the variable ID to be modified and the variable value to be modified to a baseboard management controller.
In a second aspect, the application discloses an apparatus for upgrading a BIOS out of band, applied to a baseboard management controller, including:
the BIOS firmware to be upgraded is obtained by a network;
the old variable and structure body acquisition module is used for acquiring an old variable and an old variable structure body from an old NVRAM firmware volume and an old user firmware volume of the old BIOS firmware respectively;
the new variable structure body acquisition module is used for acquiring a new variable structure body from the new user firmware volume of the BIOS firmware to be upgraded; wherein, the old variable structure body and the new variable structure body are both structures of UEFI variables related to BIOS setting;
a new variable determining module, configured to create a new variable corresponding to the new variable structure based on the old variable structure, the old variable, and the new variable structure, and write the new variable into a new NVRAM firmware volume of the BIOS firmware to be upgraded;
and the BIOS upgrading module is used for carrying out BIOS upgrading by utilizing the BIOS firmware to be upgraded.
In a third aspect, the present application discloses an electronic device comprising:
a memory for storing a computer program;
and the processor is used for executing the computer program to realize the method for upgrading the BIOS out of band.
In a fourth aspect, the present application discloses a computer readable storage medium for storing a computer program which, when executed by a processor, implements the aforementioned method for upgrading a BIOS out-of-band.
Therefore, the method and the device acquire the BIOS firmware to be upgraded through the network, acquire the old variable and the old variable structure from the old NVRAM firmware volume and the old user firmware volume of the old BIOS firmware respectively, and acquire the new variable structure from the new user firmware volume of the BIOS firmware to be upgraded; the old variable structure and the new variable structure are structures of UEFI variables related to BIOS setting, then a new variable corresponding to the new variable structure is created based on the old variable structure, the old variable and the new variable structure, the new variable is written into a new NVRAM firmware volume of the BIOS firmware to be upgraded, and then BIOS upgrading is carried out by utilizing the BIOS firmware to be upgraded. The method has the advantages that the setting reservation of the old BIOS firmware is realized through the NVRAM firmware volume of the new BIOS firmware and the old BIOS firmware and the user firmware volume, the out-of-band upgrading of the BIOS is realized completely by the BMC, the defects that the traditional out-of-band scheme needs one extra restart, the generation, the exchange and the synchronous setting of files take longer time, the downtime is longer, the usability and the serviceability of the system are affected are avoided, the BIOS of the running server is upgraded, the restarting can be effective after the firmware is upgraded, the service is continuously provided for the user, the downtime is shorter, the time cost of the BIOS upgrade can be reduced, and the user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings may be obtained according to the provided drawings without inventive effort to a person skilled in the art.
FIG. 1 is a flow chart of a method for upgrading BIOS out of band disclosed in the present application;
FIG. 2 is a flowchart of a method for upgrading BIOS outside of the band in a specific manner disclosed in the present application;
FIG. 3 is a flowchart of a BIOS setup modification disclosed herein;
FIG. 4 is a schematic diagram of a device structure for upgrading BIOS outside the band disclosed in the present application;
fig. 5 is a block diagram of an electronic device disclosed in the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
At present, the existing method for upgrading the BIOS outside the band is generally that the BIOS is started up last time to generate a current setting file and send the current setting file to the BMC, and before upgrading the BIOS, the BMC generates a future setting file according to the current setting file and then upgrades the BIOS. After the power-on, the BIOS reads the future setting file from the BMC, then analyzes the future setting file, sets and writes the future setting file into NVRAM of the BIOS, deletes the future setting file and restarts to take effect. And after the machine is started, the current setting file generated by the current setting is sent to the BMC to perform setting synchronization. After upgrading the BIOS, the BIOS also needs to generate a setting attribute file and send the setting attribute file to the BMC, the setting attribute file is quite large, and the generating and sending time is quite long. The disadvantages are: the time for generating the current setting file is long when the BIOS is started; the time for the BIOS to send the current setting file to the BMC is longer, and the time for the BIOS to read the setting file from the BMC is longer; the time for the BIOS to analyze the setting file and write the BIOS setting into NVRAM of the BIOS is long; restarting to take effect after the setting is completed, and the time consumption of the restarting process is long; the BIOS is restarted to generate the current setting configuration file again and synchronize the current setting configuration file to the BMC, so that the time consumption is long; the BIOS takes a long time to generate and send the setup attribute file to the BMC. Resulting in excessive downtime, severely impacting server availability and serviceability. Therefore, the scheme for upgrading the BIOS in an out-of-band manner can reduce the time cost of BIOS upgrading, so that the user experience is improved.
Referring to fig. 1, an embodiment of the present application discloses a method for upgrading BIOS out of band, which is applied to a baseboard management controller, and includes:
step S11: and acquiring BIOS firmware to be upgraded through a network.
In a specific embodiment, the BIOS firmware to be upgraded sent by the user terminal is obtained through a network. Specifically, the user can send the BIOS firmware to be upgraded and the signature to the BMC through the network, the BMC checks the signature, the signature checking is performed through entering the subsequent steps, the obtained BIOS firmware to be upgraded is used for performing BIOS upgrading, and otherwise, the BIOS firmware to be upgraded is not used for performing upgrading.
Step S12: the old variable and old variable structure are obtained from the old NVRAM firmware volume and the old user firmware volume of the old BIOS firmware, respectively.
Step S13: acquiring a new variable structure body from the new user firmware volume of the BIOS firmware to be upgraded; wherein, the old variable structure and the new variable structure are both structures of UEFI (i.e. Unified Extensible Firmware Interface, unified extensible firmware interface) variables related to BIOS settings.
And the old variable structure body and the new variable structure body comprise member variable IDs and member variable data types, wherein the member variable IDs are corresponding variable names.
That is, in this embodiment, the old variable and the new variable are UEFI variables, each UEFI variable is represented by a structure body, and includes a plurality of member variables, and each member variable corresponds to one option. That is, multiple member variables are stored in each UEFI variable, each member variable corresponding to an option of the BIOS setup page.
It should be noted that the readability is good using the variable name as the member variable ID. For important options, the member variable ID needs to be kept unchanged and compatible, so that cross-generation compatibility of the server is ensured, and the script for modifying BIOS settings by a user can be used without modification.
In a specific embodiment, in the BIOS firmware compiling stage, a Customer Firmware Volume (user firmware volume) is generated in the BIOS Flash (Flash memory) to store a structure body of a UEFI variable related to BIOS setting, as shown in the following example, which is an example of the structure body of one of the UEFI variables in the BIOS Flash, where the structure body is composed of a member variable ID and a member variable data type, and the following first member variable data type is: UINT8, member variable ID: numlock.
In particular embodiments, the old NVRAM firmware volume and the old user firmware volume are looked up based on their globally unique identifiers.
That is, in the embodiment of the present application, the FV is searched according to the GUID (i.e., globally Unique Identifier, globally unique identifier) of the FV (i.e., firmware Volume), the GUID of each FV in the BIOS Flash is unique, the FV is searched by the GUID, and the FV is not searched by the fixed address, which avoids searching for the FV by the fixed address, because the FV base address is changed due to the Flash Layout (Layout of Flash chip) change, which results in FV searching failure.
Wherein FV is an area in BIOS Flash, one Flahs is composed of a plurality of Firmware volumes, one Firmware Volume is composed of a plurality of Firmware files.
Step S14: and creating a new variable corresponding to the new variable structure based on the old variable structure, the old variable and the new variable structure, and writing the new variable into a new NVRAM firmware volume of the BIOS firmware to be upgraded.
In a specific embodiment, the old variable structure may be used to parse the old variable to obtain a value of each old member variable; and creating a new variable corresponding to the new variable structure based on the new variable structure and the value of each old member variable.
Specifically, obtaining a default value of each old member variable from an old NVRAM firmware volume, and obtaining a default value of each variable of BIOS firmware to be upgraded from a new NVRAM firmware volume;
comparing the value of each old member variable with the default value of the old member variable, if the values are inconsistent, creating a new variable corresponding to the new variable structure by using the value of the old member variable and the new variable structure; if the two variable structures are consistent, creating a new variable corresponding to the new variable structure by using the default value of the variable of the BIOS firmware to be upgraded corresponding to the old member variable and the new variable structure.
In addition, for the variable corresponding to the new option of the BIOS firmware to be upgraded, when the new variable is generated, adopting the default value of the variable corresponding to the new option, and for the variable corresponding to the deletion option of the BIOS firmware to be upgraded, when the new variable is generated, discarding the corresponding variable.
That is, the new BIOS adds the option: the newly added setting is kept unchanged. The new BIOS removes the option: the old BIOS settings are discarded. The old BIOS settings are different from the default values of the old BIOS: indicating that the old BIOS changed the set point and that the new BIOS adopted the old BIOS set point. The old BIOS set point is the same as the default value of the old BIOS: indicating that the old BIOS did not change the set point, the new BIOS adopts the default value of the new BIOS. Of course, default values for the old BIOS may also be selected according to policies.
It should be noted that after the completion of the BIOS compilation, a variable StdDefault is generated, which stores defaults (Default) values of the Uefi variables. The StdDefault value exists at the beginning of NVRAM, with the latter position being full FF. StdDefault is also identical in Boot Block FV (Boot Block firmware volume). The defaults value for each variable can be obtained by parsing the stddefaults variable in the FV.
In addition, for the problem of option renaming or different options homonyms of new and old variables, a variable structure naming rule can be specified, member variable naming of the structure is not allowed to be changed (positions can be added and deleted), new and old BIOS structure variables are compared before BIOS is sent, and the situation is ensured not to happen, so that design complexity is reduced.
That is, in the embodiment of the present application, the configuration is reserved by the upgraded BIOS, and the policy that the configuration is unchanged by the BIOS upgrade can reduce the probability of occurrence of faults in the upgraded BIOS firmware, and promote the stability of the server.
Step S15: and performing BIOS upgrading by using the BIOS firmware to be upgraded.
That is, in the embodiment of the present application, when the BIOS firmware is updated, the BMC first finds the NVRAM FV (NVRAM firmware volume) and the Customer FV (NVRAM firmware volume) of the old BIOS, and the NVRAM FV and the Customer FV of the new BIOS parse the old variable, the old variable structure, and the new variable structure from them. From this information, a new variable is created to write to NVRAM FV of the new BIOS.
In a specific embodiment, NVRAM FV is found from Flash according to GUID of NVRAM FV, FV is parsed, UEFI variable is found as each Setup variable, customer FV is found from Flash according to GUID of Customer FV, FV is parsed, structure of each Setup variable is found, setup variable is parsed according to variable structure, and value of each member variable is obtained.
For example, referring to fig. 2, fig. 2 is a flowchart of a method for upgrading BIOS out of band in accordance with an embodiment of the present application.
As can be seen, in the embodiment of the present application, the BIOS firmware to be upgraded is obtained through the network, and then the old variable and the old variable structure are obtained from the old NVRAM firmware volume and the old user firmware volume of the old BIOS firmware, and the new variable structure is obtained from the new user firmware volume of the BIOS firmware to be upgraded; the old variable structure and the new variable structure are structures of UEFI variables related to BIOS setting, then a new variable corresponding to the new variable structure is created based on the old variable structure, the old variable and the new variable structure, the new variable is written into a new NVRAM firmware volume of the BIOS firmware to be upgraded, and then BIOS upgrading is carried out by utilizing the BIOS firmware to be upgraded. The method has the advantages that the setting reservation of the old BIOS firmware is realized through the NVRAM firmware volume of the new BIOS firmware and the old BIOS firmware and the user firmware volume, the out-of-band upgrading of the BIOS is realized completely by the BMC, the defects that the traditional out-of-band scheme needs one extra restart, the generation, the exchange and the synchronous setting of files take longer time, the downtime is longer, the usability and the serviceability of the system are affected are avoided, the BIOS of the running server is upgraded, the restarting can be effective after the firmware is upgraded, the service is continuously provided for the user, the downtime is shorter, the time cost of the BIOS upgrade can be reduced, and the user experience is improved.
Referring to fig. 3, fig. 3 is a flowchart illustrating a modification of BIOS settings disclosed in the present application.
Step S21: and acquiring a BIOS setting modification request sent by the user terminal.
Step S22: and responding to the BIOS setting modification request, and returning the variable ID to be modified and the variable settable range to the user terminal.
In a specific embodiment, the user terminal determines the value of the change to be repaired by using the settable range of the variable, and sends the variable ID to be repaired and the value of the change to be repaired to the baseboard management controller.
Step S23: and acquiring the variable ID to be modified and the change value to be modified, which are sent by the user terminal.
Step S24: and updating corresponding variables in the new NVRAM firmware volume by using the new variable structure of the current BIOS and the value of the change to be repaired.
That is, when the user modifies the option, the member variable values of the corresponding variables in the NVRAM firmware volume are updated.
That is, before modifying the variable, the user reads the variable ID and the variable settable range, then determines the modified value by using the variable settable range, and then sends the variable ID and the modified value to the BMC to complete the out-of-band modification of the BIOS setting. This way can cope with MapID changes, where MapID is the Id of the option, and uniqueness is guaranteed, and the option name can be used as MapID.
In the implementation mode, a user sends a to-be-modified variable ID and a to-be-modified variable value to a BMC in a Json file mode or through IPMI (Internet protocol management) through a Redfish, the BMC receives the to-be-modified variable ID and the to-be-modified variable value, searches a Customer FV of the BIOS, acquires a corresponding variable structure body, and updates corresponding variables in an NVRAM firmware volume based on the variable structure body and the to-be-modified variable value. For example, tpmEnable is sent, a new variable value corresponding to Enable is calculated to be 01, and the new variable value is written into a corresponding variable in NVRAM FV.
It should be noted that, in the existing out-of-band modification BIOS setting scheme, the option to be modified is generally sent to the BMC through the IPMI or the Redfish, the BIOS reads the BIOS setting file to be modified through the IPMI or the Redfish after the startup, parses the setting file, writes the setting into the NVRAM of the BIOS, and restarts to take effect. The disadvantages are: the BIOS takes longer time to read the setting file from the BMC; the time for the BIOS to analyze the setting file and write the BIOS setting into NVRAM of the BIOS is long; and after the setting is finished, restarting to take effect, and the restarting process takes longer time. Resulting in excessive Down Time, severely impacting server availability and serviceability. In the embodiment of the application, the BMC is used for completely realizing out-of-band BIOS setting modification, so that the problems are overcome.
Therefore, the BMC is used for completely modifying BIOS setting and upgrading BIOS firmware in an out-of-band mode, and can utilize industry standards with widely mature applications such as Redfish or IPMI to communicate, so that the BMC is good in universality and adaptability, easy to maintain and convenient for an administrator to manage and maintain. While keeping good universality and manageability, because tasks of modifying BIOS setting and upgrading BIOS firmware are completed by the BMC, the limitation and limitation of BIOS modification and upgrading are avoided, BIOS modification and upgrading of BIOS firmware are realized once, the Downtime is shorter, the availability and serviceability of the server are improved, and the user experience and the product competitiveness are improved. The method overcomes the defects that the common out-of-band scheme needs one extra restart, the time for generating, exchanging and synchronizing the setting files is longer, the down time is longer, and the usability and the serviceability of the system are affected. But also overcomes the defects of poor manageability, poor adaptability, more self-updating restriction, high maintenance cost and the like of the in-band scheme.
Referring to fig. 4, an embodiment of the present application discloses a device for upgrading BIOS out of band, which is applied to a baseboard management controller, and includes:
the BIOS firmware to be upgraded obtaining module 11 is used for obtaining the BIOS firmware to be upgraded through a network;
an old variable and structure acquiring module 12, configured to acquire an old variable and an old variable structure from an old NVRAM firmware volume and an old user firmware volume of an old BIOS firmware, respectively;
a new variable structure body obtaining module 13, configured to obtain a new variable structure body from the new user firmware volume of the BIOS firmware to be upgraded; wherein, the old variable structure body and the new variable structure body are both structures of UEFI variables related to BIOS setting;
a new variable determining module 14, configured to create a new variable corresponding to the new variable structure based on the old variable structure, the old variable, and the new variable structure, and write the new variable into a new NVRAM firmware volume of the BIOS firmware to be upgraded;
and the BIOS upgrading module 15 is used for carrying out BIOS upgrading by utilizing the BIOS firmware to be upgraded.
As can be seen, in the embodiment of the present application, the BIOS firmware to be upgraded is obtained through the network, and then the old variable and the old variable structure are obtained from the old NVRAM firmware volume and the old user firmware volume of the old BIOS firmware, and the new variable structure is obtained from the new user firmware volume of the BIOS firmware to be upgraded; the old variable structure and the new variable structure are structures of UEFI variables related to BIOS setting, then a new variable corresponding to the new variable structure is created based on the old variable structure, the old variable and the new variable structure, the new variable is written into a new NVRAM firmware volume of the BIOS firmware to be upgraded, and then BIOS upgrading is carried out by utilizing the BIOS firmware to be upgraded. The method has the advantages that the setting reservation of the old BIOS firmware is realized through the NVRAM firmware volume of the new BIOS firmware and the old BIOS firmware and the user firmware volume, the out-of-band upgrading of the BIOS is realized completely by the BMC, the defects that the traditional out-of-band scheme needs one extra restart, the generation, the exchange and the synchronous setting of files take longer time, the downtime is longer, the usability and the serviceability of the system are affected are avoided, the BIOS of the running server is upgraded, the restarting can be effective after the firmware is upgraded, the service is continuously provided for the user, the downtime is shorter, the time cost of the BIOS upgrade can be reduced, and the user experience is improved.
The device also comprises a firmware volume searching module, which is used for searching the old NVRAM firmware volume and the old user firmware volume according to the globally unique identifiers of the old NVRAM firmware volume and the old user firmware volume.
The new variable determining module 14 specifically includes:
the old member variable value obtaining submodule is used for analyzing the old variable by utilizing the old variable structure body to obtain the value of each old member variable;
and the new variable creation submodule is used for creating a new variable corresponding to the new variable structure body based on the new variable structure body and the value of each old member variable.
Wherein, the new variable creation sub-module is specifically configured to:
obtaining a default value of each old member variable from an old NVRAM firmware volume, and obtaining a default value of each variable of BIOS firmware to be upgraded from a new NVRAM firmware volume;
comparing the value of each old member variable with the default value of the old member variable, if the values are inconsistent, creating a new variable corresponding to the new variable structure by using the value of the old member variable and the new variable structure; if the two variable structures are consistent, creating a new variable corresponding to the new variable structure by using the default value of the variable of the BIOS firmware to be upgraded corresponding to the old member variable and the new variable structure.
Wherein the old variable structure and the new variable structure each include a member variable ID and a member variable data type, and the member variable ID is a corresponding variable name.
The apparatus further comprises:
the modification value acquisition module is used for acquiring a variable ID to be modified and a variable value to be modified, which are sent by the user terminal;
and the variable updating module is used for updating the corresponding variable in the new NVRAM firmware volume by utilizing the new variable structure body of the current BIOS and the to-be-modified change value.
The apparatus further comprises:
the modification request acquisition module is used for acquiring a BIOS setting modification request sent by the user terminal;
and the data return module is used for responding to the BIOS setting modification request, returning the variable ID to be modified and the variable settable range to the user terminal so that the user terminal can determine the variable value to be modified by utilizing the variable settable range and send the variable ID to be modified and the variable value to be modified to the baseboard management controller.
Referring to fig. 5, an embodiment of the present application discloses an electronic device including a processor 21 and a memory 22; wherein the memory 22 is used for storing a computer program; the processor 21 is configured to execute the computer program to implement the method for upgrading the BIOS out of band disclosed in the foregoing embodiment.
For the specific process of the method for upgrading the BIOS outside the band, reference may be made to the corresponding content disclosed in the foregoing embodiment, and no detailed description is given here.
Further, the embodiment of the application also discloses a computer readable storage medium for storing a computer program, wherein the computer program is executed by a processor to implement the method for upgrading the BIOS out of band disclosed in the previous embodiment.
For the specific process of the method for upgrading the BIOS outside the band, reference may be made to the corresponding content disclosed in the foregoing embodiment, and no detailed description is given here.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between the embodiments are referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The above describes in detail a method, apparatus, device and medium for upgrading BIOS out of band provided in the present application, and specific examples are applied herein to illustrate the principles and embodiments of the present application, where the above description of the embodiments is only for helping to understand the method and core ideas of the present application; meanwhile, as those skilled in the art will have modifications in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (9)

1. A method for upgrading a BIOS out of band, applied to a baseboard management controller, comprising:
acquiring BIOS firmware to be upgraded through a network;
acquiring an old variable and an old variable structure from an old NVRAM firmware volume and an old user firmware volume of an old BIOS firmware respectively;
acquiring a new variable structure body from the new user firmware volume of the BIOS firmware to be upgraded; wherein, the old variable structure body and the new variable structure body are both structures of UEFI variables related to BIOS setting;
creating a new variable corresponding to the new variable structure based on the old variable structure, the old variable and the new variable structure, and writing the new variable into a new NVRAM firmware volume of the BIOS firmware to be upgraded;
performing BIOS upgrading by utilizing the BIOS firmware to be upgraded;
wherein before the old variable and the old variable structure are obtained from the old NVRAM firmware volume and the old user firmware volume of the old BIOS firmware respectively, the method further comprises:
the old NVRAM firmware volume and the old user firmware volume are searched according to the globally unique identifiers of the old NVRAM firmware volume and the old user firmware volume.
2. The method of out-of-band upgrade BIOS of claim 1, wherein the creating a new variable corresponding to the new variable structure based on the old variable structure, the old variable, and the new variable structure comprises:
analyzing the old variables by using the old variable structure body to obtain the value of each old member variable;
and creating a new variable corresponding to the new variable structure based on the new variable structure and the value of each old member variable.
3. The method of out-of-band upgrade BIOS of claim 2, wherein the creating a new variable corresponding to the new variable structure based on the new variable structure and the value of each old member variable comprises:
obtaining a default value of each old member variable from an old NVRAM firmware volume, and obtaining a default value of each variable of BIOS firmware to be upgraded from a new NVRAM firmware volume;
comparing the value of each old member variable with the default value of the old member variable, if the values are inconsistent, creating a new variable corresponding to the new variable structure by using the value of the old member variable and the new variable structure; if the two variable structures are consistent, creating a new variable corresponding to the new variable structure by using the default value of the variable of the BIOS firmware to be upgraded corresponding to the old member variable and the new variable structure.
4. The method of out-of-band upgrade BIOS of claim 1, wherein the old variable structure and the new variable structure each comprise a member variable ID and a member variable data type, and wherein the member variable ID is a corresponding variable name.
5. The method for upgrading BIOS out of band according to any one of claims 1 to 4, further comprising, after said BIOS upgrading using said BIOS firmware to be upgraded:
acquiring a variable ID to be modified and a variable value to be modified, which are sent by a user terminal;
and updating corresponding variables in the new NVRAM firmware volume by using the new variable structure of the current BIOS and the value of the change to be repaired.
6. The method for upgrading a BIOS out of band of claim 5, further comprising, before obtaining the variable ID to be modified and the variable value sent by the user terminal:
acquiring a BIOS setting modification request sent by a user terminal;
and responding to the BIOS setting modification request, returning a variable ID to be modified and a variable settable range to the user terminal so that the user terminal can determine the variable value to be modified by utilizing the variable settable range, and sending the variable ID to be modified and the variable value to be modified to a baseboard management controller.
7. An apparatus for upgrading a BIOS out of band, applied to a baseboard management controller, comprising:
the BIOS firmware to be upgraded is obtained by a network;
the old variable and structure body acquisition module is used for acquiring an old variable and an old variable structure body from an old NVRAM firmware volume and an old user firmware volume of the old BIOS firmware respectively;
the new variable structure body acquisition module is used for acquiring a new variable structure body from the new user firmware volume of the BIOS firmware to be upgraded; wherein, the old variable structure body and the new variable structure body are both structures of UEFI variables related to BIOS setting;
a new variable determining module, configured to create a new variable corresponding to the new variable structure based on the old variable structure, the old variable, and the new variable structure, and write the new variable into a new NVRAM firmware volume of the BIOS firmware to be upgraded;
the BIOS upgrading module is used for carrying out BIOS upgrading by utilizing the BIOS firmware to be upgraded;
the device for upgrading the BIOS in an out-of-band manner is further used for searching the old NVRAM firmware volume and the old user firmware volume according to the globally unique identifiers of the old NVRAM firmware volume and the old user firmware volume.
8. An electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the method of upgrading a BIOS out-of-band as claimed in any one of claims 1 to 6.
9. A computer readable storage medium for storing a computer program which when executed by a processor implements a method of upgrading a BIOS out-of-band as claimed in any one of claims 1 to 6.
CN202110453715.2A 2021-04-26 2021-04-26 Method, device, equipment and medium for upgrading BIOS (basic input output system) out of band Active CN113064625B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110453715.2A CN113064625B (en) 2021-04-26 2021-04-26 Method, device, equipment and medium for upgrading BIOS (basic input output system) out of band

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110453715.2A CN113064625B (en) 2021-04-26 2021-04-26 Method, device, equipment and medium for upgrading BIOS (basic input output system) out of band

Publications (2)

Publication Number Publication Date
CN113064625A CN113064625A (en) 2021-07-02
CN113064625B true CN113064625B (en) 2024-02-09

Family

ID=76567433

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110453715.2A Active CN113064625B (en) 2021-04-26 2021-04-26 Method, device, equipment and medium for upgrading BIOS (basic input output system) out of band

Country Status (1)

Country Link
CN (1) CN113064625B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114168169A (en) * 2021-10-29 2022-03-11 浪潮(北京)电子信息产业有限公司 Microcode updating method, device, equipment and storage medium
CN113961260B (en) * 2021-12-21 2022-04-15 比亚迪股份有限公司 System control software operation method, system, computer device and storage medium
US11934838B2 (en) 2022-02-09 2024-03-19 Quanta Computer Inc. Storing EFI variables in a BMC using an API

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108270626A (en) * 2018-02-01 2018-07-10 郑州云海信息技术有限公司 A kind of method, apparatus, equipment and the readable storage medium storing program for executing of upgrade server firmware
CN110795119A (en) * 2019-09-19 2020-02-14 平安科技(深圳)有限公司 Firmware upgrading method and device, computer equipment and storage medium
CN111176686A (en) * 2019-12-29 2020-05-19 山东英信计算机技术有限公司 BIOS upgrading method and system, electronic equipment and storage medium
CN111176703A (en) * 2019-12-27 2020-05-19 山东英信计算机技术有限公司 In-band firmware upgrading method and device, computer system and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108270626A (en) * 2018-02-01 2018-07-10 郑州云海信息技术有限公司 A kind of method, apparatus, equipment and the readable storage medium storing program for executing of upgrade server firmware
CN110795119A (en) * 2019-09-19 2020-02-14 平安科技(深圳)有限公司 Firmware upgrading method and device, computer equipment and storage medium
CN111176703A (en) * 2019-12-27 2020-05-19 山东英信计算机技术有限公司 In-band firmware upgrading method and device, computer system and storage medium
CN111176686A (en) * 2019-12-29 2020-05-19 山东英信计算机技术有限公司 BIOS upgrading method and system, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113064625A (en) 2021-07-02

Similar Documents

Publication Publication Date Title
CN113064625B (en) Method, device, equipment and medium for upgrading BIOS (basic input output system) out of band
US8601466B2 (en) Software deployment method and system, software deployment server and user server
US10635428B2 (en) System and method for in-service update of software
WO2020024408A1 (en) Test device, test method and storage medium
JP2021002317A (en) Method, apparatus, device and storage medium for upgrading application
US20210099359A1 (en) System for Simultaneous Viewing and Editing of Multiple Network Device Configurations
US20190317755A1 (en) Method for upgrading software of pos terminal, pos terminal, and storage medium
WO2012034440A1 (en) Method and device for generating database upgrading script
CN104317667A (en) DMI FRU synchronization method
CN109828774B (en) Server system and starting method thereof
CN113010217A (en) BIOS parameter setting method and device, electronic equipment and storage medium
CN113434202A (en) Starting method and device of equipment, electronic equipment and computer storage medium
JP6404708B2 (en) Information processing apparatus, BIOS setting information changing method, and computer program
CN104104701A (en) Online service configuration updating method and system
US9262374B1 (en) Model driven command language translator
CN106484442B (en) Server system and method for updating startup mapping file
CN106708541A (en) Version upgrading processing method and apparatus
CN110968351A (en) BIOS configuration method and device
US20180032351A1 (en) Information processing method and storage device
CN113438095B (en) Method, device and equipment for managing configuration data and storage medium
CN109634685B (en) Starting and stopping method and related device for PXE function of PCH gigabit Ethernet
CN108268285B (en) BIOS version upgrading method, device, equipment and readable storage medium
CN109101278B (en) Method and device for realizing terminal flashing
CN109947455A (en) A kind of dynamic updating method and system of the page
CN106681914B (en) Television picture quality debugging method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant