A firmware upgrading method, device, equipment and storage medium

By screening and uniformly upgrading historical firmware versions of switch devices, and then uniformly rebooting after all firmware upgrades, the problem of time-consuming firmware upgrades for switch devices was solved, improving production efficiency and reducing costs.

CN115129345BActive Publication Date: 2026-03-03INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-01
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

The firmware upgrade process for switch devices is time-consuming because each firmware upgrade requires a reboot, which is particularly inefficient in mass production.

Method used

By selecting historical firmware versions for unified upgrades and then restarting the switch after all firmware upgrades are completed, the number of device restarts is reduced.

Benefits of technology

It reduces the number of device restarts and the total time spent on firmware upgrades, simplifies the operation process, and saves labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115129345B_ABST
    Figure CN115129345B_ABST
Patent Text Reader

Abstract

The application discloses a firmware upgrading method and device, equipment and storage medium, and relates to the field of switches, and is used for solving the long time consumption of the current firmware upgrading, and comprises the following steps: checking current firmware versions of all firmwares, and screening firmwares with historical versions from the all firmwares to obtain various to-be-upgraded firmwares; performing upgrading operations on the various to-be-upgraded firmwares respectively to obtain various upgraded firmwares; controlling a central processing unit to power off, and restarting the switch through a baseboard management controller, so that firmware information corresponding to the upgraded firmwares is updated. The application screens to-be-upgraded firmwares, then performs unified upgrading operations on the to-be-upgraded firmwares, and restarts the switch after the upgrading of all to-be-upgraded firmwares is completed, so that the time consumption of the firmware upgrading is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of switches, and in particular to a firmware upgrade method, apparatus, device, and storage medium. Background Technology

[0002] In switching equipment, firmware is the most fundamental and lowest-level software, determining the functionality and performance of the hardware. Firmware version checking and upgrades are crucial steps in switch production, requiring a balance between reliability and efficiency. However, switching equipment uses a wide variety of firmware, which can be categorized into CPU (Central Processing Unit), BIOS (Basic Input Output System), BMC (Baseboard Management Controller), FW (Firmware), and CPLD (Complex Programmable Logic Device) FW, among others. Each of these is further subdivided into many different FWs. For example, BIOS and BMC are divided into primary and backup types, and CPLDs include CPU board CPLD, CTRLCPLD (responsible for power-on / off timing, reset / de-reset control functions), PortCPLD (responsible for switch optical module signal management), and FCBCPLD (responsible for switch fan management), etc. This diverse range of firmware presents significant challenges to equipment testing (especially in mass production).

[0003] Traditional production testing processes, while involving checking and upgrading all firmware versions, often involve upgrading each firmware individually. Since a device reboot is required for each firmware upgrade to take effect and for version checks to be completed, each reboot typically takes 5 to 10 minutes. With a reboot needed for every firmware upgrade, the total time spent is extremely long. Summary of the Invention

[0004] In view of this, the purpose of this invention is to provide a firmware upgrade method, apparatus, device, and storage medium that can reduce the number of device restarts and the time spent on firmware upgrades. The specific solution is as follows:

[0005] In a first aspect, this application discloses a firmware upgrade method applied to a switch, comprising:

[0006] Check the current firmware version of all firmware and filter out firmware versions whose current firmware version is a historical version from all firmware to obtain each firmware to be upgraded;

[0007] Each of the firmware files to be upgraded is then upgraded to obtain the upgraded firmware.

[0008] The central processing unit is powered off, and the switch is restarted via the baseboard management controller in order to update the firmware information corresponding to the upgraded firmware.

[0009] Optionally, before checking the current firmware version of all firmware, the method further includes:

[0010] The firmware control module set, firmware channel switching module and control circuit set in the switch are connected according to the preset connection rules.

[0011] Optionally, the step of checking the current firmware version of all firmware and filtering out firmware versions whose current firmware version is a historical version from all firmware to obtain each firmware to be upgraded includes:

[0012] Obtain the current firmware version of all firmware in the switch and the latest firmware version of all firmware that are pre-stored;

[0013] Compare the current firmware version with the latest firmware version;

[0014] When the current firmware version is different from the latest firmware version, the current firmware version is determined to be the historical version;

[0015] The firmware whose current firmware version is the historical version is identified as the firmware to be upgraded.

[0016] Optionally, the step of performing upgrade operations on each of the firmware to be upgraded to obtain upgraded firmware includes:

[0017] If the complex programmable logic device is the firmware to be upgraded, then the complex programmable logic device is upgraded in background mode.

[0018] If the first basic input / output system is the firmware to be upgraded, then upgrade the first basic input / output system;

[0019] If the first baseboard management controller is the firmware to be upgraded, then upgrade the first baseboard management controller.

[0020] Optionally, the control central processing unit is powered off, and the switch is restarted via the baseboard management controller to update the firmware information corresponding to the upgraded firmware, including:

[0021] The baseboard management controller controls the central processing unit to switch from a normal state to a shutdown state through a preset program;

[0022] The baseboard management controller controls the central processing unit to switch from the off state to the power-off state through the preset program;

[0023] When the firmware to be upgraded is the complex programmable logic device, the baseboard management controller determines whether the first complex programmable logic device and / or the second complex programmable logic device have completed the upgrade.

