CN116932006A - Firmware updating operation method and system of BMC - Google Patents

Firmware updating operation method and system of BMC Download PDF

Info

Publication number
CN116932006A
CN116932006A CN202311109220.3A CN202311109220A CN116932006A CN 116932006 A CN116932006 A CN 116932006A CN 202311109220 A CN202311109220 A CN 202311109220A CN 116932006 A CN116932006 A CN 116932006A
Authority
CN
China
Prior art keywords
firmware
bmc
preset
check
current
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
CN202311109220.3A
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.)
Hexin Technology Co ltd
Shanghai Hexin Digital Technology Co ltd
Original Assignee
Hexin Technology Co ltd
Shanghai Hexin Digital 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 Hexin Technology Co ltd, Shanghai Hexin Digital Technology Co ltd filed Critical Hexin Technology Co ltd
Priority to CN202311109220.3A priority Critical patent/CN116932006A/en
Publication of CN116932006A publication Critical patent/CN116932006A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • 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/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1004Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's to protect a block of data words, e.g. CRC or checksum
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The application discloses a firmware updating operation method and a system of a BMC, wherein the method comprises the steps of dividing a storage interval of a BMC firmware storage medium; when detecting a new firmware of a non-current version, updating an operation instruction by a user; the user updating operation instruction is determined according to BMC firmware updating requirements; reading a current starting mark of the BMC in the server, and determining a current running storage interval to obtain a first storage interval; updating and receiving new firmware through a preset receiving mode, and storing the new firmware into a second storage interval; performing functional characteristic verification on the new firmware according to preset cyclic redundancy verification or hash verification, and if the verification is passed, setting a current starting mark in a second storage interval; if the verification is not passed or the process of receiving the new firmware fails, setting a starting mark in a first storage interval; and running firmware of the BMC according to the starting mark of the BMC. The embodiment realizes the rapid updating of the BMC firmware, and improves the updating stability of the BMC firmware and the user experience.

Description

