A firmware upgrade method, device, equipment and medium
Through the automated firmware upgrade method, the configuration file and firmware upgrade function interfaces are used to solve the problem of cumbersome firmware upgrade in the existing technology, improving efficiency and reducing costs, and improving server testing progress.
Patent Information
- Application Number
- CN202310188925.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-22
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2043-02-22
AI Technical Summary
In the prior art, the firmware upgrade solution is relatively cumbersome, consuming a lot of labor and time costs, affecting the server testing progress.
By obtaining firmware upgrade information of multiple servers from the configuration file, detecting whether the current firmware upgrade file exists in the preset file database, and automatically performing firmware upgrade using the firmware upgrade function interface.
It realizes a unified firmware upgrade to multiple servers, improves firmware upgrade efficiency, reduces labor and time costs, and improves server testing progress.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a firmware upgrade method, device, equipment and medium. Background Art
[0002] During the server testing process, it is often necessary to perform a unified firmware upgrade operation on multiple servers. The firmware on the server includes but is not limited to: Baseboard Management Controller (BMC) firmware, Basic Input Output System (BIOS) firmware, and Complex Programmable Logic Device (CPLD) firmware. It is necessary to upload the firmware upgrade file corresponding to the specified firmware to each server, and then perform a firmware upgrade on the specified firmware on each server according to the firmware upgrade file corresponding to the specified firmware, thereby completing the firmware upgrade operation during the test process.
[0003] In the related art, the commonly used firmware upgrade solution is: for each server, the tester manually uploads the firmware upgrade file corresponding to the specified firmware to the server, and then performs a firmware upgrade on the specified firmware on each server according to the firmware upgrade file corresponding to the specified firmware. The firmware upgrade solution in the related art requires the tester to perform manual operations repeatedly to complete the firmware upgrade operation for multiple servers during the test process, which is relatively cumbersome and will consume a lot of manpower and time costs, affecting the progress of server testing. Summary of the invention
[0004] The present invention provides a firmware upgrade method, device, equipment and medium to solve the problem that the firmware upgrade scheme in the related art is relatively cumbersome, consumes a lot of manpower cost and time cost, and affects the server test progress.
[0005] According to one aspect of the present invention, there is provided a firmware upgrade method, comprising:
[0006] From the configuration file, obtain firmware upgrade information corresponding to the plurality of servers under test; wherein the firmware upgrade information includes: a firmware upgrade type, an expected firmware version, file identification information, and BMC login information of each of the servers under test, and the firmware upgrade type is upgrading BMC firmware, upgrading BIOS firmware, or upgrading CPLD firmware;
[0007] According to the firmware upgrade type and the file identification information, detecting whether there is a current firmware upgrade file corresponding to each of the tested servers in a preset file database;
[0008] If it is detected that there is a current firmware upgrade file corresponding to each of the tested servers in the preset file database, the firmware of each of the tested servers is upgraded according to the firmware upgrade information and the current firmware upgrade file through the firmware upgrade function interface.
[0009] The technical solution of the embodiment of the present invention can automatically upgrade the firmware to be upgraded of multiple servers to the expected firmware version according to the firmware upgrade information corresponding to the multiple servers and the current firmware upgrade file through the firmware upgrade function interface, complete the unified firmware upgrade operation for the multiple servers, improve the firmware upgrade efficiency, reduce the manpower cost and time cost of the firmware upgrade process, and improve the testing progress of the server.
[0010] Optionally, the detecting, according to the firmware upgrade type and the file identification information, whether there is a current firmware upgrade file corresponding to each of the tested servers in a preset file database includes:
[0011] If the firmware upgrade type is to upgrade the BMC firmware, searching for a target BMC firmware upgrade file whose identification information is the same as the file identification information in each BMC firmware upgrade file stored in a preset file database;
[0012] If the target BMC firmware upgrade file is found, determining that the target BMC firmware upgrade file is a current firmware upgrade file corresponding to each of the servers under test, and determining that the preset file database contains current firmware upgrade files corresponding to each of the servers under test;
[0013] If the target BMC firmware upgrade file is not found, it is determined that the preset file database does not contain the current firmware upgrade file corresponding to each of the tested servers.
[0014] The technical solution of the embodiment of the present invention can automatically query the BMC firmware upgrade file used to upgrade the BMC firmware of the multiple tested servers to the expected BMC firmware version according to the firmware upgrade information corresponding to the multiple tested servers, so as to automatically perform a unified BMC firmware upgrade operation on the multiple servers based on the queried BMC firmware upgrade file and functional interface, and upgrade the BMC firmware of the multiple tested servers to the expected BMC firmware version.
[0015] Optionally, detecting whether there is a current firmware upgrade file corresponding to each of the servers under test in the preset file database according to the firmware upgrade type and the file identification information also includes: if the firmware upgrade type is to upgrade the BIOS firmware, then querying the target BIOS firmware upgrade file whose identification information is the same as the file identification information in each BIOS firmware upgrade file stored in the preset file database; if the target BIOS firmware upgrade file is queried, determining that the target BIOS firmware upgrade file is the current firmware upgrade file corresponding to each of the servers under test, and determining that there is a current firmware upgrade file corresponding to each of the servers under test in the preset file database; if the target BIOS firmware upgrade file is not queried, determining that there is no current firmware upgrade file corresponding to each of the servers under test in the preset file database.
[0016] The technical solution of the embodiment of the present invention can automatically query the BIOS firmware upgrade file used to upgrade the BIOS firmware of multiple tested servers to the expected BIOS firmware version based on the firmware upgrade information corresponding to the multiple tested servers, so as to automatically perform a unified BIOS firmware upgrade operation on multiple servers based on the queried BIOS firmware upgrade file and functional interface, and upgrade the BIOS firmware of multiple tested servers to the expected BIOS firmware version.
[0017] Optionally, the detecting, according to the firmware upgrade type and the file identification information, whether there is a current firmware upgrade file corresponding to each of the tested servers in a preset file database further includes:
[0018] If the firmware upgrade type is to upgrade the CPLD firmware, then searching for a target CPLD firmware upgrade file whose identification information is the same as the file identification information in each CPLD firmware upgrade file stored in a preset file database;
[0019] If the target CPLD firmware upgrade file is found, determining that the target CPLD firmware upgrade file is a current firmware upgrade file corresponding to each of the servers under test, and determining that there is a current firmware upgrade file corresponding to each of the servers under test in the preset file database;
[0020] If the target CPLD firmware upgrade file is not found, it is determined that the current firmware upgrade file corresponding to each of the tested servers does not exist in the preset file database.
[0021] The technical solution of the embodiment of the present invention can automatically query the CPLD firmware upgrade file used to upgrade the CPLD firmware of multiple tested servers to the expected CPLD firmware version based on the firmware upgrade information corresponding to the multiple tested servers, so as to automatically perform a unified CPLD firmware upgrade operation on multiple servers based on the queried CPLD firmware upgrade file and functional interface, and upgrade the CPLD firmware of multiple tested servers to the expected CPLD firmware version.
[0022] Optionally, performing firmware upgrade on each of the servers under test according to the firmware upgrade information and the current firmware upgrade file through the firmware upgrade function interface includes:
[0023] For each server under test, call the firmware upgrade function interface and perform the following operations through the firmware upgrade function interface:
[0024] According to the BMC login information of the tested server in the firmware upgrade information, log in to the BMC of the tested server, and upload the current firmware upgrade file to the BMC of the tested server; wherein the BMC login information of the tested server includes the IP address, login account and login password of the BMC of the tested server;
[0025] Verifying the current firmware upgrade file uploaded to the BMC according to the firmware upgrade information;
[0026] If it is determined that the verification of the current firmware upgrade file uploaded to the BMC is passed, the BMC firmware, BIOS firmware or CPLD firmware of the tested server is upgraded according to the current firmware upgrade file uploaded to the BMC.
[0027] The technical solution of the embodiment of the present invention can upgrade the BMC firmware, BIOS firmware or CPLD firmware of multiple servers to the desired firmware version through the firmware upgrade function interface according to the firmware upgrade information corresponding to the multiple servers and the current firmware upgrade file, thereby completing a unified firmware upgrade operation for the multiple servers.
[0028] Optionally, after performing a firmware upgrade on each of the servers under test according to the firmware upgrade information and the current firmware upgrade file through the firmware upgrade function interface, the method further includes:
[0029] Obtaining the current firmware version of each of the servers under test;
[0030] The expected firmware version is compared with the current firmware version of each of the tested servers, and whether each of the tested servers is successfully upgraded is determined according to the comparison result.
[0031] The technical solution of the embodiment of the present invention can verify the firmware upgrade result of each tested server according to the expected firmware version and the current firmware version of each tested server.
[0032] Optionally, determining whether each of the tested servers is successfully upgraded according to the comparison result includes:
[0033] If the expected firmware version is the same as the current firmware version of each of the tested servers, it is determined that each of the tested servers has been successfully upgraded, and success prompt information corresponding to each of the tested servers is sent to a terminal device of a target user;
[0034] If the expected firmware version is different from the current firmware version of each tested server, it is determined that the upgrade of each tested server has failed, and failure prompt information corresponding to each tested server is sent to the terminal device of the target user.
[0035] The technical solution of the embodiment of the present invention can determine whether the upgrade of each tested server is successful or failed based on the comparison result between the expected firmware version and the current firmware version of each tested server, and provide corresponding prompt information.
[0036] According to another aspect of the present invention, there is provided a firmware upgrade device, comprising:
[0037] An information acquisition module is used to acquire firmware upgrade information corresponding to multiple servers under test from a configuration file; wherein the firmware upgrade information includes: a firmware upgrade type, an expected firmware version, file identification information, and BMC login information of each server under test, and the firmware upgrade type is to upgrade BMC firmware, upgrade BIOS firmware, or upgrade CPLD firmware;
[0038] A file detection module, used for detecting whether there is a current firmware upgrade file corresponding to each of the tested servers in a preset file database according to the firmware upgrade type and the file identification information;
[0039] The firmware upgrade module is used to upgrade the firmware of each of the servers under test according to the firmware upgrade information and the current firmware upgrade file through the firmware upgrade function interface if it is detected that there is a current firmware upgrade file corresponding to each of the servers under test in the preset file database.
[0040] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising:
[0041] at least one processor;
[0042] and a memory communicatively coupled to the at least one processor;
[0043] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the firmware upgrade method described in any embodiment of the present invention.
[0044] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the firmware upgrade method described in any embodiment of the present invention when executed.
[0045] The technical solution of the embodiment of the present invention obtains firmware upgrade information corresponding to multiple tested servers from a configuration file; wherein the firmware upgrade information includes: a firmware upgrade type, an expected firmware version, file identification information, and BMC login information of each tested server, and the firmware upgrade type is to upgrade BMC firmware, upgrade BIOS firmware, or upgrade CPLD firmware; then, according to the firmware upgrade type and the file identification information, it is detected whether there is a current firmware upgrade file corresponding to each tested server in a preset file database; if it is detected that there is a current firmware upgrade file corresponding to each tested server in the preset file database, then, through a firmware upgrade function interface, according to the firmware upgrade information and the current firmware upgrade file, the firmware of each tested server is upgraded, thereby solving the problem that the firmware upgrade solution in the related art is relatively cumbersome, consumes a lot of manpower cost and time cost, and affects the server test progress, and obtains the firmware upgrade function interface, automatically according to the firmware upgrade information and the current firmware upgrade file corresponding to the multiple servers, upgrades the firmware to be upgraded of the multiple servers to the expected firmware version, completes the unified firmware upgrade operation of the multiple servers, improves the firmware upgrade efficiency, reduces the manpower cost and time cost of the firmware upgrade process, and improves the test progress of the server.
[0046] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0048] Figure 1 The present invention provides a flowchart of a firmware upgrade method according to the first embodiment of the present invention.
[0049] Figure 2 This is a flowchart of a firmware upgrade method provided in Embodiment 2 of the present invention.
[0050] Figure 3 This is a flowchart of a firmware upgrade method provided in Embodiment 3 of the present invention.
[0051] Figure 4 A schematic diagram of the structure of a firmware upgrade device provided in Embodiment 4 of the present invention.
[0052] Figure 5 A schematic diagram of the structure of an electronic device for implementing the firmware upgrade method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0053] In order to enable those skilled in the art to better understand the scheme of the present invention, 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 should fall within the scope of protection of the present invention.
[0054] It should be noted that the terms "target", "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprise", "include" and "have" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0055] Embodiment 1
[0056] Figure 1 This is a flowchart of a firmware upgrade method provided in the first embodiment of the present invention. This embodiment is applicable to the case where a unified firmware upgrade operation is performed on multiple servers during the server testing process. The method can be executed by a firmware upgrade device, which can be implemented in the form of hardware or software, and the firmware upgrade device can be configured in an electronic device. Figure 1 As shown, the method includes:
[0057] Step 101: Obtain firmware upgrade information corresponding to multiple servers under test from a configuration file.
[0058] The firmware upgrade information includes: firmware upgrade type, expected firmware version, file identification information and BMC login information of each of the tested servers, and the firmware upgrade type is upgrading BMC firmware, upgrading BIOS firmware or upgrading CPLD firmware.
[0059] Optionally, the multiple servers under test are at least two servers that need to uniformly perform firmware upgrades during the test process. The configuration file is a file used to store various types of information associated with the multiple servers under test. The various types of information associated with the multiple servers under test include firmware upgrade information corresponding to the multiple servers under test. The firmware upgrade information corresponding to the multiple servers under test is information related to the firmware upgrade operations that need to be performed on the multiple servers. The firmware upgrade information corresponding to the multiple servers under test includes: firmware upgrade type, expected firmware version, file identification information, and BMC login information of each of the servers under test.
[0060] Optionally, the firmware upgrade type is the type of firmware upgrade operation that needs to be performed on multiple servers under test. The firmware upgrade type is upgrading BMC firmware, upgrading BIOS firmware, or upgrading CPLD firmware. The firmware upgrade type is upgrading BMC firmware, indicating that the firmware upgrade operation that needs to be performed on multiple servers under test is to upgrade the BMC firmware of multiple servers under test, and the firmware to be upgraded for multiple servers under test is BMC firmware; the firmware upgrade type is upgrading BIOS firmware, indicating that the firmware upgrade operation that needs to be performed on multiple servers under test is to upgrade the BIOS firmware of multiple servers under test, and the firmware to be upgraded for multiple servers under test is BIOS firmware; the firmware upgrade type is upgrading CPLD firmware, indicating that the firmware upgrade operation that needs to be performed on multiple servers under test is to upgrade the CPLD firmware of multiple servers under test, and the firmware to be upgraded for multiple servers under test is CPLD firmware.
[0061] Optionally, the expected firmware version is the firmware version to which the firmware to be upgraded of the multiple servers under test is to be upgraded. If the firmware upgrade type is to upgrade the BMC firmware, the expected firmware version is the BMC firmware version to which the BMC firmware of the multiple servers under test is to be upgraded; if the firmware upgrade type is to upgrade the BIOS firmware, the expected firmware version is the BIOS firmware version to which the BIOS firmware of the multiple servers under test is to be upgraded; if the firmware upgrade type is to upgrade the CPLD firmware, the expected firmware version is the CPLD firmware version to which the CPLD firmware of the multiple servers under test is to be upgraded.
[0062] Optionally, the file identification information is the identification information of a firmware upgrade file used to upgrade the firmware to be upgraded of the tested server to the expected firmware version. The identification information of the firmware upgrade file is information used to identify the firmware upgrade file. The identification information of different firmware upgrade files is different. The identification information of the firmware upgrade file includes, but is not limited to, the name of the firmware upgrade file and the digital number corresponding to the firmware upgrade file. The firmware upgrade file is an upgrade file used to upgrade the firmware of the server to a specified firmware version. Firmware upgrade files include, but are not limited to: BMC firmware upgrade files, BIOS firmware upgrade files, and CPLD firmware upgrade files.
[0063] Optionally, the BMC firmware upgrade file is an upgrade file used to upgrade the BMC firmware of the server to a specified BMC firmware version. The BMC of the server runs the BMC firmware upgrade file to upgrade the BMC firmware of the server to the specified BMC firmware version.
[0064] Optionally, the BIOS firmware upgrade file is an upgrade file used to upgrade the BIOS firmware of the server to a specified BIOS firmware version. The BMC of the server runs the BIOS firmware upgrade file to upgrade the BIOS firmware of the server to the specified BIOS firmware version.
[0065] Optionally, the CPLD firmware upgrade file is an upgrade file used to upgrade the CPLD firmware of the server to a specified CPLD firmware version. The BMC of the server runs the CPLD firmware upgrade file to upgrade the CPLD firmware of the server to the specified CPLD firmware version.
[0066] Optionally, the firmware upgrade type is upgrading BMC firmware, the expected firmware version is the BMC firmware version to which the BMC firmware of the multiple tested servers are to be upgraded, and the file identification information is identification information of a BMC firmware upgrade file used to upgrade the BMC firmware of the multiple tested servers to the expected firmware version.
[0067] Optionally, the firmware upgrade type is upgrading BIOS firmware, the expected firmware version is the BIOS firmware version to which the BIOS firmware of multiple tested servers are to be upgraded, and the file identification information is identification information of a BIOS firmware upgrade file used to upgrade the BIOS firmware of multiple tested servers to the expected firmware version.
[0068] Optionally, the firmware upgrade type is upgrading CPLD firmware, the expected firmware version is the CPLD firmware version to which the CPLD firmware of multiple tested servers are to be upgraded, and the file identification information is identification information of a CPLD firmware upgrade file used to upgrade the CPLD firmware of multiple tested servers to the expected firmware version.
[0069] Optionally, the BMC login information of each of the tested servers is information used to log in to the BMC of each of the tested servers. The BMC login information of the server includes the IP address, login account and login password of the BMC of the server.
[0070] Optionally, the target user uploads the configuration file to the electronic device through the terminal device. The target user is a tester. The target user is responsible for managing the test process of multiple servers under test. The electronic device obtains the firmware upgrade information corresponding to the multiple servers under test uploaded by the target user, and extracts the firmware upgrade information corresponding to the multiple servers under test from the configuration file.
[0071] Step 102: According to the firmware upgrade type and the file identification information, it is detected whether there is a current firmware upgrade file corresponding to each of the tested servers in a preset file database.
[0072] Optionally, the current firmware upgrade file corresponding to each of the servers under test is a firmware upgrade file used to upgrade the firmware to be upgraded of the multiple servers under test to an expected firmware version.
[0073] Optionally, detecting whether there is a current firmware upgrade file corresponding to each of the servers under test in the preset file database based on the firmware upgrade type and the file identification information includes: if the firmware upgrade type is to upgrade the BMC firmware, then querying the target BMC firmware upgrade file whose identification information is the same as the file identification information in each BMC firmware upgrade file stored in the preset file database; if the target BMC firmware upgrade file is queried, determining that the target BMC firmware upgrade file is the current firmware upgrade file corresponding to each of the servers under test, and determining that there is a current firmware upgrade file corresponding to each of the servers under test in the preset file database; if the target BMC firmware upgrade file is not queried, determining that there is no current firmware upgrade file corresponding to each of the servers under test in the preset file database.
[0074] Therefore, the BMC firmware upgrade file used to upgrade the BMC firmware of the multiple tested servers to the expected BMC firmware version can be automatically queried according to the firmware upgrade information corresponding to the multiple tested servers, so that the BMC firmware of the multiple tested servers can be automatically upgraded to the expected BMC firmware version based on the queried BMC firmware upgrade file and functional interface.
[0075] Optionally, the preset file database is a database for storing firmware upgrade files. The preset file database stores multiple BMC firmware upgrade files.
[0076] Optionally, the firmware upgrade type is upgrading the BMC firmware, and the file identification information is identification information of a BMC firmware upgrade file used to upgrade the BMC firmware of multiple servers under test to an expected firmware version. Among the BMC firmware upgrade files stored in the preset file database, the target BMC firmware upgrade file with the same identification information as the file identification information is the BMC firmware upgrade file used to upgrade the BMC firmware of multiple servers under test to an expected firmware version, that is, the current firmware upgrade file corresponding to each of the servers under test.
[0077] Optionally, detecting whether there is a current firmware upgrade file corresponding to each of the servers under test in the preset file database according to the firmware upgrade type and the file identification information also includes: if the firmware upgrade type is to upgrade the BIOS firmware, then querying the target BIOS firmware upgrade file whose identification information is the same as the file identification information in each BIOS firmware upgrade file stored in the preset file database; if the target BIOS firmware upgrade file is queried, determining that the target BIOS firmware upgrade file is the current firmware upgrade file corresponding to each of the servers under test, and determining that there is a current firmware upgrade file corresponding to each of the servers under test in the preset file database; if the target BIOS firmware upgrade file is not queried, determining that there is no current firmware upgrade file corresponding to each of the servers under test in the preset file database.
[0078] Therefore, the BIOS firmware upgrade file used to upgrade the BIOS firmware of multiple tested servers to the expected BIOS firmware version can be automatically queried according to the firmware upgrade information corresponding to the multiple tested servers, so that based on the queried BIOS firmware upgrade file and functional interface, a unified BIOS firmware upgrade operation can be automatically performed on multiple servers to upgrade the BIOS firmware of multiple tested servers to the expected BIOS firmware version.
[0079] Optionally, a plurality of BIOS firmware upgrade files are stored in the preset file database.
[0080] Optionally, the firmware upgrade type is upgrading BIOS firmware, and the file identification information is identification information of a BIOS firmware upgrade file used to upgrade the BIOS firmware of multiple servers under test to an expected firmware version. Among the BIOS firmware upgrade files stored in the preset file database, the target BIOS firmware upgrade file having the same identification information as the file identification information is a BIOS firmware upgrade file used to upgrade the BIOS firmware of multiple servers under test to an expected firmware version, that is, a current firmware upgrade file corresponding to each of the servers under test.
[0081] Optionally, detecting whether there is a current firmware upgrade file corresponding to each of the servers under test in the preset file database according to the firmware upgrade type and the file identification information also includes: if the firmware upgrade type is to upgrade the CPLD firmware, then in each CPLD firmware upgrade file stored in the preset file database, querying the target CPLD firmware upgrade file whose identification information is the same as the file identification information; if the target CPLD firmware upgrade file is queried, determining that the target CPLD firmware upgrade file is the current firmware upgrade file corresponding to each of the servers under test, and determining that there is a current firmware upgrade file corresponding to each of the servers under test in the preset file database; if the target CPLD firmware upgrade file is not queried, determining that there is no current firmware upgrade file corresponding to each of the servers under test in the preset file database.
[0082] Therefore, the CPLD firmware upgrade file used to upgrade the CPLD firmware of the multiple servers under test to the expected CPLD firmware version can be automatically queried according to the firmware upgrade information corresponding to the multiple servers under test, so that a unified CPLD firmware upgrade operation can be automatically performed on the multiple servers based on the queried CPLD firmware upgrade file and functional interface, and the CPLD firmware of the multiple servers under test can be upgraded to the expected CPLD firmware version.
[0083] Optionally, a plurality of CPLD firmware upgrade files are stored in the preset file database.
[0084] Optionally, the firmware upgrade type is to upgrade the CPLD firmware, and the file identification information is the identification information of the CPLD firmware upgrade file used to upgrade the CPLD firmware of multiple servers under test to the expected firmware version. Among the CPLD firmware upgrade files stored in the preset file database, the target CPLD firmware upgrade file whose identification information is the same as the file identification information is the CPLD firmware upgrade file used to upgrade the CPLD firmware of multiple servers under test to the expected firmware version, that is, the current firmware upgrade file corresponding to each of the servers under test.
[0085] Optionally, if it is detected that the current firmware upgrade file corresponding to each of the tested servers does not exist in the preset file database, a preset file missing prompt information is sent to the terminal device of the target user. The preset file missing prompt information is used to prompt that the current firmware upgrade files corresponding to the multiple tested servers do not exist in the preset file database, and a unified firmware upgrade operation cannot be performed on the multiple tested servers.
[0086] Step 103: If it is detected that the preset file database contains a current firmware upgrade file corresponding to each of the servers under test, the firmware of each of the servers under test is upgraded through a firmware upgrade function interface according to the firmware upgrade information and the current firmware upgrade file.
[0087] Optionally, the firmware upgrade function interface is a function interface written by the target user and set in the electronic device for performing firmware upgrade on the server according to the BMC login information of the server and the current firmware upgrade file corresponding to the server. The electronic device sends the firmware upgrade information and the current firmware upgrade file corresponding to the server to the firmware upgrade function interface, thereby calling the firmware upgrade function interface to perform firmware upgrade on the server according to the firmware upgrade information and the current firmware upgrade file corresponding to the server. After receiving the firmware upgrade information and the current firmware upgrade file corresponding to the server, the firmware upgrade function interface logs in to the BMC of the server according to the BMC login information of the server in the firmware upgrade information, uploads the current firmware upgrade file to the BMC of the server, and then verifies the current firmware upgrade file uploaded to the BMC according to the firmware upgrade information. If it is determined that the verification of the current firmware upgrade file uploaded to the BMC is passed, the BMC firmware, BIOS firmware or CPLD firmware of the server is upgraded according to the current firmware upgrade file uploaded to the BMC.
[0088] Optionally, the firmware upgrade of each of the servers under test is performed according to the firmware upgrade information and the current firmware upgrade file through the firmware upgrade function interface, including: for each server under test, calling the firmware upgrade function interface, and performing the following operations through the firmware upgrade function interface: logging into the BMC of the server under test according to the BMC login information of the server under test in the firmware upgrade information, and uploading the current firmware upgrade file to the BMC of the server under test; wherein the BMC login information of the server under test includes the IP address, login account and login password of the BMC of the server under test; and upgrading the BMC firmware, BIOS firmware or CPLD firmware of the server under test according to the current firmware upgrade file uploaded to the BMC.
[0089] Therefore, through the firmware upgrade function interface, according to the firmware upgrade information corresponding to the multiple servers and the current firmware upgrade file, the BMC firmware, BIOS firmware or CPLD firmware of the multiple servers can be upgraded to the desired firmware version, thereby completing the unified firmware upgrade operation for the multiple servers.
[0090] Optionally, according to the BMC login information of the server under test in the firmware upgrade information, log in to the BMC of the server under test, and upload the current firmware upgrade file to the BMC of the server under test, including: establishing a communication connection with the BMC of the server under test according to the IP address of the BMC of the server under test; logging in to the BMC of the server under test according to the login account and login password of the BMC of the server under test; and uploading the current firmware upgrade file to the BMC of the server under test based on the established communication connection. The electronic device establishes a communication connection with the BMC of the server under test, and can exchange information with the BMC of the server under test based on the established communication connection. The electronic device logs in to the BMC of the server under test, and can control the BMC of the server under test to perform specified operations through control instructions.
[0091] Optionally, the BMC firmware, BIOS firmware or CPLD firmware of the server under test is upgraded according to the current firmware upgrade file uploaded to the BMC, including: sending a file run instruction to the BMC. The file run instruction is used to instruct the BMC of the server under test to run the current firmware upgrade file uploaded to the BMC. After receiving the file run instruction, the BMC runs the current firmware upgrade file uploaded to the BMC, thereby upgrading the BMC firmware, BIOS firmware or CPLD firmware to be upgraded of the server under test to the desired firmware version.
[0092] Optionally, after performing a firmware upgrade on each of the servers under test according to the firmware upgrade information and the current firmware upgrade file through the firmware upgrade function interface, it also includes: obtaining the current firmware version of each of the servers under test; comparing the expected firmware version with the current firmware version of each of the servers under test, and determining whether each of the servers under test has been successfully upgraded based on the comparison result.
[0093] Thus, the firmware upgrade result of each tested server can be verified according to the expected firmware version and the current firmware version of each tested server.
[0094] Optionally, obtaining the current firmware version of each of the servers under test includes: sending a firmware version query instruction to the BMC of each of the servers under test. The firmware version query instruction is used to instruct the BMC of the server under test to feedback the current firmware version of the server under test. After receiving the firmware version query instruction, the BMC of each of the servers under test sends the current firmware version of each of the servers under test to the electronic device.
[0095] Optionally, the firmware upgrade type is upgrading BMC firmware, the current firmware version of each of the tested servers is the BMC firmware version of the BMC firmware of each of the tested servers at the current moment, and the expected firmware version is the BMC firmware version to which the BMC firmware of multiple tested servers is to be upgraded.
[0096] Optionally, the firmware upgrade type is upgrading BIOS firmware, the current firmware version of each of the tested servers is the BIOS firmware version of the BIOS firmware of each of the tested servers at the current moment, and the expected firmware version is the BIOS firmware version to which the BIOS firmware of multiple tested servers is to be upgraded.
[0097] Optionally, the firmware upgrade type is upgrading the CPLD firmware, the current firmware version of each of the servers under test is the CPLD firmware version of the CPLD firmware of each of the servers under test at the current moment, and the expected firmware version is the CPLD firmware version to which the CPLD firmware of multiple servers under test is to be upgraded.
[0098] Optionally, the firmware upgrade type is upgrading the CPLD firmware, the current firmware version of each of the servers under test is the CPLD firmware version of the CPLD firmware of each of the servers under test at the current moment, and the expected firmware version is the CPLD firmware version to which the CPLD firmware of multiple servers under test is to be upgraded.
[0099] Optionally, determining whether each of the servers under test has been successfully upgraded based on the comparison result includes: if the expected firmware version is the same as the current firmware version of each of the servers under test, determining that each of the servers under test has been successfully upgraded, and sending a success prompt message corresponding to each of the servers under test to the terminal device of the target user; if the expected firmware version is different from the current firmware version of each of the servers under test, determining that the upgrade of each of the servers under test has failed, and sending a failure prompt message corresponding to each of the servers under test to the terminal device of the target user.
[0100] Therefore, according to the comparison result between the expected firmware version and the current firmware version of each tested server, it can be determined whether the upgrade of each tested server is successful or failed, and corresponding prompt information can be provided.
[0101] Optionally, the success prompt information corresponding to each of the tested servers is used to prompt that each of the tested servers has been successfully upgraded. The failure prompt information corresponding to each of the tested servers is used to prompt that each of the tested servers has failed to be upgraded.
[0102] The technical solution of the embodiment of the present invention obtains firmware upgrade information corresponding to multiple tested servers from a configuration file; wherein the firmware upgrade information includes: a firmware upgrade type, an expected firmware version, file identification information, and BMC login information of each tested server, and the firmware upgrade type is to upgrade BMC firmware, upgrade BIOS firmware, or upgrade CPLD firmware; then, according to the firmware upgrade type and the file identification information, it is detected whether there is a current firmware upgrade file corresponding to each tested server in a preset file database; if it is detected that there is a current firmware upgrade file corresponding to each tested server in the preset file database, then, through a firmware upgrade function interface, according to the firmware upgrade information and the current firmware upgrade file, the firmware of each tested server is upgraded, thereby solving the problem that the firmware upgrade solution in the related art is relatively cumbersome, consumes a lot of manpower cost and time cost, and affects the server test progress, and obtains the firmware upgrade function interface, automatically according to the firmware upgrade information and the current firmware upgrade file corresponding to the multiple servers, upgrades the firmware to be upgraded of the multiple servers to the expected firmware version, completes the unified firmware upgrade operation of the multiple servers, improves the firmware upgrade efficiency, reduces the manpower cost and time cost of the firmware upgrade process, and improves the test progress of the server.
[0103] Embodiment 2
[0104] Figure 2 The flowchart of a firmware upgrade method provided in the second embodiment of the present invention. The embodiment of the present invention can be combined with each optional solution in one or more of the above embodiments. Figure 2 As shown, the method includes:
[0105] Step 201: Obtain firmware upgrade information corresponding to multiple servers under test from a configuration file.
[0106] The firmware upgrade information includes: firmware upgrade type, expected firmware version, file identification information and BMC login information of each of the tested servers, and the firmware upgrade type is upgrading BMC firmware, upgrading BIOS firmware or upgrading CPLD firmware.
[0107] Step 202: If the firmware upgrade type is to upgrade the BMC firmware, then search for a target BMC firmware upgrade file whose identification information is the same as the file identification information in each BMC firmware upgrade file stored in a preset file database.
[0108] Step 203: If the target BMC firmware upgrade file is found, determine that the target BMC firmware upgrade file is the current firmware upgrade file corresponding to each of the servers under test, and determine that the current firmware upgrade file corresponding to each of the servers under test exists in the preset file database.
[0109] Step 204: Upgrade the BMC firmware of each of the tested servers according to the firmware upgrade information and the current firmware upgrade file through the firmware upgrade function interface.
[0110] The technical solution of the embodiment of the present invention can automatically query the BMC firmware upgrade file used to upgrade the BMC firmware of the multiple tested servers to the expected BMC firmware version according to the firmware upgrade information corresponding to the multiple tested servers, and can automatically perform a unified BMC firmware upgrade operation on the multiple servers based on the queried BMC firmware upgrade file and functional interface to upgrade the BMC firmware of the multiple tested servers to the expected BMC firmware version.
[0111] Embodiment 3
[0112] Figure 3 A flowchart of a firmware upgrade method provided in Embodiment 3 of the present invention includes the following steps:
[0113] Step 301: Obtain firmware upgrade information corresponding to multiple servers under test from a configuration file.
[0114] The firmware upgrade information includes: firmware upgrade type, expected firmware version, file identification information and BMC login information of each of the tested servers, and the firmware upgrade type is upgrading BMC firmware, upgrading BIOS firmware or upgrading CPLD firmware.
[0115] Step 302: According to the firmware upgrade type and the file identification information, it is detected whether there is a current firmware upgrade file corresponding to each of the tested servers in a preset file database.
[0116] Step 303: If it is detected that there is a current firmware upgrade file corresponding to each of the servers under test in the preset file database, the firmware upgrade function interface is called, and through the firmware upgrade function interface, the BMC of each of the servers under test is logged in according to the BMC login information of each of the servers under test in the firmware upgrade information, and the current firmware upgrade file is uploaded to the BMC of each of the servers under test.
[0117] The BMC login information of each of the tested servers includes the IP address, login account and login password of the BMC of each of the tested servers.
[0118] Step 304: Upgrade the BMC firmware, BIOS firmware or CPLD firmware of each of the servers under test according to the current firmware upgrade file uploaded to the BMC of each of the servers under test through the firmware upgrade function interface.
[0119] Step 305: Obtain the current firmware version of each of the servers under test.
[0120] Step 306: Compare the expected firmware version with the current firmware version of each of the tested servers, and determine whether each of the tested servers is successfully upgraded based on the comparison result.
[0121] The technical solution of the embodiment of the present invention achieves the beneficial effect of automatically upgrading the firmware to be upgraded of multiple servers to the expected firmware version according to the firmware upgrade information corresponding to the multiple servers and the current firmware upgrade file through the firmware upgrade function interface, completing the unified firmware upgrade operation for the multiple servers, improving the firmware upgrade efficiency, reducing the manpower cost and time cost of the firmware upgrade process, and improving the testing progress of the server.
[0122] Embodiment 4
[0123] Figure 4 This is a schematic diagram of the structure of a firmware upgrade device provided by Embodiment 4 of the present invention. The device can be configured in an electronic device. Figure 4 As shown, the device includes: an information acquisition module 401, a file detection module 402 and a firmware upgrade module 403.
[0124] Among them, the information acquisition module 401 is used to obtain firmware upgrade information corresponding to multiple tested servers from the configuration file; wherein the firmware upgrade information includes: firmware upgrade type, expected firmware version, file identification information and BMC login information of each tested server, and the firmware upgrade type is upgrading BMC firmware, upgrading BIOS firmware or upgrading CPLD firmware; the file detection module 402 is used to detect whether there is a current firmware upgrade file corresponding to each tested server in the preset file database according to the firmware upgrade type and the file identification information; the firmware upgrade module 403 is used to perform firmware upgrade on each tested server through the firmware upgrade function interface according to the BMC login information of each tested server and the current firmware upgrade file if it is detected that there is a current firmware upgrade file corresponding to each tested server in the preset file database.
[0125] The technical solution of the embodiment of the present invention obtains firmware upgrade information corresponding to multiple tested servers from a configuration file; wherein the firmware upgrade information includes: a firmware upgrade type, an expected firmware version, file identification information, and BMC login information of each tested server, and the firmware upgrade type is to upgrade BMC firmware, upgrade BIOS firmware, or upgrade CPLD firmware; then, according to the firmware upgrade type and the file identification information, it is detected whether there is a current firmware upgrade file corresponding to each tested server in a preset file database; if it is detected that there is a current firmware upgrade file corresponding to each tested server in the preset file database, then, through a firmware upgrade function interface, according to the firmware upgrade information and the current firmware upgrade file, the firmware of each tested server is upgraded, thereby solving the problem that the firmware upgrade solution in the related art is relatively cumbersome, consumes a lot of manpower cost and time cost, and affects the server test progress, and obtains the firmware upgrade function interface, automatically according to the firmware upgrade information and the current firmware upgrade file corresponding to the multiple servers, upgrades the firmware to be upgraded of the multiple servers to the expected firmware version, completes the unified firmware upgrade operation of the multiple servers, improves the firmware upgrade efficiency, reduces the manpower cost and time cost of the firmware upgrade process, and improves the test progress of the server.
[0126] In an optional implementation manner of an embodiment of the present invention, optionally, the file detection module 402 is specifically used to: if the firmware upgrade type is to upgrade the BMC firmware, then in each BMC firmware upgrade file stored in the preset file database, query the target BMC firmware upgrade file whose identification information is the same as the file identification information; if the target BMC firmware upgrade file is queried, determine that the target BMC firmware upgrade file is the current firmware upgrade file corresponding to each of the tested servers, and determine that the current firmware upgrade file corresponding to each of the tested servers exists in the preset file database; if the target BMC firmware upgrade file is not queried, determine that the current firmware upgrade file corresponding to each of the tested servers does not exist in the preset file database.
[0127] In an optional implementation of an embodiment of the present invention, optionally, the file detection module 402 is specifically used for: if the firmware upgrade type is to upgrade the BIOS firmware, then in each BIOS firmware upgrade file stored in a preset file database, querying a target BIOS firmware upgrade file whose identification information is the same as the file identification information; if the target BIOS firmware upgrade file is queried, determining that the target BIOS firmware upgrade file is the current firmware upgrade file corresponding to each of the servers under test, and determining that there is a current firmware upgrade file corresponding to each of the servers under test in the preset file database; if the target BIOS firmware upgrade file is not queried, determining that there is no current firmware upgrade file corresponding to each of the servers under test in the preset file database.
[0128] In an optional implementation of an embodiment of the present invention, optionally, the file detection module 402 is specifically used for: detecting whether there is a current firmware upgrade file corresponding to each of the servers under test in the preset file database according to the firmware upgrade type and the file identification information, and also including: if the firmware upgrade type is to upgrade the CPLD firmware, then in each CPLD firmware upgrade file stored in the preset file database, querying the target CPLD firmware upgrade file whose identification information is the same as the file identification information; if the target CPLD firmware upgrade file is queried, determining that the target CPLD firmware upgrade file is the current firmware upgrade file corresponding to each of the servers under test, and determining that there is a current firmware upgrade file corresponding to each of the servers under test in the preset file database; if the target CPLD firmware upgrade file is not queried, determining that there is no current firmware upgrade file corresponding to each of the servers under test in the preset file database.
[0129] In an optional implementation of the embodiment of the present invention, optionally, the firmware upgrade module 403 is specifically used to: for each server under test, call the firmware upgrade function interface, and perform the following operations through the firmware upgrade function interface: log in to the BMC of the server under test according to the BMC login information of the server under test in the firmware upgrade information, and upload the current firmware upgrade file to the BMC of the server under test; wherein the BMC login information of the server under test includes the IP address, login account and login password of the BMC of the server under test; and upgrade the BMC firmware, BIOS firmware or CPLD firmware of the server under test according to the current firmware upgrade file uploaded to the BMC.
[0130] In an optional implementation of an embodiment of the present invention, optionally, the firmware upgrade device also includes: a version acquisition module, used to obtain the current firmware version of each of the servers under test; a version comparison module, used to compare the expected firmware version corresponding to each of the servers under test with the current firmware version of each of the servers under test, and determine whether each of the servers under test has been successfully upgraded based on the comparison results.
[0131] In an optional implementation of the embodiment of the present invention, optionally, a version comparison module is specifically used to: if the expected firmware version is the same as the current firmware version of each of the servers under test, it is determined that the upgrade of each of the servers under test is successful, and a success prompt information corresponding to each of the servers under test is sent to the terminal device of the target user; if the expected firmware version is not the same as the current firmware version of each of the servers under test, it is determined that the upgrade of each of the servers under test has failed, and a failure prompt information corresponding to each of the servers under test is sent to the terminal device of the target user.
[0132] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0133] The above-mentioned firmware upgrade device can execute the firmware upgrade method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the firmware upgrade method.
[0134] Embodiment 5
[0135] Figure 5 The structure diagram of the electronic device 10 that can be used to implement the firmware upgrade method of the embodiment of the present invention is shown. The components, their connections and relationships, and their functions shown herein are only examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0136] like Figure 5 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program built from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0137] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0138] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a firmware upgrade method.
[0139] In some embodiments, the firmware upgrade method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is built into the RAM 13 and executed by the processor 11, one or more steps of the firmware upgrade method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the firmware upgrade method in any other appropriate manner (e.g., by means of firmware).
[0140] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0141] The computer program for implementing the firmware upgrade method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0142] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, 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 of the foregoing.
[0143] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0144] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0145] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0146] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0147] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A firmware upgrade method, characterized in that: include: From the configuration file, obtain firmware upgrade information corresponding to the plurality of servers under test; wherein the firmware upgrade information includes: a firmware upgrade type, an expected firmware version, file identification information, and BMC login information of each of the servers under test, and the firmware upgrade type is upgrading BMC firmware, upgrading BIOS firmware, or upgrading CPLD firmware; According to the firmware upgrade type and the file identification information, it is detected whether there is a current firmware upgrade file corresponding to each of the tested servers in the preset file database; wherein the preset file database stores multiple BMC firmware upgrade files, multiple BIOS firmware upgrade files, and multiple CPLD firmware upgrade files; each of the tested servers is at least two servers that need to uniformly perform firmware upgrades during the test process, the firmware upgrade type is the type of firmware upgrade operation that needs to be performed on each of the tested servers, the expected firmware version is the firmware version to which the firmware to be upgraded of each of the tested servers is to be upgraded, the file identification information is the identification information of the firmware upgrade file used to upgrade the firmware to be upgraded of each of the tested servers to the expected firmware version, and the BMC login information of each of the tested servers includes the IP address, login account, and login password of the BMC of each of the servers; If it is detected that there is a current firmware upgrade file corresponding to each of the tested servers in the preset file database, then, through the firmware upgrade function interface, according to the firmware upgrade information and the current firmware upgrade file, the firmware of each of the tested servers is upgraded; Among them, the firmware upgrade function interface is a function interface for upgrading the firmware of the server according to the BMC login information of the server and the current firmware upgrade file corresponding to the server. After receiving the firmware upgrade information and the current firmware upgrade file corresponding to the server, the firmware upgrade function interface logs in to the BMC of the server according to the BMC login information of the server in the firmware upgrade information, uploads the current firmware upgrade file to the BMC of the server, and verifies the current firmware upgrade file uploaded to the BMC according to the firmware upgrade information. If it is determined that the verification of the current firmware upgrade file uploaded to the BMC is passed, the BMC firmware, BIOS firmware or CPLD firmware of the server is upgraded according to the current firmware upgrade file uploaded to the BMC.
2. The method according to claim 1, characterized in that: The detecting, according to the firmware upgrade type and the file identification information, whether there is a current firmware upgrade file corresponding to each of the tested servers in a preset file database comprises: If the firmware upgrade type is to upgrade the BMC firmware, searching for a target BMC firmware upgrade file whose identification information is the same as the file identification information in each BMC firmware upgrade file stored in a preset file database; If the target BMC firmware upgrade file is found, determining that the target BMC firmware upgrade file is a current firmware upgrade file corresponding to each of the servers under test, and determining that the preset file database contains current firmware upgrade files corresponding to each of the servers under test; If the target BMC firmware upgrade file is not found, it is determined that the preset file database does not contain the current firmware upgrade file corresponding to each of the tested servers.
3. The method according to claim 2, characterized in that The detecting, according to the firmware upgrade type and the file identification information, whether there is a current firmware upgrade file corresponding to each of the servers under test in a preset file database further includes: If the firmware upgrade type is to upgrade the BIOS firmware, then searching for a target BIOS firmware upgrade file whose identification information is the same as the file identification information in each BIOS firmware upgrade file stored in a preset file database; If the target BIOS firmware upgrade file is found, determining that the target BIOS firmware upgrade file is a current firmware upgrade file corresponding to each of the servers under test, and determining that a current firmware upgrade file corresponding to each of the servers under test exists in the preset file database; If the target BIOS firmware upgrade file is not found, it is determined that the preset file database does not contain the current firmware upgrade file corresponding to each of the servers under test.
4. The method according to claim 2, characterized in that: The detecting, according to the firmware upgrade type and the file identification information, whether there is a current firmware upgrade file corresponding to each of the servers under test in a preset file database further includes: If the firmware upgrade type is to upgrade the CPLD firmware, then searching for a target CPLD firmware upgrade file whose identification information is the same as the file identification information in each CPLD firmware upgrade file stored in a preset file database; If the target CPLD firmware upgrade file is found, determining that the target CPLD firmware upgrade file is a current firmware upgrade file corresponding to each of the servers under test, and determining that there is a current firmware upgrade file corresponding to each of the servers under test in the preset file database; If the target CPLD firmware upgrade file is not found, it is determined that the current firmware upgrade file corresponding to each of the tested servers does not exist in the preset file database.
5. The method according to claim 1, characterized in that The step of performing firmware upgrade on each of the servers under test according to the firmware upgrade information and the current firmware upgrade file through the firmware upgrade function interface includes: For each server under test, call the firmware upgrade function interface and perform the following operations through the firmware upgrade function interface: According to the BMC login information of the tested server in the firmware upgrade information, log in to the BMC of the tested server, and upload the current firmware upgrade file to the BMC of the tested server; wherein the BMC login information of the tested server includes the IP address, login account and login password of the BMC of the tested server; The BMC firmware, BIOS firmware or CPLD firmware of the server under test is upgraded according to the current firmware upgrade file uploaded to the BMC.
6. The method according to claim 1, characterized in that After performing firmware upgrade on each of the servers under test according to the firmware upgrade information and the current firmware upgrade file through the firmware upgrade function interface, the method further includes: Obtaining the current firmware version of each of the servers under test; The expected firmware version is compared with the current firmware version of each of the tested servers, and whether each of the tested servers is successfully upgraded is determined according to the comparison result.
7. The method according to claim 6, characterized in that Determining whether each of the tested servers is successfully upgraded according to the comparison result includes: If the expected firmware version is the same as the current firmware version of each of the tested servers, it is determined that each of the tested servers has been successfully upgraded, and success prompt information corresponding to each of the tested servers is sent to a terminal device of a target user; If the expected firmware version is different from the current firmware version of each tested server, it is determined that the upgrade of each tested server has failed, and failure prompt information corresponding to each tested server is sent to the terminal device of the target user.
8. A firmware upgrade device, characterized in that: include: An information acquisition module is used to acquire firmware upgrade information corresponding to multiple servers under test from a configuration file; wherein the firmware upgrade information includes: a firmware upgrade type, an expected firmware version, file identification information, and BMC login information of each server under test, and the firmware upgrade type is to upgrade BMC firmware, upgrade BIOS firmware, or upgrade CPLD firmware; A file detection module is used to detect whether there is a current firmware upgrade file corresponding to each of the tested servers in a preset file database according to the firmware upgrade type and the file identification information; wherein the preset file database stores multiple BMC firmware upgrade files, multiple BIOS firmware upgrade files, and multiple CPLD firmware upgrade files; each of the tested servers is at least two servers that need to be uniformly upgraded with firmware during the test process, the firmware upgrade type is the type of firmware upgrade operation that needs to be performed on each of the tested servers, the expected firmware version is the firmware version to which the firmware to be upgraded of each of the tested servers is to be upgraded, the file identification information is the identification information of the firmware upgrade file used to upgrade the firmware to be upgraded of each of the tested servers to the expected firmware version, and the BMC login information of each of the tested servers includes the IP address, login account, and login password of the BMC of each of the servers; A firmware upgrade module, configured to upgrade the firmware of each of the servers under test according to the firmware upgrade information and the current firmware upgrade file through a firmware upgrade function interface if it is detected that there is a current firmware upgrade file corresponding to each of the servers under test in the preset file database; Among them, the firmware upgrade function interface is a function interface for upgrading the firmware of the server according to the BMC login information of the server and the current firmware upgrade file corresponding to the server. After receiving the firmware upgrade information and the current firmware upgrade file corresponding to the server, the firmware upgrade function interface logs in to the BMC of the server according to the BMC login information of the server in the firmware upgrade information, uploads the current firmware upgrade file to the BMC of the server, and verifies the current firmware upgrade file uploaded to the BMC according to the firmware upgrade information. If it is determined that the verification of the current firmware upgrade file uploaded to the BMC is passed, the BMC firmware, BIOS firmware or CPLD firmware of the server is upgraded according to the current firmware upgrade file uploaded to the BMC.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the firmware upgrade method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the firmware upgrade method according to any one of claims 1 to 7 when executed.
Citation Information
Patent Citations
Server firmware version upgrading method, device and system and readable storage medium
CN113127033A
Network file transmission method and device and computer readable storage medium
CN113434467A
Server firmware upgrading method, storage device and terminal
CN114115984A