[go: up one dir, main page]

CN115048147B - A firmware upgrade method, device, equipment, and storage medium - Google Patents

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

Info

Publication number
CN115048147B
CN115048147B CN202210587092.2A CN202210587092A CN115048147B CN 115048147 B CN115048147 B CN 115048147B CN 202210587092 A CN202210587092 A CN 202210587092A CN 115048147 B CN115048147 B CN 115048147B
Authority
CN
China
Prior art keywords
firmware
upgrading
file
target
check value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210587092.2A
Other languages
Chinese (zh)
Other versions
CN115048147A (en
Inventor
林玉兵
靳先奇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Metabrain Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202210587092.2A priority Critical patent/CN115048147B/en
Publication of CN115048147A publication Critical patent/CN115048147A/en
Application granted granted Critical
Publication of CN115048147B publication Critical patent/CN115048147B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • G06F9/4406Loading of operating system
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

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

Abstract

本申请公开了一种固件升级方法、装置、设备、介质,涉及计算机技术领域,包括:当启动所述基板管理控制器时,对目标固件的第一固件文件的校验值和目标固件的第二固件文件的校验值进行比对,以得到相应的校验值比对结果;所述第一固件文件为当前正在使用的所述目标文件的固件文件,所述第二固件文件为预先保存在存储卡中的并且版本号与所述第一固件文件相同的固件文件;基于校验值比对结果判断第一固件文件是否正常;若第一固件文件不正常,则在预设时间段内发起升级目标固件的升级任务,完成目标固件升级。通过对比固件的第一固件文件的校验值与对应的固件的第二固件文件的校验值便可判断是否需要对固件进行升级活动,减轻维护成本以及人力物力。

The present application discloses a firmware upgrade method, device, equipment, and medium, which relates to the field of computer technology, including: when starting the baseboard management controller, the check value of the first firmware file of the target firmware and the check value of the second firmware file of the target firmware are compared to obtain the 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 a firmware file pre-stored in a storage card and has the same version number as the first firmware file; based on the check value comparison result, it is judged whether the first firmware file is normal; if the first firmware file is abnormal, an upgrade task of upgrading the target firmware is initiated within a preset time period to complete the target firmware upgrade. 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 judged whether the firmware needs to be upgraded, reducing maintenance costs and manpower and material resources.

Description

Firmware upgrading method, device, equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a firmware upgrade method, apparatus, device, and storage medium.
Background
The existing solution is to stop the service on the client server, restore the service by a BMC (Baseboard Management Controller ), BIOS (Basic Input Output System, basic input output system), a motherboard CPLD (Complex Programmable Logic Device ), a backboard CPLD, PSU (Power Supply Unit, power supply equipment), a network card and the like, and the BMC can support the out-of-band refreshing function, but the firmware of each module is damaged along with the running of the server and the aging and upgrading of various firmware and other problems, and the existing solution is to stop the service on the client server, restore the service by the out-of-band upgrading mode or write ROM by a burner.
In summary, how to implement firmware upgrade without affecting the business of the client on the server, and reducing maintenance cost and labor cost is a technical problem to be solved in the field.
Disclosure of Invention
In view of the above, the present invention aims to provide a firmware upgrading method, device, equipment and storage medium, which can realize firmware upgrading without affecting the business of clients on a server, and reduce maintenance cost and labor cost. The specific scheme is as follows:
In a first aspect, the present application discloses a firmware upgrade method, applied to a baseboard management controller, including:
When the baseboard management controller is started, comparing a check value of a first firmware file of a target firmware with a check value of a second firmware file of the target firmware to obtain a corresponding check value comparison result, wherein the first firmware file is a firmware file of the target file which is currently being used, and the second firmware file is a firmware file which is stored in a memory card in advance and has the same version number as the first firmware file;
Judging whether the first firmware file is normal or not based on the check value comparison result;
if the first firmware file is abnormal, initiating an upgrading task for upgrading the target firmware in a preset time period, and finishing upgrading of the target firmware.
Optionally, 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 to obtain a corresponding check value comparison result, and before the step of comparing the check values, further includes:
and generating firmware file check values 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.
Optionally, the 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 determining 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, 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.
Optionally, if the first firmware file is abnormal, initiating an upgrade task for upgrading the target firmware within a preset time period, and completing the target firmware upgrade, including:
if the first firmware file is abnormal, generating an event log and notifying a user side;
And initiating an upgrading task for upgrading the target firmware within a preset time period, completing the upgrading of the target firmware and recording a corresponding upgrading success log.
Optionally, the initiating an upgrade task for upgrading the target firmware within a preset time period, to complete the upgrade of the target firmware, includes:
And initiating an upgrading task for upgrading the target firmware within a preset time period, completing the upgrading 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.
Optionally, the firmware upgrading method further includes:
And if the user side initiates the operation of upgrading the target firmware, triggering an upgrading task for upgrading the target firmware to complete the upgrading of the target firmware.
Optionally, the triggering the upgrade task to upgrade the target firmware to complete the upgrade of the target firmware includes:
If the user side initiates the operation of upgrading the target firmware, triggering an upgrading task for upgrading the target firmware, recording the version number of the target firmware and the verification value of the corresponding second firmware file, and finishing the upgrading of the target firmware.
In a second aspect, the present application discloses a firmware upgrade apparatus, applied to a baseboard management controller, comprising:
The system comprises a baseboard management controller, a result generation module, a first firmware file, a second firmware file and a storage card, wherein the baseboard management controller is used for starting the baseboard management controller, and the baseboard management controller is used for starting the baseboard management controller;
The judging module is used for judging whether the first firmware file is normal or not based on the check value comparison result;
and the firmware upgrading module is used for initiating an upgrading task for upgrading the target firmware in a preset time period if the first firmware file is abnormal, so as to complete the upgrading of the target firmware.
In a third aspect, the present application discloses an electronic device, comprising:
a memory for storing a computer program;
And a processor for executing the computer program to implement the steps of the firmware upgrade method disclosed above.
In a fourth aspect, the present application discloses a computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the steps of the firmware upgrade method disclosed above.
The application discloses a firmware upgrading method which is applied to a baseboard management controller and comprises the steps of comparing a check value of a first firmware file of a target firmware with a check value of a second firmware file of the target firmware when the baseboard management controller is started to obtain a corresponding check value comparison result, wherein the first firmware file is a firmware file of the target file which is currently used, the second firmware file is a firmware file which is stored in a memory card in advance and has the same version number as the first firmware file, judging whether the first firmware file is normal or not based on the check value comparison result, and if the first firmware file is abnormal, initiating an upgrading task of the target firmware to upgrade the target firmware within a preset time period to complete the upgrading of the target firmware. Therefore, by adding a new memory card designed in the application, and correspondingly storing the check values and version numbers of the second firmware files of all the firmware in the memory card, when the baseboard management controller is started each time, the check values of the first firmware files of the firmware and the check values of the second firmware files of the corresponding firmware can be compared to automatically judge whether the firmware needs to be updated or not, the business of a client on a server does not need to be stopped, and the maintenance cost and manpower and material resources are greatly reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a firmware upgrade method disclosed in the present application;
FIG. 2 is a flowchart of a specific firmware upgrade method disclosed in the present application;
FIG. 3 is a flowchart of another specific firmware upgrade method disclosed in the present application;
FIG. 4 is a flowchart of a BMC reliable backup upgrade firmware disclosed in the present application;
FIG. 5 is a schematic diagram of a firmware upgrade apparatus according to the present application;
Fig. 6 is a block diagram of an electronic device according to the present disclosure.
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.
The existing server has very many related firmware including BMC, BIOS, main board CPLD, back board CPLD, PSU, network card, etc., the BMC can support the out-of-band refreshing function, but with the running of the server and the aging and upgrading of various firmware, the firmware of each module is damaged, the existing solution is to stop the service on the client server, and restore the service by adopting a BMC (baseboard management controller) out-of-band upgrading mode or by programming ROM (read only memory) through a burner, and the solution is to sacrifice the time and benefits of the client, so that the solution is not worth losing.
Therefore, the application discloses a firmware upgrading scheme which can realize firmware upgrading on the premise of not influencing the business of a client on a server and reduce maintenance cost and labor cost.
Referring to fig. 1, an embodiment of the present invention discloses a firmware upgrade method, which is applied to a baseboard management controller, and includes:
And S11, when the baseboard management controller is started, comparing a check value of a first firmware file of the target firmware with a check value of a second firmware file of the target firmware to obtain a corresponding check value comparison result, wherein the first firmware file is a firmware file of the target file which is currently being used, and the second firmware file is a firmware file which is stored in a memory card in advance and has the same version number as the first firmware file.
In this embodiment, when the baseboard management controller is started, the BMC generates the FW check value of each firmware by default, compares the FW check value with the standard FW check value stored in the TF card (Trans-FLASH CARD, flash memory card) in advance, and obtains a corresponding check value comparison result. It can be understood that the version numbers of the firmware and the corresponding standard FW check values are stored through the TF card, and the TF card has the characteristics of small volume and large capacity, and the addition of a TF card in the original system cannot affect the layout of the original firmware excessively on the physical level.
In this embodiment, if the BMC is not started to detect that the target firmware has a problem and performs upgrading, but the user side is started to upgrade the target firmware, an upgrade task for upgrading the target firmware is triggered, and the target firmware upgrade is completed. It can be understood that after each firmware generates a new version of firmware after a period of time, even if the current target firmware is not damaged, when the user considers that the version of the current target firmware is too low and wants to upgrade and update the current target firmware, the user initiates the operation of upgrading the target firmware, further triggers the upgrading task of upgrading the target firmware, records the version number of the target firmware and the verification value of the corresponding second firmware file, and completes the upgrading of the target firmware. For example, when the version number of the network card on the current server is 1.0 version, and when the monitoring module of the server monitors that the network card with the version 1.1 exists currently, the user is prompted through the corresponding display device according to a preset upgrade prompt instruction, and after the user receives the corresponding prompt, the user considers that the network card is required to be updated correspondingly, so that the user initiates the operation of updating the network card on the server, the corresponding BMC triggers the upgrade task of upgrading the network card with the version 1.1, and records the version number of the network card with the version 1.1 and the verification value of the corresponding fw file on the TF card, thereby completing the network card upgrade. It should be noted that, because some firmware on the server is manually upgraded by the user at this time, in the TF card, the verification value of the second firmware file of the target firmware with the corresponding version number may not be saved in advance, so when the user initiates the upgrading of the target firmware manually at each time, the version number of the upgrading target firmware and the verification value of the corresponding second firmware file need to be written in the TF card.
And step S12, judging whether the first firmware file is normal or not based on the check value comparison result.
In this embodiment, whether the current fw file is normal is determined by comparing the fw check value of the target firmware generated by the BMC with the standard fw check value stored in the TF card in advance, and it can be understood that, because the preset check value generation algorithm knows that the generated check value is very accurate, even if the first firmware file changes by one bit, the check value generated based on the first firmware will also change, so that whether the current fw file is normal can be seen from the check value comparison result.
And step S13, if the first firmware file is abnormal, initiating an upgrading task for upgrading the target firmware in a preset time period to complete the upgrading of the target firmware.
In this embodiment, if it is checked that the fw file of the target firmware is abnormal, the task of upgrading the firmware fw is actively initiated within a certain time, and it can be understood that an automatic update function of starting the BMC is set first, then in a listening time period range, the BMC determines that the target firmware has a problem due to the fact that the verification value comparison result is abnormal is detected, and needs to be upgraded, so that the upgrading of the target firmware is completed.
The application discloses a firmware upgrading method which is applied to a baseboard management controller and comprises the steps of comparing a check value of a first firmware file of a target firmware with a check value of a second firmware file of the target firmware when the baseboard management controller is started to obtain a corresponding check value comparison result, wherein the first firmware file is a firmware file of the target file which is currently used, the second firmware file is a firmware file which is stored in a memory card in advance and has the same version number as the first firmware file, judging whether the first firmware file is normal or not based on the check value comparison result, and if the first firmware file is abnormal, initiating an upgrading task of the target firmware to upgrade the target firmware within a preset time period to complete the upgrading of the target firmware. Therefore, by adding a new memory card designed in the application, and correspondingly storing the check values and version numbers of the second firmware files of all the firmware in the memory card, when the baseboard management controller is started each time, the check values of the first firmware files of the firmware and the check values of the second firmware files of the corresponding firmware can be compared to automatically judge whether the firmware needs to be updated or not, the business of a client on a server does not need to be stopped, and the maintenance cost and manpower and material resources are greatly reduced.
Referring to fig. 2, an embodiment of the present invention discloses a specific firmware upgrading method, and compared with the previous embodiment, the present embodiment further describes and optimizes a technical solution. Specific:
And S21, generating firmware file check values 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 check values of the corresponding second firmware files to the memory card.
In this embodiment, the verification values of the firmware files under different version numbers of each firmware are first generated based on the MD5 (Message-Digest Algorithm 5) Algorithm, it can be understood that since the MD5 value is easy to calculate from the original data with any length, and the calculated MD5 value is fixed in length, any modification is performed on the original data, even if only 1 byte is modified, the resulting MD5 values are very different, and even if the original data and the MD5 values thereof are known, it is very difficult to want to find a data with the same MD5 value, i.e., counterfeit data. Therefore, in this embodiment, the MD5 algorithm may be used as a preset check value generating algorithm, and it should be noted that the preset check value generating algorithm may specifically further include, but is not limited to, a hash algorithm, and the like. After the standard check value of fw of the target firmware generated by a preset check value generation algorithm is obtained, the standard check value, the version number of the target firmware and the target firmware are also bound and backed up in the TF card. It can be understood that by installing the TF card on the motherboard in advance and mounting the file directory of the TF card into the BMC file system, that is, combining the file directory of the TF card with the system file directory, when the firmware is upgraded in factory, the BMC backs up the firmware fw files of each component into the TF card and generates a check value of each firmware fw, and it is noted that the version of each component fw is recorded and the power supply needs to be kept continuously in the backup process, so as to avoid the situation of sudden power failure when the TF card is read and written, and avoid the damage of the TF card.
And S22, 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, and judging whether the check value of the first firmware file is consistent with the check value of the second firmware file.
In this embodiment, when the baseboard management controller is started, the check value of the first firmware file of the target firmware and the check value of the second firmware file of the target firmware are compared, and it can be understood that, because the same preset check value generation algorithm is used, and the object of the currently calculated check value and the object pre-stored in the TF card are the same version number of the target firmware, in theory, whether the two check values are identical or not can be compared to determine whether the current target firmware is normal or not.
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, and 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.
In this embodiment, 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, and then the BMC is not required to start the target firmware upgrade task at this time, and 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, and it can be understood that, because 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, errors are generally not easy to occur, and if the two check values are inconsistent, it can be preferentially considered that the first check value of the current target firmware is wrong, and thus the first firmware file is not normal.
And step S24, if the first firmware file is abnormal, initiating an upgrading task for upgrading the target firmware in a preset time period to complete the upgrading of the target firmware.
In this embodiment, if the first firmware file is abnormal, on the premise that the BMC is started to automatically update the firmware, since the monitoring module is used to monitor the BMC, when the monitoring module finds that the BMC detects that the target firmware file is abnormal, an abnormal signal is fed back to the BMC, and then the BMC initiates an upgrade task of upgrading the target firmware within a preset time period. For example, when detecting that the fw file of the PSU with the current version number of 2.0 in the server is abnormal, initiating the upgrading task of the PSU within 2 minutes to complete the upgrading of the 3.0 version of the PSU.
Therefore, when the BMC is started, a check value of the first firmware file of the current target firmware is generated through a preset check value generation algorithm, then the current check value is compared with a check value of the second firmware of the same version of the target firmware stored in the TF card in advance, whether the current target firmware is normal or not is determined based on the comparison result, and if the corresponding firmware upgrade is not performed normally, the check value of the first firmware file of the current target firmware is conveniently obtained through the embodiment, and preparation is made for comparison of the later check values.
Referring to fig. 3, an embodiment of the present invention discloses a specific firmware upgrading method, and compared with the previous embodiment, the present embodiment further describes and optimizes a technical solution. Specific:
and S31, when the baseboard management controller is started, comparing a check value of a first firmware file of the target firmware with a check value of a second firmware file of the target firmware to obtain a corresponding check value comparison result, wherein the first firmware file is a firmware file of the target file which is currently being used, and the second firmware file is a firmware file which is stored in a memory card in advance and has the same version number as the first firmware file.
And S32, judging whether the first firmware file is normal or not based on the check value comparison result.
The more specific process in steps S31 and S32 is referred to the above disclosed embodiments, and will not be described herein.
And step S33, if the first firmware file is abnormal, generating an event log and notifying a user side, initiating an upgrading task for upgrading the target firmware within a preset time period, completing the upgrading of the target firmware and recording a corresponding upgrading success log.
In this embodiment, if the first firmware file is abnormal, an event log is generated and the user side is notified, and it can be understood that when the first firmware file is abnormal, the BMC collects various information of the target firmware on the server and provides the information to the upper layer operation and maintenance network management software. The method mainly comprises two means, namely, a BMC can provide various interfaces for upper network management inquiry, such as a human-computer interface of web, command line and the like, a Simple Network Management Protocol (SNMP) (Simple Network Management Protocol), an Intelligent Platform Management Interface (IPMI) (INTELLIGENT PLATFORM MANAGEMENT INTERFACE), a Representational STATE TRANSFER) and other machine interfaces, and a BMC can actively report the faults to a service end of upper network management software through SNMP trap information, SMTP mail information, REDFISH HTTP json information and other means when the faults are detected, so that operation and maintenance personnel can identify and process the faults in time. In general, the message reported by the BMC software clearly indicates which component has failed, what the processing advice is, and so on.
In this embodiment, an upgrade task for upgrading the target firmware is initiated within a preset time period, and the target firmware is upgraded and the check value of the second firmware file corresponding to the version number of the target firmware is backed up again to the memory card. It can be understood that, after the BMC completes the task of upgrading the target firmware, it is necessary to reuse the preset check value generation algorithm to generate the check value of the second firmware file of the new version of the target firmware, and store the check value of the second firmware file corresponding to the new version in the TF card as the standard check value of the version of the target firmware.
Therefore, when the condition that the first firmware file is abnormal is detected, a corresponding target firmware upgrading task is triggered, and meanwhile, a related event log is generated to inform a user, so that the user can timely acquire firmware abnormal information to automatically and manually process and upgrade or BMC triggers target firmware upgrading to upgrade the abnormal target firmware, the upgrading processing task of the abnormal target firmware is performed, the service on a user server is not required to be stopped while the upgrading task of the firmware is processed, and the user is recovered again through a BMC out-of-band upgrading mode or through a burner for programming ROM, so that the time and benefits of a customer are avoided.
The technical scheme in the application is described below by taking a certain firmware upgrading process on a server as an example.
Referring to fig. 4, a TF card is first installed on a motherboard, and the TF card is mounted in a BMC file system, and when firmware is upgraded in factory, the BMC backs up fw files of each target firmware into the TF card, generates a standard check value of each firmware fw, and records version numbers of each component fw. It is understood that the server firmware may include, but is not limited to, BMC, BIOS, motherboard CPLD, backplane CPLD, PSU, network card, etc. When the BMC is started each time, the BMC defaults and compares the fw check value of each firmware with the version number and the corresponding standard check value which are the same as those of the firmware stored in the TF card, so that the integrity of the fw of each firmware is ensured, if the fw of each firmware under the same version is determined to be complete according to the comparison result, firmware upgrading processing is not performed, if the fw check value of each firmware under the same version is found to be different from the standard check value of the fw in the TF card according to the comparison result, the BMC generates event logs to inform a user and actively initiates task for upgrading the fw of the firmware within a certain time, if the user actively initiates the fw upgrading operation of the firmware, the BMC backs up the fw of the firmware again and generates a new check value, and after the firmware is successfully upgraded, the corresponding upgrading success log is recorded. The design has strong replicability and expansibility, and particularly, in the process of using the server by the client, the service of the client on the server does not need to be stopped, and the maintenance cost of the client is reduced.
Referring to fig. 5, an embodiment of the present invention discloses a specific firmware upgrade apparatus, which is applied to a baseboard management controller, and includes:
The result generating module 11 is configured to compare a verification value of a first firmware file of the target firmware with a verification value of a second firmware file of the target firmware when the baseboard management controller is started, so as to obtain a corresponding verification value comparison result; the first firmware file is a firmware file of the target file which is currently used, and the second firmware file is a firmware file which is stored in a memory card in advance and has the same version number as the first firmware file;
A judging module 12, configured to judge whether the first firmware file is normal based on the check value comparison result;
And the firmware upgrading module 13 is configured to initiate an upgrading task for upgrading the target firmware within a preset time period if the first firmware file is abnormal, so as to complete the target firmware upgrading.
The application discloses a firmware upgrading method which is applied to a baseboard management controller and comprises the steps of comparing a check value of a first firmware file of a target firmware with a check value of a second firmware file of the target firmware when the baseboard management controller is started to obtain a corresponding check value comparison result, wherein the first firmware file is a firmware file of the target file which is currently used, the second firmware file is a firmware file which is stored in a memory card in advance and has the same version number as the first firmware file, judging whether the first firmware file is normal or not based on the check value comparison result, and if the first firmware file is abnormal, initiating an upgrading task of the target firmware to upgrade the target firmware within a preset time period to complete the upgrading of the target firmware. Therefore, by adding a new memory card designed in the application, and correspondingly storing the check values and version numbers of the second firmware files of all the firmware in the memory card, when the baseboard management controller is started each time, the check values of the first firmware files of the firmware and the check values of the second firmware files of the corresponding firmware can be compared to automatically judge whether the firmware needs to be updated or not, the business of a client on a server does not need to be stopped, and the maintenance cost and manpower and material resources are greatly reduced.
In some specific embodiments, the result generating module 11 may specifically include:
And the first backup unit is used for generating firmware file check values 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.
In some specific embodiments, the result generating module 11 may specifically include:
the first judging unit is used for 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.
In some specific embodiments, the determining module 12 may specifically include:
And the second judging unit is used for judging that the first firmware file is normal if the check value of the first firmware file is consistent with the check value of the second firmware file, and judging that the first firmware file is abnormal if the check value of the first firmware file is inconsistent with the check value of the second firmware file.
In some specific embodiments, the firmware upgrade module 13 may specifically include:
and the log recording unit is used for generating an event log and notifying a user terminal if the first firmware file is abnormal, initiating an upgrading task for upgrading the target firmware within a preset time period, completing the upgrading of the target firmware and recording a corresponding upgrading success log.
In some specific embodiments, the firmware upgrade module 13 may specifically include:
and the second backup unit is used for initiating an upgrading task for upgrading the target firmware in a preset time period, completing the upgrading 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.
In some specific embodiments, the firmware upgrade apparatus may specifically include:
And the manual firmware upgrading module is used for triggering an upgrading task for upgrading the target firmware if the user side initiates the operation of upgrading the target firmware, so as to complete the upgrading of the target firmware.
In some specific embodiments, the manual firmware upgrade module may specifically include:
And the third backup unit is used for triggering the upgrading task of upgrading the target firmware if the user side initiates the operation of upgrading the target firmware, recording the version number of the target firmware and the check value of the corresponding second firmware file, and finishing the upgrading of the target firmware.
Further, the embodiment of the present application further discloses an electronic device, and fig. 6 is a block diagram of an electronic device 20 according to an exemplary embodiment, where the content of the figure is not to be considered as any limitation on the scope of use of the present application.
Fig. 6 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present application. The electronic device 20 may include, in particular, 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. Wherein the memory 22 is used for storing a computer program, which 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 the present embodiment may be specifically an electronic computer.
In this embodiment, the power supply 23 is configured to provide working voltages for each hardware device on the electronic device 20, the communication interface 24 is capable of creating a data transmission channel with an external device for the electronic device 20, and the communication protocol to be followed is any communication protocol applicable to the technical solution of the present application, which is not specifically limited herein, and the input/output interface 25 is configured to obtain external input data or output data to the external device, and the specific interface type of the input/output interface may be selected according to the specific application needs and is not specifically limited herein.
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), PLA (Programmable Logic Array ). The processor 21 may also include a main processor, which is a processor for processing data in a wake-up state, also called a CPU (Central Processing Unit ), and a coprocessor, which is a low-power processor for processing data in a standby state. In some embodiments, the processor 21 may integrate a GPU (Graphics Processing Unit, image processor) for rendering and drawing of content required to be displayed by the display screen. In some embodiments, the processor 21 may also include an AI (ARTIFICIAL INTELLIGENCE ) processor for processing computing operations related to machine learning.
The memory 22 may be a carrier for storing resources, such as a read-only memory, a random access memory, a magnetic disk, or an optical disk, and the resources stored thereon may include an operating system 221, a computer program 222, and the like, and the storage may be temporary storage or permanent storage.
The operating system 221 is used for managing and controlling various hardware devices on the electronic device 20 and the computer program 222, so as to implement the operation and processing of the processor 21 on the mass data 223 in the memory 22, which may be Windows Server, netware, unix, linux, etc. The computer program 222 may further include a computer program that can be used to perform other specific tasks in addition to the computer program that can be used to perform the firmware upgrade method performed by the electronic device 20 disclosed in any of the previous embodiments. The data 223 may include, in addition to data received by the electronic device and transmitted by the external device, data collected by the input/output interface 25 itself, and so on.
Further, the application also discloses a computer readable storage medium for storing a computer program, wherein the computer program realizes the firmware upgrading method when being executed by a processor. For specific steps of the method, reference may be made to the corresponding contents disclosed in the foregoing embodiments, and no further description is given here.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between the embodiments are referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application. The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
The above description of the firmware upgrading method, device, apparatus and storage medium provided by the present invention is provided in detail, and specific examples are used herein to illustrate the principles and embodiments of the present invention, and the above description of the examples is only for aiding in understanding the method and core concept of the present invention, and meanwhile, for those skilled in the art, according to the concept of the present invention, there are variations in the specific embodiments and application scope, so the disclosure should not be construed as limiting the invention.

