CN117742761A - Firmware updating method and device, storage medium and electronic equipment - Google Patents

Firmware updating method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN117742761A
CN117742761A CN202311775030.5A CN202311775030A CN117742761A CN 117742761 A CN117742761 A CN 117742761A CN 202311775030 A CN202311775030 A CN 202311775030A CN 117742761 A CN117742761 A CN 117742761A
Authority
CN
China
Prior art keywords
firmware
version
target
chip
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311775030.5A
Other languages
Chinese (zh)
Inventor
庄甲平
冯其涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Metabrain Intelligent Technology Co Ltd
Original Assignee
Suzhou Metabrain 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 Metabrain Intelligent Technology Co Ltd filed Critical Suzhou Metabrain Intelligent Technology Co Ltd
Priority to CN202311775030.5A priority Critical patent/CN117742761A/en
Publication of CN117742761A publication Critical patent/CN117742761A/en
Pending legal-status Critical Current

Links

Abstract

The embodiment of the application provides a firmware updating method and device, a storage medium and electronic equipment, wherein the method comprises the following steps: under the condition that the BMC of the server starts to update the target firmware in the server from the first version to the second version, acquiring the first version of the target firmware, and storing the first version of the target firmware into a target chip in the server; continuing to update the target firmware from the first version to the second version through the BMC under the condition that the first version of the target firmware is stored in the target chip; in the event that the update of the target firmware from the first version to the second version by the BMC fails, the target firmware is restored to the first version according to the first version stored in the target chip. Through the method and the device, the problem of low success rate of firmware update is solved, and the effect of improving the success rate of firmware update is achieved.

Description