[0024] If the upgrade is complete, the corresponding preset download configuration operation will be executed to obtain the target configuration information;

[0025] The baseboard management controller controls the central processing unit to switch from the power-off state to the normal state through the preset program;

[0026] The baseboard management controller performs its own restart operation. After the restart is completed, it triggers the power button of the central processing unit to restart the switch and update the firmware information corresponding to the upgraded firmware using the target configuration information.

[0027] Optionally, after restarting the switch via the baseboard management controller to update the firmware information corresponding to the upgraded firmware, the method further includes:

[0028] Determine whether the firmware to be upgraded has been successfully upgraded;

[0029] If the upgrade fails, the process will re-enter the step of checking the current firmware version of all firmware and recording the current firmware version as a historical version to obtain the firmware to be upgraded.

[0030] When the number of upgrade failures reaches the preset number, an alarm will be triggered and the process will end.

[0031] Optionally, after determining whether the firmware to be upgraded has been successfully upgraded, the method further includes:

[0032] If the upgrade is successful and the first basic input / output system and / or the first baseboard management controller is the firmware to be upgraded, then a preset boot program is used to boot from the storage chip of the target firmware; the target firmware is the second basic input / output system and / or the second baseboard management controller corresponding to the first basic input / output system and / or the first baseboard management controller.

[0033] Upgrade the second basic input / output system and / or the second baseboard management controller;

[0034] The central processing unit is powered off, and the switch is restarted via the baseboard management controller.

[0035] Determine whether the second basic input / output system and / or the second baseboard management controller have been successfully upgraded;

[0036] If the upgrade is successful, a complete power-down process will be performed and the process will end after the switch is restarted.

[0037] Secondly, this application discloses a firmware upgrade device applied to a switch, comprising:

[0038] The firmware to be upgraded determination module is used to check the current firmware version of all firmware and filter out firmware versions whose current firmware version is a historical version from all firmware to obtain each firmware to be upgraded.

[0039] The firmware upgrade module is used to perform upgrade operations on each of the firmware to be upgraded, so as to obtain each upgraded firmware.

[0040] The restart module is used to control the central processing unit to power down and restart the switch through the baseboard management controller in order to update the firmware information corresponding to the upgraded firmware.

[0041] Thirdly, this application discloses an electronic device, comprising:

[0042] Memory, used to store computer programs;

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

[0044] Fourthly, this application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the firmware upgrade method disclosed above.

[0045] As can be seen, this application provides a firmware upgrade method, including: checking the current firmware version of all firmware, and filtering out firmware whose current firmware version is a historical version from all firmware to obtain each firmware to be upgraded; performing upgrade operations on each firmware to be upgraded to obtain each upgraded firmware; controlling the central processing unit to power down, and restarting the switch through the baseboard management controller to update the firmware information corresponding to the upgraded firmware. Therefore, this application reduces the number of device restarts and the time spent on firmware upgrades by filtering out firmware to be upgraded from all firmware, performing a unified upgrade operation on each firmware to be upgraded, and restarting the switch after all firmware to be upgraded is completed to update the firmware information corresponding to the upgraded firmware. Attached Figure Description

[0046] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0047] Figure 1 This is a flowchart of a firmware upgrade method disclosed in this application;

[0048] Figure 2 This is a flowchart of a specific firmware upgrade method disclosed in this application;

[0049] Figure 3 This is an overall block diagram of a firmware upgrade disclosed in this application;

[0050] Figure 4 This is a schematic diagram of a firmware upgrade method disclosed in this application;

[0051] Figure 5 This is a flowchart of a specific firmware upgrade method disclosed in this application;

[0052] Figure 6 This is a flowchart of a specific firmware upgrade method disclosed in this application;

[0053] Figure 7 A schematic diagram of the firmware upgrade device provided in this application;

[0054] Figure 8 This application provides a structural diagram of an electronic device. Detailed Implementation

[0055] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0056] Currently, the traditional production testing process involves checking and upgrading all firmware versions, but in practice, it's mostly done one firmware update at a time. Since a device restart is required after each firmware upgrade and version check, each restart typically takes 5 to 10 minutes. With a restart needed for each firmware upgrade, the total time spent is very long. Therefore, this application provides a firmware upgrade method that reduces the time required for firmware upgrades.

[0057] This invention discloses a firmware upgrade method, see [link to relevant documentation]. Figure 1 As shown, applied to a switch, the method includes:

[0058] Step S11: Check the current firmware version of all firmware and filter out firmware versions whose current firmware version is a historical version from all firmware to obtain each firmware to be upgraded.

[0059] In this embodiment, the current firmware version of all firmware is checked, and firmware versions with historical versions are selected from all firmware to obtain the firmware to be upgraded. It is understood that upon initial power-on, the CPU or BMC firmware upgrade control module checks whether the firmware version of all firmware is the latest version. If all firmware versions are the latest version, it indicates that the firmware in the switch device does not require an upgrade. If some firmware versions are not the latest version (i.e., historical versions), it indicates that the firmware needs an upgrade, and therefore, these firmware are identified as the firmware to be upgraded.

[0060] Step S12: Perform upgrade operations on each of the firmware to be upgraded to obtain the upgraded firmware.

