CN115167903A - double-BMC Flash optimization upgrading method, device, equipment and medium - Google Patents

double-BMC Flash optimization upgrading method, device, equipment and medium Download PDF

Info

Publication number
CN115167903A
CN115167903A CN202210899998.8A CN202210899998A CN115167903A CN 115167903 A CN115167903 A CN 115167903A CN 202210899998 A CN202210899998 A CN 202210899998A CN 115167903 A CN115167903 A CN 115167903A
Authority
CN
China
Prior art keywords
bmc
flash
bmc flash
upgrading
data
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
Application number
CN202210899998.8A
Other languages
Chinese (zh)
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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202210899998.8A priority Critical patent/CN115167903A/en
Publication of CN115167903A publication Critical patent/CN115167903A/en
Pending legal-status Critical Current

Links

Images

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore

Landscapes

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

Abstract

The invention belongs to the technical field of BMC firmware upgrading, and particularly provides a method, a device, equipment and a medium for optimizing and upgrading dual BMC Flash, wherein the method comprises the following steps: receiving a mirror image file, and verifying the received mirror image file; after the verification is successful, upgrading the second BMC Flash according to the received image file and setting an upgrading flag bit; starting the BMC from the second BMC Flash; after the start is successful, synchronizing the second BMC Flash data to the first BMC Flash according to the value of the upgrading flag bit, and clearing the upgrading flag bit; after the starting fails, starting the BMC from the first BMC Flash; and synchronizing the first BMC Flash data to the second BMC Flash, and resetting the upgrading flag bit. The problem that the normal work of the BMC is affected because the specified function of the BMC running needs to be stopped in the existing upgrading process is solved.

Description