Firmware updating method and device, storage medium and electronic equipment
Technical Field
The embodiment of the application relates to the field of computers, in particular to a firmware updating method and device, a storage medium and electronic equipment.
Background
In the related art, in the case of updating the firmware version of the server through the BMC (Baseboard Management Controller ), if the firmware refreshing process has the problem of abnormal channel occupation or power failure, etc., the firmware version refreshing process fails, in this case, because the firmware refreshing process is abnormal and the firmware is often designed as a single Flash chip, the new firmware version may not be started to be effective, the old firmware version may not be recovered, and it is understood that in the related art, there is a problem that the success rate of firmware update is low.
Aiming at the problems of low success rate of firmware update and the like in the related technology, no effective solution has been proposed yet.
Disclosure of Invention
The embodiment of the application provides a firmware updating method and device, a storage medium and electronic equipment, so as to at least solve the problem of low success rate of firmware updating in the related technology.
According to one embodiment of the present application, there is provided a firmware update method including: under the condition that a Baseboard Management Controller (BMC) of a server starts to update target firmware in the server from a first version to a second version, acquiring the first version of the target firmware, and storing the first version of the target firmware into a target chip in the server; continuing to update the target firmware from the first version to the second version by the BMC upon completion of storing the first version of the target firmware into the target chip; and recovering the target firmware to the first version according to the first version stored in the target chip under the condition that the updating of the target firmware from the first version to the second version by the BMC fails.
In an exemplary embodiment, in a case where the BMC starts to update the target firmware in the server from a first version to a second version, the method includes: under the condition that the BMC starts to update the target firmware in the server from a first version to a second version, initiating a target acquisition request to the target firmware by the BMC, wherein the target acquisition request is used for requesting to acquire the first version of the target firmware; and acquiring a first version of the target firmware returned by the target firmware in response to the target acquisition request, and storing the first version of the target firmware into the target chip.
In an exemplary embodiment, the initiating, by the BMC, a target acquisition request to the target firmware includes: obtaining a target communication bus address corresponding to the target firmware from the firmware and the communication bus address with corresponding relation, wherein each of one or more firmware in the server corresponds to one communication bus address, the one or more firmware comprises the target firmware, and each of the one or more firmware corresponds to one communication bus address and comprises the target communication bus address; and initiating the target acquisition request to the target communication bus address corresponding to the target firmware through the BMC.
In one exemplary embodiment, the storing the first version of the target firmware into the target chip includes: obtaining a target storage position corresponding to the target firmware from the firmware and the storage positions with corresponding relation, wherein the storage space in the target chip is set to allocate different storage positions to each of one or more firmware in the server, the one or more firmware comprises the target firmware, and the different storage positions allocated to each of the one or more firmware in the server comprise the target storage position; and storing the first version of the target firmware to the target storage position through the BMC.
In an exemplary embodiment, in a case that the updating of the target firmware from the first version to the second version by the BMC fails, restoring the target firmware to the first version according to the first version stored in the target chip includes: reading a first version of the target firmware from a target storage position corresponding to the target firmware in the target chip; writing the first version of the target firmware to the target firmware.
In one exemplary embodiment, the writing the first version of the target firmware to the target firmware includes:
transmitting the first version stored in the target chip to a storage space in the target firmware through a target bus corresponding to the target firmware, wherein communication is performed between the BMC and each of one or more firmware in the server through a bus respectively, the one or more firmware comprises the target firmware, and the bus for communication between the BMC and each of the one or more firmware comprises the target bus.
In an exemplary embodiment, in the event that the update of the target firmware from the first version to the second version by the BMC fails, the method further includes, after restoring the target firmware to the first version according to the first version stored in the target chip: updating the first version of the target firmware stored in the target chip to the second version in the case that updating the target firmware from the first version to the second version is completed through the BMC; or, in a case where the update of the target firmware from the second version to the third version is started through the BMC, the first version of the target firmware stored in the target chip is updated to the second version.
According to another embodiment of the present application, there is provided a firmware updating apparatus including: the storage module is used for acquiring a first version of target firmware and storing the first version of the target firmware into a target chip in a server under the condition that a Baseboard Management Controller (BMC) of the server starts to update the target firmware from the first version to the second version; a first updating module, configured to, when storing the first version of the target firmware into the target chip is completed, continue updating, by the BMC, the target firmware from the first version to the second version; and the recovery module is used for recovering the target firmware to the first version according to the first version stored in the target chip under the condition that the updating of the target firmware from the first version to the second version through the BMC fails.
According to a further embodiment of the present application, there is also provided a computer readable storage medium having stored therein a computer program, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
According to a further embodiment of the present application, there is also provided an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
According to the method and the device, when the BMC of the server starts to update the firmware of the server from the first version to the second version, the first version of the firmware of the server is stored to the target chip, when the BMC fails to update the firmware of the server from the first version to the second version, the firmware can be restored to the first version before updating according to the first version of the firmware stored in the target chip, and in this way, the firmware can be restored to the version before updating when the BMC fails to update the version of the firmware in the server, damage caused by version updating failure is avoided, and the version of the firmware which is restored to be completed can be continuously updated again, so that the success rate of firmware updating is improved, the problem that the success rate of firmware updating is lower can be solved, and the effect of improving the success rate of firmware updating is achieved.
Drawings
Fig. 1 is a hardware configuration block diagram of a server device of a firmware update method of an embodiment of the present application;
FIG. 2 is a flow chart of a firmware update method according to an embodiment of the present application;
FIG. 3 is a schematic diagram I of an alternative firmware update method according to an embodiment of the present application;
FIG. 4 is a schematic diagram II of an alternative firmware update method according to an embodiment of the present application;
FIG. 5 is a schematic diagram of an alternative target chip as a BMC master chip according to an embodiment of the application;
fig. 6 is a block diagram of a firmware updating apparatus according to an embodiment of the present application.
Detailed Description
Embodiments of the present application will be described in detail below with reference to the accompanying drawings in conjunction with the embodiments.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order.
The method embodiments provided in the embodiments of the present application may be performed in a server device or similar computing device. Taking the example of running on a server device, fig. 1 is a hardware block diagram of a server device of a firmware updating method according to an embodiment of the present application. As shown in fig. 1, the server device may include one or more (only one is shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a microprocessor MCU, a programmable logic device FPGA, or the like processing means) and a memory 104 for storing data, wherein the server device may further include a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those of ordinary skill in the art that the architecture shown in fig. 1 is merely illustrative and is not intended to limit the architecture of the server apparatus described above. For example, the server device may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program of application software and a module, such as a computer program corresponding to a firmware update method in the embodiment of the present application, and the processor 102 executes the computer program stored in the memory 104, thereby performing various functional applications and data processing, that is, implementing the method described above. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located with respect to the processor 102, which may be connected to the server device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of a server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, simply referred to as NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is configured to communicate with the internet wirelessly.
In this embodiment, a firmware updating method is provided, fig. 2 is a flowchart of the firmware updating method according to an embodiment of the present application, and as shown in fig. 2, the flowchart includes the following steps:
step S202, under the condition that a baseboard management controller BMC of a server starts to update a target firmware in the server from a first version to a second version, acquiring the first version of the target firmware, and storing the first version of the target firmware into a target chip in the server;
step S204, when the first version of the target firmware is stored in the target chip, continuing to update the target firmware from the first version to the second version through the BMC;
step S206, in the case that the update of the target firmware from the first version to the second version by the BMC fails, restoring the target firmware to the first version according to the first version stored in the target chip.
Through the steps, when the BMC of the server starts to update the firmware of the server from the first version to the second version, the first version of the firmware of the server is stored to the target chip, when the BMC fails to update the firmware of the server from the first version to the second version, the firmware can be restored to the first version before update according to the first version of the firmware stored in the target chip, and in such a way, the firmware can be restored to the version before update when the BMC fails to update the version of the firmware in the server, so that damage caused by version update failure of the firmware is avoided, and the restored version of the firmware can be continuously updated again, thereby improving the success rate of firmware update.
The server may include one or more firmware, but is not limited to, and may be illustrated and described by including firmware 1 and firmware 2 on a motherboard of the server. Fig. 3 is a schematic diagram of an alternative firmware update method according to an embodiment of the present application, as shown in fig. 3.
Server 301 may be, but is not limited to, a BMC302, a target chip 304, and a motherboard 305, where motherboard 305 is deployed with firmware 1 and firmware 2, where firmware 1 has a current version of firmware 1 (e.g., version a) stored therein, firmware 2 has a current version of firmware 2 (e.g., version b) stored therein, and firmware 1 may be, but is not limited to, updated from version a to version c by the BMC, in which case backing up firmware 1 version a to a storage location corresponding to firmware 1 in a storage space in target chip 304 may be, but is not limited to, implemented by the following steps.
In step S302, when the update of the firmware 1 from the version a to the version c is started by the BMC, the version a of the firmware 1 is acquired and stored in the target chip 304 in the server 301.
In step S304, when the storage of the version a of the firmware 1 into the target chip 304 in the server 301 is completed, the update of the firmware 1 from the version a to the version c is continued by the BMC.
In step S306, when the update of the firmware 1 from the version a to the version c by the BMC fails, the firmware 1 is restored to the version a according to the version a of the firmware 1 stored in the target chip 304.
According to the embodiment of the application, when the BMC starts to update the version of the firmware of the server, the version of the firmware before update is backed up, if the BMC fails to update the version of the firmware of the server, the firmware can be restored to the version before update according to the version of the firmware before update, and the problem of firmware failure caused by the failure of updating the version of the firmware is avoided.
In the technical solution provided in step S202, FW (Firmware) update, sometimes referred to as Firmware refresh, upgrade, refresh, rewrite, burn-in, or refresh, refers to a process of writing a new version of Firmware into a chip instead of the original version of Firmware. The target firmware may include, but is not limited to, firmware in the server, e.g., firmware on the motherboard of the server (or referred to as built-in firmware), e.g., BISO, BMC, etc., and firmware not on the motherboard of the server but in the server (or referred to as peripheral firmware), etc.
Alternatively, in this embodiment, the first version of the target firmware may include, but is not limited to, a current version of the target firmware may include, but is not limited to, a default version of the target firmware, a version after updating the default version of the target firmware, and so on.
The first version of the target firmware may be, but is not limited to being, a first version of code comprising the target firmware, and/or a firmware code file, etc., and the second version of the target firmware may be, but is not limited to being, a second version of code comprising the firmware, and/or a firmware code file, etc.
Alternatively, in this embodiment, the first version of the target firmware may be, but not limited to being, higher than the first version, e.g., degrading the version of the target firmware, or the first version of the target firmware may be, but not limited to being, lower than the second version, e.g., upgrading the version of the target firmware, etc., or the first version of the target firmware may be, but not limited to being, the same as the second version, e.g., re-brushing the version of the target firmware.
Optionally, in this embodiment, when the baseboard management controller BMC of the server starts to update the target firmware in the server from the first version to the second version, the first image file of the first version of the target firmware is obtained, and the first image file is stored in a storage space in the target chip in the server.
In one exemplary embodiment, a first version of a target firmware in a server may be acquired and stored into a target chip in the server, without limitation, in the event that the update of the target firmware from a first version to a second version is initiated by a baseboard management controller BMC of the server by: under the condition that the BMC starts to update the target firmware in the server from a first version to a second version, initiating a target acquisition request to the target firmware by the BMC, wherein the target acquisition request is used for requesting to acquire the first version of the target firmware; and acquiring a first version of the target firmware returned by the target firmware in response to the target acquisition request, and storing the first version of the target firmware into the target chip.
Alternatively, in the present embodiment, the versions of the plurality of firmware in the server may be, but are not limited to being, the same, for example, a first version of the plurality of BIOS is deployed in the server, it may be understood that the plurality of BIOS is included in the server, and the versions of the plurality of BIOS are the same, and the same version of the plurality of firmware in the server may be updated, but is not limited to being, by the following means.
Under the condition that the BMC starts to update the first firmware in the server from the first version to the second version, a target acquisition request is initiated to the first firmware by the BMC, wherein the target acquisition request is used for requesting to acquire the first version of the first firmware; acquiring a first version of the first firmware returned by the first firmware in response to the target acquisition request, and storing the first version of the first firmware into the target chip; in the case where the update of the second firmware in the server from the third version to the fourth version is started by the BMC, the BMC does not need to store the second version of the second firmware into the target chip, but directly updates the second firmware in the server from the first version to the second version by the BMC, wherein the first version of the first firmware and the third version of the second firmware are the same.
By the method, on one hand, only one firmware version of the same versions of the plurality of firmware is stored in the target chip, storage space in the target chip is saved, on the other hand, only one firmware version of the same versions of the plurality of firmware is backed up, and when the versions of other firmware versions in the same versions of the plurality of firmware are updated, the current versions of the firmware are not needed to be backed up, but the versions of other firmware versions in the same versions of the plurality of firmware are updated directly, so that the time for backing up the versions of the firmware is saved, and the updating efficiency of the versions of the firmware is improved.
In one exemplary embodiment, a target get request may be initiated by the BMC to the target firmware by, but is not limited to: obtaining a target communication bus address corresponding to the target firmware from the firmware and the communication bus address with corresponding relation, wherein each of one or more firmware in the server corresponds to one communication bus address, the one or more firmware comprises the target firmware, and each of the one or more firmware corresponds to one communication bus address and comprises the target communication bus address; and initiating the target acquisition request to the target communication bus address corresponding to the target firmware through the BMC.
Alternatively, in this embodiment, each firmware in the server may, but is not limited to, have a corresponding communication bus address, and it is understood that, in a case where the server includes the same version of the plurality of firmware, the same communication bus address may be allocated to the same version of the plurality of firmware, where one same communication bus address corresponds to a version of one of the same version of the plurality of firmware, for example, one same communication bus address corresponds to a version of any one of the same version of the plurality of firmware, and so on.
For example, the server includes 2 first versions of BIOS, in this case, but not limited to, the first versions of BIOS may be allocated an identical communication bus address 1, where the communication bus address 1 corresponds to a version of one of the 2 first versions of BIOS.
In one exemplary embodiment, the first version of the target firmware may be stored into the target chip, but is not limited to, by: obtaining a target storage position corresponding to the target firmware from the firmware and the storage positions with corresponding relation, wherein the storage space in the target chip is set to allocate different storage positions to each of one or more firmware in the server, the one or more firmware comprises the target firmware, and the different storage positions allocated to each of the one or more firmware in the server comprise the target storage position; and storing the first version of the target firmware to the target storage position through the BMC.
Alternatively, in this embodiment, the version of firmware in the server may have a larger data size, in which case, but not limited to, the storage space in the target chip may allocate a plurality of storage locations for the version of firmware having a larger data size, and it may be understood that the storage space in the target chip is set to allocate a plurality of storage locations for one firmware in the server.
Alternatively, in this embodiment, the multiple versions of firmware in the server may be, but are not limited to being, identical, for example, multiple first versions of BIOS may be deployed in the server, and may be, but are not limited to, allocating a common storage location for the multiple first versions of firmware in the storage space in the target chip, it being understood that multiple identical versions of firmware share a storage location in the target chip.
Alternatively, in the present embodiment, a version of one of multiple identical versions of firmware in a server may be stored on the same storage location in a target chip, but is not limited to, by: when the first firmware in the server is updated from the first version to the second version by the BMC, the first version of the first firmware is stored to the first storage location by the BMC, and when the second firmware in the server is updated from the third version to the fourth version by the BMC, the fourth version of the second firmware is stored to the first storage location by the BMC, wherein the first version and the third version are the same, and the second version and the fourth version are different.
In this way, a common storage location can be allocated in the storage space in the target chip for the first versions of the plurality of firmware, so that the storage space in the target chip is saved, and the utilization rate of the storage space in the target chip is improved.
Alternatively, in this embodiment, the current version of the target firmware and the last version of the current version of the target firmware may be stored in a storage space in the target chip at a storage location allocated for the target firmware in the server. For example, in the case where the update of the target firmware in the server from the first version to the second version is initiated by the BMC, the first version and the fifth version of the target firmware may be stored in the storage space in the target chip, but not limited to, where the fifth version of the target firmware updates the first version of the target firmware.
In the technical solution provided in step S204, when the first version of the target firmware is stored in the target chip, the update of the version of the firmware may be completed through the BMC, and the process is often to download a new version of the firmware and store the new version to the computer, and connect the device to be updated to the computer. The new version of the firmware is loaded through the BMC so as to update the original version of the firmware.
Optionally, in this embodiment, in a case that the first version of the target firmware is not stored in the target chip, updating the target firmware from the first version to the second version by the BMC may be stopped, and a hint information is displayed on the visual interface by the BMC, where the hint information is used to hint that the first version of the target firmware is not stored in the target chip and whether the first version of the target firmware is stored in the target chip again; in response to a selection operation performed by the user on the visual interface, the first version of the target firmware is stored to the target chip again through the BMC.
Alternatively, in this embodiment, in the event that the storing of the first version of the target firmware into the target chip is completed, the updating of the target firmware from the first version to the second version may be continued through the BMC by, but not limited to: verifying the second version of the target firmware according to the target verification information of the second version of the target firmware and the reference verification information of the reference version of the target firmware to obtain a verification result, wherein the generation modes of the target verification information of the second version of the target firmware and the reference verification information of the reference version of the target firmware are the same; and under the condition that the verification result is used for indicating that the target verification information is consistent with the reference verification information, continuing to update the target firmware from the first version to the second version through the BMC. As an alternative example, the verification information may include, but is not limited to, an identification of the second version of the target firmware, an MDS value, and so forth, which is not limiting of the present application.
In the technical solution provided in step S206, in the case that the update of the target firmware from the first version to the second version by the BMC fails, in such a case, it may not be that the second version of the target firmware has a problem, in such a case, the second version of the target firmware may be stored in the target storage location of the storage space of the target chip by the BMC, in the case that the target firmware is updated from the first version to the second version again by the BMC, the second version of the target firmware stored in the target storage location may be read by the BMC, and then the target firmware is updated from the first version to the second version by the BMC, in this way, the second version of the target firmware is prevented from being acquired again, but the second version is stored in the target chip, so that the time required for acquiring the second version of the target firmware again is saved, and the updating efficiency of the target firmware is improved.
Optionally, in this embodiment, in the case that the update of the target firmware from the first version to the second version by the BMC fails, the target firmware may be restored to the first version according to the first version stored in the target chip, and as an optional example, the target firmware may be restored to the first version according to the first image file of the first version of the target firmware stored in the target chip, by this way, firmware damage caused by the update failure of the firmware is avoided, and the service life of the firmware is prolonged.
In one exemplary embodiment, the target firmware may be restored to the first version according to the first version stored in the target chip in the event that the update of the target firmware from the first version to the second version by the BMC fails by, but is not limited to: reading a first version of the target firmware from a target storage position corresponding to the target firmware in the target chip; writing the first version of the target firmware to the target firmware.
Optionally, in this embodiment, in a case that updating, by the BMC, the target firmware from the first version to the second version fails and the second version of the target firmware is stored in the target chip, after restoring the target firmware to the first version according to the first version stored in the target chip, the method further includes: the second version of the target firmware is read from the target storage position through the BMC, the target firmware is updated from the first version to the second version through the BMC, and in this way, the time for acquiring the second version of the target firmware again is saved, and the efficiency of updating the version of the target firmware is improved.
Alternatively, in this embodiment, in the case where the data size of the version of the target firmware is large, a plurality of storage locations may be allocated to the target firmware in the storage space in the target chip, and in this case, the first version of the target firmware is read from the plurality of storage locations corresponding to the target firmware in the target chip; and splicing the read data on the plurality of storage positions to obtain a first version of the target firmware, and writing the first version of the target firmware into the target firmware.
In one exemplary embodiment, the first version of the target firmware may be written to the target firmware by, but is not limited to: transmitting the first version stored in the target chip to a storage space in the target firmware through a target bus corresponding to the target firmware, wherein communication is performed between the BMC and each of one or more firmware in the server through a bus respectively, the one or more firmware comprises the target firmware, and the bus for communication between the BMC and each of the one or more firmware comprises the target bus.
Alternatively, in this embodiment, each of the firmware in the BMC and the one or more firmware in the server may communicate through a bus, where the target firmware is firmware on the server motherboard, may be, but not limited to, transmitting through an internal mirror bus, where the target firmware is not firmware on the server motherboard, may be, but not limited to, transmitting through an external mirror bus, for example, a LPC (Low Pin Count) bus or SPI (Serial Peripheral Interface) bus, and so on.
Optionally, in this embodiment, in order to increase the rate of transmitting the version of firmware between the BMC and the firmware, a plurality of target chips may be deployed in the server according to a deployment location of the firmware in the server, where a distance between an i-th target chip in the plurality of target chips and an i-th set of firmware in the server is less than or equal to a preset first distance threshold, and a distance between each firmware in the i-th set of firmware is less than or equal to a preset second distance threshold. By the mode, the length of a physical path for transmitting the version of the firmware between the BMC and the firmware is shortened, the transmission rate for transmitting the version of the firmware is improved, and further the efficiency for recovering the version of the firmware is improved.
In one exemplary embodiment, in case that the update of the target firmware from the first version to the second version by the BMC fails, the method further includes, after restoring the target firmware to the first version according to the first version stored in the target chip: updating the first version of the target firmware stored in the target chip to the second version in the case that updating the target firmware from the first version to the second version is completed through the BMC; or, in a case where the update of the target firmware from the second version to the third version is started through the BMC, the first version of the target firmware stored in the target chip is updated to the second version.
Optionally, in this embodiment, the operations that may be performed asynchronously between the updating of the target firmware from the first version to the second version by the BMC and the updating of the first version to the second version of the target firmware stored in the target chip may be, but are not limited to, for example, in the case where the updating of the target firmware from the first version to the second version is completed by the BMC, the updating of the first version to the second version of the target firmware stored in the target chip is completed, and by this way, the timely execution of the updated version of the firmware is realized, and the instantaneity of the version of the target firmware stored in the target chip is improved.
Alternatively, in the present embodiment, it may be but not limited to a case where the first version of the target firmware stored in the target chip is updated to the second version, the version of the target firmware stored in the target chip may be but not limited to including a plurality of latest versions of firmware or the latest version of firmware, for example, the version of the target firmware stored in the target chip may be but not limited to including the first version and the second version, or only the second version.
In order to better understand the implementation flow of the firmware update method in the embodiment of the present application, the following explanation and explanation of the firmware update method in the embodiment of the present application in conjunction with the alternative embodiment may be, but is not limited to, applicable to the embodiment of the present application.
Fig. 4 is a schematic diagram of an alternative firmware update method according to an embodiment of the present application, as shown in fig. 4, which may be explained and illustrated by taking a target chip as a Fail over chip as an example, and peripheral firmware Flash, BMC Flash, failrecover Flash, BIOS Flash, CPLD Flash, and the like are deployed in a server.
Server firmware management board card based on Fail discover chip. The server firmware management board card designs a Fail recovery chip (equivalent to the target chip) besides the BIOS and BMC chips. The server firmware management board card can be arranged on a mainboard of the server, wherein the Fail recovery chip is positioned on a firmware management module on the server firmware management board card, the firmware management module has two functions, namely one firmware management module is used for firmware mirror before firmware version upgrade, when the firmware version upgrade fails, the firmware version refresh can be used for firmware version refresh, and the second BMC main chip can be switched when BMC faults are triggered, BMC management services are integrally provided for the outside, and the method is different from the traditional method that 2 chips are used as BMC standby flash or BIOS standby flash respectively, so that the chip utilization rate is improved.
The server firmware management module based on the Fail recovery chip designs two communication links between the Fail recovery chip and the server firmware, and one is based on a communication bus (SPI) link on the server for communication. The high-speed mirror image bus is a high-speed mirror image bus on a server firmware management module, wherein the mirror image bus of the server firmware management module based on a Fail recovery chip adopts two mirror image buses, an internal mirror image bus and an external mirror image recovery bus. The firmware version (for example, the mirror image of the firmware version) transmitted between the firmware chip (BIOS, BMC, CPLD, etc.) of the management board or the main board link and the Fail discover chip is completed by adopting the built-in mirror image bus of the server firmware management module, and the built-in mirror image bus is an inherent bus recorded on the board card, so that the method is high in speed and convenient. Because the peripheral mirror image recovery bus is used when the peripheral board cards such as a backboard are in a Flash failure through the BMC communication bus, the design is that a server firmware management module which is carried out when the mirror image refresh failure needs to be recovered is temporarily connected with the backboard of the board card where the peripheral firmware chip is located, the connection bus can be LPC (Low Pin Count) bus or SPI (Serial Peripheral Interface) bus, the BMC triggers the synchronization process of the peripheral firmware and the Fail recovery chip, the synchronization process of the peripheral firmware to the Fail recovery chip can be carried out through an inherent communication bus (SPI) link, and the Fail recovery chip needs to be carried out by an external special peripheral mirror image recovery bus when the Fail recovery chip mirrors the peripheral firmware Flash.
The BMC provides 2 firmware upgrading methods, and a user can select to upgrade the development mode firmware and the mass production mode firmware, wherein the development mode firmware upgrading method mainly aims at the version upgrading mode of the board card firmware in the test verification stage, the version of the firmware is unstable, and the situation of upgrading errors possibly exists. The mass production mode firmware upgrade mainly aims at board card upgrade in the mass production stage of the machine. The board card and the upgrade version at the stage are verified in batches, and the problem of firmware upgrade does not exist.
The BMC may select to enter a development mode firmware upgrade or a mass production mode firmware upgrade. The specific process of developing the mode firmware upgrade is as follows:
step S401, upgrading the firmware version: the BMC Flash chip on the server firmware management module is used for storing a version of a BMC main program (for example, an image of the version of the BMC main program), when firmware is updated, a user uploads the version of firmware FW to be updated to the BMC, after clicking to start updating, the BMC checks according to the version of the firmware FW to be updated, and by analyzing a firmware FW file (or called the version of the firmware FW to be updated), the type of a device needing to update the firmware can be obtained, and the communication bus address of the device corresponding to the FW can be obtained by matching system information scanned by the BMC.
In step S402, after the user clicks to start the upgrade, the BMC first sends a firmware image request (corresponding to the target acquisition request) to the firmware chip control end to be upgraded according to the communication bus address. This action synchronizes the FW image (corresponding to the second version of firmware) between the Fail discover chip on the BMC trigger server firmware management module and the version of firmware that needs to be upgraded. The BIOS and BMC FW mirror synchronization uses a high-speed mirror bus between the BIOS or BMC Flash and Fail RecoverFlash to perform Flash mirror synchronization, and the first version of the peripheral firmware (for example, the mirror image of the first version of the peripheral firmware) triggers version synchronization between the peripheral firmware FW and Fail Recover Flash through the communication bus of the BMC.
In step S403, in case that the synchronization of the old version of the firmware (e.g., the image of the old version of the firmware) to the Fail recovery chip fails, the BMC displays a hint information, where the hint information is used to hint whether the user is synchronized again, and in case that the synchronization of the old version of the firmware (e.g., the image of the old version of the firmware) to the Fail recovery chip is successful, the BMC performs an update operation of the version of the corresponding firmware again, where the update operation is performed through a communication bus between the BMC and each firmware board card. The same manner as the current mainstream BMC upgrades the firmware is not described here in detail.
In step S404, when the BMC acquires that the version refresh operation of the corresponding firmware fails, the BMC returns to the upgrade failure. At this time, since the version update of the firmware fails, the conventional communication bus communication between the BMC and the firmware fails, the BMC prompts the user whether to use the old version of the firmware in the Fail recovery chip (for example, the image of the old version of the firmware) for recovery, after the user selects the image recovery, the BMC determines whether the firmware to be recovered is the built-in firmware or the peripheral firmware, if the built-in firmware FW is required to be recovered, the BMC directly uses the old version of the firmware in the Fail recovery chip (for example, the image of the old version of the firmware) to perform the image recovery operation on the corresponding firmware through the built-in image bus. If the peripheral firmware FW is required to be recovered, the BMC prompts the user to connect the server firmware management module with the peripheral mirror recovery bus of the board card where the peripheral firmware is located. After the user is connected successfully, the BMC triggers the mirror recovery operation of the Fail recovery chip to the peripheral firmware after entering the next step. After the image recovery operation is successful, the BMC prompts the user that the image recovery is successful.
By the aid of the method, the modularized firmware management module is provided, mirror backup before firmware upgrading and mirror recovery after firmware refreshing failure can be completed, and a server firmware management board card is provided with a Fail recovery chip besides BIOS and BMC chips. The server firmware management module based on the Fail discover chip designs an internal mirror image bus and an external mirror image recovery bus. The user can select different firmware FWs to perform fault recovery by using an internal mirror bus and an external mirror bus respectively, the BMC controls to backup old mirror contents in a Flash chip to be updated before firmware updating, when firmware refreshing fails, the firmware version can be subjected to mirror restoration through the mirror in the Fail recovery, the BMC can manage a firmware management module through selecting a development mode firmware updating mode and a mass production mode firmware updating mode, the original FW fault recovery after the firmware refreshing failure is completed between the Fail recovery chip and the BMC Flash chip is managed and controlled through the firmware management module, a development mode firmware refreshing mode and a mass production mode firmware refreshing mode are distinguished, a refreshing strategy is optimized for different scenes, the problem that the firmware version fails due to refreshing failure after refreshing is solved, the success rate of updating the firmware version is improved, and the research and development cost is indirectly reduced.
Optionally, in this embodiment, the method further includes: in the event of a BMC failure, the BMC function may be performed by, but is not limited to, the target chip (e.g., monitoring the temperature of the server, the speed of the fan, the voltage, the current, etc.), and the version of firmware in the server may be updated by the target chip, where the version of BMC is stored in a memory location of the memory space in the target chip, it being understood that in such a case the target chip is referred to as the BMC master chip. As an alternative example, a version of the main program image file of the BMC is stored on a storage location of the storage space in the target chip.
Fig. 5 is a schematic diagram of an alternative target chip as a BMC host chip according to an embodiment of the present application, and as shown in fig. 5, may be explained and illustrated by taking the target chip as a Fail over chip as an example, and peripheral firmware Flash, BMC Flash, fail recover Flash, BIOS Flash, CPLD Flash, and the like are disposed in a server.
The difference between the mass production mode firmware upgrading mode and the development mode firmware upgrading mode is that the Fail recovery chip is used for image backup and recovery when other firmware is upgraded, and the Fail recovery chip is set as a standby chip of the main BMC chip by the firmware management module in the mass production mode, so that the main BMC is switched under the condition of being applicable. The method may include, but is not limited to, the following steps:
Step S501, firmware version upgrade: the BMC Flash chip above the server firmware management module is used for storing a version of the BMC main program (for example, an image of the version of the BMC main program), when the firmware is updated, a user uploads the version of the firmware FW to be updated to the BMC, after clicking to start the update, the BMC checks according to the version of the firmware FW to be updated, and the version of the firmware can be updated by analyzing a firmware FW file (or called the version of the firmware FW to be updated), so that the Fail recovery chip is not used for backing up the old version of the firmware.
In step S502, when the version update of the BMC main program is completed, the master BMC triggers the backup of the version of the BMC main program to the standby BMC chip (original Fail recovery chip) using the latest version of the firmware.
Compared with the related art, when the BMC is designed, the dual-chip redundancy design is needed, when one flash is brushed out, the flash can be taken over, through the embodiment of the application, the modularized firmware management module can complete BMC fault transfer and continuously provide BMC management service to the outside, and when the main BMC hangs down (e.g. fails or the like) due to unexpected reasons, the standby BMC chip (equivalent to the target chip) can be triggered to complete fault take over. When the development mode is switched to be used for version upgrading of FW firmware, the target chip (for example, the Fail recovery chip) and the BMC main program chip are exchanged once, so that the backup of the original dual-BMC dual-BIOS main and standby chips is replaced, the use of the chips is reduced, the multiple purposes of one chip are realized, and the use efficiency of the chips is improved.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), comprising several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method described in the embodiments of the present application.
The embodiment also provides a firmware updating apparatus, which is used for implementing the above embodiment and the preferred implementation, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 6 is a block diagram of a firmware update apparatus according to an embodiment of the present application, as shown in fig. 6, the apparatus includes:
a storage module 602, configured to obtain a first version of a target firmware in a server when a baseboard management controller BMC of the server starts to update the target firmware from the first version to a second version, and store the first version of the target firmware into a target chip in the server;
a first updating module 604, configured to, when storing the first version of the target firmware into the target chip is completed, continue updating, by the BMC, the target firmware from the first version to the second version;
and a restoration module 606, configured to restore, if the update of the target firmware from the first version to the second version by the BMC fails, the target firmware to the first version according to the first version stored in the target chip.
By means of the device, when the BMC of the server starts to update the firmware of the server from the first version to the second version, the first version of the firmware of the server is stored to the target chip, when the BMC fails to update the firmware of the server from the first version to the second version, the firmware can be restored to the first version before updating according to the first version of the firmware stored in the target chip, and in this way, the firmware can be restored to the version before updating when the BMC fails to update the version of the firmware in the server, damage caused by version updating failure is avoided, and the restored version of the firmware can be continuously updated again, so that the success rate of firmware updating is improved, the problem that the success rate of firmware updating is low can be solved, and the effect of improving the success rate of firmware updating is achieved.
In one exemplary embodiment, the memory module includes: an initiating unit, configured to initiate, by the BMC, a target acquisition request to the target firmware when the target firmware in the server starts to be updated from a first version to a second version by the BMC, where the target acquisition request is used to request to acquire the first version of the target firmware; and the storage unit is used for acquiring a first version of the target firmware returned by the target firmware in response to the target acquisition request and storing the first version of the target firmware into the target chip.
In an exemplary embodiment, the initiating unit is configured to: obtaining a target communication bus address corresponding to the target firmware from the firmware and the communication bus address with corresponding relation, wherein each of one or more firmware in the server corresponds to one communication bus address, the one or more firmware comprises the target firmware, and each of the one or more firmware corresponds to one communication bus address and comprises the target communication bus address; and initiating the target acquisition request to the target communication bus address corresponding to the target firmware through the BMC.
In an exemplary embodiment, the storage unit is configured to: obtaining a target storage position corresponding to the target firmware from the firmware and the storage positions with corresponding relation, wherein the storage space in the target chip is set to allocate different storage positions to each of one or more firmware in the server, the one or more firmware comprises the target firmware, and the different storage positions allocated to each of the one or more firmware in the server comprise the target storage position; and storing the first version of the target firmware to the target storage position through the BMC.
In one exemplary embodiment, the recovery module includes: the reading unit is used for reading the first version of the target firmware from a target storage position corresponding to the target firmware in the target chip; and the writing unit is used for writing the first version of the target firmware into the target firmware.
In one exemplary embodiment, the writing unit is configured to: transmitting the first version stored in the target chip to a storage space in the target firmware through a target bus corresponding to the target firmware, wherein communication is performed between the BMC and each of one or more firmware in the server through a bus respectively, the one or more firmware comprises the target firmware, and the bus for communication between the BMC and each of the one or more firmware comprises the target bus.
In one exemplary embodiment, the apparatus further comprises: a second updating module configured to, in a case where updating of the target firmware from the first version to the second version by the BMC fails, update the first version of the target firmware stored in the target chip to the second version after restoring the target firmware to the first version according to the first version stored in the target chip is completed by the BMC; or, a third updating module, configured to update, when the BMC starts to update the target firmware from the second version to a third version, the first version of the target firmware stored in the target chip to the second version.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; alternatively, the above modules may be located in different processors in any combination.
Embodiments of the present application also provide a computer readable storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
In one exemplary embodiment, the computer readable storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
Embodiments of the present application also provide an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
In an exemplary embodiment, the electronic device may further include a transmission device connected to the processor, and an input/output device connected to the processor.
Specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the exemplary implementation, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the modules or steps of the application described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may be implemented in program code executable by computing devices, so that they may be stored in a storage device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps of them may be fabricated into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the same, but rather, various modifications and variations may be made by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application should be included in the protection scope of the present application.