Firmware updating operation method and system of BMC
Technical Field
The application relates to the field of BMC firmware updating, in particular to a firmware updating operation method and system of BMC.
Background
In the use process of the server, the BMC (Baseboard Management Controller ) plays an important role, manages hardware on the server, monitors the running environment and the safety state of the server, is not only responsible for managing the hardware of the server, but also provides functions of remote access and managing the hardware of the server, BIOS upgrading and downgrading can be carried out on the server, the BMC is an embedded Linux system, and sometimes firmware of the BMC needs to be updated in order to obtain better experience, improved service and higher stability. If there is an update, there is a possibility that a fault will occur, for example, the update fails due to power failure in the update process, in this case, the BMC cannot work normally and the server cannot start normally because of a problem in the BMC firmware.
In the prior art, in order to recover the fault of the BMC, a chip burner is generally used for re-burning the firmware into the BMC, however, the method needs to disassemble the server, is very time-consuming and labor-consuming, is troublesome and complicated, and cannot normally use the BMC firmware after each upgrade, so that the updating stability of the BMC firmware is low. Meanwhile, the server cannot quickly complete BMC firmware update after not taking time-consuming repair work, so that the server cannot normally operate, normal business is blocked, and user experience is affected.
Disclosure of Invention
The application provides a firmware updating operation method and a system of a BMC, which realize the rapid updating of BMC firmware and improve the updating stability and user experience of the BMC firmware.
In order to solve the above technical problems, an embodiment of the present application provides a firmware update operation method of a BMC, including:
reading a current starting mark of the BMC in the server, and determining a current running storage interval according to the current starting mark to obtain a first storage interval;
receiving new firmware through a preset receiving mode, and storing the new firmware into a second storage interval;
according to a preset verification mode, verifying the functional characteristics of the new firmware, and if the verification is passed, setting a current starting mark in a second storage interval; the checking mode comprises at least one of cyclic redundancy check and hash check; if the verification is not passed or the process of receiving the new firmware fails, setting a starting mark in a first storage interval;
and running firmware of the BMC according to the starting mark of the BMC.
According to the embodiment of the application, the current starting mark of the BMC in the server is read, the current running storage interval (the first storage interval) is determined according to the current starting mark, the new firmware is updated and received through a preset receiving mode, the new firmware is stored into the non-current running storage interval (the second storage interval), after the BMC firmware is updated successfully and checked, the starting mark is set to the storage interval of the new firmware, the bootloader reads the starting mark when the BMC is restarted, the new firmware of the BMC can be directly operated according to the read starting mark, the starting mark read by the bootloader is still the old firmware when the process of receiving the new firmware fails (the BMC firmware is updated failed) or the check fails, and the old firmware can be started without dismantling the BMC to burn the BMC firmware again, so that an operating system can be started smoothly, the BMC can be updated and started quickly through the starting mark, the better user experience can be possessed, the BMC firmware can be updated stably under the condition that the BMC is not dismantled, and the updating stability of the BMC firmware can be improved.
As a preferred scheme, the new firmware is updated and received through a preset receiving mode, specifically:
starting a Bootloader of the BMC, initializing a Flash controller, and reading current firmware through the Flash controller;
if the current firmware is null, initializing an Ethernet controller, and receiving new firmware in the network through the Ethernet controller;
if the current firmware is not null, initializing an Ethernet controller, receiving new firmware in the network through the Ethernet controller, and updating the current firmware into the new firmware.
As a preferred scheme, according to a preset verification mode, the new firmware is subjected to functional characteristic verification, specifically:
when the preset checking mode is cyclic redundancy check, acquiring all data bytes of first preset checking data;
initializing a check variable and adding a first data byte to the check variable;
performing check transformation operation on each data byte according to a first preset rule to obtain each check data byte, and adding each check data byte into a check variable; wherein the verify transform operation includes a shift operation and an exclusive or operation
Dividing the value of the added check variable by a preset polynomial to obtain a first CRC check code;
and transmitting the first CRC check code and the first preset check data to the first receiver through the new firmware, enabling the first receiver to calculate the second CRC check code according to the preset polynomial and the first preset check data, comparing the first CRC check code with the second CRC check code, if the first CRC check code and the second CRC check code are equal, checking to pass, and if the first CRC check code and the second CRC check code are not equal, checking to fail.
By implementing the embodiment of the application, the cyclic redundancy check is carried out by a CRC check code mode, and the integrity degree and the correctness degree of the data in the BMC firmware are checked, so that the data integrity and the correctness are ensured.
As a preferred scheme, according to a preset verification mode, the new firmware is subjected to functional characteristic verification, specifically:
when the preset verification mode is hash verification, second preset verification data are obtained;
carrying out hash calculation on second preset check data according to a second preset rule to obtain a first hash value;
and transmitting the first hash value and second preset check data to a second receiver through the new firmware, enabling the second receiver to perform hash calculation on the second preset check data according to a second preset rule to obtain a second hash value, comparing the first hash value with the second hash value, if the first hash value and the second hash value are equal, checking to pass, and if the first hash value and the second hash value are not equal, checking to fail.
By implementing the embodiment of the application, the hash check is carried out through the hash calculation, so that the integrity and the correctness of the data after the BMC firmware is updated are ensured.
As a preferred scheme, according to the start flag of the BMC, the firmware of the BMC is operated, specifically:
when restarting the running BMC, reading a starting mark of the BMC, determining a storage interval corresponding to the read starting mark, and running firmware of the BMC in the storage interval corresponding to the starting mark.
Preferably, before reading the current start flag of the BMC, the method further includes:
dividing a storage interval of the BMC firmware storage medium;
when detecting a new firmware of a non-current version, responding to a user update operation instruction; the user updating operation instruction is determined according to BMC firmware updating requirements; the BMC firmware update requirement includes one of selecting the latest version of BMC firmware, selecting a history of a version of BMC firmware, and selecting a particular version of BMC firmware.
Preferably, the dividing the storage interval of the BMC firmware storage medium includes:
judging whether the number of BMC firmware storage media is 1 or not;
if not, correspondingly dividing different storage media into different storage sections;
if yes, the current storage medium is divided into a third storage interval, a fourth storage interval and a fifth storage interval according to the size of the BMC firmware and the storage space of the current storage medium.
In order to solve the same technical problem, the embodiment of the present application further provides a firmware update running system of a BMC, including: the method comprises the steps of reading a starting mark module, receiving a new firmware module, a verification module and an operation module;
the read starting mark module is used for reading a current starting mark of the BMC in the server, determining a current running storage interval according to the current starting mark, and obtaining a first storage interval;
the receiving new firmware module is used for updating and receiving new firmware through a preset receiving mode and storing the new firmware into the second storage interval;
the verification module is used for verifying the functional characteristics of the new firmware according to a preset verification mode, and if the verification is passed, the current starting mark is arranged in the second storage interval; the checking mode comprises at least one of cyclic redundancy check and hash check; if the verification is not passed or the process of receiving the new firmware fails, setting a starting mark in a first storage interval;
the running module is used for running firmware of the BMC according to the starting mark of the BMC.
The method comprises the steps that as a preferred scheme, a new firmware module is received, the new firmware module comprises an initialization Flash unit, a new firmware receiving unit and a firmware updating unit;
the initialization Flash unit is used for starting a Bootloader of the BMC, initializing a Flash controller and reading current firmware through the Flash controller;
the new firmware receiving unit is used for initializing the Ethernet controller if the current firmware is null, and receiving the new firmware in the network through the Ethernet controller;
and the firmware updating unit is used for initializing the Ethernet controller if the current firmware is not null, receiving new firmware in the network through the Ethernet controller, and updating the current firmware into the new firmware.
Preferably, the checking module comprises a cyclic redundancy checking unit;
the cyclic redundancy check unit is used for acquiring all data bytes of the first preset check data when the preset check mode is cyclic redundancy check; initializing a check variable and adding a first data byte to the check variable; performing check transformation operation on each data byte according to a first preset rule to obtain each check data byte, and adding each check data byte into a check variable; wherein the verify transform operation includes a shift operation and an exclusive or operation; dividing the value of the added check variable by a preset polynomial to obtain a first CRC check code; and transmitting the first CRC check code and the first preset check data to the first receiver through the new firmware, enabling the first receiver to calculate the second CRC check code according to the preset polynomial and the first preset check data, comparing the first CRC check code with the second CRC check code, if the first CRC check code and the second CRC check code are equal, checking to pass, and if the first CRC check code and the second CRC check code are not equal, checking to fail.
Drawings
Fig. 1: the application provides a flow diagram of one embodiment of a firmware update operation method of a BMC;
fig. 2: the application provides a simplified flow diagram of firmware update of one embodiment of a firmware update operation method of a BMC;
fig. 3: the application provides a flow diagram of one embodiment of a firmware update running system of a BMC.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Example 1
Referring to fig. 1, a flowchart of a firmware update operation method of a BMC according to an embodiment of the present application is shown. According to the embodiment, the BMC firmware is quickly updated and started through the starting mark, so that the updating stability of the BMC firmware and the user experience are improved. The firmware updating operation method of the BMC comprises steps 101 to 105, wherein the steps are specifically as follows:
step 101: dividing a storage interval of the BMC firmware storage medium; when detecting a new firmware of a non-current version, responding to a user update operation instruction; the user updating operation instruction is determined according to BMC firmware updating requirements; the BMC firmware update requirement includes one of selecting the latest version of BMC firmware, selecting a history of a version of BMC firmware, and selecting a particular version of BMC firmware.
It should be noted that, baseboard Management Controller (BMC), a baseboard management controller, is used to manage hardware on a server, and can perform a series of operations such as firmware upgrade and checking of a machine device when the machine is not powered on, and also provides a function of remotely managing hardware of the server. The main function of Firmware (Firmware) is to provide the lowest, most direct hardware setup and control for the computer, and in addition, the Firmware is responsible for initializing some necessary hardware, and at the same time providing some system parameters to the operating system, guiding the operating system to boot up.
Optionally, step 101 specifically includes steps 1011 to 1012, each of which specifically includes the following steps:
step 1011: judging whether the number of BMC firmware storage media is 1 or not; if not, correspondingly dividing different storage media into different storage sections; if yes, the current storage medium is divided into a third storage interval, a fourth storage interval and a fifth storage interval according to the size of the BMC firmware and the storage space of the current storage medium.
In this embodiment, the storage medium of the BMC firmware is generally Flash, and if there are multiple storage media in the BMC firmware, each storage medium is a storage interval, for example: if the BMC firmware only has 1 storage medium, the storage medium is divided according to the size of the firmware and the storage space of the storage medium, three sections are divided in the storage medium of the BMC firmware, two sections A (third storage section) and B (fourth storage section) are used for storing the firmware, and the other section C (fifth storage section) stores other information such as a start-up flag.
As an example of this embodiment, when the number of BMC firmware storage media is only 1, assuming that the size of the BMC firmware is size, the storage space of Flash is at least 2×size+16,0 to (size-1) is area a, size to (2×size-1) is area B, the remaining 16 bytes are area C, and the area C stores other information such as a start flag. In the process of updating the firmware, the initial state is assumed, the firmware operated by the BMC is stored in the A section, when the firmware needs to be updated, the firmware is updated to the B section instead of directly covering the A section, so that the old firmware of the A section is not damaged when the updating fails, when the updating succeeds, a starting mark is set to the B section, so that the new firmware of the B section is operated when the restarting is performed, when the updating fails, such as failure caused by power failure, the starting mark is still the A section, and the firmware of the A section is still operated when the restarting is performed.
Step 1012: when detecting a new firmware of a non-current version, responding to a user update operation instruction; the user updating operation instruction is determined according to BMC firmware updating requirements; the BMC firmware update requirement includes one of selecting the latest version of BMC firmware, selecting a history of a version of BMC firmware, and selecting a particular version of BMC firmware.
In this embodiment, when the BMC detects that there is a new firmware, the user may select a different version of the BMC firmware to update the BMC, or when the user wants to burn a specific version of the BMC firmware, the user may also update the BMC firmware, so that the user update operation instruction is determined according to the BMC firmware update requirement, and the next firmware update operation is performed in response to the user update operation instruction.
Step 102: the method comprises the steps of reading a current starting mark of the BMC in a server, and determining a current running storage interval according to the current starting mark to obtain a first storage interval.
In this embodiment, as shown in fig. 2, the simplified flow of firmware update is that the stored start flag is read to determine which storage interval to start from currently, i.e. start from zone a or from zone B, so as to store new firmware into another storage interval without covering the currently started storage interval when updating firmware later.
Step 103: updating and receiving new firmware through a preset receiving mode, and storing the new firmware into a second storage interval;
optionally, the second storage section is a storage section that is determined according to the first storage section (a storage section that is currently running), and is not currently running.
Optionally, the new firmware is updated and received through a preset receiving mode, which specifically includes:
starting a Bootloader of the BMC, initializing a Flash controller, and reading current firmware through the Flash controller;
if the current firmware is null, initializing an Ethernet controller, and receiving new firmware in the network through the Ethernet controller;
if the current firmware is not null, initializing an Ethernet controller, receiving new firmware in the network through the Ethernet controller, and updating the current firmware into the new firmware.
In this embodiment, after Bootloader of the BMC is started, the Flash controller is initialized, then the BMC firmware is read from the Flash, if no firmware exists on the Flash, the ethernet controller is initialized, the BMC firmware (new firmware) is received from the network, and is stored in the corresponding storage space.
Step 104: according to a preset verification mode, verifying the functional characteristics of the new firmware, and if the verification is passed, setting a current starting mark in a second storage interval; the checking mode comprises at least one of cyclic redundancy check and hash check; if the verification is not passed or the process of receiving the new firmware fails, setting a start-up flag in the first storage interval.
In the embodiment, in the updating process, the integrity and the correctness (such as hash check, cyclic redundancy check and the like) of the BMC firmware are checked, and if the verification is passed, the success of the updating is indicated, and then the storage interval of the new firmware to which the start mark is stored is updated; if the verification is not passed, the start flag is not updated. In particular, when the process of receiving the new firmware fails (such as power failure, network interruption, flash controller failure, ethernet failure, etc. in the process of updating), the start-up flag is not updated.
Optionally, when the preset checking mode is cyclic redundancy check, checking the integrity and correctness of the BMC firmware through Cyclic Redundancy Check (CRC), specifically including steps S1 to S5, where each step specifically includes:
s1, acquiring all data bytes of first preset check data.
S2, initializing a check variable, and adding a first data byte into the check variable;
in this embodiment, the check variable is initialized, i.e. a variable with an initial value of 0 is defined, and the first data byte is added to the check variable.
S3, performing check transformation operation on each data byte according to a first preset rule to obtain each check data byte, and adding each check data byte into a check variable; wherein the verify transform operation includes a shift operation and an exclusive or operation.
In this embodiment, for each data byte, it is shifted and exclusive-ored according to a certain rule (first preset rule), and then added to the check variable.
And S4, dividing the value of the check variable after the addition is completed by a preset polynomial to obtain a first CRC code.
In this embodiment, the predetermined polynomial is a suitable polynomial such as CRC-32. Dividing the value of the added check variable by a preset polynomial to obtain a remainder, namely a CRC check code (first CRC check code).
S5, transmitting the first CRC check code and the first preset check data to the first receiver through the new firmware, enabling the first receiver to calculate the second CRC check code according to the preset polynomial and the first preset check data, comparing the first CRC check code with the second CRC check code, if the first CRC check code and the second CRC check code are equal, checking to pass, and if the first CRC check code and the second CRC check code are not equal, checking to fail.
In this embodiment, the new firmware is used to transmit the first CRC check code together with the preset check data, the receiver calculates the CRC check code (the second CRC check code) according to the same polynomial, compares the CRC check code with the received CRC check code (the first CRC check code), and if the CRC check codes are equal, the check is passed, which indicates that the integrity and correctness of the data are ensured, and if the CRC check codes are not equal, the check is failed, which indicates that the data are incomplete or incorrect.
By implementing the embodiment of the application, the cyclic redundancy check is carried out by a CRC check code mode, and the integrity degree and the correctness degree of the data in the BMC firmware are checked, so that the data integrity and the correctness are ensured.
Optionally, when the preset verification mode is hash verification, obtaining second preset verification data;
carrying out hash calculation on second preset check data according to a second preset rule to obtain a first hash value;
and transmitting the first hash value and second preset check data to a second receiver through the new firmware, enabling the second receiver to perform hash calculation on the second preset check data according to a second preset rule to obtain a second hash value, comparing the first hash value with the second hash value, if the first hash value and the second hash value are equal, checking to pass, and if the first hash value and the second hash value are not equal, checking to fail.
In this embodiment, the specific implementation flow of checking the integrity and correctness of the BMC firmware through Hash check (Hash Algorithm) is as follows: (1) selecting a hash algorithm, such as: SHA-256 hash algorithm; (2) And carrying out hash calculation on preset check data according to a certain rule (preset rule) to obtain a hash value (first hash value) with a fixed length. (3) And transmitting the first hash value and preset check data together. (4) The receiving party calculates the hash value (second hash value) according to the same method, compares the hash value with the received first hash value, if the hash value is equal, the verification is passed, the integrity and the correctness of the data are ensured, and if the hash value is not equal, the verification is not passed, and the data are incomplete or incorrect.
By implementing the embodiment of the application, the hash check is carried out through the hash calculation, so that the integrity and the correctness of the data after the BMC firmware is updated are ensured.
Step 105: and running firmware of the BMC according to the starting mark of the BMC.
Optionally, step 105 specifically includes: when restarting the running BMC, reading a starting mark of the BMC, determining a storage interval corresponding to the read starting mark, and running firmware of the BMC in the storage interval corresponding to the starting mark.
According to the embodiment of the application, the current starting mark of the BMC in the server is read, the current running storage interval (the first storage interval) is determined according to the current starting mark, the new firmware is updated and received through a preset receiving mode, the new firmware is stored into the non-current running storage interval (the second storage interval), after the BMC firmware is updated successfully and checked, the starting mark is set to the storage interval of the new firmware, the bootloader reads the starting mark when the BMC is restarted, the new firmware of the BMC can be directly operated according to the read starting mark, after the BMC firmware fails to update or fails to check, the storage interval of the starting mark is not changed, the starting mark read by the bootloader is still the old firmware, and the old firmware can be started without disassembling the BMC, so that an operating system can be started smoothly, the BMC firmware is updated and started quickly through the starting mark, better user experience is possessed, the BMC firmware is updated stably under the condition of not disassembling the BMC, and the firmware updating stability is improved.
Example two
Accordingly, referring to fig. 3, fig. 3 is a schematic structural diagram of a second embodiment of a firmware update running system of a BMC according to the present application. As shown in fig. 3, the firmware update operation system of the BMC includes an interval dividing module 300, a response module 301, a read start flag module 302, a new firmware receiving module 303, a verification module 304, and an operation module 305;
the interval division module 300 is used for dividing storage intervals of the BMC firmware storage medium;
the section dividing module 300 includes a judging unit 3001, a first dividing unit 3002, and a second dividing unit 3003;
the judging unit 3001 is configured to judge whether the number of BMC firmware storage mediums is 1;
the first dividing unit 3002 is configured to correspondingly divide different storage media into different storage intervals if the number of BMC firmware storage media is not 1;
the second dividing unit 3003 is configured to divide the current storage medium into a third storage interval, a fourth storage interval, and a fifth storage interval according to the size of the BMC firmware and the storage space of the current storage medium if the number of BMC firmware storage mediums is 1.
The response module 301 is configured to respond to a user update operation instruction when detecting a new firmware that is not the current version; the user updating operation instruction is determined according to BMC firmware updating requirements; the BMC firmware update requirement includes one of selecting the latest version of BMC firmware, selecting a history of a version of BMC firmware, and selecting a particular version of BMC firmware.
The read start flag module 302 is configured to read a current start flag of a BMC in a server, and determine a current running storage interval according to the current start flag, so as to obtain a first storage interval;
the new firmware receiving module 303 is configured to update and receive new firmware according to a preset receiving manner, and store the new firmware into the second storage interval;
the new firmware module 303 includes an initialization Flash unit 3031, a new firmware receiving unit 3032, and a firmware updating unit 3033;
the initialization Flash unit 3031 is used for starting a Bootloader of the BMC, initializing a Flash controller and reading current firmware through the Flash controller;
the new firmware receiving unit 3032 is configured to initialize the ethernet controller if the current firmware is null, and receive the new firmware in the network through the ethernet controller;
the firmware updating unit 3033 is configured to initialize the ethernet controller if the current firmware is not null, receive the new firmware in the network through the ethernet controller, and update the current firmware to the new firmware.
The verification module 304 is configured to verify the functional characteristics of the new firmware according to a preset verification manner, and if the verification is passed, set the current start-up flag in the second storage interval; the checking mode comprises at least one of cyclic redundancy check and hash check; if the verification is not passed or the process of receiving the new firmware fails, setting a starting mark in a first storage interval;
the check module 304 includes a cyclic redundancy check unit 3041 and a hash check unit 3042;
the cyclic redundancy check unit 3041 is configured to obtain all data bytes of the first preset check data when the preset check mode is cyclic redundancy check; initializing a check variable and adding a first data byte to the check variable; performing check transformation operation on each data byte according to a first preset rule to obtain each check data byte, and adding each check data byte into a check variable; wherein the verify transform operation includes a shift operation and an exclusive or operation; dividing the value of the added check variable by a preset polynomial to obtain a first CRC check code; and transmitting the first CRC check code and the first preset check data to the first receiver through the new firmware, enabling the first receiver to calculate the second CRC check code according to the preset polynomial and the first preset check data, comparing the first CRC check code with the second CRC check code, if the first CRC check code and the second CRC check code are equal, checking to pass, and if the first CRC check code and the second CRC check code are not equal, checking to fail.
The hash check unit 3042 is configured to obtain second preset check data when the preset check mode is hash check; carrying out hash calculation on second preset check data according to a second preset rule to obtain a first hash value; and transmitting the first hash value and second preset check data to a second receiver through the new firmware, enabling the second receiver to perform hash calculation on the second preset check data according to a second preset rule to obtain a second hash value, comparing the first hash value with the second hash value, if the first hash value and the second hash value are equal, checking to pass, and if the first hash value and the second hash value are not equal, checking to fail.
The running module 305 is configured to run firmware of the BMC according to the start flag of the BMC.
The operation module 305 includes an operation unit 3051;
the operation unit 3051 is configured to read a start flag of the BMC when the BMC is restarted, determine a storage interval corresponding to the read start flag, and operate firmware of the BMC in the storage interval corresponding to the start flag.
By implementing the embodiment of the application, the firmware updating method for the BMC can improve the stability of updating the BMC firmware, stably upgrade the BMC firmware under the condition of not disassembling the BMC firmware, directly operate the new firmware of the BMC after the BMC firmware is updated successfully, start the old firmware after the BMC firmware is updated successfully, and avoid the need of disassembling the BMC firmware to burn again, thereby smoothly starting the operating system with better experience and higher stability.
In addition, the embodiment of the application also provides a computer device, which comprises a processor and a memory, wherein the memory is used for storing a computer program, and the computer program is executed by the processor to realize the steps in any of the method embodiments.
The embodiment of the application also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program realizes the steps in any of the method embodiments when being executed by a processor.
The firmware update operation system of the BMC can implement the firmware update operation method of the BMC in the embodiment of the method. The options in the method embodiments described above are also applicable to this embodiment and will not be described in detail here. The rest of the embodiments of the present application may refer to the content of the above method embodiments, and in this embodiment, no further description is given.
The foregoing embodiments have been provided for the purpose of illustrating the general principles of the present application, and are not to be construed as limiting the scope of the application. It should be noted that any modifications, equivalent substitutions, improvements, etc. made by those skilled in the art without departing from the spirit and principles of the present application are intended to be included in the scope of the present application.

