A firmware upgrade method, device, equipment, and storage medium

By using a memory card to save the firmware version number and verification value in the substrate management controller, it is possible to automatically judge and upgrade the firmware without affecting the service, solving the problem of firmware damage in the existing technology that needs to be shut down and upgraded, reducing maintenance costs and improving server reliability.

CN115048147BActive Publication Date: 2025-06-24INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210587092.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-27
Publication Date
2025-06-24
Estimated Expiration
2042-05-27

AI Technical Summary

Technical Problem

When the firmware on the server is damaged, the customer's business needs to be stopped for upgrading, resulting in loss of time and benefits, and the maintenance and labor costs are high.

Method used

By using the memory card to save the version number and verification value of each firmware in the substrate management controller, when the controller is started, the verification value of the current firmware file is automatically compared with the standard verification value in the memory card, to determine whether an upgrade is needed, and to automatically upgrade the firmware without affecting the service.

Benefits of technology

It realizes automatic firmware upgrade without stopping customer business, reduces maintenance costs and labor costs, and improves server reliability and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115048147B_ABST
    Figure CN115048147B_ABST
Patent Text Reader

Abstract

The present application discloses a firmware upgrade method, apparatus, device, and medium, relating to the field of computer technologies, including: when starting the baseboard management controller, comparing the check value of the first firmware file of the target firmware with the check value of the second firmware file of the target firmware to obtain a corresponding check value comparison result; the first firmware file is the firmware file of the target file currently in use, and the second firmware file is the firmware file that is pre-stored in the memory card and has the same version number as the first firmware file; determining whether the first firmware file is normal based on the check value comparison result; if the first firmware file is not normal, initiating an upgrade task for upgrading the target firmware within a preset time period to complete the upgrade of the target firmware. By comparing the check value of the first firmware file of the firmware with the check value of the corresponding second firmware file of the firmware, it can be determined whether a firmware upgrade activity is required, reducing maintenance costs and human and material resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technologies, and particularly to a firmware upgrade method, apparatus, device, and storage medium. Background Art

[0002] Currently, there are a large number of firmwares involved in servers, including BMC (Baseboard Management Controller), BIOS (Basic Input Output System), motherboard CPLD (Complex Programmable Logic Device), backplane CPLD, PSU (Power Supply Unit), network cards, etc. The BMC can support out-of-band refresh functions. However, with the operation of the server and problems such as the aging and upgrading of various firmwares, the firmwares of each module may be damaged. Existing solutions often stop the services on the customer's server and restore them by out-of-band upgrading through the BMC or by burning the ROM with a burner. This solution often sacrifices the customer's time and interests, which is not worth the loss.

[0003] In summary, how to achieve firmware upgrade without affecting the customer's services on the server and reduce maintenance costs and labor costs is a technical problem to be solved in this field. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to provide a firmware upgrade method, apparatus, device, and storage medium, which can achieve firmware upgrade without affecting the customer's services on the server and reduce maintenance costs and labor costs. The specific solutions are as follows:

[0005] In a first aspect, the present application discloses a firmware upgrade method applied to a baseboard management controller, including:

[0006] When starting the baseboard management controller, compare the check value of the first firmware file of the target firmware with the check value of the second firmware file of the target firmware to obtain a corresponding check value comparison result; the first firmware file is the firmware file of the target file currently in use, and the second firmware file is the firmware file that is pre-stored in the memory card and has the same version number as the first firmware file;

[0007] Judge whether the first firmware file is normal based on the check value comparison result;

[0008] If the first firmware file is not normal, initiate an upgrade task for upgrading the target firmware within a preset time period to complete the upgrade of the target firmware.

[0009] Optionally, before comparing the check value of the first firmware file of the target firmware with the check value of the second firmware file of the target firmware to obtain a corresponding check value comparison result, the method further includes:

[0010] Generating check values of firmware files for different version numbers of each firmware based on a preset check value generation algorithm, and backing up the version numbers of each firmware and the corresponding check values of the second firmware files to the memory card.

[0011] Optionally, comparing the check value of the first firmware file of the target firmware with the check value of the second firmware file of the target firmware to obtain a corresponding check value comparison result includes:

[0012] Comparing the check value of the first firmware file of the target firmware with the check value of the second firmware file of the target firmware, and determining whether the check value of the first firmware file is consistent with the check value of the second firmware file;

[0013] Correspondingly, determining whether the first firmware file is normal based on the check value comparison result includes:

[0014] If the check value of the first firmware file is consistent with the check value of the second firmware file, the first firmware file is normal;

[0015] If the check value of the first firmware file is inconsistent with the check value of the second firmware file, the first firmware file is abnormal.

[0016] Optionally, if the first firmware file is abnormal, initiating an upgrade task for the target firmware within a preset time period to complete the upgrade of the target firmware includes:

[0017] If the first firmware file is abnormal, generating an event log and notifying the client;

[0018] Initiating an upgrade task for the target firmware within a preset time period to complete the upgrade of the target firmware and recording a corresponding upgrade success log.

[0019] Optionally, initiating an upgrade task for the target firmware within a preset time period to complete the upgrade of the target firmware includes:

[0020] Initiating an upgrade task for the target firmware within a preset time period to complete the upgrade of the target firmware and re-backing up the check value of the second firmware file corresponding to the version number of the target firmware to the memory card.

[0021] Optionally, the firmware upgrade method further includes:

[0022] If the client initiates an operation to upgrade the target firmware, an upgrade task for upgrading the target firmware is triggered, and the upgrade of the target firmware is completed.

[0023] Optionally, the triggering of the upgrade task for upgrading the target firmware and the completion of the upgrade of the target firmware include:

[0024] If the client initiates an operation to upgrade the target firmware, an upgrade task for upgrading the target firmware is triggered, and the version number of the target firmware and the check value of the corresponding second firmware file are recorded, and the upgrade of the target firmware is completed.

[0025] In a second aspect, the present application discloses a firmware upgrade device applied to a baseboard management controller, including:

[0026] A result generation module, configured to compare the check value of the first firmware file of the target firmware with the check value of the second firmware file of the target firmware when the baseboard management controller is started, so as to obtain a corresponding check value comparison result; the first firmware file is the firmware file of the target file currently in use, and the second firmware file is the firmware file pre-stored in the memory card and having the same version number as the first firmware file;

[0027] A judgment module, configured to judge whether the first firmware file is normal based on the check value comparison result;

[0028] A firmware upgrade module, configured to initiate an upgrade task for upgrading the target firmware within a preset time period if the first firmware file is abnormal, and complete the upgrade of the target firmware.

[0029] In a third aspect, the present application discloses an electronic device, including:

[0030] A memory, configured to store a computer program;

[0031] A processor, configured to execute the computer program to implement the steps of the firmware upgrade method disclosed above.

[0032] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the firmware upgrade method disclosed above are implemented.

[0033] It can be seen that the present application discloses a firmware upgrade method applied to a baseboard management controller, including: when starting the baseboard management controller, comparing the check value of the first firmware file of the target firmware with the check value of the second firmware file of the target firmware to obtain a corresponding check value comparison result; the first firmware file is the firmware file of the target file currently in use, and the second firmware file is the firmware file that is pre-stored in a memory card and has the same version number as the first firmware file; judging whether the first firmware file is normal based on the check value comparison result; if the first firmware file is not normal, initiating an upgrade task for the target firmware within a preset time period to complete the upgrade of the target firmware. Thus, by adding a memory card designed in the present application and storing the check values and version numbers of the second firmware files of all firmwares correspondingly in the memory card, when starting the baseboard management controller each time, it is only necessary to compare the check value of the first firmware file of the firmware with the check value of the corresponding second firmware file of the firmware to automatically judge whether it is necessary to perform a firmware upgrade activity, without stopping the customer's business on the server, and greatly reducing the maintenance cost and human and material resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on the provided drawings without creative efforts.

[0035] Figure 1 It is a flowchart of a firmware upgrade method disclosed in the present application;

[0036] Figure 2 It is a flowchart of a specific firmware upgrade method disclosed in the present application;

[0037] Figure 3 It is a flowchart of another specific firmware upgrade method disclosed in the present application;

[0038] Figure 4 It is a flowchart of a reliable backup and upgrade firmware of BMC disclosed in the present application;

[0039] Figure 5 It is a schematic structural diagram of a firmware upgrade device disclosed in the present application;

[0040] Figure 6 It is a structural diagram of an electronic device disclosed in the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0041] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0042] Currently, there are a large number of firmware involved on the server, including BMC, BIOS, motherboard CPLD, backplane CPLD, PSU, network card, etc. The BMC can support the out-of-band refresh function. However, with the operation of the server and the aging and upgrading of various firmware, the firmware of each module may be damaged. The existing solutions often stop the business on the customer's server and restore it by upgrading the BMC out-of-band or burning the ROM through a burner. This solution often sacrifices the customer's time and interests, which is not worth the loss.

[0043] Therefore, the present application discloses a firmware upgrade solution that can achieve firmware upgrade without affecting the customer's business on the server, reducing maintenance costs and labor costs.

[0044] Refer to Figure 1 As shown, an embodiment of the present invention discloses a firmware upgrade method applied to a baseboard management controller, including:

[0045] Step S11: When starting the baseboard management controller, compare the check value of the first firmware file of the target firmware with the check value of the second firmware file of the target firmware to obtain a corresponding check value comparison result; the first firmware file is the firmware file of the target file currently in use, and the second firmware file is the firmware file that is pre-stored in the memory card and has the same version number as the first firmware file.

[0046] In this embodiment, when starting the baseboard management controller, since the BMC will default to generate the FW check value of each firmware and compare the FW check value with the standard FW check value pre-stored in the TF card (Trans-flash Card), and obtain a corresponding check value comparison result. It can be understood that by saving the version number of each firmware and the corresponding standard FW check value in the TF card, and the TF card has the characteristics of small volume and large capacity. Physically, adding a new TF card to the original system will not overly affect the layout of each original firmware.

[0047] In this embodiment, if the detection of problems with the target firmware and its upgrade are not initiated by the BMC but by the client, an upgrade task for the target firmware is triggered to complete the upgrade of the target firmware. It can be understood that as new versions of firmware are generated for each firmware at regular intervals, even if the current target firmware is not damaged, when the user believes that the version of the current target firmware is too low and wants to upgrade and update the current target firmware, an operation to upgrade the target firmware is initiated on the client, thereby triggering the upgrade task for the target firmware, and the version number of the target firmware and the check value of the corresponding second firmware file are recorded to complete the upgrade of the target firmware. For example: The version number of the network card on the current server is 1.0. When monitoring the server, since the monitoring module of the server detects that there is already a network card with version 1.1, according to the pre-set upgrade prompt instruction, the user is prompted through the corresponding display device. When the user receives the corresponding prompt, the user believes it is necessary to update the network card accordingly. Therefore, the user initiates an operation to update the network card on the server, and the corresponding BMC triggers the upgrade task for the network card with version 1.1 and records the version number 1.1 of the network card upgraded this time and the check value of the corresponding fw file on the TF card to complete the upgrade of the network card this time. It should be noted that since the user manually upgrades some firmware on the server this time, the check value of the second firmware file of the target firmware with the corresponding version number may not be pre-saved in the TF card. Therefore, each time the user manually initiates an upgrade of the target firmware, the version number of the target firmware upgraded this time and the check value of the corresponding second firmware file need to be written into the TF card.

[0048] Step S12: Determine whether the first firmware file is normal based on the comparison result of the check values.

[0049] In this embodiment, by comparing the fw check value of the target firmware generated by the BMC with the standard fw check value pre-saved in the TF card, it is determined whether the currently generated fw file is normal. It can be understood that, according to the preset check value generation algorithm, the generated check value is very accurate. Even if there is a change in one bit of the first firmware file, the check value generated based on the first firmware will also change. Therefore, it can be seen from the comparison result of the check values whether the current fw file is normal.

[0050] Step S13: If the first firmware file is not normal, initiate an upgrade task for the target firmware within a preset time period to complete the upgrade of the target firmware.

[0051] In this embodiment, if it is detected that the fw file of the target firmware is abnormal, a task for upgrading the firmware fw is actively initiated within a certain period of time. It can be understood that, first, the automatic update function of the BMC is set to be enabled, and then within the monitored time period, since the result of the comparison of the verification values is detected to be abnormal, the BMC determines that there is a problem with the target firmware and needs to upgrade it, thereby completing the upgrade of the target firmware. That is, in this embodiment, mainly by using the BMC to verify whether the verification value of the first firmware file of the target firmware is consistent with the standard verification value of the same version stored in the memory card, it is self-determined whether the target firmware needs to be upgraded, and then the corresponding firmware upgrade operation is triggered, avoiding operations such as restarting the BMC when upgrading the target firmware that affect other business activities of the customer, and avoiding the need to arrange a large number of operation and maintenance personnel to manually troubleshoot the firmware faults in the server, improving work efficiency.

[0052] It can be seen that the present application discloses a firmware upgrade method applied to a baseboard management controller, including: when starting the baseboard management controller, comparing the verification value of the first firmware file of the target firmware with the verification value of the second firmware file of the target firmware to obtain the corresponding verification value comparison result; the first firmware file is the firmware file of the target file currently in use, and the second firmware file is the firmware file pre-stored in the memory card and having the same version number as the first firmware file; determining whether the first firmware file is normal based on the verification value comparison result; if the first firmware file is abnormal, initiating an upgrade task for the target firmware within a preset time period to complete the upgrade of the target firmware. Thus, by designing a new memory card in the present application and storing the verification values and version numbers of the second firmware files of all firmwares correspondingly in the memory card, when the baseboard management controller is started each time, it is only necessary to compare the verification value of the first firmware file of the firmware with the verification value of the corresponding second firmware file of the firmware to automatically determine whether an upgrade activity needs to be performed on the firmware, without stopping the customer's business on the server, and greatly reducing the maintenance cost and human and material resources.

[0053] Refer to Figure 2 As shown, the embodiment of the present invention discloses a specific firmware upgrade method. Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution. Specifically:

[0054] Step S21: Generate the firmware file verification values of each firmware under different version numbers based on a preset verification value generation algorithm, and back up the version numbers of each firmware and the corresponding verification values of the second firmware files to the memory card.

[0055] In this embodiment, first, the firmware file check values under different version numbers of each firmware are generated based on the MD5 (Message-Digest Algorithm 5) algorithm. It can be understood that since it is easy to calculate the MD5 value from the original data of any length, and the length of the calculated MD5 value is fixed, any modification to the original data, even if only 1 byte is modified, will result in a significant difference in the obtained MD5 value. Moreover, even if the original data and its MD5 value are known, it is very difficult to find a piece of data with the same MD5 value, that is, to forge data. Therefore, the MD5 algorithm can be used as the preset check value generation algorithm in this embodiment. It should be noted that the preset check value generation algorithm may specifically include but is not limited to hash algorithms, etc. After obtaining the standard check value of the fw of the target firmware generated by the preset check value generation algorithm, the standard check value, the version number of the target firmware, and the target firmware are bound and backed up in the TF card together. It can be understood that by pre-installing the TF card on the motherboard and mounting the file directory of the TF card to the BMC file system, that is, combining the file directory of the TF card with the system file directory, when upgrading the firmware at the factory, the BMC will back up the fw files of each component to the TF card and generate the check value of each firmware fw. It should be noted that the version of each component fw is recorded and the power supply needs to be continuously supplied during the backup process to avoid sudden power-off when reading and writing the TF card and prevent damage to the TF card.

[0056] Step S22: When starting the baseboard management controller, compare the check value of the first firmware file of the target firmware with the check value of the second firmware file of the target firmware, and determine whether the check value of the first firmware file is consistent with the check value of the second firmware file.

[0057] In this embodiment, when starting the baseboard management controller, compare the check value of the first firmware file of the target firmware with the check value of the second firmware file of the target firmware. It can be understood that since the same preset check value generation algorithm is used, and the object for which the check value is currently calculated and the object pre-saved in the TF card are the target firmware of the same version number, theoretically, it is possible to determine whether the current target firmware is in a normal situation by comparing whether the two check values are consistent.

[0058] Step S23: If the check value of the first firmware file is consistent with the check value of the second firmware file, the first firmware file is normal; if the check value of the first firmware file is inconsistent with the check value of the second firmware file, the first firmware file is abnormal.

[0059] In this embodiment, if the check value of the first firmware file is the same as that of the second firmware file, the first firmware file is normal, and in this case, there is no need for the BMC to start the target firmware upgrade task this time; if the check value of the first firmware file is different from that of the second firmware file, the first firmware file is abnormal. It can be understood that since the version number of the target firmware backed up in the TF card and the check value of the corresponding second firmware file are standard check values and generally do not easily go wrong, when the check values are inconsistent twice, it can be preferentially considered that the first check value of the current target firmware is incorrect. Therefore, it is determined that the first firmware file is abnormal.

[0060] Step S24: If the first firmware file is abnormal, initiate an upgrade task for the target firmware within a preset time period to complete the upgrade of the target firmware.

[0061] In this embodiment, if the first firmware file is abnormal and the BMC automatically updates the firmware is started, since the monitoring module monitors the BMC, when the monitoring module detects that the BMC detects that the target firmware file is abnormal, it feeds back an abnormal signal to the BMC, and then the BMC initiates an upgrade task for the target firmware within a preset time period. For example: when it is detected that the fw file of the PSU with the current version number of 2.0 in the server is abnormal, an upgrade task for the PSU is initiated within 2 minutes to complete the upgrade to the 3.0 version of the PSU.

[0062] It can be seen that when the BMC starts, through the preset check value generation algorithm, the check value of the first firmware file of the current target firmware is generated, and then the current check value is compared with the check value of the second firmware of the same version of the target firmware pre-stored in the TF card. Based on the comparison result, it is determined whether the current target firmware is normal. If it is abnormal, the corresponding firmware upgrade is performed. Through this embodiment, it is convenient to obtain the check value of the first firmware file of the current target firmware, which prepares for the subsequent check value comparison.

[0063] Refer to Figure 3 As shown, the embodiment of the present invention discloses a specific firmware upgrade method. Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution. Specifically:

[0064] Step S31: When starting the baseboard management controller, compare the check value of the first firmware file of the target firmware with the check value of the second firmware file of the target firmware to obtain a corresponding check value comparison result; the first firmware file is the firmware file of the target file currently in use, and the second firmware file is the firmware file pre-stored in the memory card and having the same version number as the first firmware file.

[0065] Step S32: Determine whether the first firmware file is normal based on the comparison result of the verification values.

[0066] Among them, for more specific processes in Steps S31 and S32, please refer to the foregoing disclosed embodiments, and details will not be elaborated herein.

[0067] Step S33: If the first firmware file is not normal, generate an event log and notify the client; initiate an upgrade task for the target firmware within a preset time period, complete the upgrade of the target firmware, and record the corresponding upgrade success log.

[0068] In this embodiment, if the first firmware file is not normal, an event log is generated and the client is notified. It can be understood that when the first firmware file is not normal, the BMC collects various information of the target firmware on the server and provides it to the upper-layer operation and maintenance network management software. There are mainly two means. The first is that the BMC provides various interfaces for the upper-layer network management to query, such as human-computer interfaces like web and command line, and machine-to-machine interfaces such as SNMP (Simple Network Management Protocol), IPMI (Intelligent Platform Management Interface), and Restful (Representational State Transfer). The second is active reporting. When a fault is detected, the BMC can report to the server side of the upper-layer network management software through means such as SNMP trap messages, SMTP email messages, and Redfish http json messages, so that the operation and maintenance personnel can identify and handle the fault in a timely manner. Generally, the messages reported by the BMC software will clearly indicate which component has generated the fault and what the handling suggestions are, etc.

[0069] In this embodiment, initiate an upgrade task for the target firmware within a preset time period, complete the upgrade of the target firmware, and re-back up the verification value of the second firmware file corresponding to the version number of the target firmware to the memory card. It can be understood that after the BMC completes the upgrade task of the target firmware, it is necessary to re-generate the verification value of the second firmware file of the new version of the target firmware using the preset verification value generation algorithm, and save the verification value of the corresponding second firmware file of the new version in the TF card as the standard verification value of this version of the target firmware.

[0070] It can be seen that when an abnormality in the first firmware file is detected, a corresponding target firmware upgrade task is triggered, and relevant event logs are generated to notify the user, so that the user can obtain the firmware abnormality information in time for manual processing and upgrading or the BMC triggers the target firmware upgrade to perform the upgrade processing task for the abnormal target firmware. And when processing the firmware upgrade task, it is not necessary to stop the services on the user server. It can be restored by the BMC out-of-band upgrade method or by burning the ROM with a burner, avoiding sacrificing the time and interests of customers.

[0071] Taking the firmware upgrade process of a certain server as an example below, the technical solution in the present application will be described.

[0072] Refer to Figure 4 As shown, first, a TF card is installed on the motherboard and the TF card is mounted to the BMC file system. When the firmware is upgraded at the factory, the BMC will back up the fw files of each target firmware to the TF card, generate the standard check value of each firmware fw, and record the version numbers of the fws of each component. It can be understood that the server firmware may specifically include but is not limited to: BMC, BIOS, motherboard CPLD, backplane CPLD, PSU, network card, etc. Each time the BMC is started, the BMC will default to compare the fw check values and versions of each firmware with the version numbers and corresponding standard check values of the firmware stored in the TF card to ensure the integrity of the fw of each firmware. If it is determined according to the comparison result that the fw of each firmware is complete under the same version, no firmware upgrade processing is performed; if it is found according to the comparison result that there is a difference between the fw check value of each firmware under the same version and the standard check value of the fw in the TF card, the BMC will generate an event log to notify the user and initiate a task to upgrade the fw of the firmware actively within a certain period of time. If the user actively initiates the fw upgrade operation of the firmware, the BMC will back up the fw of the firmware again during the upgrade and generate a new check value, and record the corresponding upgrade success log after the firmware upgrade is successful. This design has strong replicability and scalability. Especially during the process of the customer using the server, it is not necessary to stop the services of the customer on the server, and the maintenance cost of the customer is reduced.

[0073] Refer to Figure 5 As shown, an embodiment of the present invention discloses a specific firmware upgrade device, which is applied to a baseboard management controller and includes:

[0074] A result generation module 11 is configured to compare the check value of the first firmware file of the target firmware with the check value of the second firmware file of the target firmware when the baseboard management controller is started, so as to obtain a corresponding check value comparison result; the first firmware file is the firmware file of the target file currently in use, and the second firmware file is the firmware file that is pre-stored in the memory card and has the same version number as the first firmware file;

[0075] A judgment module 12 is configured to judge whether the first firmware file is normal based on the check value comparison result;

[0076] A firmware upgrade module 13 is configured to initiate an upgrade task for upgrading the target firmware within a preset time period if the first firmware file is not normal, and complete the upgrade of the target firmware.

[0077] It can be seen that the present application discloses a firmware upgrade method applied to a baseboard management controller, including: when the baseboard management controller is started, comparing the check value of the first firmware file of the target firmware with the check value of the second firmware file of the target firmware, so as to obtain a corresponding check value comparison result; the first firmware file is the firmware file of the target file currently in use, and the second firmware file is the firmware file that is pre-stored in the memory card and has the same version number as the first firmware file; judging whether the first firmware file is normal based on the check value comparison result; if the first firmware file is not normal, initiating an upgrade task for upgrading the target firmware within a preset time period, and completing the upgrade of the target firmware. Thus, it can be seen that by designing and adding a memory card in the present application, and storing the check values and version numbers of the second firmware files of all firmwares correspondingly in the memory card, when the baseboard management controller is started each time, it is only necessary to compare the check value of the first firmware file of the firmware with the check value of the corresponding second firmware file of the firmware to automatically judge whether it is necessary to perform a firmware upgrade activity, without stopping the customer's business on the server, and greatly reducing the maintenance cost and human and material resources.

[0078] In some specific embodiments, the result generation module 11 may specifically include:

[0079] A first backup unit is configured to generate the check values of the firmware files under different version numbers of each firmware based on a preset check value generation algorithm, and back up the version numbers of each firmware and the corresponding check values of the second firmware files to the memory card.

[0080] In some specific embodiments, the result generation module 11 may specifically include:

[0081] A first judgment unit is configured to compare the verification value of the first firmware file of the target firmware with the verification value of the second firmware file of the target firmware, and determine whether the verification value of the first firmware file is consistent with the verification value of the second firmware file.

[0082] In some specific embodiments, the judgment module 12 may specifically include:

[0083] A second judgment unit is configured to determine that the first firmware file is normal if the verification value of the first firmware file is consistent with the verification value of the second firmware file; and determine that the first firmware file is abnormal if the verification value of the first firmware file is inconsistent with the verification value of the second firmware file.

[0084] In some specific embodiments, the firmware upgrade module 13 may specifically include:

[0085] A log recording unit is configured to generate an event log and notify the client if the first firmware file is abnormal; initiate an upgrade task for the target firmware within a preset time period, complete the upgrade of the target firmware, and record the corresponding upgrade success log.

[0086] In some specific embodiments, the firmware upgrade module 13 may specifically include:

[0087] A second backup unit is configured to initiate an upgrade task for the target firmware within a preset time period, complete the upgrade of the target firmware, and re-backup the verification value of the second firmware file corresponding to the version number of the target firmware to the memory card.

[0088] In some specific embodiments, the firmware upgrade device may specifically include:

[0089] A manual firmware upgrade module is configured to trigger an upgrade task for the target firmware if the client initiates an operation to upgrade the target firmware, and complete the upgrade of the target firmware.

[0090] In some specific embodiments, the manual firmware upgrade module may specifically include:

[0091] A third backup unit is configured to trigger an upgrade task for the target firmware if the client initiates an operation to upgrade the target firmware, record the version number of the target firmware and the corresponding verification value of the second firmware file, and complete the upgrade of the target firmware.

[0092] Furthermore, an embodiment of the present application also discloses an electronic device, Figure 6 It is a structural diagram of an electronic device 20 shown according to an exemplary embodiment, and the content in the figure should not be considered as any limitation to the scope of use of the present application.

[0093] Figure 6 This is a schematic structural diagram of an electronic device 20 provided by an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the firmware upgrade method disclosed in any of the foregoing embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0094] In this embodiment, the power supply 23 is used to provide a working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of the present application, and specific limitations are not imposed on it here; the input / output interface 25 is used to obtain external input data or output data to the outside, and its specific interface type can be selected according to specific application needs, and no specific limitations are made here.

[0095] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor used to process data in the wake state, also known as the CPU (Central Processing Unit); the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, and the AI processor is used to process computing operations related to machine learning.

[0096] In addition, as a carrier for resource storage, the memory 22 may be a read-only memory, a random access memory, a disk, or an optical disc, etc., and the resources stored thereon may include an operating system 221, a computer program 222, etc., and the storage method may be short-term storage or permanent storage.

[0097] Among them, the operating system 221 is used to manage and control each hardware device on the electronic device 20 and the computer program 222, so as to implement the operation and processing of the massive data 223 in the memory 22 by the processor 21. It can be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program that can be used to complete the firmware upgrade method executed by the electronic device 20 disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs that can be used to complete other specific tasks. The data 223 may include not only the data transmitted by the external device received by the electronic device, but also the data collected by its own input / output interface 25, etc.

[0098] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the foregoing disclosed firmware upgrade method is implemented. For the specific steps of this method, reference may be made to the corresponding content disclosed in the foregoing embodiments, and details will not be repeated here.

[0099] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple. For the relevant parts, reference can be made to the description in the method part.

[0100] Those skilled in the art can further realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed in this article can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application. The steps of the methods or algorithms described in combination with the embodiments disclosed in this article can be directly implemented by hardware, software modules executed by a processor, or a combination of the two. The software module can be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the technical field.

[0101] Finally, it should also be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the said element.

[0102] The above has introduced in detail a firmware upgrade method, apparatus, device, and storage medium provided by the present invention. Specific examples are used in this text to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A firmware upgrade method, characterized in that, Applied to a baseboard management controller, including: When starting the baseboard management controller, comparing the check value of the first firmware file of the target firmware with the check value of the second firmware file of the target firmware to obtain a corresponding check value comparison result; the first firmware file is the firmware file of the target file currently in use, and the second firmware file is the firmware file that is pre - stored in the memory card and has the same version number as the first firmware file; Judging whether the first firmware file is normal based on the check value comparison result; If the first firmware file is not normal, initiating an upgrade task for the target firmware within a preset time period to complete the upgrade of the target firmware; The step of, if the first firmware file is not normal, initiating an upgrade task for the target firmware within a preset time period to complete the upgrade of the target firmware, includes: If the first firmware file is not normal, generating an event log and notifying the client; Initiating an upgrade task for the target firmware within a preset time period to complete the upgrade of the target firmware and recording a corresponding upgrade success log; The step of, in a preset time period, initiating an upgrade task for the target firmware to complete the upgrade of the target firmware and recording a corresponding upgrade success log, includes: Based on the automatic update function, initiating an upgrade task for the target firmware from the current version to the next version within a preset time period to complete the upgrade of the target firmware and recording the upgrade success log corresponding to the next version.

2. The firmware upgrade method according to claim 1, wherein Before the step of, when starting the baseboard management controller, comparing the check value of the first firmware file of the target firmware with the check value of the second firmware file of the target firmware to obtain a corresponding check value comparison result, further includes: Generating the check values of the firmware files under different version numbers of each firmware based on a preset check value generation algorithm, and backing up the version numbers of each firmware and the corresponding check values of the second firmware files to the memory card.

3. The firmware upgrade method according to claim 1, wherein The step of comparing the check value of the first firmware file of the target firmware with the check value of the second firmware file of the target firmware to obtain a corresponding check value comparison result, includes: Comparing the check value of the first firmware file of the target firmware with the check value of the second firmware file of the target firmware, and judging whether the check value of the first firmware file is consistent with the check value of the second firmware file; Correspondingly, the step of judging whether the first firmware file is normal based on the check value comparison result, includes: If the check value of the first firmware file is consistent with the check value of the second firmware file, then the first firmware file is normal; If the check value of the first firmware file is inconsistent with the check value of the second firmware file, then the first firmware file is not normal.

4. The firmware upgrade method according to any one of claims 1 to 3, characterized in that The step of, in a preset time period, initiating an upgrade task for the target firmware to complete the upgrade of the target firmware, includes: Initiating an upgrade task for the target firmware within a preset time period to complete the upgrade of the target firmware and re - backing up the check value of the second firmware file corresponding to the version number of the target firmware to the memory card.

5. The firmware upgrade method according to claim 1, wherein Also includes: If the client initiates an operation to upgrade the target firmware, an upgrade task for upgrading the target firmware is triggered, and the upgrade of the target firmware is completed.

6. The firmware upgrade method according to claim 5, wherein The triggering of the upgrade task for upgrading the target firmware and the completion of the upgrade of the target firmware include: If the client initiates an operation to upgrade the target firmware, an upgrade task for upgrading the target firmware is triggered, and the version number of the target firmware and the check value of the corresponding second firmware file are recorded, and the upgrade of the target firmware is completed.

7. A firmware upgrade device, characterized in that, Applied to a baseboard management controller, it includes: A result generation module, configured to compare the check value of the first firmware file of the target firmware with the check value of the second firmware file of the target firmware when the baseboard management controller is started, so as to obtain a corresponding check value comparison result; the first firmware file is the firmware file of the target file currently in use, and the second firmware file is the firmware file that is pre-stored in the memory card and has the same version number as the first firmware file; A judgment module, configured to judge whether the first firmware file is normal based on the check value comparison result; A firmware upgrade module, configured to initiate an upgrade task for upgrading the target firmware within a preset time period if the first firmware file is abnormal, and complete the upgrade of the target firmware; The firmware upgrade module is specifically configured to generate an event log and notify the client if the first firmware file is abnormal; initiate an upgrade task for upgrading the target firmware within a preset time period, complete the upgrade of the target firmware and record a corresponding upgrade success log; The firmware upgrade device is further configured to initiate an upgrade task for upgrading the target firmware from the current version to the next version within a preset time period based on the automatic update function, complete the upgrade of the target firmware and record an upgrade success log corresponding to the next version.

8. An electronic device, characterized in that, It includes: A memory, configured to store a computer program; A processor, configured to execute the computer program to implement the steps of the firmware upgrade method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, For storing a computer program; wherein, when the computer program is executed by the processor, the steps of the firmware upgrade method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Firmware upgrading method and device based on external memory card

    CN111176701A

  • Firmware upgrading exception processing method, computer equipment and readable storage medium

    CN114356658A