Firmware refreshing method of equipment, computer equipment and storage medium
By detecting update notifications from the basic input and output system, receiving firmware files uploaded by the user and parsing their version number, directly refreshing the firmware of the target device, solving the problems of low firmware refresh efficiency and complex operation in the existing technology, and achieving an efficient and secure firmware refresh process.
Patent Information
- Application Number
- CN202411629124.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-03-07
AI Technical Summary
In the prior art, the server's PCIE device firmware refresh efficiency is low, which affects the user experience, and requires frequent plugging and unplugging of devices and installing different models of drivers, which increases operational complexity and potential compatibility issues.
By detecting the target device firmware update notification sent by the basic input and output system, the firmware file uploaded by the user is received and its version number is parsed. If the version number is greater than or equal to the expected version number, directly refresh the firmware of the target device without installing additional drivers or frequently plugging and unplugging the device.
Improves the efficiency and user experience of firmware refresh of PCIE equipment, simplifies operational processes, reduces compatibility issues, and ensures the accuracy and security of firmware refresh.
Smart Images

Figure CN119576366A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of servers, and in particular to a device firmware refresh method, computer equipment and storage medium. Background Art
[0002] Server hardware is a highly integrated and feature-rich system that integrates components such as processors, memory, storage devices, motherboards, power cooling systems, and network cards. Among them, the network card can be called a high-speed serial interface standard (Peripheral Component Interconnect Express, PCIE) device. The firmware (Firmware, FW) of the PCIE device plays a vital role in the communication capabilities of the server. Firmware is software embedded in the hardware, which controls the basic functions of the hardware. Therefore, in order to ensure the communication capabilities of the server, it is necessary to select and install a PCIE device FW that is compatible with the server hardware and operating system. At the same time, it is also very important to regularly update the PCIE device FW to ensure that its security and performance are continuously optimized.
[0003] In the related art, the firmware of the PCIE device is usually refreshed under the server's operating system (OS). This method requires the server to identify the PCIE device and install the driver of the PCIE device. The server includes a variety of different PCIE devices. Therefore, the user needs to install different drivers corresponding to different PCIE devices on the server, and then refresh the firmware of different PCIE devices. This results in low firmware refresh efficiency of the PCIE device, affecting the user experience. Summary of the invention
[0004] In view of this, the present invention provides a device firmware refresh method, a computer device and a storage medium to solve the problems of low device firmware refresh efficiency and poor user experience.
[0005] In a first aspect, the present invention provides a device firmware refresh method, which is applied to a controller, and the method includes: when it is detected that the firmware of a target peripheral component interconnect high-speed (PCIE) device sent by a basic input / output system (BIOS) needs to be updated, receiving a first firmware file uploaded by a user through a client, and the first firmware file is used to update the firmware of the target device; parsing the first firmware file to obtain a first version number corresponding to the first firmware file; comparing whether the first version number is greater than or equal to an expected version number, and if the first version number is greater than or equal to the expected version number, based on the first firmware file, refreshing the firmware of the target device to the first firmware corresponding to the first firmware file.
[0006] Based on the method of the first aspect above, when it is detected that the firmware of the target device sent by the basic input and output system needs to be updated, the first firmware file uploaded by the client is received, and when the first version number corresponding to the first firmware file is greater than or equal to the expected version number, the firmware of the target device is refreshed to the first firmware. Since the target device can be a different PCIE device of different manufacturers and different models, it is convenient for the server to be installed with different PCIE devices, thereby improving the compatibility and flexibility of the server. In addition, compared with the PCIE device firmware refresh method of the related art, this method does not require frequent plugging and unplugging of PCIE devices, avoiding the cumbersome physical operations and possible risks. The present invention does not need to install additional drivers for PCIE devices, thereby simplifying the refresh process and reducing potential compatibility issues. The present invention does not need to adopt different refresh methods for different models of PCIE devices, thereby improving the convenience of user operation and the firmware refresh efficiency of PCIE devices, improving user experience, and ensuring the accuracy and security of firmware refresh.
[0007] In an optional implementation, detecting that the firmware of a target device sent by a basic input / output system needs to be updated includes: receiving at least one device information sent from the basic input / output system, each device information including a second firmware version number of each device; selecting a device from at least one device as a target device, the target device corresponding to the target device information; detecting whether the second firmware version number included in the target device information is an expected version number; if not, determining that the firmware of the target device needs to be refreshed.
[0008] In this embodiment, the second firmware version number of the target device can be obtained through the basic input and output system. The second firmware version number is the current firmware version number of the target device. When the current firmware version number is inconsistent with the expected version number, it indicates that the target device needs to refresh the firmware, so as to facilitate timely refreshing of the firmware of the target device.
[0009] In an optional implementation, the target device information also includes a device path of the target device; based on the first firmware file, the firmware of the target device is refreshed to the first firmware corresponding to the first firmware file, including: in response to the user clicking the refresh control on the client interface, based on the first firmware file, a refresh instruction is sent to the target device, the firmware of the target device is refreshed to the first firmware, and the refresh instruction carries the device path of the target device.
[0010] In this implementation, the firmware of the target device may be refreshed by sending a refresh instruction carrying the device path of the target device, thereby making the version number of the firmware of the target device the expected version number.
[0011] In an optional embodiment, the method further includes: in the process of refreshing the firmware of the target device to the first firmware, detecting the refresh progress of the target device to obtain refresh progress information of the target device; sending the refresh progress information to the client so that the refresh progress information is displayed on the client interface.
[0012] In this implementation, the refresh progress information can be displayed on the client interface, so that the user can intuitively see the refresh progress of the target device through the client interface.
[0013] In an optional implementation, the method further includes: in response to the user clicking a cancel control operation on the client interface, deleting the first firmware file, and stopping refreshing the firmware of the target device to the first firmware.
[0014] In this implementation, when the client uploads the first firmware file and does not want to update it, the user can click the cancel control on the client interface to delete the first firmware file to prevent the firmware of the target device from being updated to the first firmware.
[0015] In an optional embodiment, the controller is installed with a first verification tool; parsing the first firmware file to obtain a first version number corresponding to the first firmware file, including: calculating a first checksum of the first firmware file through the first verification tool; obtaining a first mapping relationship, and a first firmware type carried by the first firmware file, the first mapping relationship being a mapping relationship between the first firmware file and the standard checksum, the first firmware type indicating a device type adapted by the first firmware; determining the standard checksum corresponding to the first firmware file based on the first mapping relationship and the first firmware file.
[0016] Compare the first checksum with the standard checksum for consistency; if they are inconsistent, generate a first prompt message to the client, the first prompt message is used to prompt that the first firmware file is abnormal, and the client needs to upload the first firmware file again; if they are consistent, determine whether the first firmware type matches the target device; if they match, parse the first firmware file to obtain the first version number; if they do not match, delete the first firmware file and send a second prompt message to the client, the second prompt message is used to prompt that the first firmware file is an incorrect firmware file, and the client needs to re-upload the correct firmware file.
[0017] In this embodiment, the integrity of the first firmware file can be verified by verifying the first verification tool, and when the first firmware file is incomplete or abnormal, the client is prompted to re-upload the first firmware file; and further based on the firmware type, it is determined whether the first firmware is a correct firmware file to avoid firmware refresh errors or refresh failures of the target device.
[0018] In an optional implementation, the BMC stores at least one firmware file; the method further includes: when it is detected that the firmware of the target device sent by the basic input / output system needs to be refreshed, screening a second firmware file from the at least one firmware file, the firmware version number corresponding to the second firmware file being greater than or equal to the expected version number; based on the second firmware file, refreshing the firmware of the target device to the second firmware corresponding to the second firmware file.
[0019] In this embodiment, when the firmware of the target device needs to be refreshed, a second firmware file can also be screened out from at least one stored firmware file to refresh the firmware of the target device. This can avoid the situation where the firmware of the target device cannot be refreshed when the client cannot upload the first firmware file, thereby affecting the overall performance of the server.
[0020] In an optional implementation, fault information of a target device sent by a basic input / output system is received, the fault information including a fault state and a fault type of the firmware fault when a firmware fault occurs in the target device, the fault state including a recoverable fault state or an unrecoverable fault state; if the fault state is an unrecoverable fault state, a first instruction is sent to the basic input / output system, the first instruction is used to instruct the basic input / output system to trigger the target device to stop running the firmware at the current moment; if the fault state is a recoverable fault state, a fault repair method corresponding to the firmware fault is determined according to the fault type and a corresponding relationship, the corresponding relationship being a corresponding relationship between the fault type and the fault repair method; according to the fault repair method, a second instruction is generated; and the second instruction is sent to the basic input / output system, the second instruction instructing the basic input / output system to perform fault repair on the target device according to the fault repair method.
[0021] In this embodiment, when a firmware fault occurs in the target device, it is possible to determine whether the firmware fault is a recoverable fault based on the fault status included in the fault information, and further, when the firmware fault is a recoverable fault, determine the corresponding fault repair method according to the fault type, and then implement fault repair on the target device. This can avoid the situation where the target device cannot run a service or the service fails due to a firmware fault, and improve the work efficiency of the target device.
[0022] In a second aspect, the present invention provides a controller, which baseboard management control includes: a transceiver module, which is used to detect that the firmware of a target peripheral component interconnect high-speed device sent by a basic input and output system needs to be updated, and receive a first firmware file uploaded by a user through a client, and the first firmware file is used to update the firmware of the target device; a processing module, which is used to parse the first firmware file and obtain a first version number corresponding to the first firmware file; the processing module is used to compare whether the first version number is greater than or equal to the expected version number, and if the first version number is greater than or equal to the expected version number, based on the first firmware file, refresh the firmware of the target device to the first firmware corresponding to the first firmware file.
[0023] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the firmware refresh method of the device of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0024] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the firmware refresh method for a device of the first aspect or any corresponding embodiment thereof.
[0025] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions, wherein the computer instructions are used to enable a computer to execute the firmware refresh method of the device of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0027] Figure 1 is a topological diagram of a firmware refresh system for a device according to an embodiment of the present invention;
[0028] Figure 2 is a schematic flow chart of a method for updating the firmware of a device according to an embodiment of the present invention;
[0029] Figure 3 is a schematic diagram of a method for parsing a firmware file according to an embodiment of the present invention;
[0030] Figure 4 is a structural block diagram of a controller according to an embodiment of the present invention;
[0031] Figure 5 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution 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 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 those skilled in the art without creative work are within the scope of protection of the present invention.
[0033] The embodiment of the present invention is applied to the scenario of upgrading / refreshing the firmware of a PCIE device on a server. In this scenario, the firmware of the PCIE device is usually refreshed under the operating system of the server. This method requires that different drivers corresponding to different PCIE devices be installed on the server before refreshing the firmware of different PCIE devices, which results in low firmware refresh efficiency of the PCIE device and affects the user experience.
[0034] In order to solve the above problem, an embodiment of the present invention provides a device firmware refresh method, which compares the first version number included in the first firmware file uploaded by the client with the expected version number, and when the first version number is greater than or equal to the expected version number, refreshes the firmware of the target device to the first firmware, so as to improve the convenience of user operation and the firmware refresh efficiency of the device.
[0035] Below Figure 1 Taking the firmware refresh system 100 of the device shown as an example, the method provided in the embodiment of the present application is described. Figure 1 It is only a schematic diagram and does not constitute a limitation on the applicable scenarios of the technical solution provided in this application.
[0036] like Figure 1 As shown, Figure 1 4 is a topological diagram of a firmware refresh system for a device according to an embodiment of the present invention. Figure 1 In the embodiment, the device firmware updating system 100 may include a controller 101 , a basic input and output system 102 , a device 103 and a client 104 .
[0037] The controller 101 in the embodiment of the present invention may be a baseboard management controller (BMC) integrated in a server, a network device, or other computer systems. The BMC may refresh the firmware of the PCIE device and communicate with the basic input and output system and the client.
[0038] The basic input and output system 102 in the embodiment of the present invention can be the first program running when the computer is started, responsible for initializing hardware, self-checking and loading the operating system. It can be understood that the basic input and output system can obtain device information of the device when the server is started.
[0039] The device 103 in the embodiment of the present invention may be any type of PCIE device, for example, the PCIE device may be a graphics card, a solid state drive, a network adapter, or an expansion card.
[0040] The client 104 in the embodiment of the present invention can be any BMC client tool or software. For example, the client 104 can be a Simple Network Management Protocol (SNMP) monitoring tool, a Web interface, or an ipmitool tool. The client 104 can communicate with the BMC 101.
[0041] Figure 1 The device firmware refresh system 100 shown is only used as an example and is not used to limit the technical solution of the present application. Those skilled in the art should understand that in the specific implementation process, the device firmware refresh system 100 may also include other PCIE devices without limitation.
[0042] According to an embodiment of the present invention, an embodiment of a firmware refresh method for a device is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0043] In this embodiment, a device firmware refresh method is provided, which can be used for the above-mentioned BMC. Figure 2 is a flowchart of a firmware refresh method for a device according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0044] S201: When it is detected that the firmware of the target device sent by the basic input and output system needs to be updated, a first firmware file uploaded by the user through the client is received.
[0045] The first firmware file is used to update the firmware of the target PCIE device.
[0046] The target device is also referred to as a target PCIE device. The device is also referred to as a PCIE device.
[0047] In some optional implementations, the BMC receives at least one device information sent from a basic input / output system; selects a device from the at least one device as a target device, the target device corresponding to the target PCIE device information; detects whether the second firmware version number included in the target device information is the expected version number; if not, determines that the firmware of the target device needs to be updated.
[0048] Each device information includes the second firmware version number of each PCIE device. Optionally, each device information also includes device name, PCIE device path, manufacturer, device model, and IO interface information. The target device information includes the device path of the target PCIE device.
[0049] It can be understood that the second firmware version number is the firmware version number of each PCIE device at the current moment. For example, the second firmware version number may be 2.0.
[0050] The target device may be any one of the at least one PCIE device, or may be a PCIE device selected by a user according to a device name.
[0051] It is understandable that when the server is turned on, the basic input and output system performs initialization operations, captures at least one PCIE device information on the server, and sends the at least one PCIE device information to the BMC. The BMC receives the at least one PCIE device information sent from the basic input and output system.
[0052] In one example, the BMC detects that the second firmware version number included in the target PCIE device information is an expected version number, and then determines that the firmware of the target PCIE device does not need to be updated.
[0053] It can be understood that after receiving the first firmware file, the BMC stores the first firmware file in the memory of the BMC, and the memory can also store more firmware files and at least one PCIE device information.
[0054] In one example, when the BMC selects a PCIE device from at least one PCIE device as a target PCIE device, the BMC establishes a connection with the target PCIE device through an IO interface.
[0055] In one example, the BMC sends at least one PCIE device information to the client, so that the at least one PCIE device information is displayed on the client. Thus, the user can intuitively view the device information of the at least one PCIE device on the client interface.
[0056] S202: Parse the first firmware file to obtain a first version number corresponding to the first firmware file.
[0057] The first version number may be a version number of the first firmware, for example, the first version number is 3.0.
[0058] The BMC is installed with a first verification tool, which may be an md5sum verification tool or a sha256sum verification tool.
[0059] The following describes the process of BMC parsing the first firmware file to obtain the first version number corresponding to the first firmware file. Figure 3 As shown, Figure 3 is a schematic diagram of a method for parsing a firmware file according to an embodiment of the present invention; Figure 3 In the BMC, you can also perform:
[0060] S301: Acquire a first mapping relationship and a first firmware type carried by a first firmware file.
[0061] S302: Determine a standard checksum corresponding to the first firmware file according to the first mapping relationship and the first firmware file.
[0062] S303: Compare the first checksum with the standard checksum to see if they are consistent; if they are inconsistent, execute S304; if they are consistent, execute S305.
[0063] S304: Generate first prompt information to the client.
[0064] S305: Determine whether the first firmware type matches the target PCIE device. If it matches, execute S306; if it does not match, execute S307.
[0065] S306: Parse the first firmware file to obtain a first version number.
[0066] S307: Delete the first firmware file, and send a second prompt message to the client.
[0067] The first mapping relationship is a mapping relationship between the first firmware file and the standard checksum.
[0068] The first firmware type indicates a device type adapted by the first firmware.
[0069] The first prompt information is used to prompt that the first firmware file is abnormal and the client needs to upload the first firmware file again.
[0070] The second prompt information is used to prompt that the first firmware file is an incorrect firmware file and the client needs to re-upload the correct firmware file.
[0071] S203: Compare whether the first version number is greater than or equal to the expected version number, and if the first version number is greater than or equal to the expected version number, update the firmware of the target device to the first firmware corresponding to the first firmware file based on the first firmware file.
[0072] The expected version number may be sent by the client to the BMC. The expected version number may be set according to actual needs. The first version number is greater than or equal to the expected version number, which means that when the firmware of the target PCIE device is the first version number, the function or performance of the target PCIE device is higher than the function or performance when the firmware of the target PCIE device is the expected version number.
[0073] In one example, when the first version number is smaller than the expected version number, the BMC deletes the first firmware file and sends a prompt message to the client, where the prompt message is used to prompt the client to upload a firmware file with a firmware version number greater than the first version number.
[0074] It can be understood that the first version number is smaller than the expected version number, indicating that the first firmware file is not required by the user or cannot meet the firmware refresh requirements of the target PCIE device. Therefore, the first firmware file needs to be deleted.
[0075] In some optional implementations, in response to a user clicking a refresh control on a client interface, the BMC sends a refresh instruction to a target PCIE device based on the first firmware file to refresh the firmware of the target PCIE device to the first firmware.
[0076] The refresh instruction carries the device path of the target PCIE device.
[0077] In some optional implementations, during the process of refreshing the firmware of the target PCIE device to the first firmware, the refresh progress of the target PCIE device is detected to obtain refresh progress information of the target PCIE device; the refresh progress information is sent to the client so that the refresh progress information is displayed on the client interface.
[0078] It can be understood that when the refresh progress information reaches 100%, it indicates that the BMC has completed refreshing the firmware of the target PCIE device to the first firmware.
[0079] In some optional implementations, the BMC deletes the first firmware file in response to the user clicking a cancel control operation on the client interface, and stops refreshing the firmware of the target PCIE device to the first firmware.
[0080] Optionally, the BMC stores at least one firmware file.
[0081] In some optional implementations, when the BMC detects that the firmware of the target PCIE device sent by the basic input and output system needs to be updated, it filters a second firmware file from at least one firmware file; based on the second firmware file, the firmware of the target PCIE device is refreshed to the second firmware corresponding to the second firmware file.
[0082] The firmware version number corresponding to the second firmware file is greater than or equal to the expected version number.
[0083] It can be understood that when the firmware of the target PCIE device needs to be refreshed, the BMC can also filter out the second firmware file from at least one stored firmware file to refresh the firmware of the target PCIE device, which can avoid the situation where the firmware of the target PCIE device cannot be refreshed when the client cannot upload the first firmware file, affecting the overall performance of the server.
[0084] It is understandable that after the firmware of the target PCIE device is updated, in order to ensure that the first firmware can take effect, the user needs to restart the server. During the restart process, the first firmware of the target PCIE device will be loaded and enabled, thereby ensuring that the server can use the latest firmware version for network communication.
[0085] Optionally, the baseboard management controller can also receive fault information of the target device sent by the basic input and output system; if the fault state is an irrecoverable fault state, send a first instruction to the basic input and output system; if the fault state is a recoverable fault state, determine the fault repair method corresponding to the firmware fault according to the fault type and the corresponding relationship; generate a second instruction according to the fault repair method; and send the second instruction to the basic input and output system.
[0086] The fault information includes the fault state of the target device when a firmware fault occurs and the fault type of the firmware fault.
[0087] The fault state includes a recoverable fault state or an unrecoverable fault state. It is understandable that the recoverable fault state indicates that the firmware fault is a recoverable fault. For example, the recoverable fault may be that the target device is stuck. The unrecoverable fault state indicates that the firmware fault is an unrecoverable fault. For example, the unrecoverable fault may be that the firmware file corresponding to the firmware of the target device is damaged or lost.
[0088] The fault type may include a firmware version too low type or a firmware operation error type. It is understandable that the fault type may also include other more types.
[0089] The first instruction is used to instruct the basic input and output system to trigger the target device to stop running the firmware at the current moment.
[0090] The corresponding relationship is the corresponding relationship between the fault type and the fault repair method. For example, when the fault type is the firmware version is too low, the corresponding relationship is the fault type "firmware version is too low" and the fault repair method "restart the target device, re-upload a firmware file with a higher firmware version than the current firmware version, and refresh the firmware of the target device based on the re-uploaded firmware file".
[0091] The second instruction instructs the basic input and output system to perform fault repair on the target device according to the fault repair method.
[0092] It is understandable that when a firmware fault occurs in a target device, the baseboard management controller can determine whether the firmware fault is a recoverable fault based on the fault status included in the fault information, and further determine the corresponding fault repair method according to the fault type when the firmware fault is a recoverable fault, thereby realizing fault repair of the target device. This can avoid the situation where the target device cannot run the service or the service fails due to the firmware fault, and improve the working efficiency of the target device.
[0093] based on Figure 2 According to the method shown, when the BMC detects that the firmware of the target device sent by the basic input and output system needs to be updated, it receives the first firmware file uploaded by the client, and when the first version number corresponding to the first firmware file is greater than or equal to the expected version number, the firmware of the target device is refreshed to the first firmware. Since the target device can be a different PCIE device of different manufacturers and different models, it is convenient for the server to be installed with different PCIE devices, thereby improving the compatibility and flexibility of the server. In addition, compared with the PCIE device firmware refresh method of the related art, this method does not require frequent plugging and unplugging of PCIE devices, avoiding the cumbersome physical operations and possible risks. The present invention does not need to install additional drivers for PCIE devices, thereby simplifying the refresh process and reducing potential compatibility issues. The present invention does not need to adopt different refresh methods for different models of PCIE devices, thereby improving the convenience of user operation and the firmware refresh efficiency of PCIE devices, improving user experience, and ensuring the accuracy and security of firmware refresh.
[0094] In this embodiment, a controller is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.
[0095] This embodiment provides a controller such as Figure 4 As shown, Figure 4 is a structural block diagram of a controller according to an embodiment of the present invention; the controller comprises:
[0096] The transceiver module 401 is used to receive a first firmware file uploaded by a user through a client when it is detected that the firmware of the target device sent by the BIOS needs to be updated. The first firmware file is used to update the firmware of the target device.
[0097] The processing module 402 is used to parse the first firmware file to obtain a first version number corresponding to the first firmware file.
[0098] The processing module 402 is used to compare whether the first version number is greater than or equal to the expected version number. If the first version number is greater than or equal to the expected version number, based on the first firmware file, the firmware of the target device is updated to the first firmware corresponding to the first firmware file.
[0099] In some optional embodiments, the transceiver module 401 is specifically used to receive at least one device information sent from the basic input and output system, and each device information includes the second firmware version number of each device; the transceiver module 401 is also specifically used to select a PCIE device as a target device from at least one device, and the target device corresponds to the target device information; the transceiver module 401 is also specifically used to detect whether the second firmware version number included in the target device information is the expected version number; the transceiver module 401 is also specifically used to determine that the firmware of the target device needs to be updated if not.
[0100] In some optional embodiments, the target device information also includes the device path of the target device; the processing module 402 is specifically used to respond to the user clicking the refresh control in the client interface, based on the first firmware file, to send a refresh instruction to the target device, refresh the firmware of the target device to the first firmware, and the refresh instruction carries the device path of the target device.
[0101] In some optional embodiments, the processing module 402 is also used to detect the refresh progress of the target device and obtain the refresh progress information of the target device during the process of refreshing the firmware of the target device to the first firmware; the transceiver module 401 is also used to send the refresh progress information to the client so that the refresh progress information is displayed on the client interface.
[0102] In some optional implementations, the processing module 402 is further configured to delete the first firmware file and stop refreshing the firmware of the target device to the first firmware in response to the user clicking a cancel control on the client interface.
[0103] In some optional embodiments, the controller is installed with a first verification tool; the processing module 402 is further specifically used to calculate a first checksum of the first firmware file through the first verification tool; the processing module 402 is further specifically used to obtain a first mapping relationship, and a first firmware type carried by the first firmware file, the first mapping relationship being a mapping relationship between the first firmware file and the standard checksum, and the first firmware type indicating a device type adapted by the first firmware; the processing module 402 is further specifically used to determine the standard checksum corresponding to the first firmware file based on the first mapping relationship and the first firmware file.
[0104] Processing module 402 is also specifically used to compare whether the first checksum is consistent with the standard checksum; processing module 402 is also specifically used to generate a first prompt message to the client if they are inconsistent, the first prompt message is used to prompt that the first firmware file is abnormal and the client needs to upload the first firmware file again; processing module 402 is also specifically used to determine whether the first firmware type matches the target device if they are consistent; processing module 402 is also specifically used to parse the first firmware file to obtain the first version number if they match; processing module 402 is also specifically used to delete the first firmware file if they do not match, and send a second prompt message to the client, the second prompt message is used to prompt that the first firmware file is an incorrect firmware file and the client needs to re-upload the correct firmware file.
[0105] In some optional embodiments, the controller stores at least one firmware file; the processing module 402 is also used to detect that the firmware of the target device sent by the basic input and output system needs to be updated, and filter a second firmware file from at least one firmware file, and the firmware version number corresponding to the second firmware file is greater than or equal to the expected version number; the processing module 402 is also specifically used to refresh the firmware of the target device to the second firmware corresponding to the second firmware file based on the second firmware file.
[0106] In some optional implementations, the transceiver module 401 is further used to receive the fault information of the target device sent by the basic input and output system, the fault information includes the fault state and the fault type of the firmware fault when the target device has a firmware fault, and the fault state includes a recoverable fault state or an unrecoverable fault state. The processing module 402 is further used to send a first instruction to the basic input and output system if the fault state is an unrecoverable fault state, the first instruction is used to instruct the basic input and output system to trigger the target device to stop running the firmware at the current moment.
[0107] The processing module 402 is also used to determine the fault repair method corresponding to the firmware fault according to the fault type and the corresponding relationship if the fault state is a recoverable fault state, and the corresponding relationship is the corresponding relationship between the fault type and the fault repair method; the processing module 402 is also used to generate a second instruction according to the fault repair method; the transceiver module 401 is also used to send the second instruction to the basic input and output system, and the second instruction instructs the basic input and output system to perform fault repair on the target device according to the fault repair method.
[0108] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0109] The controller in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0110] The embodiment of the present invention also provides a computer device having the above Figure 4 Controller shown.
[0111] See also Figure 5 , Figure 5 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 5 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 5 A processor 10 is taken as an example.
[0112] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0113] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0114] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0115] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0116] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0117] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0118] Part of the present application may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present application through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes but is not limited to source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.
[0119] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for updating the firmware of a device, characterized in that: Applied to a controller, the method comprises: When it is detected that the firmware of the target device sent by the basic input and output system needs to be updated, receiving a first firmware file uploaded by the user through the client, wherein the first firmware file is used to update the firmware of the target device; Parsing the first firmware file to obtain a first version number corresponding to the first firmware file; Comparing whether the first version number is greater than or equal to an expected version number, if the first version number is greater than or equal to the expected version number, updating the firmware of the target device to the first firmware corresponding to the first firmware file based on the first firmware file.
2. The method according to claim 1, characterized in that The step of detecting that the firmware of the target device sent by the basic input and output system needs to be updated includes: receiving at least one piece of device information sent from the basic input and output system, each piece of device information including a second firmware version number of each device; Selecting a device from at least one device as the target device, the target device corresponding to the target device information; Detecting whether the second firmware version number included in the target device information is the expected version number; If not, it is determined that the firmware of the target device needs to be updated.
3. The method according to claim 2, characterized in that The target device information also includes a device path of the target device; and refreshing the firmware of the target device to the first firmware corresponding to the first firmware file based on the first firmware file includes: In response to the user clicking a refresh control on the client interface, a refresh instruction is sent to the target device based on the first firmware file to refresh the firmware of the target device to the first firmware, and the refresh instruction carries the device path of the target device.
4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: In the process of refreshing the firmware of the target device to the first firmware, detecting the refreshing progress of the target device and obtaining refreshing progress information of the target device; The refresh progress information is sent to the client so that the refresh progress information is displayed on the client interface.
5. The method according to claim 4, characterized in that The method further comprises: In response to the user clicking a cancel control on the client interface, the first firmware file is deleted, and refreshing the firmware of the target device to the first firmware is stopped.
6. The method according to claim 1, characterized in that The controller is installed with a first verification tool; and the parsing of the first firmware file to obtain a first version number corresponding to the first firmware file includes: Calculating a first checksum of the first firmware file by using the first checksum tool; Acquire a first mapping relationship and the first firmware type carried by the first firmware file, wherein the first mapping relationship is a mapping relationship between the first firmware file and a standard checksum, and the first firmware type indicates a device type adapted by the first firmware; Determining the standard checksum corresponding to the first firmware file according to the first mapping relationship and the first firmware file; comparing whether the first checksum is consistent with the standard checksum; If they are inconsistent, generating a first prompt message to the client, wherein the first prompt message is used to prompt that the first firmware file is abnormal and the client needs to upload the first firmware file again; If they are consistent, determining whether the first firmware type matches the target device; If they match, parsing the first firmware file to obtain the first version number; If they do not match, the first firmware file is deleted, and a second prompt message is sent to the client, where the second prompt message is used to prompt that the first firmware file is an incorrect firmware file and the client needs to re-upload a correct firmware file.
7. The method according to claim 1, characterized in that The controller stores at least one firmware file; the method further comprises: When it is detected that the firmware of the target device sent by the basic input and output system needs to be updated, a second firmware file is selected from the at least one firmware file, and the firmware version number corresponding to the second firmware file is greater than or equal to the expected version number; Based on the second firmware file, the firmware of the target device is updated to the second firmware corresponding to the second firmware file.
8. The method according to claim 1, characterized in that: The method further comprises: receiving the fault information of the target device sent by the basic input and output system, wherein the fault information includes a fault state when a firmware fault occurs in the target device and a fault type of the firmware fault, wherein the fault state includes a recoverable fault state or an unrecoverable fault state; If the fault state is the unrecoverable fault state, sending a first instruction to the basic input and output system, wherein the first instruction is used to instruct the basic input and output system to trigger the target device to stop running the firmware at the current moment; If the fault state is the recoverable fault state, determining a fault repair method corresponding to the firmware fault according to the fault type and the corresponding relationship, wherein the corresponding relationship is a corresponding relationship between the fault type and the fault repair method; Generate a second instruction according to the fault repair method; The second instruction is sent to the basic input output system, where the second instruction instructs the basic input output system to perform fault repair on the target device according to the fault repair method.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the firmware refresh method of the device according to any one of claims 1 to 7 by executing the computer instructions.
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 computer to execute the firmware refreshing method for a device according to any one of claims 1 to 7.
Citation Information
Cited By
Adapter card updating method and equipment
CN121029205A