[0061] In this embodiment, after obtaining each firmware to be upgraded, an upgrade operation is performed on each firmware to obtain the upgraded firmware. Specifically, the corresponding upgrade operation is selected according to the different firmware to be upgraded. For example, if the CPLD version needs to be upgraded, the CPLDs to be upgraded can be upgraded one by one in Background mode. It can be understood that in Background mode, when loading on-chip Flash (Flash EEPROM Memory, a type of memory chip), the CPLD device is allowed to remain in user operation mode (i.e., the CPLD can work normally).

[0062] Step S13: Power off the central processing unit and restart the switch through the baseboard management controller in order to update the firmware information corresponding to the upgraded firmware.

[0063] In this embodiment, each of the firmware to be upgraded is upgraded separately. After obtaining the upgraded firmware, the central processing unit is powered down, and the switch is restarted through the baseboard management controller to update the firmware information corresponding to the upgraded firmware. It is understood that since a device restart is required for the firmware upgrade to take effect and for version checking, after upgrading all the firmware to be upgraded, the CPU is powered down first, and then the switch is restarted through the baseboard management controller to update the firmware information corresponding to the upgraded firmware. This application organically combines all firmware upgrades according to the operation flow of each firmware upgrade process, reducing the number of device restarts without increasing costs. This solves the problem of long firmware checking time during production testing, reduces the total firmware upgrade time, simplifies the operation process, saves labor costs, and brings economic benefits.

[0064] It should be noted that this solution is applicable not only to the field of switches, but also to other usage environments that use multiple types of devices, such as servers, firewalls, and routers.

[0065] As can be seen, this application provides a firmware upgrade method, including: checking the current firmware version of all firmware, and filtering out firmware whose current firmware version is a historical version from all firmware to obtain each firmware to be upgraded; performing upgrade operations on each firmware to be upgraded to obtain each upgraded firmware; controlling the central processing unit to power down, and restarting the switch through the baseboard management controller to update the firmware information corresponding to the upgraded firmware. Therefore, this application reduces the number of device restarts and the time spent on firmware upgrades by filtering out firmware to be upgraded from all firmware, performing a unified upgrade operation on each firmware to be upgraded, and restarting the switch after all firmware to be upgraded is completed to update the firmware information corresponding to the upgraded firmware.

[0066] See Figure 2 As shown, this embodiment of the invention discloses a firmware upgrade method. Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution.

[0067] Step S21: Connect the firmware control module set, firmware channel switching module and control circuit set in the switch according to the preset connection rules.

[0068] In this embodiment, before checking the current firmware version of all firmware, the firmware control module set and firmware channel switching module and control circuit set in the switch are connected according to a preset connection rule. It can be understood that this solution provides an AVS (Audio Video Coding Standard) voltage regulation method that supports multi-controller switching, including a CPU upgrade FW control module, a BMC upgrade FW control module, an upgrade FW control module in the CTRLCPLD, a BIOS upgrade / load channel switching module and control circuit, a BMCFW upgrade / load channel switching module and control circuit, and a CPLD upgrade channel switching module and control circuit. For example... Figure 3As shown, the CPU firmware upgrade control module is connected to the BIOS upgrade / load channel switching module and control circuit, the BMC firmware upgrade / load channel switching module and control circuit, and the CPLD firmware upgrade channel switching module and control circuit. It controls each switching module and control circuit by writing to the CTRLCPLD register, thus enabling the CPU to upgrade the firmware version. The BMC firmware upgrade control module is also connected to the BIOS upgrade / load channel switching module and control circuit, the BMC firmware upgrade / load channel switching module and control circuit, and the CPLD firmware upgrade channel switching module and control circuit. It controls each switching module and control circuit by writing to the CTRLCPLD register, thus enabling the BMC to upgrade the firmware version. The firmware upgrade control module in the CTRLCPLD is connected to the CPU, BMC, BIOS firmware upgrade / load channel switching module and control circuit, and CPLD firmware upgrade channel switching module and control circuit. The CPU and BMC can be managed through register writing. The BIOS firmware upgrade / load channel switching module and control circuit is connected to the CPU, BMC, CTRLCPLD, and primary / backup BIOS Flash. The BMC upgrade / loading channel switching module and control circuit are connected to the CPU, BMC, CTRLCPLD, and main / backup BMCFW Flash. The CPLD upgrade channel switching module and control circuit are connected to the upgrade FW control module in the CPU, BMC, CTRL CPLD, and each CPLD upgrade channel.

[0069] For example, such as Figure 4 As shown, the BMC chip is ASPEED's AST2520A2-GP, connected to each CPLD via I2C (Inter-Integrated Circuit) for read and write access to registers. It connects to each CPLD via GPIO (General-purpose input / output) simulating JTAG (Joint Test Action Group) through a MUX (multiplexer). It also connects to the BIOS main / backup Flash and BMCFW main / backup Flash via SPI (Serial Peripheral Interface) through the MUX. The CPU chip is Intel's Ice Lake D-1734NT. It connects to each CPLD via I2C for read and write access to registers. It also connects to each CPLD via GPIO simulating JTAG through a MUX. Finally, it connects to the BIOS main / backup Flash and BMCFW main / backup Flash via SPI through the MUX.