double-BMC Flash optimization upgrading method, device, equipment and medium
Technical Field
The invention relates to the technical field of BMC firmware upgrading, in particular to a dual-BMC Flash optimization upgrading method, device, equipment and medium.
Background
The BMC Flash upgrading mode comprises an off-line upgrading mode and an on-line upgrading mode, wherein after FW is burnt off the BMC Flash chip in an off-line mode through a special Flash burner in the off-line upgrading mode, the BMC Flash chip is welded to a PCB, and the method is only suitable for batch production in factories. The online upgrading mode means that BMC FW upgrading is realized through software after a user upgrading command is received under the condition that BMC is powered on. With the improvement of the safety performance requirement of the user, the server gradually develops from single BMC Flash to double BMC Flash. Under the single BMC Flash scene, if the online upgrading of BMC fails, BMC cannot be restarted, and Flash must be refreshed again in an offline refreshing mode, which has high requirements on hardware environment, inconvenient operation and high maintenance cost. The dual-BMC Flash generally comprises a main BMC Flash and a backup BMC Flash, when the dual-BMC Flash is upgraded on line, the main BMC Flash is generally upgraded firstly, the main BMC Flash is synchronized to the backup BMC after the upgrade is completed and the start is successful, and if the main BMC Flash is not upgraded successfully, the backup BMC Flash is started from the backup BMC Flash and the backup BMC Flash is synchronized to the main BMC Flash. The scene of the double-BMC Flash provides a self-rescue scheme for upgrading failure, and the safety of the system is improved.
The existing scheme is as follows: CN110990045A proposes a double-BMC + FLASH upgrading method and equipment, the scheme adopts an upgrading method of firstly upgrading a main BMC FLASH and then synchronizing to a backup BMC FLASH, during the upgrading process, the specified function of the main BMC which is running needs to be stopped firstly, after the restart is successful, whether the upgrading is successful is judged, and if the upgrading is successful, the backup BMC FLASH is synchronized.
There are problems in that: 1. in the upgrading process, the normal operation of the BMC is affected by stopping the running designated function of the BMC. 2. And after the upgrading is successfully started, whether the upgrading is successful can be judged, if the upgrading is successful, the BMC Flash is synchronously backed up, and the condition that the upgrading is failed and the starting cannot be successfully started is not described.
Disclosure of Invention
The method comprises the steps of firstly upgrading a main BMC Flash and then synchronizing to a backup BMC Flash, stopping a specified function which is operated by the main BMC in the upgrading process, judging whether upgrading is successful or not after restarting successfully, synchronously backing up the BMC Flash if upgrading is successful, stopping the specified function which is operated by the BMC in the upgrading process to influence the normal work of the BMC, judging whether upgrading is successful or not after successful starting, synchronously backing up the BMC Flash if upgrading is successful, and failing to start successfully.
In a first aspect, the technical scheme of the invention provides a dual-BMC Flash optimization upgrading method, wherein the dual-BMC Flash comprises a first BMC Flash serving as a main BMC Flash and a second BMC Flash serving as a standby BMC Flash; the method comprises the following steps:
receiving a mirror image file, and verifying the received mirror image file;
after the verification is successful, upgrading a second BMC Flash according to the received image file and setting an upgrading flag bit; starting the BMC from the second BMC Flash;
after the start is successful, synchronizing the second BMC Flash data to the first BMC Flash according to the value of the upgrading flag bit, and clearing the upgrading flag bit;
starting the BMC from the first BMC Flash after the starting fails;
and synchronizing the first BMC Flash data to the second BMC Flash, and clearing the upgrading flag bit.
Further, after the verification is successful, the steps of upgrading the second BMC Flash according to the received image file and setting an upgrading flag bit include:
reading out the second BMC Flash data by taking the sector as a unit; comparing the data to be written in the received mirror image file;
if the two sectors are the same, directly skipping the sector; judging whether all sectors are read completely, if not, continuing the next sector, and executing the following steps: reading out the second BMC Flash data by taking a sector as a unit; comparing the data to be written in the received mirror image file; if yes, ending;
if not, erasing the content of the sector and writing the data to be written, judging whether all the sectors are completely read, if not, continuing the next sector, and executing the following steps: reading out the second BMC Flash data by taking a sector as a unit; comparing the data to be written in the received mirror image file; if yes, the process is finished.
Further, the step of starting the BMC from the second BMC Flash includes:
the BMC is electrified to automatically load firmware and start a timer for setting first time;
if the BMC enters the u-boot within the timing range of the timer, resetting the timer in the u-boot, wherein the timing time is the second time;
if the BMC walks through the kernel partition of the operating system and enters the user space within the timing range of the timer, the timer is closed in the user space, and the normal starting of the BMC is indicated;
if the timer is overtime in any link, the BMC is failed to start, the BMC can be automatically switched to start from the first BMC Flash, and a position register is arranged for marking.
Further, after the start is successful, the second BMC Flash data is synchronized to the first BMC Flash according to the value of the upgrade flag bit, and the step of resetting the upgrade flag bit includes:
after the start is successful, reading an upgrading flag bit;
judging whether the upgrading flag bit is 1;
if so, synchronizing the second BMC Flash data to the first BMC Flash, and resetting the upgrading flag bit;
if not, ending.
Further, in the step of synchronizing the second BMC Flash data to the first BMC Flash, the data of the initialization partition, the environment variable partition, and the readable file system partition in the second BMC Flash are synchronized to the corresponding partition of the first BMC Flash.
Further, the method also comprises the following steps: the data synchronization method of the first BMC Flash and the second BMC Flash writable partition comprises the following steps:
erasing the writable partition data of the first BMC Flash/the second BMC Flash;
starting configuration synchronization to ensure that the first BMC Flash and the second BMC Flash are consistent in configuration;
mounting the writable partition to a directory and setting a real-time monitoring configuration file;
and copying the configuration file to a directory corresponding to the writable partition of the second BMC Flash/the first BMC Flash after monitoring the write-in completion signal.
Further, the step of receiving the image file and verifying the received image file includes:
triggering BMC firmware upgrading through a mirror image upgrading button, and uploading a mirror image file through a mirror image uploading button; or, sending a BMC firmware upgrade command and an image file from a UART or an OS.
In a second aspect, the technical solution of the present invention further provides a dual-BMC Flash optimized upgrade device, including a user interface module, a BMC start module, an erase/write module, a synchronization module, a first BMC Flash as a main BMC Flash, and a second BMC Flash as a standby BMC Flash;
triggering BMC firmware upgrading and uploading and checking a mirror image file through a user interface module;
the BMC starting module is used for starting the BMC, monitoring a starting process and handling the problem of starting failure; the BMC is started from the second BMC Flash after the upgrading is finished; after the starting fails, starting the BMC from the first BMC Flash;
the erasing module is used for performing the read-write function of the first BMC Flash data/the second BMC Flash according to the received image file to complete the upgrading of the BMC firmware;
and the synchronization module is used for synchronizing the data of the first BMC Flash and the data of the second BMC Flash.
Further, the user interface module comprises a BMC (baseboard management controller) WEB graphical interface and an ipmitool command interface;
the BMC WEB graphical interface triggers BMC FW upgrading through a mirror image upgrading button, uploads a mirror image through a mirror image uploading button, and observes a BMC firmware upgrading process through a status bar;
and the ipmitool command interface sends an ipmitool upgrading command and an image file from a UART or an OS to upgrade the BMC firmware.
Further, the synchronization module is specifically used for erasing the writable partition data of the first BMC Flash/the second BMC Flash; starting configuration synchronization to ensure that the first BMC Flash and the second BMC Flash are configured consistently; mounting the writable partition to a directory and setting a real-time monitoring configuration file; and copying the configuration file to a directory corresponding to the second BMC Flash/first BMC Flash writable partition after monitoring the write-in completion signal.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores computer program instructions executable by the at least one processor to enable the at least one processor to perform the dual BMC Flash optimization upgrade method of the first aspect.
In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium, where the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions enable the computer to execute the dual BMC Flash optimization and upgrade method according to the first aspect.
According to the technical scheme, the invention has the following advantages: the problem that the normal work of the BMC is affected because the specified function of the BMC in operation needs to be stopped in the upgrading process in the existing double-BMC Flash upgrading scheme is solved, and the processing scheme after upgrading failure is improved.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
Therefore, compared with the prior art, the invention has prominent substantive features and remarkable progress, and the beneficial effects of the implementation are also obvious.
Drawings
In order to more clearly illustrate the embodiments or prior art solutions of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a schematic flow diagram of a method of one embodiment of the invention.
Fig. 2 is a schematic flow diagram of a method of another embodiment of the invention.
Fig. 3 is a schematic block diagram of an apparatus of one embodiment of the present invention.
Detailed Description
The method comprises the steps of firstly upgrading a main BMC Flash and then synchronizing to a backup BMC Flash, stopping a specified function which is operated by the main BMC in the upgrading process, judging whether upgrading is successful or not after restarting successfully, synchronously backing up the BMC Flash if upgrading is successful, stopping the specified function which is operated by the BMC in the upgrading process, influencing the normal work of the BMC, judging whether upgrading is successful or not after successful starting, synchronously backing up the BMC Flash if upgrading is successful, and failing to upgrade and failing to start successfully is not explained. In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of the embodiment of the present invention, and 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 invention.
As shown in fig. 1, an embodiment of the present invention provides an optimized upgrade method for a dual-BMC Flash, where the dual-BMC Flash includes a first BMC Flash serving as a main BMC Flash and a second BMC Flash serving as a standby BMC Flash; the method comprises the following steps:
step 1: receiving a mirror image file, and verifying the received mirror image file;
and 2, step: after the verification is successful, upgrading the second BMC Flash according to the received image file and setting an upgrading flag bit;
and step 3: starting the BMC from the second BMC Flash;
and 4, step 4: after the start is successful, synchronizing the second BMC Flash data to the first BMC Flash according to the value of the upgrading zone bit, and clearing the upgrading zone bit;
and 5: after the starting fails, starting the BMC from the first BMC Flash;
and 6: and synchronizing the first BMC Flash data to the second BMC Flash, and resetting the upgrading flag bit.
In some embodiments, after the verification is successful, the step of upgrading the second BMC Flash according to the received image file and setting the upgrade flag bit includes:
step 21: reading out the second BMC Flash data by taking the sector as a unit; comparing the data to be written in the received mirror image file;
if yes, go to step 22;
if not, go to step 23;
step 22: then directly skip this sector; step 24 is executed;
step 23: erasing the content of the sector and writing the data to be written; step 24 is executed;
step 24: judging whether all sectors are read completely, if not, continuing to the next sector, and executing the step 21; if yes, the process is finished.
In some embodiments, the step of starting the BMC from the second BMC Flash includes:
the BMC is electrified to automatically load firmware and start a timer for setting first time;
if the BMC enters the u-boot within the timing range of the timer, resetting the timer in the u-boot, wherein the timing time is the second time;
if the BMC passes through the kernel partition of the operating system and enters the user space within the timing range of the timer, the normal starting of the BMC is indicated by closing the timer in the user space;
if the timer is overtime in any link, the BMC is failed to start, the BMC can be automatically switched to start from the first BMC Flash, and a position register is arranged for marking.
In some embodiments, as shown in fig. 2, after the start is successful, the step of synchronizing the second BMC Flash data to the first BMC Flash according to the value of the upgrade flag bit and clearing the upgrade flag bit includes:
step 41: after the start is successful, reading an upgrading flag bit;
step 42: judging whether the upgrading flag bit is 1;
if yes, go to step 43;
if not, ending;
step 43: synchronizing the second BMC Flash data to the first BMC Flash, and resetting the upgrading flag bit;
it should be noted that, in the step of synchronizing the second BMC Flash data to the first BMC Flash, the data of the initialization partition, the environment variable partition, and the readable file system partition in the second BMC Flash are synchronized to the corresponding partition of the first BMC Flash.
In some embodiments, the method further comprises: the data synchronization method of the first BMC Flash and the second BMC Flash writable partition comprises the following steps:
erasing the writable partition data of the first BMC Flash/the second BMC Flash;
starting configuration synchronization to ensure that the first BMC Flash and the second BMC Flash are consistent in configuration;
mounting the writable partition to a directory and setting a real-time monitoring configuration file;
and copying the configuration file to a directory corresponding to the second BMC Flash/first BMC Flash writable partition after monitoring the write-in completion signal.
It should be noted that, the step of receiving the image file and verifying the received image file includes:
triggering BMC firmware upgrading through a mirror image upgrading button, and uploading a mirror image file through a mirror image uploading button; or, sending a BMC firmware upgrade command and an image file from a UART or an OS.
As shown in fig. 3, an embodiment of the present invention further provides a dual-BMC Flash optimized upgrade device, which includes a user interface module, a BMC start module, an erase/write module, a synchronization module, a first BMC Flash serving as a main BMC Flash, and a second BMC Flash serving as a standby BMC Flash;
triggering BMC firmware upgrading and uploading and checking a mirror image file through a user interface module;
the BMC starting module is used for starting the BMC, monitoring a starting process and processing a starting failure problem; the BMC is started from the second BMC Flash after the upgrading is finished; after the starting fails, starting the BMC from the first BMC Flash;
the erasing module is used for performing reading and writing functions of the first BMC Flash data/the second BMC Flash according to the received mirror image file to finish upgrading of the BMC firmware;
and the synchronization module is used for synchronizing the data of the first BMC Flash and the data of the second BMC Flash.
The upgrading process comprises the following steps:
s1: triggering a BMC FW upgrading task through a user interface module, uploading and checking the image file, if the checking is successful, performing the step S2, and if the checking is unsuccessful, recording the log, and ending the step;
s2: upgrading a second BMC Flash by using an erasing module, and setting an environment variable rollback as 1 in u-boot-env to mark that upgrading is needed;
s3: starting the BMC from the second BMC Flash through the BMC starting module, if the starting is successful, performing the step S4, and if the starting is unsuccessful, performing the step S5;
s4: if the start is successful, reading an environment variable alt-u-boot-env zone bit rollback, if the rollback is equal to 1, synchronizing the second BMC Flash data to the first BMC Flash through a synchronization module, clearing the rollback, and upgrading successfully; if rollback is not equal to 1, ending;
s5: if the starting is unsuccessful, the BMC is automatically started from the first BMC Flash through the BMC starting module, the upgrading is failed, the first BMC Flash data is synchronized to the second BMC Flash through the synchronization module, and the rollback is cleared.
In some embodiments, the user interface module comprises a BMC WEB graphical interface and an ipmitool command interface;
the BMC WEB graphical interface triggers BMC FW upgrading through a mirror image upgrading button, uploads a mirror image through a mirror image uploading button, and observes a BMC firmware upgrading process through a status bar;
and the ipmitool command interface sends an ipmitool upgrading command and an image file from a UART or an OS to upgrade the BMC firmware.
It should be noted that the user interface module includes a BMC WEB graphics interface and an ipmitool command interface. The BMC WEB graphical interface triggers BMC FW upgrading through a mirror image upgrading button, uploads a mirror image through a mirror image uploading button, and observes a BMC FW refreshing process through a status bar. The ipmitool command interface can send an ipmitool upgrade command and an image file from a UART or an OS to perform FW upgrade.
In some embodiments, the synchronization module is specifically configured to erase the first BMC Flash/second BMC Flash writable partition data; starting configuration synchronization to ensure that the first BMC Flash and the second BMC Flash are configured consistently; mounting the writable partition to a directory and setting a real-time monitoring configuration file; and copying the configuration file to a directory corresponding to the writable partition of the second BMC Flash/the first BMC Flash after monitoring the write-in completion signal.
The BMC starting module is used for starting the BMC, monitoring a starting process and processing a starting failure problem. The BMC is electrified to automatically load the FW and defaults to start a hardware timer with the timing time of 22s, the time required by the BMC to enter the u-boot is less than 22s, the timer is reset in the u-boot, enough timing time is reset to ensure that the BMC can smoothly walk through a kernel partition to enter a user-space, and finally the timer is closed in the user-space through a program to indicate that the BMC is normally started. If the timer of any link is overtime, the BMC can automatically switch to another Flash to start the BMC, and a position register is arranged for marking.
The erasing module completes the read-write function of the BMC Flash. The erasing module reads the Flash data by taking the Sector as a unit, compares the Flash data with the data to be written, directly skips the Sector if the Flash data are the same as the data to be written, erases the content of the Sector and writes the content into the Sector if the Flash data are different from the data to be written, and continuously reads the next Sector.
The synchronization module is used for synchronizing the data of the two BMC flashes. The partition of the main BMC Flash is configured to be u-boot, u-boot-env (environment variable), kernel, rofs (file system) and rwfs (read-write system), and the partition of the backup Flash is alt-u-boot, alt-u-boot-env, alt-kernel, alt-rofs and alt-rwfs. The u-boot partition, the u-boot-env partition, the kernel partition and the rofs partition can be directly synchronized, the rwfs partition is a writable partition, files generated and modified after the BMC is started cannot be directly synchronized, the alt-rwfs partition needs to be erased firstly, then configuration synchronization is started, and main configuration of the two flashes is guaranteed to be consistent. And the configuration synchronization uses a mount command to mount the alt-rwfs partition to a directory, and the configuration file is copied to the directory corresponding to the alt-rwfs partition by monitoring the configuration file and a write-in completion signal through a program.
An embodiment of the present invention further provides an electronic device, where the electronic device includes: the system comprises a processor, a communication interface, a memory and a bus, wherein the processor, the communication interface and the memory are communicated with each other through the bus. The bus may be used for information transfer between the electronic device and the sensor. The processor may call logic instructions in memory to perform the following method: step 1: receiving a mirror image file, and verifying the received mirror image file; and 2, step: after the verification is successful, upgrading the second BMC Flash according to the received image file and setting an upgrading step 3: a flag bit; starting the BMC from the second BMC Flash; and 4, step 4: after the start is successful, synchronizing the second BMC Flash data to the first BMC Flash according to the value of the upgrading flag bit, and clearing the upgrading flag bit; and 5: starting the BMC from the first BMC Flash after the starting fails; step 6: and synchronizing the first BMC Flash data to the second BMC Flash, and clearing the upgrading flag bit.
In some embodiments, the processor may call logic instructions in the memory to perform the following method: step 21: reading out the second BMC Flash data by taking the sector as a unit; comparing the data to be written in the received mirror image file; if yes, go to step 22; if not, go to step 23; step 22: then directly skip this sector; step 24 is executed; step 23: erasing the content of the sector and writing the data to be written; step 24 is executed; and step 24: judging whether all sectors are read completely, if not, continuing to the next sector, and executing the step 21; if yes, ending.
In some embodiments, the processor may call logic instructions in the memory to perform the following method: erasing the writable partition data of the first BMC Flash/the second BMC Flash; starting configuration synchronization to ensure that the first BMC Flash and the second BMC Flash are consistent in configuration; mounting the writable partition to a directory and setting a real-time monitoring configuration file; and copying the configuration file to a directory corresponding to the second BMC Flash/first BMC Flash writable partition after monitoring the write-in completion signal.
In addition, the logic instructions in the memory may be implemented in the form of software functional units and may be stored in a computer readable storage medium when sold or used as a stand-alone product. Based on such understanding, the technical solution of the present invention or a part thereof which substantially contributes to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk, and various media capable of storing program codes.
Embodiments of the present invention provide a non-transitory computer-readable storage medium storing computer instructions that cause a computer to perform a method provided by the above method embodiments, for example, including: step 1: receiving a mirror image file, and verifying the received mirror image file; step 2: after the verification is successful, upgrading the second BMC Flash according to the received image file and setting an upgrading step 3: a flag bit; starting the BMC from the second BMC Flash; and 4, step 4: after the start is successful, synchronizing the second BMC Flash data to the first BMC Flash according to the value of the upgrading flag bit, and clearing the upgrading flag bit; and 5: starting the BMC from the first BMC Flash after the starting fails; step 6: and synchronizing the first BMC Flash data to the second BMC Flash, and clearing the upgrading flag bit.
Although the present invention has been described in detail in connection with the preferred embodiments with reference to the accompanying drawings, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made on the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and these modifications or substitutions should be within the scope of the present invention/any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present disclosure and the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (10)