Claims (9)

1. A firmware upgrade method, applied to a baseboard management controller, comprising:
When the baseboard management controller is started, comparing a check value of a first firmware file of a target firmware with a check value of a second firmware file of the target firmware to obtain a corresponding check value comparison result, wherein the first firmware file is a firmware file of the target file which is currently being used, and the second firmware file is a firmware file which is stored in a memory card in advance and has the same version number as the first firmware file;
Judging whether the first firmware file is normal or not based on the check value comparison result;
If the first firmware file is abnormal, initiating an upgrading task for upgrading the target firmware in a preset time period, and finishing upgrading of the target firmware;
if the first firmware file is abnormal, initiating an upgrade task for upgrading the target firmware in a preset time period to complete the upgrade of the target firmware, including:
if the first firmware file is abnormal, generating an event log and notifying a user side;
initiating an upgrading task for upgrading the target firmware within a preset time period, completing the upgrading of the target firmware and recording a corresponding upgrading success log;
Initiating an upgrading task for upgrading the target firmware within a preset time period, completing the upgrading of the target firmware and recording a corresponding upgrading success log, wherein the upgrading task comprises the following steps:
And initiating an upgrading task for upgrading the target firmware from the current version to the next version in a preset time period based on an automatic updating function, finishing upgrading the target firmware and recording an upgrading success log corresponding to the next version.
2. The firmware upgrade method of claim 1, wherein when the baseboard management controller is started, the method further comprises, 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:
and generating firmware file check values 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 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 comprises:
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 determining 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, 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.
4. A firmware upgrade method according to any one of claims 1 to 3, wherein said initiating an upgrade task to upgrade said target firmware within a preset time period, completing a target firmware upgrade, comprises:
And initiating an upgrading task for upgrading the target firmware within a preset time period, completing the upgrading 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 of claim 1, further comprising:
And if the user side initiates the operation of upgrading the target firmware, triggering an upgrading task for upgrading the target firmware to complete the upgrading of the target firmware.
6. The firmware upgrade method of claim 5, wherein triggering an upgrade task to upgrade the target firmware to complete the target firmware upgrade comprises:
If the user side initiates the operation of upgrading the target firmware, triggering an upgrading task for upgrading the target firmware, recording the version number of the target firmware and the verification value of the corresponding second firmware file, and finishing the upgrading of the target firmware.
7. A firmware upgrade apparatus applied to a baseboard management controller, comprising:
The system comprises a baseboard management controller, a result generation module, a first firmware file, a second firmware file and a storage card, wherein the baseboard management controller is used for starting the baseboard management controller, and the baseboard management controller is used for starting the baseboard management controller;
The judging module is used for judging whether the first firmware file is normal or not based on the check value comparison result;
the firmware upgrading module is used for initiating an upgrading task for upgrading the target firmware in a preset time period if the first firmware file is abnormal, so as to complete the upgrading of the target firmware;
the firmware upgrading module is specifically configured to generate an event log and notify the user side if the first firmware file is abnormal; initiating an upgrading task for upgrading the target firmware within a preset time period, completing the upgrading of the target firmware and recording a corresponding upgrading success log;
The firmware upgrading device is also used for initiating an upgrading task for upgrading the target firmware from the current version to the next version in a preset time period based on an automatic updating function, completing the upgrading of the target firmware and recording an upgrading success log corresponding to the next version.
8. An electronic device, comprising:
a memory for storing a computer program;
A processor for executing the computer program to implement the steps of the firmware upgrade method as claimed in any one of claims 1 to 6.
9. A computer readable storage medium for storing a computer program, wherein the computer program when executed by a processor implements the steps of the firmware upgrade method according to any one of claims 1 to 6.
CN202210587092.2A 2022-05-27 2022-05-27 A firmware upgrade method, device, equipment, and storage medium Active CN115048147B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210587092.2A CN115048147B (en) 2022-05-27 2022-05-27 A firmware upgrade method, device, equipment, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210587092.2A CN115048147B (en) 2022-05-27 2022-05-27 A firmware upgrade method, device, equipment, and storage medium