[0070] The CTRLCPLD is a LATTICE LCMXO3LF-4300C-6BG324I. The CPU and BMC can access registers via the I2C channel, and the upgrade channel is JTAG. It connects to each MUX via GPIO to control the upgrade / load channel.

[0071] The CPU board / Port / FCB (Fan Control Board) CPLD is LATTICE's LCMXO3LF-2100C-5BG256C. The CPU and BMC can access registers via the I2C channel, and the upgrade channel is JTAG.

[0072] Step S22: Check the current firmware version of all firmware and filter out firmware versions whose current firmware version is a historical version from all firmware to obtain each firmware to be upgraded.

[0073] In this embodiment, the current firmware version of all firmware is checked, and firmware versions whose current firmware version is a historical version are selected from all firmware to obtain the firmware to be upgraded. Specifically, the current firmware version of all firmware in the switch and the latest firmware version of all firmware pre-stored are obtained, and then the current firmware version is compared with the latest firmware version. When the current firmware version is different from the latest firmware version, the current firmware version is determined to be a historical version, and the firmware whose current firmware version is the historical version is then identified as the firmware to be upgraded.

[0074] Step S23: Perform upgrade operations on each of the firmware to be upgraded to obtain the upgraded firmware.

[0075] In this embodiment, each of the firmware files to be upgraded is upgraded to obtain the upgraded firmware. It is understood that, as... Figure 5As shown, after obtaining each firmware to be upgraded, if the firmware to be upgraded contains the complex programmable logic device (CPLD), that is, if the CPLD is the firmware to be upgraded, then the CPLD is upgraded one by one in background mode. If the firmware to be upgraded contains a first basic input / output system (e.g., main BIOS), that is, if the first basic input / output system is the firmware to be upgraded, then the first basic input / output system is upgraded. If the firmware to be upgraded contains a first baseboard management controller (e.g., main BMC), that is, if the first baseboard management controller is the firmware to be upgraded, then the first baseboard management controller is upgraded. If the firmware to be upgraded contains a CPLD, a first basic input / output system, and a first baseboard management controller, then the CPLD is upgraded one by one in the following order: first, the first CPLD; second, the first baseboard management controller. It should be noted that the above upgrade order can be changed; the above order is the optimal order.

[0076] Step S24: Power off the central processing unit.

[0077] In this embodiment, after the firmware upgrade is completed, the central processing unit (CPU) is powered off. Specifically, the baseboard management controller controls the CPU to switch from the normal state (S0) to the off state (S5) through a preset program (e.g., CTRL CPLD). Regardless of whether the switch is successful, the next step is performed, that is, the baseboard management controller controls the CPU to switch from the off state (S5) to the power-off state (G3) through the preset program, thus completing the CPU power-off process.

[0078] Step S25: When the firmware to be upgraded is the complex programmable logic device, the baseboard management controller determines whether the first complex programmable logic device and / or the second complex programmable logic device have completed the upgrade.

[0079] In this embodiment, when the firmware to be upgraded is the complex programmable logic device (CPLD), the baseboard management controller determines whether the first CPLD and / or the second CPLD have been upgraded. If the CPLD exists in the firmware to be upgraded, it is determined whether the FCB / PORT CPLD has been upgraded. If the FCB / PORT CPLD has not been upgraded, it is determined whether the CTRL CPLD has been upgraded. If the CTRL CPLD has not been upgraded, the process directly proceeds to the step of powering on the central processing unit.

[0080] Step S26: If the upgrade is complete, execute the corresponding preset download configuration operation to obtain the target configuration information.

[0081] In this embodiment, if the upgrade is complete, the corresponding preset download configuration operation is executed to obtain the target configuration information. If the FCB / PORT CPLD is upgraded, then the FCB / PORT CPLD is re-Fresh, that is, the firmware is downloaded to SRAM (Static Random-Access Memory), and the CPLD is reconfigured to make the upgraded firmware effective. If the CTRL CPLD is upgraded, then the CTRL CPLD is re-Fresh.

[0082] Step S27: The baseboard management controller controls the central processing unit to switch from the power-off state to the normal state through the preset program.

[0083] In this embodiment, the baseboard management controller controls the central processing unit to switch from the power-off state to the normal state through the preset program. Specifically, the tethering management controller controls the CPU to switch from the G3 state to the S5 state through CTRL CPLD.

[0084] Step S28: Perform a self-reboot operation through the baseboard management controller. After rebooting, trigger the power button of the central processing unit to reboot the switch and update the firmware information corresponding to the upgraded firmware using the target configuration information.

[0085] In this embodiment, after the central processing unit (CCPU) switches from the power-off state to the normal state, it performs a self-reboot operation through the baseboard management controller (BMC). After rebooting, the CCPU's power button is triggered to restart the switch and update the firmware information corresponding to the upgraded firmware using the target configuration information. Specifically, the BMC performs its own reboot, and after booting, it triggers the CPU power button as normal to restart the switch device.