1. A dual BMC Flash optimization upgrading method is characterized in that the dual BMC Flash comprises a first BMC Flash serving as a main BMC Flash and a second BMC Flash serving as a standby BMC Flash; the method comprises the following steps:
receiving a mirror image file, and verifying the received mirror image file;
after the verification is successful, upgrading the second BMC Flash according to the received image file and setting an upgrading flag bit; starting the BMC from the second BMC Flash;
after the start is successful, synchronizing the second BMC Flash data to the first BMC Flash according to the value of the upgrading flag bit, and clearing the upgrading flag bit;
after the starting fails, starting the BMC from the first BMC Flash;
and synchronizing the first BMC Flash data to the second BMC Flash, and resetting the upgrading flag bit.
2. The dual-BMC Flash optimized upgrading method according to claim 1, characterized in that after the verification is successful, the step of upgrading the second BMC Flash and setting an upgrade flag bit according to the received image file comprises:
reading out the second BMC Flash data by taking the sector as a unit; comparing the data to be written in the received mirror image file;
if the two sectors are the same, directly skipping the sector; judging whether all sectors are read completely, if not, continuing the next sector, and executing the following steps: reading out the second BMC Flash data by taking the sector as a unit; comparing the data to be written in the received mirror image file; if yes, ending;
if not, erasing the content of the sector and writing the data to be written, judging whether all the sectors are completely read, if not, continuing the next sector, and executing the following steps: reading out the second BMC Flash data by taking a sector as a unit; comparing the data to be written in the received mirror image file; if yes, the process is finished.
3. The dual-BMC Flash optimized upgrade method according to claim 2, wherein the step of starting the BMC from the second BMC Flash comprises:
the BMC is electrified to automatically load firmware and start a timer for setting first time;
if the BMC enters the u-boot within the timing range of the timer, resetting the timer in the u-boot, wherein the timing time is the second time;
if the BMC walks through the kernel partition of the operating system and enters the user space within the timing range of the timer, the timer is closed in the user space, and the normal starting of the BMC is indicated;
if the timer is overtime in any link, the BMC is failed to start, the BMC can be automatically switched to start from the first BMC Flash, and a position register is set to mark.
4. The dual-BMC Flash optimization upgrading method of claim 3, wherein after the start is successful, synchronizing the second BMC Flash data to the first BMC Flash according to the value of the upgrade flag bit, and the step of clearing the upgrade flag bit includes:
after the start is successful, reading an upgrading flag bit;
judging whether the upgrading flag bit is 1;
if so, synchronizing the second BMC Flash data to the first BMC Flash, and resetting the upgrading flag bit;
if not, ending.
5. The dual-BMC Flash optimized upgrading method of claim 4, characterized in that the step of synchronizing the second BMC Flash data to the first BMC Flash is synchronizing data of an initialization partition, an environment variable partition and a readable file system partition in the second BMC Flash to a corresponding partition of the first BMC Flash.
6. The dual-BMC Flash optimized upgrade method of claim 5, further comprising: the data synchronization method of the first BMC Flash and the second BMC Flash writable partition comprises the following steps:
erasing the writable partition data of the first BMC Flash/the second BMC Flash;
starting configuration synchronization to ensure that the first BMC Flash and the second BMC Flash are configured consistently;
mounting the writable partition to a directory and setting a real-time monitoring configuration file;
and copying the configuration file to a directory corresponding to the writable partition of the second BMC Flash/the first BMC Flash after monitoring the write-in completion signal.
7. The dual-BMC Flash optimization upgrade method of claim 6, wherein the step of receiving the image file and checking the received image file comprises:
triggering BMC firmware upgrading through a mirror image upgrading button, and uploading a mirror image file through a mirror image uploading button; or, sending a BMC firmware upgrading command and an image file from a UART or an OS.
8. A double-BMC Flash optimized upgrading device is characterized by comprising a user interface module, a BMC starting module, an erasing module, a synchronization module, a first BMC Flash serving as a main BMC Flash and a second BMC Flash serving as a standby BMC Flash;
triggering BMC firmware upgrading and uploading and checking a mirror image file through a user interface module;
the BMC starting module is used for starting the BMC, monitoring a starting process and handling the problem of starting failure; the BMC is started from the second BMC Flash after the upgrading is finished; after the starting fails, starting the BMC from the first BMC Flash;
the erasing module is used for performing the read-write function of the first BMC Flash data/the second BMC Flash according to the received image file to complete the upgrading of the BMC firmware;
and the synchronization module is used for synchronizing the data of the first BMC Flash and the data of the second BMC Flash.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores computer program instructions executable by at least one processor to enable the at least one processor to perform the dual BMC Flash optimized upgrade method of any of claims 1 to 7.
10. A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the dual BMC Flash upgrade method according to any one of claims 1 to 7.
CN202210899998.8A 2022-07-28 2022-07-28 double-BMC Flash optimization upgrading method, device, equipment and medium Pending CN115167903A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210899998.8A CN115167903A (en) 2022-07-28 2022-07-28 double-BMC Flash optimization upgrading method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210899998.8A CN115167903A (en) 2022-07-28 2022-07-28 double-BMC Flash optimization upgrading method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN115167903A true CN115167903A (en) 2022-10-11

Family

ID=83476878

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210899998.8A Pending CN115167903A (en) 2022-07-28 2022-07-28 double-BMC Flash optimization upgrading method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN115167903A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116302011A (en) * 2023-05-24 2023-06-23 广东电网有限责任公司佛山供电局 Firmware upgrading method for cable monitoring equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116302011A (en) * 2023-05-24 2023-06-23 广东电网有限责任公司佛山供电局 Firmware upgrading method for cable monitoring equipment
CN116302011B (en) * 2023-05-24 2023-08-18 广东电网有限责任公司佛山供电局 Firmware upgrading method for cable monitoring equipment

Similar Documents

Publication Publication Date Title
US8924778B2 (en) Method to synchronize a replacement controller's firmware version to the native configuration database version on a simplex array
CN101221508B (en) Equipment starting method and device
CN102023908A (en) Method and device for backing up boot program
CN111143132B (en) BIOS recovery method, device, equipment and readable storage medium
US8555012B2 (en) Data storage apparatus
CN107918568B (en) Method for preventing Linux system from failing to restart
WO2017080225A1 (en) Data partition recovery method and apparatus and terminal
CN105138433A (en) Backup method for UBIFS file system in embedded type Linux operating system
CN115167903A (en) double-BMC Flash optimization upgrading method, device, equipment and medium
CN110058973B (en) Test system and test method for data storage device
CN105718330A (en) Linux system backup data recovery method and device
CN111722960A (en) Starting method, system, equipment and medium under CMOS information abnormity
CN117931091B (en) Abnormal power failure processing method, device, equipment, medium and product
CN111240903A (en) Data recovery method and related equipment
CN113032023B (en) Electronic equipment processing method and device and electronic equipment
CN111158734A (en) Seamless upgrading method, system and equipment for CPLD-FPGA
CN111124752A (en) Backup power protection method and device for storage equipment
CN103019773A (en) System update power failure protection method and system, and mobile terminal
CN115562593A (en) Abnormal RAID member disk processing method, device and medium
CN110990191B (en) Data recovery method and system based on mirror image storage
CN115114094A (en) Method and system for realizing double backup and self recovery of FRU (field replaceable Unit) information of server
CN112199231A (en) CPLD fault detection and repair method and device
CN113672302A (en) Router starting method and device, router and storage medium
JP2003122644A (en) Computer and its storage device
JP4358943B2 (en) Automatic backup system and recording medium recording automatic backup program

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