Publications (2)

Publication Number Publication Date
CN115048147A CN115048147A (en) 2022-09-13
CN115048147B true CN115048147B (en) 2025-06-24

Family

ID=83160030

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210587092.2A Active CN115048147B (en) 2022-05-27 2022-05-27 A firmware upgrade method, device, equipment, and storage medium

Country Status (1)

Country Link
CN (1) CN115048147B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115567386A (en) * 2022-09-30 2023-01-03 苏州浪潮智能科技有限公司 Method for modifying properties of network card, device for modifying and system for modifying them
CN116009941A (en) * 2022-12-22 2023-04-25 联想(北京)信息技术有限公司 Firmware control method, device and electronic device
CN118260768A (en) * 2024-04-11 2024-06-28 超聚变数字技术有限公司 BMC startup, BMC firmware compilation, BMC firmware upgrade method, chip and computing device
CN119293803B (en) * 2024-12-10 2025-04-25 苏州元脑智能科技有限公司 Server startup verification system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111176701A (en) * 2019-12-13 2020-05-19 苏州浪潮智能科技有限公司 Firmware upgrading method and device based on external memory card
CN114356658A (en) * 2021-12-23 2022-04-15 深圳市天英联合教育股份有限公司 Processing method of firmware upgrading exception, computer equipment and readable storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111176701A (en) * 2019-12-13 2020-05-19 苏州浪潮智能科技有限公司 Firmware upgrading method and device based on external memory card
CN114356658A (en) * 2021-12-23 2022-04-15 深圳市天英联合教育股份有限公司 Processing method of firmware upgrading exception, computer equipment and readable storage medium