[0086] As can be seen, in this embodiment, the firmware control module set, firmware channel switching module, and control circuit set in the switch are connected according to a preset connection rule; the current firmware version of all firmware is checked, and firmware with the current firmware version being a historical version is selected from all firmware to obtain each firmware to be upgraded; upgrade operations are performed on each firmware to be upgraded to obtain each upgraded firmware; the central processing unit is powered off; when the firmware to be upgraded is the complex programmable logic device, the baseboard management controller determines whether the first complex programmable logic device and / or the second complex programmable logic device has completed the upgrade; if the upgrade is completed, the corresponding preset download configuration operation is executed to obtain the target configuration information; the baseboard management controller controls the central processing unit to switch from the power-off state to the normal state through the preset program; the baseboard management controller performs its own restart operation, and after restarting, the power button of the central processing unit is triggered to restart the switch and update the firmware information corresponding to the upgraded firmware using the target configuration information, thereby reducing the number of device restarts and the time spent on firmware upgrades.

[0087] See Figure 6 As shown, this embodiment of the invention discloses a firmware upgrade method. Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution.

[0088] Step S31: Check the current firmware version of all firmware and filter out firmware versions whose current firmware version is a historical version from all firmware to obtain each firmware to be upgraded.

[0089] Step S32: Perform upgrade operations on each of the firmware to be upgraded to obtain the upgraded firmware.

[0090] Step S33: Power off the central processing unit and restart the switch through the baseboard management controller in order to update the firmware information corresponding to the upgraded firmware.

[0091] Step S34: Determine whether the firmware to be upgraded has been successfully upgraded.

[0092] In this embodiment, after restarting the switch via the baseboard management controller and updating the firmware information corresponding to the upgraded firmware, it is determined whether the firmware to be upgraded has been successfully upgraded. If the upgrade fails, the process re-enters the step of checking the current firmware version of all firmware and recording the current firmware version as a historical version to obtain the firmware to be upgraded. When the number of upgrade failures reaches a preset number, an alarm is triggered and the process ends. It can be understood that an alarm is triggered and the process ends when the number of upgrade failures reaches a custom preset number. For example, when the preset number is 2, it indicates that the first upgrade failure will trigger a re-entry into the first step, and the second upgrade failure will trigger an alarm and the process ends.

[0093] Specifically, such as Figure 5 The flowchart for upgrading firmware using BMC as an example shows that the BMC reads and checks the firmware version, records the firmware to be upgraded, and if the firmware to be upgraded contains a CPLD, it indicates that the CPLD version needs to be upgraded. The BMC then upgrades the CPLDs one by one in Background mode. If the firmware to be upgraded contains the main BIOS, the upgrade command is executed; otherwise, it is skipped. Similarly, if the firmware to be upgraded contains the main BMC, it is skipped if it does not. After the firmware upgrade is complete, the BMC controls the CPU to switch from S0 to S5 via CTRL CPLD (this step continues to the next step regardless of success or failure). The BMC then controls the CPU to switch from S5 to G3 via CTRL CPLD. It checks whether the FCB / Port CPLD has been upgraded; if so, it refreshes the FCB / Port CPLD; otherwise, it skips this step. It checks whether the CTRL CPLD has been upgraded; if so, it refreshes the CTRL CPLD; otherwise, it skips this step. The BMC controls the CPU to switch from G3 to S5 via CTRL CPLD. The BMC performs its own reboot. After booting, it triggers the CPU power button to power on as normal. It reads the firmware version information and determines whether the CPLD / main BIOS / main BMC upgrade was successful. If the first attempt fails, it jumps to step one and restarts. If the second attempt fails, an alarm is triggered, and the process ends. If the upgrade is successful, it continues. It sets the next boot device to boot from the backup BIOS / backup BMC Flash. The BMC controls the CPU to switch from S5 to G3 via the CRTL CPLD, and the BMC performs its own reboot. It sets the next boot device to boot from the backup BIOS / backup BMC Flash, executes the PSUPower Cycle, and the device restarts. It determines whether the backup BIOS / backup BMC upgrade was successful. If the first attempt fails, it jumps to the step of setting the next boot device to boot from the backup BIOS / backup BMC Flash. If the second attempt fails, an alarm is triggered, and the process ends. If the upgrade is successful, it continues. It executes the PSU Power Cycle, and the device restarts from the main BIOS / main BMC Flash and terminates.

[0094] Step S35: If the upgrade is successful and the first basic input / output system and / or the first baseboard management controller is the firmware to be upgraded, then the system boots from the storage chip of the target firmware through a preset boot program.

[0095] In this embodiment, if the upgrade is successful and the first basic input / output system and / or the first baseboard management controller is the firmware to be upgraded, then a preset boot program is used to boot from the memory chip of the target firmware. The target firmware is the second basic input / output system and / or the second baseboard management controller corresponding to the first basic input / output system and / or the first baseboard management controller. It is understood that if the firmware to be upgraded contains a first basic input / output system (i.e., the main BIOS), then after a successful upgrade, a preset boot program (e.g., CTRL CPLD) is used to boot from the memory chip of the second basic input / output system (i.e., the backup BIOS). If the firmware to be upgraded contains a first baseboard management controller (i.e., the main BMC), then after a successful upgrade, a preset boot program (e.g., CTRL CPLD) is used to boot from the memory chip of the second baseboard management controller (i.e., the backup BMC). If the firmware to be upgraded does not contain a first basic input / output system or a first baseboard management controller, then the upgrade process ends after the firmware upgrade is completed.

