CN113703823A - BMC (baseboard management controller) firmware upgrading method and device, electronic equipment and storage medium - Google Patents
BMC (baseboard management controller) firmware upgrading method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN113703823A CN113703823A CN202111251310.7A CN202111251310A CN113703823A CN 113703823 A CN113703823 A CN 113703823A CN 202111251310 A CN202111251310 A CN 202111251310A CN 113703823 A CN113703823 A CN 113703823A
- Authority
- CN
- China
- Prior art keywords
- firmware
- bmc
- partition
- service
- standby
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 73
- 238000005192 partition Methods 0.000 claims abstract description 253
- 230000008569 process Effects 0.000 claims abstract description 21
- 238000001514 detection method Methods 0.000 claims description 51
- 230000036541 health Effects 0.000 claims description 30
- 230000002159 abnormal effect Effects 0.000 claims description 13
- 230000003862 health status Effects 0.000 description 12
- 238000010586 diagram Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 5
- 238000012545 processing Methods 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 230000007547 defect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008439 repair process Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
- G06F8/658—Incremental updates; Differential updates
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 provides a BMC (baseboard management controller) firmware upgrading method, a BMC firmware upgrading device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring a firmware image file to be upgraded; downloading a firmware image file to be upgraded to a standby partition, and performing corresponding firmware upgrade based on the firmware image file to be upgraded under the standby partition to obtain a new version standby partition after the firmware is upgraded; detecting firmware content difference information between the new version standby partition and a service partition which is not subjected to firmware upgrading; and updating the firmware content of the service partition according to the firmware content difference information. According to the method provided by the scheme, the firmware of the service partition is updated according to the firmware content difference information between the new version standby partition after the firmware is updated and the service partition without the firmware update, so that the firmware update process of the service partition is simplified, and the BMC firmware update efficiency is improved.
Description
Technical Field
The present application relates to the field of server technologies, and in particular, to a method and an apparatus for upgrading a BMC firmware, an electronic device, and a storage medium.
Background
A Baseboard Management Controller (BMC) is used to perform operations such as firmware upgrade and checking of machine devices on a server when the server is not powered on, and when the BMC needs to repair a file or add a function, the BMC firmware is generally upgraded.
However, some BMCs have two partitions for dual-mirror backup, and the firmware upgrade efficiency of such BMCs is low, which often results in too long upgrade time.
Disclosure of Invention
The application provides a BMC firmware upgrading method and device, electronic equipment and a storage medium, and aims to overcome the defects that in the prior art, BMC firmware upgrading efficiency is low and the like.
A first aspect of the present application provides a BMC firmware upgrading method, applied to a BMC, where the BMC includes a service partition and a standby partition, and the method includes:
acquiring a firmware image file to be upgraded;
downloading the firmware image file to be upgraded to a standby partition, and performing corresponding firmware upgrade based on the firmware image file to be upgraded under the standby partition to obtain a new version standby partition after the firmware is upgraded;
detecting firmware content difference information between the new version standby partition and a service partition which is not subjected to firmware upgrading;
and updating the firmware content of the service partition according to the firmware content difference information.
Optionally, the updating the firmware content of the service partition according to the firmware content difference information includes:
copying corresponding firmware difference contents from the new backup partition to the service partition according to the firmware content difference information;
and correspondingly replacing the firmware content of the service partition based on the firmware difference content obtained by the service partition.
Optionally, before detecting the firmware content difference information between the new backup partition and the service partition without firmware upgrade, the method further includes:
detecting the health state of the BMC which is switched to the new version standby partition currently;
and when the health state detection result of the BMC is normal, executing the step of detecting the firmware content difference information between the new version standby partition and the service partition without firmware upgrading.
Optionally, the detecting the health state of the BMC currently switched to the new-version standby partition includes:
judging whether the CPU average occupancy rate of the BMC in a preset detection period exceeds a preset value; or judging whether the BMC is abnormally restarted in a preset detection period; or judging whether the thread of the BMC can be started normally;
and when the CPU average occupancy rate of the BMC in a preset detection period does not exceed a preset value, the BMC is not abnormally restarted in the preset detection period, and the thread of the BMC can be normally started, determining that the health state of the BMC is normal.
Optionally, the detecting the health state of the BMC currently switched to the new-version standby partition includes:
judging whether the quantity of the current configuration files of the BMC reaches a preset standard or not; or judging whether the service required by the BMC can normally run;
and when the number of the current configuration files of the BMC reaches a preset standard and the service required by the BMC can normally run, determining that the health state of the BMC is normal.
Optionally, before detecting the firmware content difference information between the new backup partition and the service partition without firmware upgrade, the method further includes:
judging whether the version number of the new version standby partition is larger than the version number of a service partition which is not upgraded;
and if so, executing the step of detecting the firmware content difference information between the new version standby partition and the service partition without firmware upgrading.
Optionally, the method further includes:
and when the health state detection result of the BMC is abnormal or the version number of the new version standby partition is not greater than the version number of the service partition which is not subjected to firmware upgrading, ending the current BMC firmware upgrading process.
A second aspect of the present application provides a BMC firmware upgrade device, applied to a BMC, where the BMC includes a service partition and a standby partition, the device including:
the acquisition module is used for acquiring a firmware image file to be upgraded;
the first upgrading module is used for downloading the firmware image file to be upgraded to a standby partition, and carrying out corresponding firmware upgrading on the basis of the firmware image file to be upgraded under the standby partition to obtain a new version standby partition after the firmware is upgraded;
the detection module is used for detecting the difference information of the firmware content between the new version standby partition and the service partition which is not subjected to firmware upgrading;
and the second upgrading module is used for updating the firmware content of the service partition according to the firmware content difference information.
Optionally, the second upgrade module is specifically configured to:
copying corresponding firmware difference contents from the new backup partition to the service partition according to the firmware content difference information;
and correspondingly replacing the firmware content of the service partition based on the firmware difference content obtained by the service partition.
Optionally, the apparatus further comprises:
the state detection module is used for detecting the health state of the BMC which is switched to the new version standby partition currently; and when the health state detection result of the BMC is normal, executing the step of detecting the firmware content difference information between the new version standby partition and the service partition without firmware upgrading.
Optionally, the state detection module is specifically configured to:
judging whether the CPU average occupancy rate of the BMC in a preset detection period exceeds a preset value; or judging whether the BMC is abnormally restarted in a preset detection period; or judging whether the thread of the BMC can be started normally;
and when the CPU average occupancy rate of the BMC in a preset detection period does not exceed a preset value, the BMC is not abnormally restarted in the preset detection period, and the thread of the BMC can be normally started, determining that the health state of the BMC is normal.
Optionally, the state detection module is specifically configured to:
judging whether the quantity of the current configuration files of the BMC reaches a preset standard or not; or judging whether the service required by the BMC can normally run;
and when the number of the current configuration files of the BMC reaches a preset standard and the service required by the BMC can normally run, determining that the health state of the BMC is normal.
Optionally, the apparatus further comprises:
the version detection module is used for judging whether the version number of the new version standby partition is greater than the version number of the service partition which is not upgraded by the firmware; and if so, executing the step of detecting the firmware content difference information between the new version standby partition and the service partition without firmware upgrading.
Optionally, the apparatus further comprises:
and the ending module is used for ending the current BMC firmware upgrading process when the health state detection result of the BMC is abnormal or the version number of the new version standby partition is not greater than the version number of the service partition which is not upgraded with the firmware.
A third aspect of the present application provides an electronic device, comprising: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executes computer-executable instructions stored by the memory to cause the at least one processor to perform the method as set forth in the first aspect above and in various possible designs of the first aspect.
A fourth aspect of the present application provides a computer-readable storage medium having stored thereon computer-executable instructions that, when executed by a processor, implement a method as set forth in the first aspect and various possible designs of the first aspect.
This application technical scheme has following advantage:
the application provides a BMC firmware upgrading method, a BMC firmware upgrading device, an electronic device and a storage medium, wherein the method comprises the following steps: acquiring a firmware image file to be upgraded; downloading a firmware image file to be upgraded to a standby partition, and performing corresponding firmware upgrade based on the firmware image file to be upgraded under the standby partition to obtain a new version standby partition after the firmware is upgraded; detecting firmware content difference information between the new version standby partition and a service partition which is not subjected to firmware upgrading; and updating the firmware content of the service partition according to the firmware content difference information. According to the method provided by the scheme, the firmware of the service partition is updated according to the firmware content difference information between the new version standby partition after the firmware is updated and the service partition without the firmware update, so that the firmware update process of the service partition is simplified, and the BMC firmware update efficiency 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 needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art according to these drawings.
Fig. 1 is a schematic structural diagram of a BMC firmware upgrade system according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a BMC firmware upgrading method according to an embodiment of the present disclosure;
fig. 3 is a schematic overall flow chart of a BMC firmware upgrading method according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a BMC firmware upgrading device according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
With the above figures, there are shown specific embodiments of the present application, which will be described in more detail below. These drawings and written description are not intended to limit the scope of the disclosed concepts in any way, but rather to illustrate the concepts of the disclosure to those skilled in the art by reference to specific embodiments.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Furthermore, the terms "first", "second", etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. In the description of the following examples, "plurality" means two or more unless specifically limited otherwise.
In the prior art, some BMCs may have two partitions for dual-mirror backup, and when the BMC performs firmware upgrade, the two partitions generally perform the same firmware upgrade operation at the same time, so that the firmware upgrade efficiency is low, and the upgrade time is often too long, which affects the work efficiency of the BMC.
In order to solve the above problems, in the BMC firmware upgrading method and apparatus, the electronic device, and the storage medium provided in the embodiments of the present application, a firmware image file to be upgraded is obtained; downloading a firmware image file to be upgraded to a standby partition, and performing corresponding firmware upgrade based on the firmware image file to be upgraded under the standby partition to obtain a new version standby partition after the firmware is upgraded; detecting firmware content difference information between the new version standby partition and a service partition which is not subjected to firmware upgrading; and updating the firmware content of the service partition according to the firmware content difference information. The firmware of the service partition is updated according to the difference information of the firmware content between the new version standby partition after the firmware is updated and the service partition without the firmware, so that the firmware updating process of the service partition is simplified, and the firmware updating efficiency of the BMC is improved.
The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present invention will be described below with reference to the accompanying drawings.
First, a structure of a BMC firmware upgrade system based on the present application will be described:
the BMC firmware upgrading method and device, the electronic device and the storage medium are suitable for upgrading firmware of BMC in a server. As shown in fig. 1, a schematic structural diagram of a BMC firmware upgrade system according to an embodiment of the present application is mainly included, where the BMC mainly includes a BMC and a BMC firmware upgrade device, where the BMC service is processed based on a service partition, and a firmware content of the standby partition is the same as that of the service partition, and is used to process the BMC service instead of the service partition when the service partition fails. Specifically, a firmware image file to be upgraded may be acquired by using a BMC firmware upgrading device, and the firmware of the BMC may be upgraded based on the firmware image file to be upgraded, where the BMC firmware upgrading device may be deployed outside the BMC or in the BMC.
The embodiment of the application provides a BMC firmware upgrading method, which is used for upgrading firmware of BMC in a server and is applied to BMC, wherein the BMC comprises a service partition and a standby partition, namely, a flash of the BMC is divided into the service partition and the standby partition. The execution subject of the embodiment of the application is an electronic device, such as a server, a desktop computer, a notebook computer, a tablet computer, and other electronic devices that can be used for upgrading the firmware of the BMC in the server.
As shown in fig. 2, a schematic flow diagram of a BMC firmware upgrading method provided in the embodiment of the present application is shown, where the method includes:
Specifically, the firmware image file to be upgraded may be extracted from the database of the current server.
It should be noted that, because the BMC currently to be firmware upgraded includes the service partition and the standby partition, in order to avoid that the abnormal firmware upgrade affects the service processing capability of the BMC, the embodiment of the present application first performs firmware upgrade on the standby partition of the BMC.
Specifically, after the firmware image file to be upgraded is downloaded to the standby partition, the BMC is switched to the standby partition environment, and the new firmware version is started, that is, the corresponding firmware upgrade is performed based on the firmware image file to be upgraded. At this time, the standby partition of the BMC is already upgraded to the new-version standby partition, the firmware of the service partition of the BMC is still the old version, and the service partition can normally process the BMC service based on the old version firmware, which shows that the BMC firmware upgrading method provided by the embodiment of the present application has a small influence on the service processing of the BMC.
The firmware content difference information may include information such as a firmware difference content name.
It should be noted that the firmware content mainly includes a kernel, file system content, and an application program, and specifically, the difference information of the firmware content between the new standby partition and the service partition may be detected according to an MD5 value of the firmware content, where the MD5 value of the firmware content is a unique identifier of the firmware content.
Specifically, after the firmware of the standby partition is upgraded, the current service partition directory may be mounted to the standby partition, so that the BMC may read the firmware content of the service partition under the new version of the standby partition. After the firmware contents of the new version standby partition and the service partition are read, the firmware content difference information between the new version standby partition and the service partition without firmware upgrading can be detected by traversing all the firmware contents of the new version standby partition and the service partition.
And step 204, updating the firmware content of the service partition according to the firmware content difference information.
Specifically, the firmware content to be updated or the firmware content to be newly added of the service partition may be determined according to the difference information of the firmware content between the service partition and the service partition, and then the firmware content to be updated is updated or the firmware content to be newly added is newly added.
Further, after the service partition finishes updating or newly adding the firmware content, the firmware content difference information between the service partition and the service partition is detected again, and if the firmware difference content still exists, the firmware content is continuously updated or newly added to the service partition until the firmware difference content does not exist between the service partition and the service partition.
Specifically, in one embodiment, the corresponding firmware difference content may be copied from the new version standby partition to the service partition according to the firmware content difference information; and correspondingly replacing the firmware content of the service partition based on the firmware difference content obtained by the service partition.
Specifically, the firmware content of the service partition may be updated once every time the firmware content difference information is determined to cyclically copy the firmware difference content to the service partition.
On the basis of the above embodiment, when the upgrade of the BMC firmware is abnormal, the currently upgraded firmware version is incompatible with the current BMC, or the new firmware version fails, the firmware of the BMC is abnormal, and the old version service cannot meet the requirement of the current BMC.
To solve the above problem, as an implementable manner, on the basis of the above embodiment, in an embodiment, before detecting the firmware content difference information between the new version standby partition and the service partition without firmware upgrade, the method further includes:
step 301, detecting the health state of the BMC which is switched to the new version standby partition currently;
step 302, when the health status detection result of the BMC is normal, executing a step of detecting firmware content difference information between the new version standby partition and the service partition without firmware upgrade.
Specifically, before a firmware upgrade is performed on a service partition, BMC health status detection may be performed for a new version of a standby partition that has now completed the firmware upgrade. And if the health state detection result is normal, continuing to execute the subsequent flow so as to perform corresponding firmware upgrading operation on the service partition. On the contrary, if the health status detection result is abnormal, it may be determined that the current new version of firmware is abnormal or is not suitable for the BMC, and at this time, the subsequent firmware upgrade process is terminated, that is, the service partition is still the old version of firmware, and the service work of the BMC is not affected.
Similarly, in an embodiment, it may be determined whether the version number of the new version standby partition is greater than the version number of the service partition without firmware upgrade; and if so, executing the step of detecting the firmware content difference information between the new version standby partition and the service partition without firmware upgrading.
Specifically, if the version number of the new version spare partition is smaller than the version number of the service partition without firmware upgrade, it is proved that the firmware version of the current new version spare partition is substantially older than the firmware version of the current service partition, and at this time, it is not necessary to update the service partition into the old version firmware. If the version number of the new backup partition is equal to the version number of the service partition without firmware upgrade, it may be determined that the firmware version of the new backup partition is the same as the firmware version of the current server. And if the version number of the new backup partition is greater than the version number of the service partition which is not upgraded, determining that the firmware version of the new backup partition is newer than the backup version of the current service partition, and executing a subsequent firmware upgrading process aiming at the service partition.
Conversely, in an embodiment, when the health status detection result of the BMC is abnormal, or the version number of the new-version standby partition is not greater than the version number of the service partition without firmware upgrade, the current BMC firmware upgrade process is ended.
For example, when the health status detection result of the BMC is abnormal or the version number of the new backup partition is not less than the version number of the service partition that is not subject to firmware upgrade, the current BMC firmware upgrade process is ended, and meanwhile, the current service partition may be regarded as the new backup partition, and the current new backup partition may be regarded as the service partition, and with reference to the above embodiment, a subsequent service partition firmware upgrade process is executed to correct the firmware content of the backup partition that is subject to error upgrade (the current new backup partition).
Correspondingly, when the health state detection result of the BMC is normal, but the version number of the new-version standby partition is equal to the version number of the service partition which is not subjected to firmware upgrade, the current BMC firmware upgrade process can be ended without performing other operations.
On the basis of the foregoing embodiment, since the health status of the BMC relates to various indicators, in order to improve the BMC health status detection efficiency, as an implementable manner, on the basis of the foregoing embodiment, in an embodiment, the detecting the health status of the BMC currently switched to the new-version standby partition includes:
step 3011, determining whether the average CPU occupancy rate of the BMC in a preset detection period exceeds a preset value; or judging whether the BMC is abnormally restarted in a preset detection period; or judging whether the thread of the BMC can be started normally;
and 3012, determining that the health state of the BMC is normal when the average CPU occupancy rate of the BMC in the preset detection period does not exceed a preset value, the BMC is not abnormally restarted in the preset detection period, and the thread of the BMC can be normally started.
The detection period may be specifically set according to an actual situation, for example, 5 minutes, and the determination of the average CPU occupancy may refer to the prior art, and the embodiment of the present application is not limited.
Similarly, in an embodiment, whether the number of the current configuration files of the BMC reaches a preset standard may also be determined; or judging whether the service required by the BMC can normally run; and when the number of the current configuration files of the BMC reaches a preset standard and the service required by the BMC can normally run, determining the health state of the BMC to be normal.
It should be noted that the BMC includes a configuration file system, where a large number of configuration files are stored in the configuration file system to support the BMC function, and if the number of the configuration files in the configuration file system of the current BMC does not reach a preset standard, it may be determined that the current BMC function is not sufficiently supported, and it may also be determined that the health status detection result of the BMC is abnormal.
The services required by the BMC include log service, NTB service, timing service and the like so as to maintain the normal operation of the BMC. If the services cannot normally operate, the BMC cannot normally operate, that is, the health status detection result of the BMC can be determined to be abnormal.
Exemplarily, as shown in fig. 3, an overall flowchart of the BMC firmware upgrading method provided in the embodiment of the present application is schematically shown. As shown in fig. 3, the execution subject of the method is BMC, the BMC initiates a firmware upgrade process, and downloads a firmware image file to be upgraded to a standby partition, that is, upgrades a standby partition image, after the firmware upgrade of the standby partition is completed, the BMC restarts, then detects a self health status, if the health status detection result is normal, further detects a version number of a current standby partition (a new standby partition), then judges whether the version numbers of the new standby partition and the current service partition are the same, if the version numbers are different, mounts a directory of the current service partition to the new standby partition, then traverses all contents under the two partitions, including contents of a kernel and a file system, and records the difference contents, specifically can record an MD5 value of the difference contents of the firmware, update or newly add the firmware contents to the current service partition, and then circularly detect the difference contents, and if the firmware difference content still exists, continuously updating or newly adding the firmware content of the service partition until the firmware difference content does not exist.
According to the BMC firmware upgrading method provided by the embodiment of the application, the firmware image file to be upgraded is obtained; downloading a firmware image file to be upgraded to a standby partition, and performing corresponding firmware upgrade based on the firmware image file to be upgraded under the standby partition to obtain a new version standby partition after the firmware is upgraded; detecting firmware content difference information between the new version standby partition and a service partition which is not subjected to firmware upgrading; and updating the firmware content of the service partition according to the firmware content difference information. The firmware updating method comprises the steps of firstly updating the firmware of the standby partition, then updating the firmware content of the service partition according to the difference information of the firmware content between the new version standby partition after the firmware is updated and the service partition without the firmware updating, simplifying the firmware updating process of the service partition, improving the firmware updating efficiency of the BMC, effectively improving the firmware updating speed, and simultaneously ensuring the consistency and the integrity of the contents of the double partitions. Moreover, the health state of the BMC is analyzed in the upgrading process of the BMC firmware, so that the safety of firmware upgrading is ensured.
The embodiment of the application provides a BMC firmware upgrading device, which is used for executing the BMC firmware upgrading method provided by the embodiment.
Fig. 4 is a schematic structural diagram of a BMC firmware upgrading device according to an embodiment of the present disclosure. The BMC firmware upgrading apparatus 40 includes an obtaining module 401, a first upgrading module 402, a detecting module 403, and a second upgrading module 404.
The system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring a firmware image file to be upgraded; the first upgrading module is used for downloading the firmware image file to be upgraded to the standby partition, and carrying out corresponding firmware upgrading on the basis of the firmware image file to be upgraded under the standby partition to obtain a new version standby partition after the firmware is upgraded; the detection module is used for detecting the difference information of the firmware content between the new version standby partition and the service partition which is not subjected to firmware upgrading; and the second upgrading module is used for updating the firmware content of the service partition according to the firmware content difference information.
Specifically, in an embodiment, the second upgrade module is specifically configured to:
copying corresponding firmware difference contents from the new backup partition to the service partition according to the firmware content difference information;
and correspondingly replacing the firmware content of the service partition based on the firmware difference content obtained by the service partition.
Specifically, in one embodiment, the apparatus further comprises:
the state detection module is used for detecting the health state of the BMC which is switched to the new version standby partition at present; and when the health state detection result of the BMC is normal, executing a step of detecting the firmware content difference information between the new version standby partition and the service partition without firmware upgrading.
Specifically, in an embodiment, the state detection module is specifically configured to:
judging whether the CPU average occupancy rate of the BMC in a preset detection period exceeds a preset value; or judging whether the BMC is abnormally restarted in a preset detection period; or judging whether the thread of the BMC can be started normally;
and when the CPU average occupancy rate of the BMC in the preset detection period does not exceed the preset value, the BMC is not abnormally restarted in the preset detection period, and the thread of the BMC can be normally started, determining that the health state of the BMC is normal.
Specifically, in an embodiment, the state detection module is specifically configured to:
judging whether the quantity of the current configuration files of the BMC reaches a preset standard or not; or judging whether the service required by the BMC can normally run;
and when the number of the current configuration files of the BMC reaches a preset standard and the service required by the BMC can normally run, determining the health state of the BMC to be normal.
Specifically, in one embodiment, the apparatus further comprises:
the version detection module is used for judging whether the version number of the new version standby partition is greater than the version number of the service partition which is not upgraded by the firmware; and if so, executing the step of detecting the firmware content difference information between the new version standby partition and the service partition without firmware upgrading.
Specifically, in one embodiment, the apparatus further comprises:
and the ending module is used for ending the current BMC firmware upgrading process when the health state detection result of the BMC is abnormal or the version number of the new version standby partition is not greater than the version number of the service partition which is not upgraded with the firmware.
The detailed manner in which each module performs the operation has been described in detail in the embodiment of the method, and will not be elaborated herein.
The BMC firmware upgrading device provided in the embodiment of the present application is configured to execute the BMC firmware upgrading method provided in the foregoing embodiment, and an implementation manner of the BMC firmware upgrading device is the same as a principle, and is not described again.
The embodiment of the application provides an electronic device, which is used for executing the BMC firmware upgrading method provided by the embodiment.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application. The electronic device 50 includes: at least one processor 51 and memory 52;
the memory stores computer-executable instructions; the at least one processor executes the memory-stored computer-executable instructions, causing the at least one processor to perform the BMC firmware upgrade method provided by the above embodiments.
The electronic device provided in the embodiment of the present application is configured to execute the BMC firmware upgrading method provided in the above embodiment, and an implementation manner and a principle of the electronic device are the same and are not described again.
An embodiment of the present application provides a computer-readable storage medium, where a computer execution instruction is stored in the computer-readable storage medium, and when a processor executes the computer execution instruction, the BMC firmware upgrading method provided in any of the above embodiments is implemented.
The storage medium including the computer executable instructions according to the embodiment of the present application may be used to store the computer executable instructions of the BMC firmware upgrading method provided in the foregoing embodiment, and the implementation manner and the principle thereof are the same and are not described again.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
It is obvious to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to perform all or part of the above described functions. For the specific working process of the device described above, reference may be made to the corresponding process in the foregoing method embodiment, which is not described herein again.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.
Claims (10)
1. A BMC firmware upgrading method is applied to BMC and comprises a service partition and a standby partition, and is characterized by comprising the following steps:
acquiring a firmware image file to be upgraded;
downloading the firmware image file to be upgraded to a standby partition, and performing corresponding firmware upgrade based on the firmware image file to be upgraded under the standby partition to obtain a new version standby partition after the firmware is upgraded;
detecting firmware content difference information between the new version standby partition and a service partition which is not subjected to firmware upgrading;
and updating the firmware content of the service partition according to the firmware content difference information.
2. The method of claim 1, wherein the updating the firmware content of the service partition according to the firmware content difference information comprises:
copying corresponding firmware difference contents from the new backup partition to the service partition according to the firmware content difference information;
and correspondingly replacing the firmware content of the service partition based on the firmware difference content obtained by the service partition.
3. The method of claim 2, wherein prior to detecting the firmware content difference information between the new spare partition and the service partition without firmware upgrade, the method further comprises:
detecting the health state of the BMC which is switched to the new version standby partition currently;
and when the health state detection result of the BMC is normal, executing the step of detecting the firmware content difference information between the new version standby partition and the service partition without firmware upgrading.
4. The method of claim 3, wherein detecting the health of the BMC that is currently switched to the new version standby partition comprises:
judging whether the CPU average occupancy rate of the BMC in a preset detection period exceeds a preset value; or judging whether the BMC is abnormally restarted in a preset detection period; or judging whether the thread of the BMC can be started normally;
and when the CPU average occupancy rate of the BMC in a preset detection period does not exceed a preset value, the BMC is not abnormally restarted in the preset detection period, and the thread of the BMC can be normally started, determining that the health state of the BMC is normal.
5. The method of claim 3, wherein detecting the health of the BMC that is currently switched to the new version standby partition comprises:
judging whether the quantity of the current configuration files of the BMC reaches a preset standard or not; or judging whether the service required by the BMC can normally run;
and when the number of the current configuration files of the BMC reaches a preset standard and the service required by the BMC can normally run, determining that the health state of the BMC is normal.
6. The method of claim 3, wherein prior to detecting the firmware content difference information between the new spare partition and the service partition without firmware upgrade, the method further comprises:
judging whether the version number of the new version standby partition is larger than the version number of a service partition which is not upgraded;
and if so, executing the step of detecting the firmware content difference information between the new version standby partition and the service partition without firmware upgrading.
7. The method of claim 6, further comprising:
and when the health state detection result of the BMC is abnormal or the version number of the new version standby partition is not greater than the version number of the service partition which is not subjected to firmware upgrading, ending the current BMC firmware upgrading process.
8. A BMC firmware upgrade device applied to BMC, the BMC comprising a service partition and a standby partition, the device comprising:
the acquisition module is used for acquiring a firmware image file to be upgraded;
the first upgrading module is used for downloading the firmware image file to be upgraded to a standby partition, and carrying out corresponding firmware upgrading on the basis of the firmware image file to be upgraded under the standby partition to obtain a new version standby partition after the firmware is upgraded;
the detection module is used for detecting the difference information of the firmware content between the new version standby partition and the service partition which is not subjected to firmware upgrading;
and the second upgrading module is used for updating the firmware content of the service partition according to the firmware content difference information.
9. An electronic device, comprising: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing the computer-executable instructions stored by the memory causes the at least one processor to perform the method of any of claims 1-7.
10. A computer-readable storage medium having computer-executable instructions stored thereon which, when executed by a processor, implement the method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111251310.7A CN113703823A (en) | 2021-10-27 | 2021-10-27 | BMC (baseboard management controller) firmware upgrading method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111251310.7A CN113703823A (en) | 2021-10-27 | 2021-10-27 | BMC (baseboard management controller) firmware upgrading method and device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113703823A true CN113703823A (en) | 2021-11-26 |
Family
ID=78646940
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111251310.7A Pending CN113703823A (en) | 2021-10-27 | 2021-10-27 | BMC (baseboard management controller) firmware upgrading method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113703823A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117608618A (en) * | 2024-01-24 | 2024-02-27 | 苏州元脑智能科技有限公司 | Server firmware upgrading method and device, storage medium and electronic equipment |
CN118260136A (en) * | 2022-12-27 | 2024-06-28 | 宁畅信息产业(北京)有限公司 | Flash detection method, flash detection device, computer equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130290945A1 (en) * | 2012-04-30 | 2013-10-31 | Dell Products, L.P. | System and method for performing an in-service software upgrade in non-redundant systems |
CN104636171A (en) * | 2015-03-04 | 2015-05-20 | 深圳市欧珀通信软件有限公司 | Upgrading method and device and mobile device |
CN106802813A (en) * | 2016-12-06 | 2017-06-06 | 智车优行科技(北京)有限公司 | Method, device and vehicle for aerial firmware upgrade |
CN109254788A (en) * | 2018-09-06 | 2019-01-22 | 四川爱联科技有限公司 | The method of device firmware upgrade under low bandwidth |
-
2021
- 2021-10-27 CN CN202111251310.7A patent/CN113703823A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130290945A1 (en) * | 2012-04-30 | 2013-10-31 | Dell Products, L.P. | System and method for performing an in-service software upgrade in non-redundant systems |
CN104636171A (en) * | 2015-03-04 | 2015-05-20 | 深圳市欧珀通信软件有限公司 | Upgrading method and device and mobile device |
CN106802813A (en) * | 2016-12-06 | 2017-06-06 | 智车优行科技(北京)有限公司 | Method, device and vehicle for aerial firmware upgrade |
CN109254788A (en) * | 2018-09-06 | 2019-01-22 | 四川爱联科技有限公司 | The method of device firmware upgrade under low bandwidth |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118260136A (en) * | 2022-12-27 | 2024-06-28 | 宁畅信息产业(北京)有限公司 | Flash detection method, flash detection device, computer equipment and storage medium |
CN117608618A (en) * | 2024-01-24 | 2024-02-27 | 苏州元脑智能科技有限公司 | Server firmware upgrading method and device, storage medium and electronic equipment |
CN117608618B (en) * | 2024-01-24 | 2024-04-12 | 苏州元脑智能科技有限公司 | Server firmware upgrading method and device, storage medium and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10915412B2 (en) | System and method for live migration of a virtual machine | |
US20140310698A1 (en) | Apparatus and method for upgrading firmware of mobile terminal | |
US10068015B2 (en) | Monitoring a monitoring-target process | |
US10635473B2 (en) | Setting support program, setting support method, and setting support device | |
US20160132420A1 (en) | Backup method, pre-testing method for environment updating and system thereof | |
CN111897558A (en) | Kubernets upgrading method and device for container cluster management system | |
JP2010086181A (en) | Virtual machine system, method for managing thereof, program, and recording medium | |
WO2016206514A1 (en) | Startup processing method and device | |
CN112099825B (en) | Method, device, equipment and storage medium for upgrading component | |
KR20110055841A (en) | Recovery method of system and apparatus for supplying the same | |
CN103970564A (en) | Automatic repairing and upgrading method of embedded operating system and embedded operating system with automatic repairing and upgrading functions | |
CN113703823A (en) | BMC (baseboard management controller) firmware upgrading method and device, electronic equipment and storage medium | |
CN114385418A (en) | Protection method, device, equipment and storage medium for communication equipment | |
CN113032183A (en) | System management method, device, computer equipment and storage medium | |
WO2016131294A1 (en) | Version upgrade processing method and device | |
CN111966520A (en) | Database high-availability switching method, device and system | |
CN111949290A (en) | Hot patch management method and device, electronic equipment and storage medium | |
CN115291925A (en) | BMC upgrading method, system, equipment and storage medium | |
CN114153503A (en) | BIOS control method, device and medium | |
CN112579113A (en) | Application program upgrading method and device, storage medium and terminal | |
CN112527327A (en) | Method, system, terminal and storage medium for factory restoration of UOS operating system | |
CN111949278B (en) | Method, system, terminal and storage medium for automatically installing MCS system | |
WO2024000535A1 (en) | Partition table update method and apparatus, and electronic device and storage medium | |
CN118227383B (en) | Method, device, equipment and readable storage medium for controlling slot consistency | |
CN110908725A (en) | Application program starting method and device, electronic equipment and readable medium |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20211126 |