Claims (10)

1. A firmware update operation method of a BMC, comprising:
reading a current starting mark of the BMC in the server, and determining a current running storage interval according to the current starting mark to obtain a first storage interval;
receiving new firmware through a preset receiving mode, and storing the new firmware into a second storage interval;
according to a preset verification mode, verifying the functional characteristics of the new firmware, and if the verification is passed, setting the current starting mark in the second storage interval; wherein the checking mode comprises at least one of cyclic redundancy check and hash check; if the verification is not passed or the process of receiving the new firmware fails, setting the starting mark in the first storage interval;
and running firmware of the BMC according to the starting mark of the BMC.
2. The method for updating and running the firmware of the BMC according to claim 1, wherein the updating and receiving the new firmware by a preset receiving mode comprises:
starting a Bootloader of the BMC, initializing a Flash controller, and reading current firmware through the Flash controller;
if the current firmware is null, initializing an Ethernet controller, and receiving the new firmware in a network through the Ethernet controller;
and if the current firmware is not the null value, initializing the Ethernet controller, receiving the new firmware in a network through the Ethernet controller, and updating the current firmware into the new firmware.
3. The method for updating and running the firmware of the BMC according to claim 1, wherein the verifying the functional characteristics of the new firmware according to a preset verification mode specifically comprises:
when the preset checking mode is the cyclic redundancy check, acquiring all data bytes of first preset checking data;
initializing a check variable and adding a first data byte to the check variable;
performing a check transformation operation on each data byte according to a first preset rule to obtain each check data byte, and adding each check data byte into the check variable; wherein the verify transform operation includes a shift operation and an exclusive or operation
Dividing the value of the added check variable by a preset polynomial to obtain a first CRC check code;
and transmitting the first CRC check code and the first preset check data to a first receiver through the new firmware, enabling the first receiver to calculate a second CRC check code according to the preset polynomial and the first preset check data, comparing the first CRC check code with the second CRC check code, if the first CRC check code and the second CRC check code are equal, checking to pass, and if the first CRC check code and the first preset check data are not equal, checking to fail.
4. The method for updating and running the firmware of the BMC according to claim 1, wherein the verifying the functional characteristics of the new firmware according to a preset verification mode specifically comprises:
when the preset verification mode is the hash verification, second preset verification data are obtained;
carrying out hash calculation on the second preset check data according to a second preset rule to obtain a first hash value;
and transmitting the first hash value and the second preset check data to a second receiver through the new firmware, enabling the second receiver to perform hash calculation on the second preset check data according to the second preset rule to obtain a second hash value, comparing the first hash value with the second hash value, if the first hash value and the second hash value are equal, checking to pass, and if the first hash value and the second hash value are not equal, checking to fail.
5. The method for updating and running firmware of the BMC according to claim 1, wherein the running firmware of the BMC according to the start flag of the BMC specifically comprises:
when restarting the BMC, reading a starting mark of the BMC, determining a storage interval corresponding to the read starting mark, and running firmware of the BMC in the storage interval corresponding to the starting mark.
6. The method for firmware update operation of a BMC according to claim 1, further comprising, before said reading a current start flag of the BMC:
dividing a storage interval of the BMC firmware storage medium;
when detecting a new firmware of a non-current version, responding to a user update operation instruction; the user updating operation instruction is determined according to BMC firmware updating requirements; the BMC firmware update requirement includes one of selecting the latest version of BMC firmware, selecting a history of a version of BMC firmware, and selecting a particular version of BMC firmware.
7. The method for firmware update operation of the BMC as claimed in claim 6, wherein the dividing the BMC firmware storage medium into storage intervals comprises:
judging whether the number of the BMC firmware storage media is 1 or not;
if not, correspondingly dividing different storage media into different storage sections;
if yes, dividing the current storage medium into a third storage interval, a fourth storage interval and a fifth storage interval according to the size of the BMC firmware and the storage space of the current storage medium.
8. A firmware update execution system of a BMC, comprising: the method comprises the steps of reading a starting mark module, receiving a new firmware module, a verification module and an operation module;
the read starting mark module is used for reading a current starting mark of the BMC in the server, determining a current running storage interval according to the current starting mark and obtaining a first storage interval;
the new firmware receiving module is used for receiving new firmware through a preset receiving mode and storing the new firmware into a second storage interval;
the verification module is used for verifying the functional characteristics of the new firmware according to a preset verification mode, and if the verification is passed, the current starting mark is arranged in the second storage section; wherein the checking mode comprises at least one of cyclic redundancy check and hash check; if the verification is not passed or the process of receiving the new firmware fails, setting the starting mark in the first storage interval;
and the running module is used for running firmware of the BMC according to the starting mark of the BMC.
9. The firmware update running system of the BMC of claim 8, wherein the receiving a new firmware module comprises initializing a Flash unit, a new firmware receiving unit, and a firmware updating unit;
the initialization Flash unit is used for starting a Bootloader of the BMC, initializing a Flash controller and reading current firmware through the Flash controller;
the new firmware receiving unit is used for initializing an Ethernet controller if the current firmware is null, and receiving the new firmware in a network through the Ethernet controller;
and the firmware updating unit is used for initializing the Ethernet controller if the current firmware is not the null value, receiving the new firmware in a network through the Ethernet controller, and updating the current firmware into the new firmware.
10. The firmware update running system of the BMC of claim 8, wherein the check module comprises a cyclic redundancy check unit;
the cyclic redundancy check unit is used for acquiring all data bytes of first preset check data when the preset check mode is the cyclic redundancy check; initializing a check variable and adding a first data byte to the check variable; performing a check transformation operation on each data byte according to a first preset rule to obtain each check data byte, and adding each check data byte into the check variable; wherein the check transformation operation includes a shift operation and an exclusive or operation; dividing the value of the added check variable by a preset polynomial to obtain a first CRC check code; and transmitting the first CRC check code and the first preset check data to a first receiver through the new firmware, enabling the first receiver to calculate a second CRC check code according to the preset polynomial and the first preset check data, comparing the first CRC check code with the second CRC check code, if the first CRC check code and the second CRC check code are equal, checking to pass, and if the first CRC check code and the first preset check data are not equal, checking to fail.
CN202311109220.3A 2023-08-30 2023-08-30 Firmware updating operation method and system of BMC Pending CN116932006A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311109220.3A CN116932006A (en) 2023-08-30 2023-08-30 Firmware updating operation method and system of BMC

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311109220.3A CN116932006A (en) 2023-08-30 2023-08-30 Firmware updating operation method and system of BMC