[0096] Step S36: Upgrade the second basic input / output system and / or the second baseboard management controller.

[0097] In this embodiment, after booting from the target firmware's storage chip using a preset boot program, the second basic input / output system and / or the second baseboard management controller are upgraded. That is, the decision to upgrade the second basic input / output system and / or the second baseboard management controller is made based on the actual situation.

[0098] Step S37: Power off the central processing unit and restart the switch via the baseboard management controller.

[0099] In this embodiment, the central processing unit (CCPU) is powered down, and the switch is restarted via the baseboard management controller (BMC). Specifically, the BMC controls the CPU to switch from S5 to G3 via CTRL CPLD to complete the power-down process, and then the BMC performs its own reboot. After this step is completed, it is set to boot from the backup BIOS / backup BMC Flash next time, execute the PSU Power Cycle, and the device restarts.

[0100] Step S38: Determine whether the second basic input / output system and / or the second baseboard management controller have been successfully upgraded.

[0101] In this embodiment, it is determined whether the second basic input / output system and / or the second baseboard management controller has been successfully upgraded. If the upgrade fails, the process re-enters the step of booting from the target firmware's storage chip via a preset boot program. It should be noted that if the number of upgrade failures reaches a preset number, an alarm is triggered and the process terminates. For example, upon the first failure, the process re-enters the step of booting from the target firmware's storage chip via a preset boot program, and upon the second failure, an alarm is triggered and the process terminates.

[0102] Step S39: If the upgrade is successful, perform a complete power-down process and end after restarting the switch.

[0103] In this embodiment, if the upgrade is successful, a complete power-down process is performed and the process ends after the switch is restarted. That is, if the upgrade is successful, the PSU Power Cycle is executed, the device restarts from the main BIOS / main BMC Flash, and the process ends.

[0104] For details regarding steps S31 to S33, please refer to the corresponding content disclosed in the foregoing embodiments, which will not be repeated here.

[0105] As can be seen, this embodiment of the application checks the current firmware version of all firmware and filters out firmware versions whose current firmware version is a historical version from all firmware to obtain each firmware to be upgraded; performs upgrade operations on each firmware to be upgraded to obtain each upgraded firmware; controls the central processing unit to power down and restarts the switch through the baseboard management controller to update the firmware information corresponding to the upgraded firmware; determines whether the firmware to be upgraded has been successfully upgraded; if the upgrade is successful and the first basic input / output system and / or the first baseboard management controller is the firmware to be upgraded, then boots from the storage chip of the target firmware through a preset boot program; upgrades the second basic input / output system and / or the second baseboard management controller; controls the central processing unit to power down and restarts the switch through the baseboard management controller; determines whether the second basic input / output system and / or the second baseboard management controller has been successfully upgraded; if the upgrade is successful, a complete power-down process is performed and ends after restarting the switch, reducing the number of device restarts and the time consumed by firmware upgrades.

[0106] See Figure 7 As shown in the illustration, this application also discloses a firmware upgrade device applied to a switch, comprising:

[0107] The firmware to be upgraded determination module 11 is used to check the current firmware version of all firmware and filter out firmware with the current firmware version being a historical version from all firmware to obtain each firmware to be upgraded.

[0108] Firmware upgrade module 12 is used to perform upgrade operations on each of the firmware to be upgraded, so as to obtain each upgraded firmware;

[0109] The restart module 13 is used to control the central processing unit to power down and restart the switch through the baseboard management controller in order to update the firmware information corresponding to the upgraded firmware.

[0110] As can be seen, this application provides a firmware upgrade method, including: checking the current firmware version of all firmware, and filtering out firmware whose current firmware version is a historical version from all firmware to obtain each firmware to be upgraded; performing upgrade operations on each firmware to be upgraded to obtain each upgraded firmware; controlling the central processing unit to power down, and restarting the switch through the baseboard management controller to update the firmware information corresponding to the upgraded firmware. Therefore, this application reduces the number of device restarts and the time spent on firmware upgrades by filtering out firmware to be upgraded from all firmware, performing a unified upgrade operation on each firmware to be upgraded, and restarting the switch after all firmware to be upgraded is completed to update the firmware information corresponding to the upgraded firmware.

[0111] In some specific embodiments, the firmware to be upgraded determination module 11 specifically includes:

[0112] A connection unit is used to connect the firmware control module set and the firmware channel switching module and control circuit set in the switch according to a preset connection rule.

[0113] Version acquisition unit, used to acquire the current firmware version of all firmware in the switch and the latest firmware version of all firmware pre-stored;

[0114] The version comparison unit is used to compare the current firmware version with the latest firmware version;

[0115] The version determination unit is used to determine that the current firmware version is the historical version when the current firmware version is different from the latest firmware version;

[0116] The firmware to be upgraded determination unit is used to determine the firmware whose current firmware version is the historical version as the firmware to be upgraded.

[0117] In some specific embodiments, the firmware upgrade module 12 specifically includes:

[0118] A complex programmable logic device upgrade unit is used to upgrade the complex programmable logic device in a background mode if the complex programmable logic device is the firmware to be upgraded.