Claims (10)

1. A firmware updating method is characterized in that,
Comprising the following steps:
under the condition that a baseboard management controller BM C of a server starts to update a target firmware in the server from a first version to a second version, acquiring the first version of the target firmware, and storing the first version of the target firmware into a target chip in the server;
continuing to update the target firmware from the first version to the second version through the bm C upon completion of storing the first version of the target firmware into the target chip;
in the event that the updating of the target firmware from the first version to the second version by the BMC fails, the target firmware is restored to the first version according to the first version stored in the target chip.
2. The method of claim 1, wherein the step of determining the position of the substrate comprises,
the method for updating the target firmware in the server from the first version to the second version by the baseboard management controller BM C of the server, obtaining the first version of the target firmware, and storing the first version of the target firmware into a target chip in the server comprises the following steps:
Under the condition that updating of target firmware in the server from a first version to a second version is started through the BMC, a target acquisition request is initiated to the target firmware through the BMC, wherein the target acquisition request is used for requesting acquisition of the first version of the target firmware;
and acquiring a first version of the target firmware returned by the target firmware in response to the target acquisition request, and storing the first version of the target firmware into the target chip.
3. The method of claim 2, wherein the step of determining the position of the substrate comprises,
the initiating, by the BMC, a target acquisition request to the target firmware, including:
obtaining a target communication bus address corresponding to the target firmware from the firmware and the communication bus address with corresponding relation, wherein each of one or more firmware in the server corresponds to one communication bus address, the one or more firmware comprises the target firmware, and each of the one or more firmware corresponds to one communication bus address and comprises the target communication bus address;
and initiating the target acquisition request to the target communication bus address corresponding to the target firmware through the BM C.
4. The method of claim 2, wherein the step of determining the position of the substrate comprises,
the storing the first version of the target firmware into the target chip includes:
obtaining a target storage position corresponding to the target firmware from the firmware and the storage positions with corresponding relation, wherein the storage space in the target chip is set to allocate different storage positions to each of one or more firmware in the server, the one or more firmware comprises the target firmware, and the different storage positions allocated to each of the one or more firmware in the server comprise the target storage position;
and storing the first version of the target firmware to the target storage location through the BMC.
5. The method of claim 1, wherein the step of determining the position of the substrate comprises,
the restoring the target firmware to the first version according to the first version stored in the target chip in the case that the updating of the target firmware from the first version to the second version by the bm C fails, includes:
reading a first version of the target firmware from a target storage position corresponding to the target firmware in the target chip; writing the first version of the target firmware to the target firmware.
6. The method of claim 5, wherein the step of determining the position of the probe is performed,
the writing the first version of the target firmware to the target firmware includes:
transmitting the first version stored in the target chip to a storage space in the target firmware through a target bus corresponding to the target firmware, wherein communication is performed between the BMC and each of one or more firmware in the server through a bus, the one or more firmware comprises the target firmware, and the bus for communication between the BMC and each of the one or more firmware comprises the target bus.
7. The method of claim 1, wherein the step of determining the position of the substrate comprises,
in the event that the updating of the target firmware from the first version to the second version by the bm C fails, the method further includes, after restoring the target firmware to the first version according to the first version stored in the target chip:
updating the first version of the target firmware stored in the target chip to the second version, if the updating of the target firmware from the first version to the second version is completed through the bm C; or,
In a case where the update of the target firmware from the second version to the third version is started through the bm C, the first version of the target firmware stored in the target chip is updated to the second version.
8. A firmware updating apparatus is characterized in that,
comprising the following steps:
a storage module, configured to obtain a first version of a target firmware in a server when a baseboard management controller B M C of the server starts to update the target firmware from the first version to a second version, and store the first version of the target firmware into a target chip in the server;
a first updating module, configured to continue updating, by the bm C, the target firmware from the first version to the second version, in a case where storing of the first version of the target firmware into the target chip is completed;
and the recovery module is used for recovering the target firmware to the first version according to the first version stored in the target chip under the condition that updating of the target firmware from the first version to the second version through the BM C fails.
9. A computer-readable storage medium comprising,
The computer readable storage medium has stored therein a computer program, wherein the computer program when executed by a processor realizes the steps of the method as claimed in any of claims 1 to 7.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that,
the processor, when executing the computer program, implements the steps of the method as claimed in any one of claims 1 to 7.
CN202311775030.5A 2023-12-21 2023-12-21 Firmware updating method and device, storage medium and electronic equipment Pending CN117742761A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311775030.5A CN117742761A (en) 2023-12-21 2023-12-21 Firmware updating method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311775030.5A CN117742761A (en) 2023-12-21 2023-12-21 Firmware updating method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN117742761A true CN117742761A (en) 2024-03-22