Publications (1)

Publication Number Publication Date
CN116932006A true CN116932006A (en) 2023-10-24

Family

ID=88379257

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311109220.3A Pending CN116932006A (en) 2023-08-30 2023-08-30 Firmware updating operation method and system of BMC

Country Status (1)

Country Link
CN (1) CN116932006A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190079748A1 (en) * 2017-09-12 2019-03-14 Mitac Computing Technology Corporation Server with double-firmware storage space and firmware update method therefor
CN111324366A (en) * 2020-02-14 2020-06-23 苏州浪潮智能科技有限公司 BMC (baseboard management controller) starting firmware rollback method and device, BMC and storage medium
CN116301963A (en) * 2023-01-09 2023-06-23 上海加糖科技有限公司 Upgrading method, device, equipment and storage medium of system firmware

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190079748A1 (en) * 2017-09-12 2019-03-14 Mitac Computing Technology Corporation Server with double-firmware storage space and firmware update method therefor
CN111324366A (en) * 2020-02-14 2020-06-23 苏州浪潮智能科技有限公司 BMC (baseboard management controller) starting firmware rollback method and device, BMC and storage medium
CN116301963A (en) * 2023-01-09 2023-06-23 上海加糖科技有限公司 Upgrading method, device, equipment and storage medium of system firmware

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
温子祺等: "《ARM Cortex-M4 微控制器原理与实践》", 29 February 2016, 北京航空航天大学出版社, pages: 304 - 309 *
陈泽茂等: "《信息系统安全》", 30 April 2014, 武汉大学出版社, pages: 237 - 239 *