[0119] The first basic input / output system upgrade unit is configured to upgrade the first basic input / output system if the first basic input / output system is the firmware to be upgraded.

[0120] The first baseboard management controller upgrade unit is configured to upgrade the first baseboard management controller if the first baseboard management controller is the firmware to be upgraded.

[0121] In some specific embodiments, the restart module 13 specifically includes:

[0122] The central processing unit first state switching unit is used by the baseboard management controller to control the central processing unit to switch from a normal state to a shutdown state through a preset program;

[0123] A second state switching unit for the central processing unit, used by the baseboard management controller to control the central processing unit to switch from the off state to the power-off state through the preset program;

[0124] The first upgrade judgment unit is used to determine, through the baseboard management controller, whether the first complex programmable logic device and / or the second complex programmable logic device has completed the upgrade when the firmware to be upgraded is the complex programmable logic device.

[0125] The target configuration information acquisition unit is used to perform the corresponding preset download configuration operation if the upgrade is completed, so as to obtain the target configuration information;

[0126] The third state switching unit of the central processing unit is used by the baseboard management controller to control the central processing unit to switch from the power-off state to the normal state through the preset program.

[0127] The first restart unit is used to perform its own restart operation through the baseboard management controller. After restarting, it triggers the power button of the central processing unit to restart the switch and update the firmware information corresponding to the upgraded firmware using the target configuration information.

[0128] The firmware upgrade determination unit is used to determine whether the firmware upgrade has been successful.

[0129] The upgrade failure unit is used to re-enter the step of checking the current firmware version of all firmware if the upgrade fails, and record the current firmware version as a historical firmware version to obtain the firmware to be upgraded.

[0130] The alarm unit is used to issue an alarm and terminate the process when the number of upgrade failures reaches a preset number.

[0131] A startup unit is configured to, if the upgrade is successful and the first basic input / output system and / or the first baseboard management controller is the firmware to be upgraded, boot from the storage chip of the target firmware through a preset startup program; the target firmware is a second basic input / output system and / or a second baseboard management controller corresponding to the first basic input / output system and / or the first baseboard management controller.

[0132] Upgrade unit, used to upgrade the second basic input / output system and / or the second baseboard management controller;

[0133] The second restart unit is used to control the central processing unit to power off and restart the switch through the baseboard management controller;

[0134] The second upgrade determination unit is used to determine whether the second basic input / output system and / or the second baseboard management controller have been successfully upgraded.

[0135] The upgrade termination unit is used to perform a complete power-down process if the upgrade is successful and then terminate the process after restarting the switch.

[0136] Furthermore, embodiments of this application also provide an electronic device. Figure 8 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.

[0137] Figure 8 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the firmware upgrade method disclosed in any of the foregoing embodiments. Furthermore, the electronic device 20 in this embodiment may specifically be an electronic computer.

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

[0139] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0140] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the firmware upgrade method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include a computer program capable of performing other specific tasks.

[0141] Furthermore, this application also discloses a storage medium storing a computer program, which, when loaded and executed by a processor, implements the firmware upgrade method steps disclosed in any of the foregoing embodiments.

[0142] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0143] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0144] The firmware upgrade method, apparatus, device, and storage medium provided by the present invention have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A firmware upgrade method, characterized in that, Applied to switches, including: Check the current firmware version of all firmware and filter out firmware versions whose current firmware version is a historical version from all firmware to obtain each firmware to be upgraded; Each of the firmware files to be upgraded is then upgraded to obtain the upgraded firmware. The central processing unit is powered off, and the switch is restarted via the baseboard management controller in order to update the firmware information corresponding to the upgraded firmware. Before checking the current firmware version of all firmware, the process also includes: The firmware control module set, firmware channel switching module and control circuit set in the switch are connected according to a preset connection rule to realize the CPU firmware version upgrade and the BMC firmware version upgrade. The control central processing unit is powered off, and the switch is restarted via the baseboard management controller to update the firmware information corresponding to the upgraded firmware, including: The baseboard management controller controls the central processing unit to switch from a normal state to a shutdown state through a preset program; The baseboard management controller controls the central processing unit to switch from the off state to the power-off state through the preset program; When the firmware to be upgraded is a complex programmable logic device, the baseboard management controller determines whether the first complex programmable logic device and / or the second complex programmable logic device have completed the upgrade. If the upgrade is complete, the corresponding preset download configuration operation will be executed to obtain the target configuration information; The baseboard management controller controls the central processing unit to switch from the power-off state to the normal state through the preset program; The baseboard management controller performs its own restart operation. After the restart is completed, it triggers the power button of the central processing unit to restart the switch and update the firmware information corresponding to the upgraded firmware using the target configuration information. The step of performing upgrade operations on each of the firmware to be upgraded to obtain upgraded firmware includes: If the complex programmable logic device is the firmware to be upgraded, then the complex programmable logic device is upgraded in background mode. If the first basic input / output system is the firmware to be upgraded, then upgrade the first basic input / output system; If the first baseboard management controller is the firmware to be upgraded, then upgrade the first baseboard management controller; The upgrade operation is carried out one by one in the following order: first complex programmable logic device, then the first basic input / output system, and finally the first baseboard management controller. After restarting the switch via the baseboard management controller to update the firmware information corresponding to the upgraded firmware, the method further includes: Determine whether the firmware to be upgraded has been successfully upgraded; If the upgrade fails, the process will re-enter the step of checking the current firmware version of all firmware and recording the current firmware version as a historical version to obtain the firmware to be upgraded. When the number of upgrade failures reaches the preset number, an alarm will be triggered and the process will end. After determining whether the firmware to be upgraded has been successfully upgraded, the process further includes: If the upgrade is successful and the first basic input / output system and / or the first baseboard management controller is the firmware to be upgraded, then a preset boot program is used to boot from the storage chip of the target firmware; the target firmware is the second basic input / output system and / or the second baseboard management controller corresponding to the first basic input / output system and / or the first baseboard management controller. Upgrade the second basic input / output system and / or the second baseboard management controller; The central processing unit is powered off, and the switch is restarted via the baseboard management controller. Determine whether the second basic input / output system and / or the second baseboard management controller have been successfully upgraded; If the upgrade is successful, a complete power-down process will be performed and the process will end after the switch is restarted.