Family

ID=90282747

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311775030.5A Pending CN117742761A (en) 2023-12-21 2023-12-21 Firmware updating method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN117742761A (en)

Similar Documents

Publication Publication Date Title
CN101436138B (en) Control device and control method for software upgrade and dynamic rolling back
CN108616382B (en) Method and device for upgrading network card firmware, network card and equipment
EP2375323A1 (en) Firmware image update and management
CN107179909A (en) Method for upgrading software, device and computer-readable recording medium
CN107066300B (en) Firmware upgrading method of storage device and storage device
US11314665B2 (en) Information processing system, information processing device, BIOS updating method for information processing device, and BIOS updating program for information processing device
CN114116280B (en) Interactive BMC self-recovery method, system, terminal and storage medium
CN104915226A (en) Network device software starting method, device and network device
WO2011088701A1 (en) Method and device for online upgrading cross-platform version
CN111104147A (en) BMC upgrading method, device, terminal and storage medium
CN115840579A (en) FPGA remote updating method, system, chip mounter and storage medium
CN111651304A (en) Software recovery method and device based on double-core intelligent electric meter and computer equipment
CN111984287A (en) Equipment upgrading method and system
RU2600101C1 (en) Assembly control module and method of firmware updating for this control module
CN106708541A (en) Version upgrading processing method and apparatus
CN117742761A (en) Firmware updating method and device, storage medium and electronic equipment
CN114253573A (en) PCIe device firmware batch upgrading method, system, terminal and storage medium
CN113377425A (en) BMC firmware generation method and device, BMC starting method and device and storage medium
CN109783031B (en) Method, device, terminal and storage medium for checking drive letter and slot number of RAID card
CN111176902A (en) Device and method for backing up Controller Device firmware by using BMC Flash
CN111324488B (en) Program backup processing method and device
CN116627465A (en) Upgrading method and device for extended JBOD firmware and electronic equipment
CN114115955B (en) Method, system, terminal and storage medium for upgrading FPGA firmware of server resource box
CN117608618B (en) Server firmware upgrading method and device, storage medium and electronic equipment
CN114968314B (en) Firmware upgrading method and device for display equipment, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination