Server firmware upgrading method and device, electronic equipment and readable storage medium
By dividing the core board levels in the server and upgrading in segments, the problem of low firmware upgrade efficiency is solved, and a more efficient firmware upgrade process is achieved.
Patent Information
- Application Number
- CN202310542215.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-11
- Publication Date
- 2024-11-12
AI Technical Summary
The existing server firmware upgrade method requires waiting for all core boards to be idle, resulting in low firmware upgrade efficiency.
By dividing the core boards in the server into the main core board and multi-level sub-core board, establish communication connections and perform firmware upgrades in segments, and use wider bandwidth channels for data transmission until all core boards receive the upgraded firmware data and Complete the upgrade.
Improves the efficiency of firmware upgrades, avoids the limitation of waiting for all core boards to be idle, and improves the efficiency and stability of the upgrade process.
Smart Images

Figure CN118939283A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of servers, and in particular to a firmware upgrade method, device, electronic device and readable storage medium for a server. Background Art
[0002] The server contains two boards: BMC (Baseboard Management Controller) and core board. BMC is responsible for controlling and obtaining device information and data of the core board, and core board supports specific business functions. BMC is used for updating and upgrading the firmware version of the server during OTA (Over-the-Air Technology) upgrade. Specifically, the firmware can be upgraded by transferring the upgrade package to the core board (or business board), thereby achieving the update and upgrade of the server. Generally speaking, a server contains multiple core boards. At present, when updating and upgrading the server, it is necessary to wait until all core boards in the server are in idle state before the firmware can be upgraded, resulting in low efficiency of firmware upgrade. Summary of the invention
[0003] The main purpose of the present application is to provide a server firmware upgrade method, device, electronic device and readable storage medium, aiming to solve the technical problem that the existing firmware upgrade method requires waiting for all core boards to be in an idle state before firmware upgrade can be performed, resulting in low firmware upgrade efficiency.
[0004] To achieve the above object, the present application provides a firmware upgrade method for a server, wherein the server includes multiple core boards, each of which is divided into a main core board and at least two levels of sub-core boards, and the firmware upgrade method for the server includes:
[0005] Get the firmware upgrade data;
[0006] Establishing a communication connection through the main core board and the first-level sub-core board corresponding to the main core board, wherein one main core board corresponds to at least two of the first-level sub-core boards;
[0007] After each of the first-level sub-core boards receives the upgraded firmware data, each of the main core boards is triggered to perform a firmware upgrade;
[0008] Use each first-level sub-core board as a new main core board, and use the second-level sub-core board corresponding to each first-level sub-core board as a new first-level sub-core board, wherein one first-level sub-core board corresponds to at least two second-level sub-core boards, return to execute the step of establishing a communication connection through the main core board and the first-level sub-core board corresponding to the main core board, until there is no corresponding second-level sub-core board for the first-level sub-core board, triggering each first-level sub-core board to perform a firmware upgrade.
[0009] Optionally, before the step of establishing a communication connection between the main core board and the first-level sub-core board corresponding to the main core board, the firmware upgrade method of the server further includes:
[0010] The upgraded firmware data is written into an upgrade package storage area of at least one of the main core boards through a first channel.
[0011] Optionally, after the step of establishing a communication connection between the main core board and the first-level sub-core board corresponding to the main core board, the firmware upgrade method of the server further includes:
[0012] A second channel is provided between the main core board and each of the first-level sub-core boards as a data transmission channel, wherein the bandwidth of the first channel is smaller than the bandwidth of the second channel;
[0013] The upgrade firmware data is transmitted from the main core board to the upgrade package storage area of each first-level sub-core board through the second channel.
[0014] Optionally, the step of establishing a communication connection through the main core board and a first-level sub-core board corresponding to the main core board includes:
[0015] If the main core board does not have an enabling object, the enabling object of the main core board is set to the server side, and the enabling object of each of the first-level sub-core boards is set to the user side to establish a communication connection between the main core board and the first-level sub-core board corresponding to the main core board;
[0016] If the main core board has an enabling object and the enabling object is the user end, the enabling object of the main core board is adjusted to the server end, and the enabling object of each first-level sub-core board is set to the user end to establish a communication connection between the main core board and the first-level sub-core board corresponding to the main core board.
[0017] Optionally, before the step of setting the enabling object of the main core board to the server side and setting the enabling object of each of the first-level sub-core boards to the user side, the firmware upgrade method of the server further includes:
[0018] Transmitting the identification information of the main core board to the first-level sub-core board corresponding to the main core board through the first channel;
[0019] After the first-level sub-core board receives the identification information, the steps of setting the enabling object of the main core board to the server side and setting the enabling object of each of the first-level sub-core boards to the user side are performed.
[0020] Optionally, the step of triggering each of the main core boards to perform a firmware upgrade includes:
[0021] Check whether the working status of each main core board is idle;
[0022] If so, an upgrade thread corresponding to each of the main core boards is created, and based on the upgrade thread corresponding to each of the main core boards, each of the main core boards is triggered to retrieve the upgrade firmware data from the upgrade package storage area to perform a firmware upgrade.
[0023] Optionally, the step of triggering each of the first-level sub-core boards to perform a firmware upgrade includes:
[0024] Verify whether the working status of each of the first-level sub-core boards is idle;
[0025] If so, an upgrade thread corresponding to each of the first-level sub-core boards is created, and based on the upgrade thread corresponding to each of the first-level sub-core boards, each of the first-level sub-core boards is triggered to retrieve the upgrade firmware data from the upgrade package storage area for firmware upgrade.
[0026] Optionally, the server firmware upgrade method further includes:
[0027] Verify whether each upgrade thread is running normally;
[0028] If not, then determine the interrupt upgrade thread that is not running normally, and obtain the running interruption point of each interrupt upgrade thread and the interrupt core board corresponding to each interrupt upgrade thread;
[0029] According to the operation interruption point, determining the remaining upgrade firmware data of the interrupted core board that has not completed the upgrade;
[0030] Each of the interrupt core boards is triggered to retrieve the remaining upgrade firmware data from the upgrade package storage area to perform firmware upgrade.
[0031] Optionally, the server includes at least one switching chip, and before the step of obtaining the upgrade firmware data, the firmware upgrade method of the server further includes:
[0032] Obtain the number of switch chips and the total number of core boards in the server;
[0033] According to the number of the switching chips and the total number of core boards, a core board set corresponding to each of the switching chips is constructed;
[0034] For any of the core board sets, select a core board from the core board set as the main core board, and use the main core board as the root node of the preset tree structure;
[0035] Using the remaining core boards in the core board set as sub-core boards corresponding to the main core board in the core board set;
[0036] According to the preset tree structure, the sub-core boards corresponding to the main core board are deployed in layers.
[0037] The present application also provides a firmware upgrade device for a server, the server comprising a plurality of core boards, each of the core boards being divided into a main core board and at least two levels of sub-core boards, the firmware upgrade device for the server comprising:
[0038] An acquisition module is used to acquire upgrade firmware data;
[0039] A communication module, used to establish a communication connection through the main core board and the first-level sub-core board corresponding to the main core board, wherein one main core board corresponds to at least two of the first-level sub-core boards;
[0040] A first upgrade module, used for triggering each of the main core boards to perform a firmware upgrade after each of the first-level sub-core boards receives the upgrade firmware data;
[0041] The second neural module is used to use each of the first-level sub-core boards as a new main core board, and to use the second-level sub-core board corresponding to each of the first-level sub-core boards as a new first-level sub-core board, wherein one first-level sub-core board corresponds to at least two second-level sub-core boards, and returns to execute the step of establishing a communication connection through the main core board and the first-level sub-core board corresponding to the main core board until there is no corresponding second-level sub-core board for the first-level sub-core board, thereby triggering each of the first-level sub-core boards to perform a firmware upgrade.
[0042] The present application also provides an electronic device, which is a physical device, and includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the steps of the server firmware upgrade method as described above.
[0043] The present application also provides a readable storage medium, which is a computer-readable storage medium, and a program for implementing a firmware upgrade method for a server is stored on the computer-readable storage medium. The program for implementing the firmware upgrade method for the server is executed by a processor to implement the steps of the firmware upgrade method for the server as described above.
[0044] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned server firmware upgrade method when executed by a processor.
[0045] The present application provides a firmware upgrade method for a server, the server includes multiple core boards, each core board is divided into a main core board and at least two levels of sub-core boards, the present application first divides the core boards in the server into a main core board and a sub-core board, and further divides the sub-core boards, thereby laying a foundation for the segmented upgrade of the core boards, after obtaining the upgrade firmware data, first control each main core board to establish a communication connection with each corresponding first-level sub-core board, after each first-level sub-core board receives the upgrade firmware data, trigger the main core board to perform a firmware upgrade, and use each first-level sub-core board as a new main core board, and The second-level sub-core boards corresponding to the first-level sub-core boards act as new first-level sub-core boards, repeating the above-mentioned operations of establishing communication connections, performing data transmission, and upgrading core boards until there is no corresponding second-level sub-core board under the sub-core board that acts as the new first-level sub-core board. In this way, the first-level sub-core board is triggered to complete the firmware upgrade of the sub-core board of the last level, thereby realizing the segmented upgrade of the core boards by dividing the levels of the core boards, solving the technical problem that the existing firmware upgrade method requires waiting for all core boards to be in an idle state before firmware upgrade can be performed, resulting in low efficiency of firmware upgrade. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0047] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0048] Figure 1 A schematic diagram of parallel transmission of the first embodiment of the firmware upgrade method of the server of the present application;
[0049] Figure 2This is a flow chart of a first embodiment of a method for upgrading the firmware of a server of the present application;
[0050] Figure 3 This is a transmission diagram of the serial-parallel combination of the first embodiment of the firmware upgrade method of the server of this application;
[0051] Figure 4 This is a flow chart of Embodiment 2 of the firmware upgrade method of the server of this application;
[0052] Figure 5 This is a schematic diagram of the module structure of the firmware upgrade device of the server in the embodiment of the present application;
[0053] Figure 6 This is a schematic diagram of the device structure of the hardware operating environment involved in the firmware upgrade device of the server in the embodiment of the present application.
[0054] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0055] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the scope of protection of the present invention.
[0056] Embodiment 1
[0057] Firmware upgrade refers to the manufacturer upgrading the embedded firmware of electronic devices to improve device functions, enhance device stability, and patch device vulnerabilities.
[0058] The server contains two boards: BMC (Baseboard Management Controller) and core board. BMC is responsible for controlling and obtaining device information and data of the core board, and core board supports specific business functions. BMC is used for updating and upgrading the firmware version of the server during OTA (Over-the-Air Technology) upgrade. Specifically, the firmware can be upgraded by transferring the upgrade package to the core board (or business board), thereby achieving the update and upgrade of the server. Generally speaking, a server contains multiple core boards. At present, when updating and upgrading the server, it is necessary to wait until all core boards in the server are in idle state before the firmware can be upgraded, resulting in low efficiency of firmware upgrade.
[0059] In addition, currently, the upgrade package is usually written into each core board one by one through the USB2.0 channel using serial transmission, or refer to Figure 1 As shown, the upgrade package is written to core boards 1 to 14 simultaneously through the USB2.0 channel in parallel transmission mode. However, when the size of the transmitted upgrade package is consistent and the number of core boards that need to receive the transmission package is consistent, the transmission efficiency is only related to the bandwidth of the USB2.0 channel. Therefore, in this case, whether it is serial transmission or parallel transmission, the transmission time consumed is the same. Therefore, the current transmission method also affects the firmware upgrade efficiency.
[0060] Reference Figure 1 , Figure 1 The upgrade package is simultaneously written into core boards 1 to 14 by parallel transmission through the USB 2.0 channel.
[0061] Based on this, this application proposes a server firmware upgrade method of the first embodiment, please refer to Figure 2 The server includes a plurality of core boards, each of which is divided into a main core board and at least two levels of sub-core boards. The firmware upgrade method of the server includes:
[0062] Step S10, obtaining upgrade firmware data;
[0063] The execution subject of the server firmware upgrade method of this embodiment may be a BMC (Baseboard Management Controller).
[0064] It should be noted that the upgrade firmware data is an upgrade package for upgrading the firmware of the core board, and the upgrade package can be a full upgrade package or a differential upgrade package, which is not specifically limited in this embodiment. Specifically, the upgrade firmware data is used to upgrade the current firmware version of the core board to the target firmware version.
[0065] Step S20, establishing a communication connection through the main core board and the first-level sub-core board corresponding to the main core board, wherein one main core board corresponds to at least two of the first-level sub-core boards;
[0066] It should be noted that the communication connection may be a TCP communication connection, which is not specifically limited in this embodiment.
[0067] As an example, the step of establishing a communication connection through the main core board and the first-level sub-core board corresponding to the main core board can be to establish a communication connection by matching the communication IP of the main core board and the communication IP of the first-level sub-core board, or to establish a communication connection by matching the number of the main core board and the number of the first-level sub-core board. This example does not make specific limitations on this.
[0068] Step S30, after each of the first-level sub-core boards receives the upgraded firmware data, triggering each of the main core boards to perform a firmware upgrade;
[0069] Step S40, using each of the first-level sub-core boards as a new main core board, and using the second-level sub-core board corresponding to each of the first-level sub-core boards as a new first-level sub-core board, wherein one first-level sub-core board corresponds to at least two second-level sub-core boards, returning to execute the step of establishing a communication connection through the main core board and the first-level sub-core board corresponding to the main core board, until there is no corresponding second-level sub-core board for the first-level sub-core board, triggering each of the first-level sub-core boards to perform a firmware upgrade.
[0070] Assuming that there are only two levels of sub-core boards, namely the first-level sub-core board and the second-level sub-core board, then after taking the first-level sub-core board as the new main core board, and the second-level sub-core board as the new first-level core board to build the communication connection between the original first-level sub-core board (new main core board) and the original second-level sub-core board (new first-level sub-core board) and the transmission of the upgraded firmware data, since the original second-level sub-core board (new first-level sub-core board) is already the lowest level of the sub-core board, all the core boards of the server have received the upgraded firmware data, and there is no need to build a new communication connection between the core boards to transmit the upgraded firmware data.
[0071] The embodiment of the present application provides a firmware upgrade method for a server, the server includes multiple core boards, each core board is divided into a main core board and at least two levels of sub-core boards, the embodiment of the present application first divides the core board in the server into a main core board and a sub-core board, and further divides the sub-core board, so as to lay a foundation for the segmented upgrade of the core board, after obtaining the upgrade firmware data, first control each main core board and its corresponding first-level sub-core board to establish a communication connection, after each first-level sub-core board receives the upgrade firmware data, trigger the main core board to perform a firmware upgrade, and use each first-level sub-core board as a new main core board, so as to And use the second-level sub-core board corresponding to each first-level sub-core board as the new first-level sub-core board to repeat the above operations of establishing communication connection, transmitting data, and upgrading the core board, until there is no corresponding second-level sub-core board under the sub-core board that is the new first-level sub-core board, then the first-level sub-core board is triggered to complete the firmware upgrade of the sub-core board of the last level, thereby realizing the segmented upgrade of the core board by dividing the level of the core board, solving the technical problem that the existing firmware upgrade method needs to wait until all core boards are in idle state before firmware upgrade can be performed, resulting in low efficiency of firmware upgrade.
[0072] In a possible implementation, before the step of establishing a communication connection between the main core board and the first-level sub-core board corresponding to the main core board, the firmware upgrade method of the server further includes:
[0073] Step A201, writing the upgrade firmware data into the upgrade package storage area of at least one of the main core boards through the first channel;
[0074] It should be noted that the upgrade package storage area is a storage area used to store upgrade firmware data.
[0075] After the step of establishing a communication connection between the main core board and the first-level sub-core board corresponding to the main core board, the firmware upgrade method of the server further includes:
[0076] Step A202, providing a second channel between the main core board and each of the first-level sub-core boards as a data transmission channel, wherein the bandwidth of the first channel is smaller than the bandwidth of the second channel;
[0077] Step A203, transmitting the upgrade firmware data from the main core board to the upgrade package storage area of each first-level sub-core board through the second channel;
[0078] It is known to those skilled in the art that the transmission efficiency of a channel is limited by the bandwidth of the channel. The wider the bandwidth, the higher the transmission efficiency. Therefore, the second channel in this example has a higher transmission efficiency than the first channel, thereby further improving the transmission efficiency of the upgraded firmware data on the core board. The first channel can be a USB2.0 channel (low-speed channel), and the second channel can be a USB3.0 channel (high-speed channel). In general, the time calculation formula for data transmission on the core board using the channel is as follows:
[0079]
[0080] Among them, T is the transmission time, B is the upgrade firmware data size, D is the number of core boards, and L is the bandwidth of the transmission channel.
[0081] As an example, the step of transmitting the upgrade firmware data from the main core board to the upgrade package storage area of each first-level sub-core board through the second channel includes: transmitting the upgrade firmware data from the data header to the data tail from the main core board to the upgrade package storage area of each first-level sub-core board through the second channel; the upgrade firmware data may also be divided into multiple data segments, and then the upgrade firmware data is transmitted from the main core board to the upgrade package storage area of each first-level sub-core board in the order of arrangement of the data segments through the second channel. This example does not make specific limitations on this.
[0082] Before controlling each main core board to establish a communication connection with its corresponding first-level sub-core board, this embodiment needs to first write the upgrade firmware data into the upgrade package storage area of each main core board through the first channel. After controlling each main core board to establish a communication connection with its corresponding first-level sub-core board, a wider second channel can be installed between the main core board and each first-level sub-core board as a data transmission channel, thereby improving the transmission rate of the upgrade firmware data to each first-level sub-core board, so as to avoid the influence of transmission efficiency on firmware upgrade efficiency, thereby improving firmware upgrade efficiency by improving the transmission efficiency of upgrade firmware data.
[0083] In a possible implementation, the step of establishing a communication connection between the main core board and a first-level sub-core board corresponding to the main core board includes:
[0084] Step S21, if the main core board does not have an enabled object, the enabled object of the main core board is set to the server side, and the enabled object of each of the first-level sub-core boards is set to the user side, so as to establish a communication connection between the main core board and the first-level sub-core board corresponding to the main core board;
[0085] It should be noted that the enabling object is used to characterize the object of the core board TCP communication. When the enabling object is the server side, the core board will establish TCP communication with the server. When the enabling object is the user side, the core board will establish TCP communication with the user side.
[0086] Step S22, if the main core board has an enabling object and the enabling object is the user end, the enabling object of the main core board is adjusted to the server end, and the enabling object of each first-level sub-core board is set to the user end to establish a communication connection between the main core board and the first-level sub-core board corresponding to the main core board.
[0087] In this embodiment, when the main core board does not have an enabling object, the enabling object of the main core board is set to the server side, thereby establishing TCP communication between the main core board and the server, and the enabling object of the first-level sub-core board is set to the user side, thereby establishing TCP communication between the first-level sub-core board and the user side, so as to establish TCP communication between the main core board and the first-level sub-core board through the server side and the user side, and to ensure that the TCP communication between the main core board and the first-level sub-core board is between the server and the user side, so as to ensure the stability of communication, when the main core board has an enabling object and enables When the target is the user end, it is necessary to first cut off the TCP communication between the main core board and the user end, and then establish the TCP communication between the main core board and the client, as well as the TCP communication between the first-level sub-core board and the user end, to prevent TCP communication conflicts from occurring when establishing TCP communication between the main core board and the first-level sub-core board through the server end and the user end, causing TCP communication disorder, resulting in the main core board and the first-level sub-core board being unable to establish TCP communication, or causing the upgraded firmware data to be repeatedly transmitted between the main core board and the first-level sub-core board, affecting the stability of the firmware upgrade.
[0088] In a possible implementation, before the step of setting the enabling object of the main core board to the server side and setting the enabling object of each of the first-level sub-core boards to the user side, the firmware upgrade method of the server further includes:
[0089] Step S211, transmitting the identification information of the main core board to the first-level sub-core board corresponding to the main core board through the first channel;
[0090] It should be noted that the identification information refers to information used to characterize the attribute characteristics of the core board, and the identification information may include the core board number, the core board IP address, the port number, etc., wherein one core board corresponds to one core board IP address, one core board corresponds to one core board number, and one core board corresponds to multiple port numbers. The BMC can record the core board IP address during the core board startup process. The core board number can be determined by the drawer number of the core board location, or by the slot number of the core board location. This embodiment does not make specific limitations on this. The port number of the core board can be set according to the number of first-level sub-core boards that need to establish communication connections, wherein the port numbers of the main core boards corresponding to each first-level sub-core board are different.
[0091] As an example, the identification information includes the core board IP address and the available port number, and the step of transmitting the identification information of the main core board to the first-level sub-core board corresponding to the main core board through the first channel includes: transmitting the core board IP address and the available port number of the main core board to the first-level sub-core board corresponding to the main core board through the first channel. This example does not limit this.
[0092] Step S212, after the first-level sub-core board receives the identification information, execute the step of setting the enabling object of the main core board to the server side, and setting the enabling object of each first-level sub-core board to the user side.
[0093] In this embodiment, before establishing a communication connection through the main core board and the first-level sub-core board, the core board IP address and available port number of the main core board are first transmitted to the first-level sub-core board through the first channel, thereby establishing a preliminary connection between the main core board and the first-level sub-core board, ensuring that when establishing a communication connection subsequently, multiple first-level sub-core boards will not use the same wiring port of the main core board, thereby causing data transmission disorder, and the main core communication connection will not be connected to a first-level sub-core board that does not correspond to itself, thereby further improving the reliability of the communication connection.
[0094] In a possible implementation, before the step of transmitting the upgrade firmware data from the main core board to the upgrade package storage area of each first-level sub-core board through the second channel, the firmware upgrade method of the server further includes:
[0095] Step S201, obtaining the connection duration of the main core board and the first-level sub-core board corresponding to the main core board to establish a communication connection;
[0096] As an example, the connection duration can be the connection duration spent by the main core board and each first-level sub-core board to establish a communication connection, or it can be the total connection duration spent by the main core board and each first-level sub-core board to establish a communication connection. This example does not limit this.
[0097] Further, the step of obtaining the connection duration for establishing a communication connection between the main core board and the first-level sub-core board corresponding to the main core board may include: obtaining the initial time point for establishing a communication connection between the main core board and the first-level sub-core board, and checking whether the main core board and the first-level sub-core board have completed the communication connection; if the main core board and the first-level sub-core board have completed the communication connection, obtaining the end time point for establishing a communication connection between the main core board and the first-level sub-core board; calculating the difference between the initial time point and the end time point, and obtaining the connection duration for establishing a communication connection between the main core board and the first-level sub-core board corresponding to the main core board; if the main core board and the first-level sub-core board have not completed the communication connection, calculating the difference between the initial time point and the current time point, and obtaining the connection duration for establishing a communication connection between the main core board and the first-level sub-core board corresponding to the main core board.
[0098] Step S202, determining whether the connection duration is greater than a preset duration threshold;
[0099] Step S203: if yes, reacquire the identification information of the main core board, and return to execute the step of transmitting the identification information of the main core board to the first-level sub-core board corresponding to the main core board through the first channel;
[0100] Step S204: if not, executing the step of transmitting the upgrade firmware data from the main core board to the upgrade package storage area of each first-level sub-core board through the second channel.
[0101] In this embodiment, before transmitting the upgraded firmware data from the main core board to each first-level sub-core board through the second channel, it is necessary to first record the connection duration for establishing the communication connection between the main core board and each first-level sub-core board to verify the rationality of the communication connection. If any connection duration or the total connection duration for establishing the communication connection between the main core board and each first-level sub-core board exceeds a preset duration threshold, it is necessary to re-acquire the identification information of the main core board, and re-transmit the re-acquired identification information to each first-level sub-core board through the first channel to re-establish the communication connection between the main core board and the first-level sub-core boards, thereby ensuring the rationality of the communication connection.
[0102] In a possible implementation, the step of triggering each of the main core boards to perform a firmware upgrade includes:
[0103] Step S31, checking whether the working status of each main core board is idle;
[0104] As an example, the working state includes an idle state and an occupied state. The idle state refers to the state of the core board when there is no running task in the core board. At this time, the step of verifying whether the working state of each of the main core boards is an idle state includes: verifying whether there is a running task in each of the main core boards; if there is a running task in the main core board, the working state of the main core board is an occupied state; if there is no running task in the main core board, the working state of the main core board is an idle state.
[0105] As another example, a task tag can be inserted into the core board, and the task tag is used to record whether the core board is occupied, so that the idle state refers to the core board state when the task tag of the core board is not occupied. At this time, the step of verifying whether the working states of each of the main core boards are in an idle state includes: verifying whether the task tags in each of the main core boards are occupied; if the task tags in the main core boards are occupied, the working state of the main core boards is an occupied state; if the task tags in the main core boards are not occupied, the working state of the main core boards is an idle state. This example does not limit this.
[0106] Step S32: If yes, then create an upgrade thread corresponding to each of the main core boards, and based on the upgrade thread corresponding to each of the main core boards, trigger each of the main core boards to retrieve the upgrade firmware data from the upgrade package storage area to perform firmware upgrade.
[0107] It should be noted that the upgrade thread is used to control the core board to perform firmware upgrade.
[0108] The step of triggering each of the first-level sub-core boards to perform a firmware upgrade includes:
[0109] Step S41, checking whether the working status of each of the first-level sub-core boards is an idle state;
[0110] Step S42, if yes, then create an upgrade thread corresponding to each of the first-level sub-core boards, and based on the upgrade thread corresponding to each of the first-level sub-core boards, trigger each of the first-level sub-core boards to retrieve the upgrade firmware data from the upgrade package storage area for firmware upgrade.
[0111] In this embodiment, before the upgrade firmware data is retrieved from the storage area of the core board upgrade package for firmware upgrade, it is necessary to ensure that the core board to be upgraded is in an idle state and create an upgrade process for it, so as to prevent the firmware upgrade process from being affected by the running tasks in the core board, or the firmware upgrade process from causing the current running tasks of the core board to be interrupted, so as to avoid process conflicts during the firmware upgrade process and improve the stability of the firmware upgrade.
[0112] In a possible implementation, before the step of triggering each of the main core boards to perform a firmware upgrade, the firmware upgrade method of the server further includes:
[0113] Step E10, obtaining the first data length of the upgrade firmware data and the second data length of the upgrade firmware data received by each of the first-level sub-core boards;
[0114] Step E20, checking whether the first data length is equal to the second data length;
[0115] Step E30: If yes, execute the step of triggering each main core board to perform firmware upgrade;
[0116] Step E40: If not, return to execute the step of transmitting the upgrade firmware data from the main core board to the upgrade package storage area of each first-level sub-core board through the second channel.
[0117] In this embodiment, by obtaining the first data length of the upgrade firmware data and the second data length of the upgrade firmware data received by each first-level sub-core board, and verifying whether the two are equal, it is determined whether each first-level sub-core board has received the complete upgrade firmware data. If the two are equal, it is determined that each first-level sub-core board has received the complete upgrade firmware data. At this time, each core board can be triggered normally to perform firmware upgrade. If the two are not equal, it is determined that there is a first-level sub-core board that has not received the complete upgrade firmware data. At this time, the upgrade firmware data needs to be re-transmitted until each first-level sub-core board has received the complete upgrade firmware data, thereby avoiding the technical problem of incomplete upgrade firmware data stored in the upgrade storage area of some core boards during the upgrade process, affecting the upgrade stability.
[0118] In a possible implementation, the server includes at least one switching chip, and before the step of obtaining the upgrade firmware data, the firmware upgrade method of the server further includes:
[0119] Step S11, obtaining the number of switch chips and the total number of core boards in the server;
[0120] Step S12, constructing a core board set corresponding to each switching chip according to the number of switching chips and the total number of core boards;
[0121] It should be noted that the number of core board sets is related to the number of switch chips, that is, as many core board sets as there are switch chips, they need to be constructed accordingly.
[0122] As an example, the step of constructing a core board set corresponding to each switching chip based on the number of switching chips and the total number of core boards includes: determining the number of core board sets based on the number of switching chips, and determining the number of core boards included in the core board set based on the number of core board sets and the total number of core boards, so as to construct a core board set corresponding to each switching chip. This example does not limit this.
[0123] Step S13, for any of the core board sets, selecting a core board from the core board set as the main core board, and using the main core board as the root node of the preset tree structure;
[0124] It should be noted that the number of the main core boards is related to the number of switching chips, that is, there are several main core boards corresponding to several switching chips. The main core boards can be selected arbitrarily or according to the core board numbers. The preset tree structure can be a binary tree structure or a multi-branch tree structure.
[0125] As an example, when selecting the main core board according to the core board number, for any of the core board sets, selecting a core board in the core board set as the main core board, and using the main core board as the root node of the preset tree structure includes: for any of the core board sets, selecting the core board with the smallest core board number in the core board set as the main core board, and using the main core board as the root node of the preset tree structure, or for any of the core board sets, selecting the core board with the largest core board number in the core board set as the main core board, and using the main core board as the root node of the preset tree structure. This example does not limit this.
[0126] Step S14, using the remaining core boards in the core board set as sub-core boards corresponding to the main core board in the core board set;
[0127] Step S15, deploying the sub-core boards corresponding to the main core boards in layers according to the preset tree structure.
[0128] As an example, hierarchical deployment can be performed in the order of core board numbers. At this time, the step of hierarchically deploying the sub-core boards corresponding to each main core board according to the preset tree structure includes: according to the preset tree structure, the sub-core boards corresponding to each main core board are hierarchically deployed from small to large according to the core board numbers, or according to the preset tree structure, the sub-core boards corresponding to each main core board are hierarchically deployed from large to small according to the core board numbers.
[0129] In this embodiment, after obtaining the number of switching chips and the total number of core boards contained in the server, a core board set under each switching chip is constructed, and then any core board in the core board set is selected as the main core board for use as the transmission medium for upgrading the firmware data through the second channel, and the main core board is used as the root node of the preset tree structure. At the same time, according to the preset tree structure, the remaining core boards in the core board set are deployed in layers as sub-core boards corresponding to the main core boards associated with them, thereby realizing hierarchical deployment of the core boards and laying the foundation for the segmented upgrade of the core boards.
[0130] In order to help understand the technical concept or technical principle of the present application, a specific embodiment is listed:
[0131] Reference Figure 3 , taking 14 core boards and a binary tree structure as an example, the upgrade process in this specific embodiment is:
[0132] 1. BMC writes the upgrade file (i.e. the upgrade firmware data mentioned above) into the upgrade package storage area of core board 1 and core board 8 (i.e. the main core board mentioned above);
[0133] 2. BMC notifies core board 1 and core board 8 to enable the server side, and notifies the remaining core boards 2, 3, 9 and 10 (i.e. the first-level sub-core boards) to enable the user side, so that core board 1 establishes a TCP communication connection with core board 2 and core board 3 between the user side and the server side, and core board 8 establishes a TCP communication connection with core board 9 and core board 10 between the user side and the server side;
[0134] 3. Core board 1 sends the upgrade file to core board 2 and core board 3 through the USB3.0 channel via TCP connection, and core board 8 sends the upgrade file to core board 9 and core board 10 through the USB3.0 channel via TCP connection;
[0135] 4. After core board 1 and core board 8 complete the sending of the upgrade file, they notify BMC. BMC records the working status of all core boards. When core board 1 and core board 8 are idle, BMC immediately triggers the upgrade action of core board 1 and core board 8, and notifies core board 2, core board 3, core board 9 and core board 10 to close the client function and enable the server function.
[0136] 5. BMC notifies core board 4, core board 5, core board 6, core board 7, core board 11, core board 12, core board 13 and core board 14 to enable the client, so that core board 2 establishes a TCP communication connection with core board 4 and core board 5 between the user end and the server end, core board 3 establishes a TCP communication connection with core board 6 and core board 7 between the user end and the server end, core board 9 establishes a TCP communication connection with core board 11 and core board 12 between the user end and the server end, and core board 10 establishes a TCP communication connection with core board 13 and core board 14 between the user end and the server end;
[0137] 6. Core board 2 sends the upgrade file to core board 4 and core board 5 through the USB3.0 channel via TCP connection. Core board 3 sends the upgrade file to core board 6 and core board 7 through the USB3.0 channel via TCP connection. Core board 9 sends the upgrade file to core board 11 and core board 12 through the USB3.0 channel via TCP connection. Core board 10 sends the upgrade file to core board 13 and core board 14 through the USB3.0 channel via TCP connection.
[0138] 7. After core board 2, core board 3, core board 9 and core board 10 complete the sending event of the upgrade file, they notify BMC. BMC records the working status of all core boards. When all remaining core boards are idle, BMC immediately triggers the upgrade action of all remaining core boards.
[0139] It should be noted that the above specific embodiments are only used to understand the present application and do not constitute a limitation on the firmware upgrade method of the server of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0140] Embodiment 2
[0141] Based on the first embodiment of the present application, in another embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 4 , the firmware upgrade method of the server further includes:
[0142] Step A10, verifying whether each upgrade thread is running normally;
[0143] It should be noted that the normal operation of the upgrade thread means that the upgrade thread is not killed to generate an operation interruption point.
[0144] Step A20: if not, determine the interrupt upgrade thread that is not running normally, and obtain the running interruption point of each interrupt upgrade thread and the interrupt core board corresponding to each interrupt upgrade thread;
[0145] Step A30, determining the remaining upgrade firmware data of the interrupted core board that has not completed the upgrade according to the operation interruption point;
[0146] Step A40, triggering each of the interrupt core boards to retrieve the remaining upgrade firmware data from the upgrade package storage area to perform firmware upgrade.
[0147] In this embodiment, by verifying whether each created upgrade thread is running normally, it is timely determined whether the core board has successfully completed the firmware upgrade. If the created upgrade thread is running normally, it is determined that the core board corresponding to the upgrade thread has successfully completed the firmware upgrade. If the created upgrade thread is not running normally, it is necessary to first determine the operation interruption point of the interrupt upgrade thread and the interrupt core board corresponding to the interrupt upgrade thread based on the interrupt upgrade thread that is not running normally, so as to find the remaining upgrade firmware data that has not been upgraded in the interrupt core board, and then re-trigger the interrupt core board on the interrupt upgrade thread to retrieve the remaining upgrade firmware data from the upgrade package storage area for firmware upgrade, which solves the technical problem of low firmware upgrade efficiency caused by the need to retransmit the upgrade firmware data when the core board upgrade fails, and re-write, decompress and run the upgrade firmware data.
[0148] Embodiment 3
[0149] The embodiment of the present invention also provides a server firmware upgrade device, please refer to Figure 5 The server includes a plurality of core boards, each of which is divided into a main core board and at least two levels of sub-core boards, and the firmware upgrade device of the server includes:
[0150] An acquisition module 10 is used to acquire upgrade firmware data;
[0151] A communication module 20, for establishing a communication connection through the main core board and a first-level sub-core board corresponding to the main core board, wherein one main core board corresponds to at least two of the first-level sub-core boards;
[0152] A first upgrade module 30, configured to trigger each of the main core boards to perform a firmware upgrade after each of the first-level sub-core boards receives the upgrade firmware data;
[0153] The second upgrade module 40 is used to use each of the first-level sub-core boards as a new main core board, and use the second-level sub-core board corresponding to each of the first-level sub-core boards as a new first-level sub-core board, wherein one first-level sub-core board corresponds to at least two second-level sub-core boards, and return to execute the step of establishing a communication connection through the main core board and the first-level sub-core board corresponding to the main core board until there is no corresponding second-level sub-core board for the first-level sub-core board, triggering each of the first-level sub-core boards to perform a firmware upgrade.
[0154] Optionally, the firmware upgrade device of the server further includes:
[0155] The upgraded firmware data is written into an upgrade package storage area of at least one of the main core boards through a first channel.
[0156] Optionally, the firmware upgrade device of the server further includes:
[0157] A second channel is provided between the main core board and each of the first-level sub-core boards as a data transmission channel, wherein the bandwidth of the first channel is smaller than the bandwidth of the second channel;
[0158] The upgrade firmware data is transmitted from the main core board to the upgrade package storage area of each first-level sub-core board through the second channel.
[0159] Optionally, the communication module 20 further includes:
[0160] If the main core board does not have an enabling object, the enabling object of the main core board is set to the server side, and the enabling object of each of the first-level sub-core boards is set to the user side to establish a communication connection between the main core board and the first-level sub-core board corresponding to the main core board;
[0161] If the main core board has an enabling object and the enabling object is the user end, the enabling object of the main core board is adjusted to the server end, and the enabling object of each first-level sub-core board is set to the user end to establish a communication connection between the main core board and the first-level sub-core board corresponding to the main core board.
[0162] Optionally, the firmware upgrade device of the server further includes:
[0163] Transmitting the identification information of the main core board to the first-level sub-core board corresponding to the main core board through the first channel;
[0164] After the first-level sub-core board receives the identification information, the steps of setting the enabling object of the main core board to the server side and setting the enabling object of each of the first-level sub-core boards to the user side are performed.
[0165] Optionally, the first upgrading module 30 further includes:
[0166] Check whether the working status of each main core board is idle;
[0167] If so, an upgrade thread corresponding to each of the main core boards is created, and based on the upgrade thread corresponding to each of the main core boards, each of the main core boards is triggered to retrieve the upgrade firmware data from the upgrade package storage area to perform a firmware upgrade.
[0168] Optionally, the second upgrading module 40 further includes:
[0169] Verify whether the working status of each of the first-level sub-core boards is idle;
[0170] If so, an upgrade thread corresponding to each of the first-level sub-core boards is created, and based on the upgrade thread corresponding to each of the first-level sub-core boards, each of the first-level sub-core boards is triggered to retrieve the upgrade firmware data from the upgrade package storage area for firmware upgrade.
[0171] Optionally, the firmware upgrade device of the server further includes:
[0172] Verify whether each upgrade thread is running normally;
[0173] If not, then determine the interrupt upgrade thread that is not running normally, and obtain the running interruption point of each interrupt upgrade thread and the interrupt core board corresponding to each interrupt upgrade thread;
[0174] According to the operation interruption point, determining the remaining upgrade firmware data of the interrupted core board that has not completed the upgrade;
[0175] Each of the interrupt core boards is triggered to retrieve the remaining upgrade firmware data from the upgrade package storage area to perform firmware upgrade.
[0176] The server includes at least one switching chip, and the firmware upgrade device of the server also includes:
[0177] Obtain the number of switch chips and the total number of core boards in the server;
[0178] According to the number of the switching chips and the total number of core boards, a core board set corresponding to each of the switching chips is constructed;
[0179] For any of the core board sets, select a core board from the core board set as the main core board, and use the main core board as the root node of the preset tree structure;
[0180] Using the remaining core boards in the core board set as sub-core boards corresponding to the main core board in the core board set;
[0181] According to the preset tree structure, the sub-core boards corresponding to the main core board are deployed in layers.
[0182] The server firmware upgrade device provided by the present invention adopts the server firmware upgrade method in the above-mentioned embodiment 1 or embodiment 2, which can solve the technical problem that the existing firmware upgrade method needs to wait until all core boards are in an idle state before firmware upgrade can be performed, resulting in low firmware upgrade efficiency. Compared with the prior art, the beneficial effects of the server firmware upgrade device provided by the embodiment of the present invention are the same as the beneficial effects of the server firmware upgrade method provided by the above-mentioned embodiment, and the other technical features in the server firmware upgrade device are the same as the features disclosed in the previous embodiment method, which will not be repeated here.
[0183] Embodiment 4
[0184] An embodiment of the present invention provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the firmware upgrade method of the server in the above-mentioned embodiment one.
[0185] Reference below Figure 6 , which shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiment of the present disclosure. The electronic device in the embodiment of the present disclosure may be a BMC (Baseboard Management Controller) or the like. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0186] like Figure 6As shown, the electronic device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the electronic device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows an electronic device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0187] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0188] The electronic device provided by the present invention adopts the firmware upgrade method of the server in the above embodiment, which can solve the technical problem that the existing firmware upgrade method needs to wait until all core boards are in an idle state before firmware upgrade can be performed, resulting in low efficiency of firmware upgrade. Compared with the prior art, the beneficial effects of the electronic device provided by the embodiment of the present invention are the same as the beneficial effects of the firmware upgrade method of the server provided by the above embodiment, and other technical features in the electronic device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0189] It should be understood that the various parts of the present disclosure can be implemented with hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0190] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
[0191] Embodiment 5
[0192] An embodiment of the present invention provides a computer-readable storage medium having computer-readable program instructions stored thereon, and the computer-readable program instructions are used to execute the firmware upgrade method of the server in the above-mentioned embodiment 1.
[0193] The computer-readable storage medium provided in the embodiment of the present invention may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0194] The computer-readable storage medium may be included in the electronic device, or may exist independently without being installed in the electronic device.
[0195] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains upgrade firmware data; establishes a communication connection through the main core board and the first-level sub-core board corresponding to the main core board, wherein one main core board corresponds to at least two first-level sub-core boards; after each first-level sub-core board receives the upgrade firmware data, triggers each main core board to perform a firmware upgrade; uses each first-level sub-core board as a new main core board, and uses the second-level sub-core board corresponding to each first-level sub-core board as a new first-level sub-core board, wherein one first-level sub-core board corresponds to at least two second-level sub-core boards, and returns to execute the step of establishing a communication connection through the main core board and the first-level sub-core board corresponding to the main core board, until there is no corresponding second-level sub-core board for the first-level sub-core board, triggering each first-level sub-core board to perform a firmware upgrade.
[0196] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0197] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0198] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of the module does not limit the unit itself in some cases.
[0199] The readable storage medium provided by the present invention is a computer-readable storage medium, which stores computer-readable program instructions for executing the firmware upgrade method of the above-mentioned server, and can solve the technical problem that the existing firmware upgrade method needs to wait for all core boards to be in an idle state before firmware upgrade, resulting in low efficiency of firmware upgrade. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the embodiment of the present invention are the same as the beneficial effects of the firmware upgrade method of the server provided by the above-mentioned embodiment one or embodiment two, and will not be repeated here.
[0200] Embodiment 6
[0201] An embodiment of the present invention further provides a computer program product, including a computer program, wherein when the computer program is executed by a processor, the steps of the above-mentioned server firmware upgrade method are implemented.
[0202] The computer program product provided by the present application can solve the technical problem that the existing firmware upgrade method needs to wait until all core boards are in an idle state before firmware upgrade can be performed, resulting in low firmware upgrade efficiency. Compared with the prior art, the beneficial effects of the computer program product provided by the embodiment of the present invention are the same as the beneficial effects of the firmware upgrade method of the server provided by the above-mentioned embodiment 1 or embodiment 2, and will not be repeated here.
[0203] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent processing scope of the present application.
Claims
1. A method for upgrading server firmware, characterized in that: The server includes a plurality of core boards, each of which is divided into a main core board and at least two levels of sub-core boards. The firmware upgrade method of the server includes: Get the firmware upgrade data; Establishing a communication connection through the main core board and the first-level sub-core board corresponding to the main core board, wherein one main core board corresponds to at least two of the first-level sub-core boards; After each of the first-level sub-core boards receives the upgraded firmware data, each of the main core boards is triggered to perform a firmware upgrade; Use each first-level sub-core board as a new main core board, and use the second-level sub-core board corresponding to each first-level sub-core board as a new first-level sub-core board, wherein one first-level sub-core board corresponds to at least two second-level sub-core boards, return to execute the step of establishing a communication connection through the main core board and the first-level sub-core board corresponding to the main core board, until there is no corresponding second-level sub-core board for the first-level sub-core board, triggering each first-level sub-core board to perform a firmware upgrade.
2. The server firmware upgrade method according to claim 1, characterized in that: Before the step of establishing a communication connection between the main core board and the first-level sub-core board corresponding to the main core board, the firmware upgrade method of the server further includes: Writing the upgraded firmware data into an upgrade package storage area of at least one of the main core boards through a first channel; After the step of establishing a communication connection between the main core board and the first-level sub-core board corresponding to the main core board, the firmware upgrade method of the server further includes: A second channel is provided between the main core board and each of the first-level sub-core boards as a data transmission channel, wherein the bandwidth of the first channel is smaller than the bandwidth of the second channel; The upgrade firmware data is transmitted from the main core board to the upgrade package storage area of each first-level sub-core board through the second channel.
3. The server firmware upgrade method according to claim 2, characterized in that: The step of establishing a communication connection between the main core board and the first-level sub-core board corresponding to the main core board includes: If the main core board does not have an enabling object, the enabling object of the main core board is set to the server side, and the enabling object of each of the first-level sub-core boards is set to the user side to establish a communication connection between the main core board and the first-level sub-core board corresponding to the main core board; If the main core board has an enabling object and the enabling object is the user end, the enabling object of the main core board is adjusted to the server end, and the enabling object of each first-level sub-core board is set to the user end to establish a communication connection between the main core board and the first-level sub-core board corresponding to the main core board.
4. The server firmware upgrade method according to claim 3, characterized in that: Before the step of setting the enabling object of the main core board to the server side and setting the enabling object of each of the first-level sub-core boards to the user side, the firmware upgrade method of the server further includes: Transmitting the identification information of the main core board to the first-level sub-core board corresponding to the main core board through the first channel; After the first-level sub-core board receives the identification information, the steps of setting the enabling object of the main core board to the server side and setting the enabling object of each of the first-level sub-core boards to the user side are performed.
5. The server firmware upgrade method according to claim 1, characterized in that: The step of triggering each of the main core boards to perform a firmware upgrade comprises: Check whether the working status of each main core board is idle; If so, create an upgrade thread corresponding to each of the main core boards, and based on the upgrade thread corresponding to each of the main core boards, trigger each of the main core boards to retrieve the upgrade firmware data from the upgrade package storage area to perform a firmware upgrade; The step of triggering each of the first-level sub-core boards to perform a firmware upgrade includes: Verify whether the working status of each of the first-level sub-core boards is idle; If so, an upgrade thread corresponding to each of the first-level sub-core boards is created, and based on the upgrade thread corresponding to each of the first-level sub-core boards, each of the first-level sub-core boards is triggered to retrieve the upgrade firmware data from the upgrade package storage area for firmware upgrade.
6. The server firmware upgrade method according to claim 5, characterized in that: The firmware upgrade method of the server also includes: Verify whether each upgrade thread is running normally; If not, then determine the interrupt upgrade thread that is not running normally, and obtain the running interruption point of each interrupt upgrade thread and the interrupt core board corresponding to each interrupt upgrade thread; According to the operation interruption point, determining the remaining upgrade firmware data of the interrupted core board that has not completed the upgrade; Each of the interrupt core boards is triggered to retrieve the remaining upgrade firmware data from the upgrade package storage area to perform firmware upgrade.
7. The server firmware upgrade method according to any one of claims 1 to 6, characterized in that: The server includes at least one switching chip. Before the step of obtaining the upgrade firmware data, the firmware upgrade method of the server further includes: Obtain the number of switch chips and the total number of core boards in the server; According to the number of the switching chips and the total number of core boards, a core board set corresponding to each of the switching chips is constructed; For any of the core board sets, select a core board from the core board set as the main core board, and use the main core board as the root node of the preset tree structure; Using the remaining core boards in the core board set as sub-core boards corresponding to the main core board in the core board set; According to the preset tree structure, the sub-core boards corresponding to the main core board are deployed in layers.
8. A server firmware upgrade device, characterized in that: The server includes a plurality of core boards, each of which is divided into a main core board and at least two levels of sub-core boards, and the firmware upgrade device of the server includes: An acquisition module is used to acquire upgrade firmware data; A communication module, used to establish a communication connection through the main core board and the first-level sub-core board corresponding to the main core board, wherein one main core board corresponds to at least two of the first-level sub-core boards; A first upgrade module, used for triggering each of the main core boards to perform a firmware upgrade after each of the first-level sub-core boards receives the upgrade firmware data; The second neural module is used to use each of the first-level sub-core boards as a new main core board, and to use the second-level sub-core board corresponding to each of the first-level sub-core boards as a new first-level sub-core board, wherein one first-level sub-core board corresponds to at least two second-level sub-core boards, and returns to execute the step of establishing a communication connection through the main core board and the first-level sub-core board corresponding to the main core board until there is no corresponding second-level sub-core board for the first-level sub-core board, thereby triggering each of the first-level sub-core boards to perform a firmware upgrade.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps of the firmware upgrade method of the server according to any one of claims 1 to 7.
10. A readable storage medium, characterized in that: The readable storage medium is a computer-readable storage medium, on which is stored a program for implementing a firmware upgrade method for a server, and the program for implementing a firmware upgrade method for a server is executed by a processor to implement the steps of the firmware upgrade method for a server as described in any one of claims 1 to 7.
