Firmware refreshing method and device, equipment and storage medium
通过在Switch芯片固件刷新失败时使用另一个Switch芯片的固件进行还原,解决了Switch芯片固件刷新问题,实现了快速、稳定恢复和成本效益。
Patent Information
- Application Number
- CN202510727190.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-03
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2045-06-03
AI Technical Summary
During the server operation and maintenance process, after problems occur in the firmware refresh of the Switch chip, how to ensure that the Switch chip can work effectively.
Provides a firmware refresh method, by resuming the firmware of another Switch chip on the refresh failure, ensuring that the Switch chip that fails to refresh can resume normal operation.
Without adding additional hardware equipment, the Switch chip is achieved quickly and stably recovered, reducing cost investment, and supporting centralized monitoring and management of Switch chips in large data centers.
Smart Images

Figure CN120276755A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of firmware update, and in particular to a firmware refresh method, device, equipment and storage medium. Background Art
[0002] GPU (Graphics Processing Unit) is a hardware device dedicated to processing graphics and image-related computing tasks. The Switch chip on the GPU board is responsible for establishing a high-speed data channel between the GPU and other components (for example, memory, CPU). A stable Switch chip can ensure that data can be transmitted at a stable rate and low latency, so that the GPU can obtain the required data for calculation in a timely manner and quickly feedback the results. Stable Switch chips are essential for tasks that have extremely high requirements for data transmission, such as graphics rendering and deep learning. GPUs with dual Switch chips have multiple topologies, and the FW (Firmware) versions of Switch chips are different in different topologies. When problems occur in the firmware refresh of the Switch chip during server operation and maintenance, how to ensure that the Switch chip can work effectively has become a technical problem that technicians in this field need to solve urgently. Summary of the invention
[0003] The present application provides a firmware refresh method, apparatus, device and storage medium to ensure that a Switch chip can work effectively after a problem occurs in the firmware refresh of the Switch chip.
[0004] The present application provides a firmware updating method, comprising: Refresh the firmware of the first switch; Detecting whether the firmware of the first switch is updated successfully; If the firmware update of the first switch fails, a restore instruction is sent to the first switch, and the firmware of the second switch is used to restore the firmware of the first switch; Refreshing the firmware of the second switch; Detecting whether the firmware of the second switch is updated successfully; If the firmware update of the second switch fails, a restore instruction is sent to the second switch, and the firmware of the first switch is used to restore the firmware of the second switch.
[0005] The present application also provides a firmware updating device, comprising: A first refreshing module, used for refreshing the firmware of the first switch; A first detection module, used to detect whether the firmware of the first switch is refreshed successfully; The first restoration module is configured to, if the firmware update of the first switch fails, send a restoration instruction to the first switch and use the firmware of the second switch to restore the firmware of the first switch; The second update module is configured to update the firmware of the second switch; The second detection module is configured to detect whether the firmware update of the second switch is successful; The second restoration module is configured to, if the firmware update of the second switch fails, send a restoration instruction to the second switch and use the firmware of the first switch to restore the firmware of the second switch.
[0006] This application also provides an electronic device, including: a memory for storing a computer program; a processor for implementing the steps of any of the above firmware update methods when executing the computer program.
[0007] This application also provides a computer-readable storage medium storing a computer program, wherein the computer program implements the steps of any of the above firmware update methods when executed by a processor.
[0008] This application also provides a computer program product including a computer program, and the computer program implements the steps of any of the above firmware update methods when executed by a processor.
[0009] When this application updates the firmware of the GPUs of the dual Switch chips, if the firmware update of one Switch chip fails, without powering off, the firmware of the other Switch chip is used to restore the firmware of the Switch chip with the failed firmware update, so that the functions of the Switch chip with the failed firmware update return to normal. In this way, after a problem occurs in the firmware update of the Switch chip, it can be ensured that the Switch chip can work effectively. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] To more clearly illustrate the embodiments of this application, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings in the following description are only some embodiments of this application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0011] Figure 1 It is a flowchart of a firmware update method provided by an embodiment of this application; Figure 2 It is a schematic diagram of a Balance topology provided by an embodiment of this application; Figure 3 It is a schematic diagram of a Common topology provided by an embodiment of this application; Figure 4 A schematic diagram of a Cascade topology provided by an embodiment of the present application; Figure 5 A schematic diagram of a specific firmware update process provided by an embodiment of the present application; Figure 6 A schematic diagram of a link provided by an embodiment of the present application; Figure 7 A schematic diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0012] Next, the technical solutions in the embodiments of the present application will be clearly and completely described with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.
[0013] It should be noted that in the description of the present application, the terms "include", "comprise" or any other variation thereof are intended to cover a non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. The terms "first", "second", etc. in the present application are used to distinguish similar objects and not to describe a specific order or sequence.
[0014] To enable those skilled in the art of the present technology to better understand the solution of the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific implementation manners.
[0015] An embodiment of the present application provides a firmware update method. The method will be described in detail below in combination with the execution process of the firmware update method. Refer to Figure 1 As shown, the firmware update method includes: S101: Update the firmware of the first switch; S102: Detect whether the firmware of the first switch is updated successfully; S103: If the firmware update of the first switch fails, send a restoration instruction to the first switch and use the firmware of the second switch to restore the firmware of the first switch; S104: Update the firmware of the second switch; S105: Detect whether the firmware of the second switch is updated successfully; S106: If the firmware update of the second switch fails, send a restoration instruction to the second switch and use the firmware of the first switch to restore the firmware of the second switch.
[0016] For the GPU board with multiple Switch chips, confirm the topology information, topology ID, and FW version information of the GPU board, and save the configuration file of the Switch chip. The saving format can be: chip number_GPU topology_topology ID_FW version.
[0017] The corresponding relationship between the GPU topology, topology ID, and FW version can be referred to as shown in Table 1: Table 1
[0018] Refresh the new firmware for the first Switch chip, i.e., the first switch. After the refresh is completed, judge whether the firmware of the first switch is successfully refreshed by confirming the FW version information and running status of the first switch. If the FW version information and the running status are normal, it can be considered that the firmware refresh is successful. If the FW version information is abnormal and the configuration file is abnormal, it can be considered that the firmware refresh fails. If the firmware refresh fails, then issue a restore command to the first switch through the second Switch chip, i.e., the second switch, and use the old firmware of the second switch to restore the firmware of the first switch. If the firmware of the first switch is successfully refreshed, then retain the new firmware image file and the corresponding configuration file.
[0019] In some embodiments, sending a restore command to the first switch and using the firmware of the second switch to restore the firmware of the first switch includes: If the topology of the image processor is a balanced topology, then notify the second processor through the first processor that the firmware refresh of the first switch fails, so as to notify the second switch through the second processor that the firmware refresh of the first switch fails, so that the second switch issues a restore command to the first switch, and the second switch transfers the firmware image file of the second switch to the first switch and restores the firmware of the first switch according to the corresponding configuration file; in the balanced topology, the first processor is respectively connected to the first switch and the second processor, the second processor is connected to the second switch, and the first switch is connected to the second switch; If the topology of the image processor is a general topology, then notify the second switch through the first processor that the firmware refresh of the first switch fails, so that the second switch issues a restore command to the first switch, and the second switch transfers the firmware image file of the second switch to the first switch and restores the firmware of the first switch according to the corresponding configuration file; in the general topology, the first processor is respectively connected to the first switch, the second switch, and the second processor, and the first switch is connected to the second switch; If the topology of the image processor is a cascade topology, the first processor notifies the second switch of the failure of the first switch firmware refresh via the first switch, causing the second switch to issue a restoration instruction to the first switch. The second switch transfers the firmware image file of the second switch to the first switch and restores the firmware of the first switch according to the corresponding configuration file. In the cascade topology, the first processor is respectively connected to the first switch and the second processor, and the first switch is connected to the second switch.
[0020] Reference Figure 2 shown in Figure 2 As shown, the figure shows the Balance topology, i.e., the balanced topology. SW0 is the first switch, and SW1 is the second switch. CPU0 is the first processor, and CPU1 is the second processor. When the topology of the image processor is a balanced topology, the first processor detects the failure of the first switch firmware refresh. The first processor notifies the second processor of the failure of the first switch firmware refresh, and then the second processor notifies the second switch of the failure of the first switch firmware refresh. The second switch issues a restoration instruction to the first switch. The second switch transfers the old firmware image file of the second switch to the first switch and restores the firmware of the first switch according to the corresponding configuration file.
[0021] Reference Figure 3 shown in Figure 3 As shown, the figure shows the Common topology, i.e., the general topology. When the topology of the image processor is a general topology, the first processor detects the failure of the first switch firmware refresh. The first processor notifies the second switch of the failure of the first switch firmware refresh. The second switch issues a restoration instruction to the first switch. The second switch transfers the old firmware image file of the second switch to the first switch and restores the firmware of the first switch according to the corresponding configuration file.
[0022] Reference Figure 4 shown in Figure 4 is the Cascade topology, i.e., the cascade topology. When the topology of the image processor is a cascade topology, the first processor detects the failure of the first switch firmware refresh. The first processor notifies the second switch of the failure of the first switch firmware refresh via the first switch. The second switch issues a restoration instruction to the first switch. The second switch transfers the firmware image file of the second switch to the first switch and restores the firmware of the first switch according to the corresponding configuration file.
[0023] In this embodiment, corresponding firmware restoration processes are executed according to the topology of the image processor, which can better adapt to the topology of the image processor and meet the topology requirements of the image processor.
[0024] Refresh the new firmware for the second Switch chip, i.e., the second switch. After the refresh is completed, determine whether the firmware of the second switch is successfully refreshed by confirming the FW version information, operating status, etc. of the second switch. If the refresh fails, issue a restoration command to the first switch, i.e., the first switch, through the first Switch chip, and use the old firmware of the first switch to restore the firmware of the second switch. If the firmware of the second switch is successfully refreshed, retain the new firmware image file and the corresponding configuration file.
[0025] In some embodiments, sending a restoration command to the second switch and using the firmware of the first switch to restore the firmware of the second switch includes: If the topology of the image processor is a balanced topology, notify the first processor through the second processor that the firmware refresh of the second switch fails, so as to notify the first switch through the first processor that the firmware refresh of the second switch fails, causing the first switch to issue a restoration command to the second switch, and the first switch transmits the firmware image file of the first switch to the second switch and restores the firmware of the second switch according to the corresponding configuration file; in the balanced topology, the first processor is respectively connected to the first switch and the second processor, the second processor is connected to the second switch, and the first switch is connected to the second switch; If the topology of the image processor is a general topology, notify the first switch through the first processor that the firmware refresh of the second switch fails, causing the first switch to issue a restoration command to the second switch, and the first switch transmits the firmware image file of the first switch to the second switch and restores the firmware of the second switch according to the corresponding configuration file; in the general topology, the first processor is respectively connected to the first switch, the second switch, and the second processor, and the first switch is connected to the second switch; If the topology of the image processor is a cascaded topology, notify the first switch through the first processor that the firmware refresh of the second switch fails, causing the first switch to issue a restoration command to the second switch, and the first switch transmits the firmware image file of the first switch to the second switch and restores the firmware of the second switch according to the corresponding configuration file; in the cascaded topology, the first processor is respectively connected to the first switch and the second processor, and the first switch is connected to the second switch.
[0026] Reference Figure 2As shown, when the topology of the image processor is a balanced topology, the second processor detects a failure in the firmware update of the second switch. The second processor notifies the first processor of the failure in the firmware update of the second switch, and in turn, the first processor notifies the first switch of the failure in the firmware update of the second switch. The first switch issues a restoration command to the second switch, and the first switch transfers the old firmware image file of the first switch to the second switch and restores the firmware of the second switch according to the corresponding configuration file.
[0027] Reference Figure 3 As shown, when the topology of the image processor is a general topology, the first processor detects a failure in the firmware update of the second switch. The first processor notifies the first switch of the failure in the firmware update of the second switch. The first switch issues a restoration command to the second switch, and the first switch transfers the old firmware image file of the first switch to the second switch and restores the firmware of the second switch according to the corresponding configuration file.
[0028] Reference Figure 4 As shown, when the topology of the image processor is a cascaded topology, the first processor detects a failure in the firmware update of the second switch. The first processor notifies the first switch of the failure in the firmware update of the second switch. The first switch issues a restoration command to the second switch, and the first switch transfers the firmware image file of the first switch to the second switch and restores the firmware of the second switch according to the corresponding configuration file.
[0029] In this embodiment, by performing corresponding firmware restoration processes according to the topology of the image processor, it can better adapt to the topology of the image processor and meet the topology requirements of the image processor.
[0030] In some embodiments, it further includes: Detect whether the firmware of the first switch is restored successfully; If the firmware of the first switch is restored successfully, output a successful restoration and retain the target metrics; If the firmware restoration of the first switch fails, output a restoration failure, send a restoration command to the first switch again, and restore the firmware of the first switch with the firmware of the second switch again; or, re-update the firmware of the first switch; or, issue an alarm to prompt manual intervention.
[0031] If the firmware of the first switch is restored successfully, output a successful update and retain the target metrics for monitoring and evaluation. The target metrics may include the automatic recovery time, success rate, data integrity, etc. The automatic recovery time may be the time from triggering the restoration operation to the successful restoration. If the firmware restoration of the first switch fails, output a failed update and the firmware restoration can be performed again; or, re-update the first switch with new firmware; or issue an alarm to prompt manual intervention.
[0032] In some embodiments, it further includes: If the firmware restoration of the first switch is successful, the firmware of the first switch is refreshed again.
[0033] If the firmware restoration of the first switch is successful, after confirming that the firmware version information, operating status, etc. of the first switch are normal, the firmware of the first switch is refreshed with a new firmware to upgrade the firmware of the first switch.
[0034] In some embodiments, it further includes: Detect whether the firmware restoration of the second switch is successful; If the firmware restoration of the second switch is successful, output that the restoration is successful and retain the target metrics; If the firmware restoration of the second switch fails, output that the restoration fails, send a restoration instruction to the second switch again, and use the firmware of the first switch to restore the firmware of the second switch again; or, refresh the firmware of the second switch again; or, issue an alarm to prompt manual intervention.
[0035] If the firmware restoration of the second switch is successful, output that the refresh is successful, and retain the target metrics for monitoring and evaluation. The target metrics may include automatic recovery time, success rate, data integrity, etc. The automatic recovery time may be the time from triggering the restoration operation to the restoration being successful. If the firmware restoration of the second switch fails, output that the refresh fails, and the firmware may be restored again; or, refresh the second switch with a new firmware; or issue an alarm to prompt manual intervention.
[0036] In some embodiments, it further includes: If the firmware restoration of the second switch is successful, the firmware of the second switch is refreshed again.
[0037] If the firmware restoration of the second switch is successful, after confirming that the firmware version information, operating status, etc. of the second switch are normal, the firmware of the second switch is refreshed with a new firmware to upgrade the firmware of the second switch.
[0038] In some embodiments, it further includes: Simulate multiple scenarios of firmware refresh failure, and detect whether the first switch and the second switch can successfully perform firmware restoration in each scenario.
[0039] To verify the effectiveness of firmware refresh and address various problems during operation and maintenance, various scenarios of firmware refresh failure or firmware anomaly during operation and maintenance are preset, such as hardware failure, firmware file corruption, configuration error, etc. Verifying whether the Switch chip can successfully perform the restoration operation can ensure that the Switch chip can quickly and stably recover to the normal working state and avoid affecting the business.
[0040] For example, simulate multiple scenarios of failure in refreshing the firmware of the first switch, and verify whether the second switch can successfully perform a restoration operation on the first switch.
[0041] Combined with Figure 5 As shown below, a specific implementation manner will be described: After the server is powered on and booted, check the firmware version information, operating status, etc. of the two Switch chips (Switch Chip 1 and Switch Chip 2), confirm that the operating status is normal and retain the firmware image files (F1_A, F2_A) and relevant configuration files (S1_A, S2_A). F1_A is the firmware image file of Switch Chip 1, F2_A is the firmware image file of Switch Chip 2, S1_A is the configuration file of Switch Chip 1, and S2_A is the configuration file of Switch Chip 2.
[0042] Under the OS (Operating System), use a tool to refresh the firmware of Switch Chip 1. After the refresh is completed, check the firmware version information and operating status of Switch Chip 1. If the firmware version information and operating status are normal, output that the refresh is successful and retain the new firmware image file F1_B and the relevant configuration file S1_B. If the firmware version information is abnormal and the configuration file is abnormal, output that the refresh fails and start the restoration operation: 1. Switch Chip 2 issues a restoration instruction to trigger the firmware restoration operation, and Switch Chip 2 transfers the correct stored firmware image file to Switch Chip 1. Perform firmware restoration according to the configuration file S1_A, and monitor the transfer progress and configuration status in real time to confirm the integrity and accuracy of the entire restoration operation process. After the restoration is completed, if the firmware version information and operating status are abnormal, output that the refresh fails and start the restoration operation to perform firmware restoration again. After the restoration is completed, if the firmware version information and operating status are normal, output that the refresh is successful, and retain indicators such as the automatic recovery time, success rate, and data integrity for monitoring and evaluation.
[0043] Under the OS, use a tool to refresh the firmware of Switch Chip 2. After the refresh is completed, check the FW version information and operating status of Switch Chip 2. If the firmware version information and operating status are normal, output that the refresh is successful and retain the new firmware image file F2_B and the relevant configuration file S2_B. If the firmware version information is abnormal and the configuration file is abnormal, output that the refresh fails and start the restoration operation.
[0044] Simulate the scenarios where the analog chip refresh fails, such as network failures, FW file corruption, configuration errors, high-temperature damage, etc., and verify whether Switch chip 2 can successfully perform the restoration operation to ensure that all Switch chips can quickly and stably return to the normal working state.
[0045] Among them, referring to Figure 6 As shown, a PCIE (Peripheral Component Interconnect Express) link can be established between the CPU and the Switch chip.
[0046] When the firmware of the GPU of the dual Switch chips is refreshed in this application, if the firmware refresh of one Switch chip fails, without power-off, the firmware of the other Switch chip is used to restore the firmware of the Switch chip with the failed firmware refresh, so that the functions of the Switch chip with the failed firmware refresh return to normal. In this way, after a problem occurs in the firmware refresh of the Switch chip, the effective operation of the Switch chip can be guaranteed. At the same time, this application does not require additional hardware devices, which can reduce cost investment. It can realize centralized monitoring and management of Switch chips of servers such as clusters or large data centers, which is convenient and fast and improves efficiency.
[0047] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases, the former is a better implementation method.
[0048] The embodiments of this application also provide a firmware refresh device, which includes: A first refresh module for refreshing the firmware of the first switch; A first detection module for detecting whether the firmware of the first switch is successfully refreshed; A first restoration module for, if the firmware refresh of the first switch fails, sending a restoration instruction to the first switch and using the firmware of the second switch to restore the firmware of the first switch; A second refresh module for refreshing the firmware of the second switch; A second detection module for detecting whether the firmware of the second switch is successfully refreshed; A second restoration module for, if the firmware refresh of the second switch fails, sending a restoration instruction to the second switch and using the firmware of the first switch to restore the firmware of the second switch.
[0049] Based on the above embodiments, as a specific implementation manner, it further includes: A third detection module, configured to detect whether the firmware of the first switch is successfully restored; A first output module, configured to output a successful restoration and retain the target metrics if the firmware of the first switch is successfully restored; A second output module, configured to output a restoration failure if the firmware restoration of the first switch fails, send a restoration instruction to the first switch again, and use the firmware of the second switch to restore the firmware of the first switch again; or, re-flash the firmware of the first switch; or, issue an alarm to prompt manual intervention.
[0050] Based on the above embodiments, as a specific implementation, it further includes: A re-flashing module, configured to re-flash the firmware of the first switch if the firmware of the first switch is successfully restored.
[0051] Based on the above embodiments, as a specific implementation, it further includes: A simulation module, configured to simulate multiple scenarios where the firmware flashing of the first switch fails, and detect whether the second switch can successfully restore the firmware of the first switch in each scenario.
[0052] Based on the above embodiments, as a specific implementation, it further includes: A fourth detection module, configured to detect whether the firmware of the second switch is successfully restored; A third output module, configured to output a successful restoration and retain the target metrics if the firmware of the second switch is successfully restored; A fourth output module, configured to output a restoration failure if the firmware restoration of the second switch fails, send a restoration instruction to the second switch again, and use the firmware of the first switch to restore the firmware of the second switch again; or, re-flash the firmware of the second switch; or, issue an alarm to prompt manual intervention.
[0053] Based on the above embodiments, as a specific implementation, it further includes: A first retention module, configured to retain the new firmware image file and the corresponding configuration file if the firmware of the first switch is successfully flashed; A second retention module, configured to retain the new firmware image file and the corresponding configuration file if the firmware of the second switch is successfully flashed.
[0054] Based on the above embodiments, as a specific implementation, the first restoration module is configured to: If the topology of the image processor is a balanced topology, the first processor notifies the second processor that the firmware refresh of the first switch fails, so that the second processor notifies the second switch that the firmware refresh of the first switch fails, causing the second switch to issue a restoration instruction to the first switch. The second switch transfers the firmware image file of the second switch to the first switch and restores the firmware of the first switch according to the corresponding configuration file. In the balanced topology, the first processor is respectively connected to the first switch and the second processor, the second processor is connected to the second switch, and the first switch is connected to the second switch. If the topology of the image processor is a general topology, the first processor notifies the second switch that the firmware refresh of the first switch fails, causing the second switch to issue a restoration instruction to the first switch. The second switch transfers the firmware image file of the second switch to the first switch and restores the firmware of the first switch according to the corresponding configuration file. In the general topology, the first processor is respectively connected to the first switch, the second switch, and the second processor, and the first switch is connected to the second switch. If the topology of the image processor is a cascaded topology, the first processor notifies the second switch that the firmware refresh of the first switch fails via the first switch, causing the second switch to issue a restoration instruction to the first switch. The second switch transfers the firmware image file of the second switch to the first switch and restores the firmware of the first switch according to the corresponding configuration file. In the cascaded topology, the first processor is respectively connected to the first switch and the second processor, and the first switch is connected to the second switch.
[0055] For the description of the features in the corresponding embodiments of the firmware refresh device, reference can be made to the relevant descriptions in the corresponding embodiments of the firmware refresh method, which will not be elaborated here one by one.
[0056] The embodiments of the present application also provide an electronic device. Refer to Figure 7 As shown, the electronic device includes a memory 1 and a processor 2. A computer program is stored in the memory 1, and the processor 2 is configured to run the computer program to execute the steps in any of the above embodiments of the firmware refresh method.
[0057] The embodiments of the present application also provide a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps in any of the above embodiments of the firmware refresh method when running.
[0058] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: various media that can store computer programs such as USB flash drives, read-only memory (ROM for short), random access memory (RAM for short), mobile hard disks, magnetic disks, or optical discs.
[0059] An embodiment of the present application also provides a computer program product. The above computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps in any of the above-described firmware update method embodiments.
[0060] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium. The non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the steps in any of the above-described firmware update method embodiments.
[0061] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Skilled professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0062] The above has introduced in detail a firmware update method, device, equipment, and storage medium provided by this application. Specific examples are used herein to elaborate on the principle and implementation manner of this application. The description of the above embodiments is only used to help understand the method and its core idea of this application. It should be noted that for those of ordinary skill in the art of this technology, without departing from the principle of this application, several improvements and modifications can be made to this application, and these improvements and modifications also fall within the protection scope of this application.
Claims
1. A firmware update method, characterized in that, Including: Refreshing the firmware of the first switch; Detecting whether the firmware of the first switch is successfully refreshed; If the firmware refresh of the first switch fails, sending a restoration instruction to the first switch and using the firmware of the second switch to restore the firmware of the first switch; Refreshing the firmware of the second switch; Detecting whether the firmware of the second switch is successfully refreshed; If the firmware refresh of the second switch fails, sending a restoration instruction to the second switch and using the firmware of the first switch to restore the firmware of the second switch.
2. The firmware refreshing method according to claim 1, wherein Also including: Detecting whether the firmware of the first switch is successfully restored; If the firmware of the first switch is successfully restored, outputting a successful restoration and retaining the target metrics; If the firmware restoration of the first switch fails, outputting a restoration failure, sending a restoration instruction to the first switch again, and using the firmware of the second switch to restore the firmware of the first switch again; Or, refreshing the firmware of the first switch again; or, issuing an alarm to prompt manual intervention.
3. The firmware refreshing method according to claim 2, wherein, Also including: If the firmware of the first switch is successfully restored, refreshing the firmware of the first switch again.
4. The firmware refreshing method according to claim 1, wherein Also including: Simulating multiple scenarios of firmware refresh failure and detecting whether the first switch and the second switch can successfully perform firmware restoration in each scenario.
5. The firmware refreshing method according to claim 1, wherein Also including: Detecting whether the firmware of the second switch is successfully restored; If the firmware of the second switch is successfully restored, outputting a successful restoration and retaining the target metrics; If the firmware restoration of the second switch fails, outputting a restoration failure, sending a restoration instruction to the second switch again, and using the firmware of the first switch to restore the firmware of the second switch again; Or, refreshing the firmware of the second switch again; or, issuing an alarm to prompt manual intervention.
6. The firmware update method according to claim 1, characterized in that Also including: If the firmware of the first switch is successfully refreshed, retaining the new firmware image file and the corresponding configuration file; If the firmware of the second switch is successfully refreshed, retaining the new firmware image file and the corresponding configuration file.
7. The firmware refreshing method according to claim 1, wherein Sending a restoration instruction to the first switch and using the firmware of the second switch to restore the firmware of the first switch includes: If the topology of the image processor is a balanced topology, notifying the second processor of the failure of the first switch firmware refresh through the first processor, so that the second processor notifies the second switch of the failure of the first switch firmware refresh, enabling the second switch to issue a restoration instruction to the first switch, and the second switch transfers the firmware image file of the second switch to the first switch and performs firmware restoration on the first switch according to the corresponding configuration file; in the balanced topology, the first processor is respectively connected to the first switch and the second processor, the second processor is connected to the second switch, and the first switch is connected to the second switch; If the topology of the image processor is a general topology, the first processor notifies the second switch of the failure of the first switch firmware refresh, causing the second switch to issue a restoration instruction to the first switch. The second switch transfers the firmware image file of the second switch to the first switch and restores the firmware of the first switch according to the corresponding configuration file. In the general topology, the first processor is respectively connected to the first switch, the second switch, and the second processor, and the first switch is connected to the second switch. If the topology of the image processor is a cascaded topology, the first processor notifies the second switch of the failure of the first switch firmware refresh via the first switch, causing the second switch to issue a restoration instruction to the first switch. The second switch transfers the firmware image file of the second switch to the first switch and restores the firmware of the first switch according to the corresponding configuration file. In the cascaded topology, the first processor is respectively connected to the first switch and the second processor, and the first switch is connected to the second switch.
8. A firmware refreshing device, characterized in that, Comprising: A first refresh module for refreshing the firmware of the first switch; A first detection module for detecting whether the firmware of the first switch is successfully refreshed; A first restoration module for, if the firmware refresh of the first switch fails, sending a restoration instruction to the first switch and restoring the firmware of the first switch using the firmware of the second switch; A second refresh module for refreshing the firmware of the second switch; A second detection module for detecting whether the firmware of the second switch is successfully refreshed; A second restoration module for, if the firmware refresh of the second switch fails, sending a restoration instruction to the second switch and restoring the firmware of the second switch using the firmware of the first switch.
9. An electronic device, characterized in that, Comprising: A memory for storing computer programs; A processor for implementing the steps of the firmware refresh method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium, wherein the computer program implements the steps of the firmware refresh method according to any one of claims 1 to 7 when executed by a processor.
Citation Information
Patent Citations
Firmware upgrading method based on double-CPU system
CN104021014A
Updating system and updating method for mobile terminal NFC chip firmware
CN104618888A
Server flash system verification and fault location method and device
CN113868003A
Switch management method and system, computer equipment and storage medium
CN115904537A
Electronic equipment firmware updating method, cleaning equipment and storage medium
CN116909611A