Also Published As

Publication number Publication date
CN115048147A (en) 2022-09-13

Similar Documents

Publication Publication Date Title
CN115048147B (en) A firmware upgrade method, device, equipment, and storage medium
CN110943860B (en) BMC (baseboard management controller) firmware updating method and system, electronic equipment and storage medium
US9946600B2 (en) Method of detecting power reset of a server, a baseboard management controller, and a server
CN109144789B (en) A method, device and system for restarting OSD
CN111182033B (en) A method and device for restoring a switch
CN112099825A (en) Method, device and equipment for upgrading component and storage medium
CN108255506A (en) A kind of data-updating method of BMC, device, equipment and readable storage medium storing program for executing
CN113672306B (en) Method, device, system and medium for recovery from abnormal self-checking of server components
US20060224723A1 (en) Data updating system and method
CN111324366A (en) A BMC boot firmware rollback method, device, BMC and storage medium
CN118151980A (en) A firmware upgrade method, device, equipment and storage medium
CN111400094A (en) A method, device, device and medium for restoring factory settings of a server system
CN114237722B (en) System starting method, device, equipment and engineering vehicle
CN113687867B (en) Shutdown method, system, equipment and storage medium of cloud platform cluster
CN111130856A (en) A server configuration method, system, device, and computer-readable storage medium
CN115794182A (en) Firmware out-of-band upgrade method, device, electronic equipment and storage medium
CN117033084B (en) Virtual machine backup method and device, electronic equipment and storage medium
CN114153503A (en) BIOS control method, device and medium
US20250377977A1 (en) Method and apparatus for amd server system installation power-off processing, device, and medium
CN111124095B (en) A method and related device for detecting power supply running state when upgrading power supply firmware
CN114996055B (en) Dual-machine hot standby system control method, device, and medium
CN111858234A (en) A task execution method, apparatus, device and medium
KR102221593B1 (en) System for maintaining the installation envoronment of computer terminals
CN113127239A (en) Page state monitoring method, device, terminal and storage medium
CN111061537A (en) Method, system and device for updating Tools of virtual machine and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: 215100 Building 9, No.1 guanpu Road, Guoxiang street, Wuzhong Economic Development Zone, Suzhou City, Jiangsu Province

Patentee after: Suzhou Yuannao Intelligent Technology Co.,Ltd.

Country or region after: China

Address before: 215100 Building 9, No.1 guanpu Road, Guoxiang street, Wuzhong Economic Development Zone, Suzhou City, Jiangsu Province

Patentee before: SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd.

Country or region before: China

CP03 Change of name, title or address