Similar Documents

Publication Publication Date Title
CN102023908B (en) Method and device for backing up boot program
US11163886B2 (en) Information handling system firmware bit error detection and correction
CN107220141B (en) Data file checking method and device
CN102667716A (en) Methods and devices for updating firmware of a component using a firmware update application
CN107315616B (en) Firmware loading method and device and electronic equipment
EP3268893B1 (en) Firmware map data
US7320087B2 (en) Information processing apparatus and method, program, and recording medium
CN111813428A (en) Method and device for upgrading terminal firmware, electronic equipment and storage medium
WO2020199027A1 (en) Method for starting system, electronic device, and machine readable storage medium
CN106897166B (en) Mobile terminal and repairing method thereof
CN105354063A (en) Online program upgrading method and system
TWI778811B (en) Method for upgrade, computer system and remote upgrade equipment
CN114356361A (en) Embedded system and method for controlling nonvolatile memory
CN101807152A (en) Basic output and input system for self verification of selection read only memory and verification method thereof
CN114840242A (en) System upgrading method and device of electronic equipment and readable storage medium
CN118151977B (en) Firmware upgrading method and system of controller chip
CN105677409A (en) System upgrading method and device
CN105183580A (en) Storage method and fault recovery method for bootstrap program, and devices
CN112015447A (en) System updating method and device for electronic equipment, electronic equipment and storage medium
CN111459496B (en) Method for generating tamper-proof program file and method for upgrading equipment
CN116932006A (en) Firmware updating operation method and system of BMC
CN116048581A (en) Application updating method and device, electronic equipment and computer readable storage medium
CN113377425B (en) BMC firmware generation method and device, BMC starting method and device and storage medium
CN112230967B (en) Optical module firmware rollback online upgrading method based on traditional partition
US9529581B2 (en) Circuit and method for writing program codes of basic input/output system

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