2. The firmware upgrade method according to claim 1, characterized in that, The process involves checking the current firmware version of all firmware files and filtering out firmware files whose current firmware version is a historical version to obtain the firmware files to be upgraded, including: Obtain the current firmware version of all firmware in the switch and the latest firmware version of all firmware that are pre-stored; Compare the current firmware version with the latest firmware version; When the current firmware version is different from the latest firmware version, the current firmware version is determined to be the historical version; The firmware whose current firmware version is the historical version is identified as the firmware to be upgraded.

3. A firmware upgrade device, characterized in that, Applied to switches, including: The firmware to be upgraded determination module is used to check the current firmware version of all firmware and filter out firmware versions whose current firmware version is a historical version from all firmware to obtain each firmware to be upgraded. The firmware upgrade module is used to perform upgrade operations on each of the firmware to be upgraded, so as to obtain each upgraded firmware. The restart module is used to control the power-off of the central processing unit and restart the switch through the baseboard management controller in order to update the firmware information corresponding to the upgraded firmware; The firmware to be upgraded determination module includes: The connection unit is used to connect the firmware control module set and the firmware channel switching module and control circuit set in the switch according to the preset connection rules, so as to realize the CPU firmware version upgrade and the BMC firmware version upgrade. The restart module includes: The central processing unit first state switching unit is used by the baseboard management controller to control the central processing unit to switch from a normal state to a shutdown state through a preset program; A second state switching unit for the central processing unit, used by the baseboard management controller to control the central processing unit to switch from the off state to the power-off state through the preset program; The first upgrade judgment unit is used to determine, through the baseboard management controller, whether the first complex programmable logic device and / or the second complex programmable logic device have completed the upgrade when the firmware to be upgraded is a complex programmable logic device. The target configuration information acquisition unit is used to perform the corresponding preset download configuration operation if the upgrade is completed, so as to obtain the target configuration information; A third state switching unit for the central processing unit, used by the baseboard management controller to control the central processing unit to switch from the power-off state to the normal state through the preset program; The first restart unit is used to perform its own restart operation through the baseboard management controller. After restarting, it triggers the power button of the central processing unit to restart the switch and update the firmware information corresponding to the upgraded firmware using the target configuration information. Each of the firmware files to be upgraded is then upgraded to obtain the upgraded firmware, including: If the complex programmable logic device is the firmware to be upgraded, then the complex programmable logic device is upgraded in background mode. If the first basic input / output system is the firmware to be upgraded, then upgrade the first basic input / output system; If the first baseboard management controller is the firmware to be upgraded, then upgrade the first baseboard management controller; The upgrade operation is carried out one by one in the following order: first complex programmable logic device, then the first basic input / output system, and finally the first baseboard management controller. The firmware upgrade determination unit is used to determine whether the firmware upgrade has been successful. The upgrade failure unit is used to re-enter the step of checking the current firmware version of all firmware if the upgrade fails, and record the current firmware version as a historical firmware version to obtain the firmware to be upgraded. The alarm unit is used to issue an alarm and terminate the process when the number of upgrade failures reaches a preset number. A startup unit is configured to, if the upgrade is successful and the first basic input / output system and / or the first baseboard management controller is the firmware to be upgraded, boot from the storage chip of the target firmware through a preset startup program; the target firmware is a second basic input / output system and / or a second baseboard management controller corresponding to the first basic input / output system and / or the first baseboard management controller. Upgrade unit, used to upgrade the second basic input / output system and / or the second baseboard management controller; The second restart unit is used to control the central processing unit to power off and restart the switch through the baseboard management controller; The second upgrade determination unit is used to determine whether the second basic input / output system and / or the second baseboard management controller have been successfully upgraded. The upgrade termination unit is used to perform a complete power-down process if the upgrade is successful and then terminate the process after restarting the switch.

4. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the firmware upgrade method as described in any one of claims 1 to 2.

5. A computer-readable storage medium, characterized in that, Used to store a computer program; wherein, when the computer program is executed by a processor, it implements the firmware upgrade method as described in any one of claims 1 to 2.

Citation Information

Patent Citations

  • Switch firmware upgrading method and device, equipment and readable medium

    CN112118132A