Firmware upgrading method and device, equipment and medium

By obtaining server information and generating device logos, an automated upgrade of firmware of multiple systems is achieved, solving the problem of incomplete and interrupted firmware upgrade coverage, and improving the accuracy and stability of the upgrade.

CN119201162APending Publication Date: 2024-12-27INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411208870.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

In scenarios where multiple system firmware needs to be upgraded at one time, the firmware upgrade coverage is incomplete, and there is a problem of upgrade interruption or missed, especially after the device restarts, the device flag changes irregularly, resulting in the upgrade failure.

Method used

By obtaining server information and firmware type, extracting the information about the firmware device to be upgraded, generating device logos, and using the firmware upgrade tool to automatically upgrade, ensuring that each firmware device is upgraded independently and avoiding flag changes caused by restart.

Benefits of technology

The completeness and accuracy of firmware upgrades are achieved, the risk of upgrade interruption or failure is reduced, the stability and efficiency of upgrades are improved, and faults and errors in the production diagnosis process are reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201162A_ABST
    Figure CN119201162A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and discloses a firmware upgrading method and device, equipment and a medium, and the method comprises the steps: obtaining server information and a firmware type, and extracting a firmware equipment name corresponding to firmware equipment to be upgraded, a firmware version to be upgraded and a firmware file name to be upgraded from a diagnosis server; obtaining a to-be-upgraded firmware file and a firmware upgrading tool according to the to-be-upgraded firmware file name; acquiring an address access identifier according to the firmware equipment name; according to the address access identifier, sequentially generating equipment marks in each upgrading stage and storing the equipment marks; in the current upgrading stage, firmware upgrading operation corresponding to each piece of firmware equipment to be upgraded in the current upgrading stage is completed through a firmware upgrading tool according to the firmware equipment name corresponding to each piece of firmware equipment to be upgraded, the equipment mark generated in the current upgrading stage and the firmware file to be upgraded. According to the method, the upgrading stability, accuracy and efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

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] Before the server is shipped, the common method for upgrading system firmware is to use the firmware upgrade tool with the firmware version file. Some system firmware upgrades require the specification of device flags. This method can be used for most firmware upgrades. However, it is not applicable in some special scenarios. For example, if a server has multiple system firmware that needs to be upgraded at one time and needs to be restarted during the firmware upgrade, the restart will cause the device flag to change irregularly, resulting in the interruption or loss of a firmware upgrade. Therefore, in the scenario where multiple system firmware need to be upgraded at one time, how to ensure that the firmware upgrade is fully covered and avoid firmware upgrade loss has become an urgent problem to be solved. Summary of the invention

[0003] In view of this, the present invention provides a firmware upgrade method, device, equipment and medium to solve the problem of incomplete firmware upgrade coverage and firmware upgrade omissions.

[0004] In a first aspect, the present invention provides a firmware upgrade method, the method comprising:

[0005] Get server information and firmware type;

[0006] Extract the firmware device name, firmware version, and firmware file name corresponding to the firmware device to be upgraded from the diagnostic server according to the server information and the firmware type;

[0007] According to the file name of the firmware to be upgraded, obtain the firmware file to be upgraded and the firmware upgrade tool corresponding to the firmware file to be upgraded;

[0008] According to the firmware device name corresponding to each firmware device to be upgraded, acquiring the address access identifier corresponding to each firmware device to be upgraded;

[0009] According to the address access identifier corresponding to each firmware device to be upgraded, a device flag corresponding to each firmware device to be upgraded is sequentially generated and saved in each upgrade stage;

[0010] In the current upgrade stage, the firmware upgrade tool is used to complete the firmware upgrade operation corresponding to each firmware device to be upgraded in the current upgrade stage according to the firmware device name corresponding to each firmware device to be upgraded, the device flag generated in the current upgrade stage, and the firmware file to be upgraded.

[0011] The firmware upgrade method provided by the present invention has the following advantages:

[0012] The server information and the firmware type are obtained, and the relevant information of the firmware device to be upgraded is extracted from the diagnostic server according to the server information and the firmware type, including the firmware device name, the firmware version to be upgraded and the firmware file name to be upgraded. Then, according to the firmware file name to be upgraded, the firmware file to be upgraded and the corresponding firmware upgrade tool are obtained. According to the firmware device name of each firmware device to be upgraded, the corresponding address access identifier is obtained. In each upgrade stage, the device flag is generated and saved according to the address access identifier. And in the current upgrade stage, the firmware upgrade operation of each firmware device to be upgraded is completed using the firmware upgrade tool and the device flag. Through the above steps, the automatic upgrade of the server firmware can be realized, the upgrade efficiency and accuracy can be improved, and the errors and risks of manual operation can be reduced. At the same time, by generating the device flag and operating at different upgrade stages, the orderly progress of the upgrade process can be ensured, and each firmware device can be independently upgraded. Improve the accuracy and reliability of the upgrade. Furthermore, the device flag is generated and saved at each upgrade stage according to the address access identifier, which can avoid the problem of irregular flag changes caused by the restart of the firmware device. As a result, each firmware device can be accurately identified and operated during the upgrade process, reducing the risk of upgrade interruption or failure. By solving the problem of upgrade interruption or failure, and improving the stability and accuracy of the upgrade, it is possible to reduce failures and errors in the production diagnosis process and improve production efficiency. At the same time, upgrading multiple firmware devices in parallel can also improve upgrade efficiency, thereby improving the quality and efficiency of server shipments.

[0013] In an optional implementation, before acquiring the address access identifier corresponding to each firmware device to be upgraded according to the firmware device name corresponding to each firmware device to be upgraded, the method further includes:

[0014] Extracting a first verification code corresponding to the firmware to be upgraded and a second verification code corresponding to the firmware upgrade tool from the diagnostic server;

[0015] Acquire a third verification code corresponding to the firmware to be upgraded and a fourth verification code corresponding to the firmware upgrade tool respectively through a pre-configured verification code acquisition instruction;

[0016] When the first verification code is the same as the third verification code, and the second verification code is the same as the fourth verification code, obtaining an address access identifier corresponding to each firmware device to be upgraded according to the firmware device name corresponding to each firmware device to be upgraded;

[0017] or,

[0018] When the first check code and the third check code are different, and / or when the second check code and the fourth check code are different, the operation is stopped.

[0019] Specifically, by comparing the checksums, the integrity and accuracy of the firmware to be upgraded and the firmware upgrade tool can be verified. If the checksums do not match, it means that the file may have been tampered with or damaged. Stopping the operation can avoid using the wrong or incomplete file for upgrading, thereby reducing the risk of upgrade failure. Only when the first checksum and the third checksum are the same, and the second checksum and the fourth checksum are the same, can the subsequent operation be continued. Ensuring that the correct firmware and firmware upgrade tool are used improves the reliability and stability of the upgrade. The verification process of the checksum helps prevent malware or unauthorized modifications and increases the security of the system. If the checksums do not match, stopping the operation can prevent potential security threats. Using the correct firmware and firmware upgrade tool for upgrading can avoid server failures or anomalies caused by using the wrong file. Protect the normal operation of the server and improve the reliability and availability of the server. Verifying the checksum before upgrading can avoid troubleshooting and repairing after problems occur during the upgrade process, thereby saving time and resources. The record of the checksum can also provide traceability of the upgrade process, facilitating auditing and troubleshooting when necessary.

[0020] In an optional implementation, after acquiring the address access identifier corresponding to each firmware device to be upgraded according to the firmware device name corresponding to each firmware device to be upgraded, the method further includes:

[0021] Sorting the acquired address access identifiers to obtain a sorted first address access identifier set;

[0022] Performing a deduplication operation on the address access identifier set to obtain a second address access identifier set;

[0023] Counting the number of address access identifiers in the second address access identifier set;

[0024] When it is determined that the number of address access identifiers is the same as the number of firmware devices to be upgraded, determining that a check of the address access identifiers in the second address access identifier set passes;

[0025] Comparing each address access identifier in the second address access identifier set with the address access identifiers in the pre-built address access identifier library;

[0026] When it is determined that each address access identifier in the second address access identifier set does not match the address access identifier in the pre-built address access identifier library, determining that the secondary verification of the address access identifiers in the second address access identifier set passes, wherein the address access identifiers in the second address access identifier set after the secondary verification passes will be used to perform the firmware upgrade operation;

[0027] or,

[0028] When it is determined that the number of address access identifiers is different from the number of firmware devices to be upgraded, and / or when it is determined that one or more address access identifiers in the second address access identifier set match the address access identifiers in the pre-built address access identifier library, it is determined that the verification of the address access identifier has failed and the operation is stopped.

[0029] Specifically, when the number of address access identifiers is the same as the number of firmware devices to be upgraded, one verification is passed. Then, each address access identifier in the second address access identifier set is compared with the identifier in the address access identifier library. If none of them match, the secondary verification is passed and can be used to perform the firmware upgrade operation. However, if the number of address access identifiers is different from the number of devices, or there is an identifier that matches the one in the address access identifier library, the verification fails and the operation will stop. In this way, it can be ensured that each firmware device to be upgraded has a unique identifier. Avoid identifier conflicts and ensure the accuracy and reliability of the upgrade operation. And when it is determined that the number of address access identifiers is the same as the number of firmware devices to be upgraded, it means that the number of identifiers allocated is correct, and the verification of the address access identifiers is passed. This method can improve the accuracy of the upgrade and reduce upgrade failures caused by identifier errors. Correct identifier allocation can ensure that the upgrade operation is performed on the correct firmware device and avoid misoperation on other devices. It helps to enhance the stability of the system and reduce system failures caused by upgrade errors. By automatically checking whether the number of address access identifiers is the same as the number of firmware devices to be upgraded, even if there is an address conflict, the identifier allocation error can be quickly discovered and the operation can be stopped in time, avoiding unnecessary upgrade time and resource waste, and improving production efficiency. The verification process of address access identifiers can also provide traceability of upgrade operations, facilitating auditing and troubleshooting when necessary. Accurate identifier allocation and verification can reduce maintenance costs caused by upgrade errors and improve system availability and reliability.

[0030] In an optional implementation, the method further includes: in a first upgrade phase, obtaining a current firmware version corresponding to a first firmware device, wherein the first firmware device is any firmware device among the firmware devices to be upgraded;

[0031] A system firmware device matrix is ​​generated according to the current firmware version, the firmware device name corresponding to the first firmware device, the first firmware version to be upgraded corresponding to the first firmware device, the firmware file name to be upgraded corresponding to the first firmware version to be upgraded, the first verification code corresponding to the first firmware to be upgraded, the address access code corresponding to the first firmware device, and the device flag corresponding to the first firmware device generated in the first upgrade phase.

[0032] Specifically, by obtaining the current firmware version of the first firmware device and generating a system firmware device matrix in combination with other relevant information, it is possible to ensure that the correct firmware version and file are used during the upgrade process, thereby improving the accuracy of the upgrade. The system firmware device matrix contains key information related to the upgrade, such as the firmware device name, the firmware version to be upgraded, the checksum, etc. It helps to ensure the integrity of the upgrade process and avoid omissions or erroneous operations. The generated system firmware device matrix can be used as a record of the upgrade process to facilitate subsequent management and traceability. If a problem occurs after the upgrade, it can be quickly located and resolved through the information in the matrix. Using the system firmware device matrix can reduce manual operations and errors and improve the efficiency and reliability of the upgrade. At the same time, the information in the matrix can be reused in different upgrade stages to further improve work efficiency. Accurate upgrade operations help enhance the stability of the system and ensure the normal operation of the firmware device. By generating a system firmware device matrix, the upgrade process can be better managed and controlled, reducing the risk of system failures.

[0033] In an optional implementation, after generating a system firmware device matrix according to the current firmware version, the firmware device name corresponding to the first firmware device, the first firmware version to be upgraded corresponding to the first firmware device, the firmware file name to be upgraded corresponding to the first firmware version to be upgraded, the first verification code corresponding to the first firmware to be upgraded, the address access code corresponding to the first firmware device, and the device flag corresponding to the first firmware device generated in the first upgrade phase, the method further includes:

[0034] When the device flag corresponding to the first firmware device changes in any subsequent upgrade stage, the device flag corresponding to the first firmware device generated in each upgrade stage is updated to the system firmware device matrix.

[0035] Specifically, the device flags corresponding to the first firmware device generated in each upgrade stage are updated to the system firmware device matrix, which can provide a complete upgrade record. It helps to track the upgrade history of the device and facilitate subsequent maintenance and management. If problems occur during subsequent use, the upgrade stage where the problem may occur can be quickly located by viewing the changes in the device flags in the system firmware device matrix, which is convenient for troubleshooting and tracing. By updating the device flags, it can be ensured that the information in the system firmware device matrix is ​​consistent with the status of the actual device. Avoid erroneous operations or misunderstandings caused by inconsistent information. Complete upgrade records and updates of device flags can improve the reliability of the upgrade. If an abnormal situation occurs during the upgrade process, rollback or other measures can be taken according to the information in the matrix to ensure the normal operation of the device. The upgrade records and device flag changes in the system firmware device matrix provide an important reference for system maintenance. Maintenance personnel can formulate a more reasonable maintenance plan based on this information to improve the maintainability of the system.

[0036] In an optional implementation, the address access identifier is a unique identifier for identifying and accessing a Serial Attached Small Computer System Interface device.

[0037] Specifically, through the unique identifier, a specific device can be accurately identified and accessed, reducing the possibility of erroneous access to other devices. By using a unique identifier, devices can be quickly located and accessed, improving the operating efficiency of the system. The address access identifier can be used to limit access rights to specific devices, enhancing the security of the system. It avoids erroneous operations and configuration problems caused by non-unique identifiers, improving the stability and reliability of the system.

[0038] In an optional implementation, in the current upgrade phase, after completing the firmware upgrade operation corresponding to each firmware device to be upgraded in the current upgrade phase using a firmware upgrade tool according to the firmware device name corresponding to each firmware device to be upgraded, the device flag generated in the current upgrade phase, and the firmware file to be upgraded, the method further includes:

[0039] Obtain the latest firmware version corresponding to the first firmware device, and update it to the system firmware device matrix;

[0040] Extract the firmware version to be upgraded from the system firmware device;

[0041] When it is confirmed that the latest firmware version is the same as the firmware version to be upgraded, it is determined that the upgrade of the first firmware device is successful;

[0042] Alternatively, when it is confirmed that the latest firmware version is different from the firmware version to be upgraded, it is determined that the upgrade of the first firmware device has failed.

[0043] Specifically, by obtaining the latest firmware version of the first firmware device and updating it to the system firmware device matrix, it can be ensured that the firmware version information recorded in the system is the latest, which is convenient for subsequent management and maintenance. By comparing the latest firmware version and the firmware version to be upgraded, it can be determined whether the upgrade of the first firmware device is successful. It helps to discover the situation of upgrade failure in time and take corresponding measures to repair it. When it is determined that the upgrade of the first firmware device fails, the problem can be troubleshooted according to the information in the system firmware device matrix to find out the cause of the upgrade failure and take corresponding solutions. Ensuring the successful upgrade of the firmware device can improve the stability and reliability of the system and reduce system failures caused by firmware version mismatch or upgrade failure. The system firmware device matrix records the relevant information of each firmware device, including firmware version, upgrade status, etc., which is convenient for maintenance personnel to manage and maintain and improve work efficiency. By confirming the upgrade results and updating the system firmware device matrix, the version consistency of each firmware device in the system can be guaranteed to avoid compatibility problems caused by inconsistent versions.

[0044] In a second aspect, the present invention provides a firmware upgrade device, the device comprising:

[0045] The acquisition module is used to obtain server information and firmware type;

[0046] The extraction module is used to extract the firmware device name, the firmware version and the firmware file name corresponding to the firmware device to be upgraded from the diagnostic server according to the server information and the firmware type;

[0047] The processing module is used to obtain the firmware file to be upgraded and the firmware upgrade tool corresponding to the firmware file to be upgraded according to the name of the firmware file to be upgraded; and obtain the address access identifier corresponding to each firmware device to be upgraded according to the firmware device name corresponding to each firmware device to be upgraded;

[0048] A generating module, used for sequentially generating and saving a device flag corresponding to each firmware device to be upgraded in each upgrade stage according to the address access identifier corresponding to each firmware device to be upgraded;

[0049] The upgrade module is used to use the firmware upgrade tool in the current upgrade phase to complete the firmware upgrade operation corresponding to each firmware device to be upgraded in the current upgrade phase according to the firmware device name corresponding to each firmware device to be upgraded, the device flag generated in the current upgrade phase, and the firmware file to be upgraded.

[0050] The firmware upgrade device provided by the present invention has the following advantages:

[0051] The server information and the firmware type are obtained, and the relevant information of the firmware device to be upgraded is extracted from the diagnostic server according to the server information and the firmware type, including the firmware device name, the firmware version to be upgraded and the firmware file name to be upgraded. Then, according to the firmware file name to be upgraded, the firmware file to be upgraded and the corresponding firmware upgrade tool are obtained. According to the firmware device name of each firmware device to be upgraded, the corresponding address access identifier is obtained. In each upgrade stage, the device flag is generated and saved according to the address access identifier. And in the current upgrade stage, the firmware upgrade operation of each firmware device to be upgraded is completed using the firmware upgrade tool and the device flag. Through the above steps, the automatic upgrade of the server firmware can be realized, the upgrade efficiency and accuracy can be improved, and the errors and risks of manual operation can be reduced. At the same time, by generating the device flag and operating at different upgrade stages, the orderly progress of the upgrade process can be ensured, and each firmware device can be independently upgraded. Improve the accuracy and reliability of the upgrade. Furthermore, the device flag is generated and saved at each upgrade stage according to the address access identifier, which can avoid the problem of irregular flag changes caused by the restart of the firmware device. As a result, each firmware device can be accurately identified and operated during the upgrade process, reducing the risk of upgrade interruption or failure. By solving the problem of upgrade interruption or failure, and improving the stability and accuracy of the upgrade, it is possible to reduce failures and errors in the production diagnosis process and improve production efficiency. At the same time, upgrading multiple firmware devices in parallel can also improve upgrade efficiency, thereby improving the quality and efficiency of server shipments.

[0052] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the firmware upgrade method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0053] 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 upgrade method of the first aspect or any corresponding embodiment thereof.

[0054] 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 upgrade method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] 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.

[0056] Figure 1 It is a flowchart of a firmware upgrade method provided by an embodiment of the present invention;

[0057] Figure 2 It is a flowchart of another firmware upgrade method provided by an embodiment of the present invention;

[0058] Figure 3 It is a flowchart of another firmware upgrade method provided by an embodiment of the present invention;

[0059] Figure 4 It is a schematic diagram of the overall operation flow of the firmware upgrade method provided by the present invention;

[0060] Figure 5 It is a schematic diagram of the overall operation flow of a specific example of a firmware upgrade method provided by the present invention;

[0061] Figure 6 This is a structural block diagram of a firmware upgrade device provided by an embodiment of the present invention;

[0062] Figure 7 It is a schematic diagram of the hardware structure of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0063] 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.

[0064] With the rapid development of software and hardware technologies, servers play a key role as information technology infrastructure. Server system firmware is the bridge between hardware and operating system (OS). It is the basic software on server hardware, responsible for hardware initialization and configuration and providing underlying support for OS. System firmware will directly affect the overall performance of the server, so it is necessary to ensure that the system firmware is upgraded to the correct version when the server leaves the factory.

[0065] Before the server is shipped, the common method for upgrading system firmware is to use the firmware upgrade tool with the firmware version file. Some system firmware upgrades require the specification of device flags. This method can be used for most firmware upgrades. However, it is not applicable in some special scenarios. For example, if a server has multiple system firmware that needs to be upgraded at one time and needs to be restarted during the firmware upgrade, the restart will cause the device flag to change irregularly, resulting in the interruption or loss of a firmware upgrade. Therefore, in the scenario where multiple system firmware need to be upgraded at one time, how to ensure that the firmware upgrade is fully covered and avoid firmware upgrade loss has become an urgent problem to be solved.

[0066] To solve the above problems, an embodiment of the present invention provides a firmware upgrade embodiment. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system (computer device) including 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.

[0067] In this embodiment, a firmware upgrade method is provided, which can be used for the above-mentioned terminal equipment, such as a mobile phone, a tablet computer, etc. Figure 1 is a flowchart of a firmware upgrade method provided by an embodiment of the present invention, such as Figure 1 As shown, this method can be applied to the system firmware upgrade scenario where multiple firmwares need to be upgraded at one time in the server, and the firmware device needs to be restarted during the upgrade, and the restart causes the device flag to change irregularly. The process includes the following steps:

[0068] Step S101, obtaining server information and firmware type.

[0069] Step S102: extracting the firmware device name, the firmware version, and the firmware file name corresponding to the firmware device to be upgraded from the diagnostic server according to the server information and the firmware type.

[0070] Specifically, the firmware upgrade of the server before leaving the factory is in the whole machine diagnosis process. The assembled server is powered on to the rack and enters the OS to start the diagnosis process. When it runs to the system firmware upgrade item, it first obtains the server information and firmware type, and then obtains the firmware device name, firmware version, and firmware file name corresponding to the firmware device to be upgraded from the diagnostic server based on the server information and firmware type.

[0071] Among them, for servers of the same model or configuration, the system firmware devices that need to be upgraded are fixed and maintained on the diagnostic server together with the firmware version and firmware files, etc. Therefore, according to the server information and firmware type, the firmware device name, firmware version to be upgraded, firmware file name to be upgraded, etc. corresponding to the firmware device to be upgraded can be obtained from the diagnostic server.

[0072] Step S103, obtaining the firmware file to be upgraded and the firmware upgrade tool corresponding to the firmware file to be upgraded according to the name of the firmware file to be upgraded.

[0073] Specifically, after the file name of the firmware to be upgraded is obtained, the firmware file to be upgraded corresponding to the file name of the firmware to be upgraded and the firmware upgrade tool corresponding to the firmware file to be upgraded can be extracted from the diagnostic server.

[0074] Step S104: acquiring an address access identifier corresponding to each firmware device to be upgraded according to the firmware device name corresponding to each firmware device to be upgraded.

[0075] Specifically, the address access identifier is usually a unique address access identifier, which is used to easily identify each firmware device. In an optional example, the address access identifier can be a serial attached small computer system interface (Serial Attached Small Computer System Interface, SAS for short) address.

[0076] Step S105 , according to the address access identifier corresponding to each firmware device to be upgraded, a device flag corresponding to each firmware device to be upgraded is sequentially generated and saved in each upgrade stage.

[0077] The SAS address is written into a non-volatile memory (such as EEPROM) during production according to the manufacturer identifier and device serial number. When the server is turned on, it reads the SAS address in the memory for use. The SAS addresses are different and unique, and so are the SAS addresses of multiple firmware devices on the server. Before the diagnostic OS is installed on the server, the SAS addresses of multiple firmware devices have been written.

[0078] When the system firmware is upgraded, it is necessary to specify the device flag of the firmware device. Therefore, in an embodiment of the present application, the SAS address is obtained through the lsscsi-sgt and grep commands. Then, according to the SAS address corresponding to each firmware device to be upgraded, a device flag corresponding to each firmware device to be upgraded is generated. Among them, the lsscsi-sgt command is used to obtain the information of the SCSI device, and then the grep command is used to filter out the lines that match the specific pattern, so as to extract the SAS address corresponding to each firmware device to be upgraded. Then, a device flag is generated according to the SAS address, so as to accurately identify and specify the firmware device to be upgraded during the system firmware upgrade process.

[0079] Step S106, in the current upgrade stage, using the firmware upgrade tool, respectively according to the firmware device name corresponding to each firmware device to be upgraded, the device flag generated in the current upgrade stage, and the firmware file to be upgraded, complete the firmware upgrade operation corresponding to each firmware device to be upgraded in the current upgrade stage.

[0080] Specifically, when upgrading a firmware device, it is necessary to specify the firmware file name and device flag. When multiple firmware devices are upgraded in parallel, multiple threads can be used to execute simultaneously.

[0081] The system firmware upgrade may include multiple upgrade stages. After each stage of the upgrade, the system firmware device will restart, and the device flag will change after the restart. Therefore, in each upgrade stage, it is necessary to regenerate the device flag corresponding to each firmware device to be upgraded according to the address access identifier corresponding to each firmware device to be upgraded. Then complete the upgrade operation process in the upgrade stage until the upgrade is completed.

[0082] The firmware upgrade method provided in this embodiment obtains server information and firmware type, and extracts relevant information of the firmware device to be upgraded from the diagnostic server according to the server information and firmware type, including the firmware device name, the firmware version to be upgraded and the firmware file name to be upgraded. Then, according to the firmware file name to be upgraded, the firmware file to be upgraded and the corresponding firmware upgrade tool are obtained. According to the firmware device name of each firmware device to be upgraded, the corresponding address access identifier is obtained. In each upgrade stage, a device flag is generated and saved according to the address access identifier. And in the current upgrade stage, the firmware upgrade operation of each firmware device to be upgraded is completed using the firmware upgrade tool and the device flag. Through the above steps, the automatic upgrade of the server firmware can be realized, the upgrade efficiency and accuracy can be improved, and the errors and risks of manual operation can be reduced. At the same time, by generating the device flag and operating at different upgrade stages, the orderly progress of the upgrade process can be ensured, and each firmware device can be independently upgraded. Improve the accuracy and reliability of the upgrade. Furthermore, the device flag is generated and saved at each upgrade stage according to the address access identifier, which can avoid the problem of irregular flag changes caused by the restart of the firmware device. As a result, each firmware device can be accurately identified and operated during the upgrade process, reducing the risk of upgrade interruption or failure. By solving the problem of upgrade interruption or failure, and improving the stability and accuracy of the upgrade, it is possible to reduce failures and errors in the production diagnosis process and improve production efficiency. At the same time, upgrading multiple firmware devices in parallel can also improve upgrade efficiency, thereby improving the quality and efficiency of server shipments.

[0083] In this embodiment, a firmware upgrade method is provided, which can be used for the above-mentioned mobile terminal, such as a mobile phone, a tablet computer, etc. Figure 2FIG. 1 is a flow chart of another firmware upgrade method provided by an embodiment of the present invention. Figure 2 As shown, before acquiring the address access identifier corresponding to each firmware device to be upgraded according to the firmware device name corresponding to each firmware device to be upgraded, the method flow further includes the following steps:

[0084] Step S201: extracting a first verification code corresponding to the firmware to be upgraded and a second verification code corresponding to the firmware upgrade tool from a diagnostic server.

[0085] Step S202: Obtain a third verification code corresponding to the firmware to be upgraded and a fourth verification code corresponding to the firmware upgrade tool respectively through a pre-configured verification code acquisition instruction.

[0086] Specifically, before acquiring the address access identifier corresponding to each firmware device to be upgraded according to the firmware device name corresponding to each firmware device to be upgraded, the upgrade environment needs to be checked.

[0087] Specific checks include verifying the firmware files to be upgraded and the firmware upgrade tools.

[0088] Therefore, it is necessary to extract a first verification code corresponding to the firmware to be upgraded and a second verification code corresponding to the firmware upgrade tool from the diagnostic server.

[0089] Then, the third verification code corresponding to the firmware to be upgraded and the fourth verification code corresponding to the firmware upgrade tool are respectively acquired through the pre-configured verification code acquisition instruction.

[0090] When the first verification code is the same as the third verification code, and the second verification code is the same as the fourth verification code, it means that the firmware file to be upgraded and the firmware upgrade tool are successfully verified.

[0091] Therefore, the address access identifier corresponding to each firmware device to be upgraded can be obtained according to the firmware device name corresponding to each firmware device to be upgraded;

[0092] or,

[0093] When the first verification code is different from the third verification code, and / or when the second verification code is different from the fourth verification code, it means that the verification of the firmware file to be upgraded and / or the firmware upgrade tool has failed, and the operation needs to be stopped. After troubleshooting the cause of the problem, restart the upgrade process.

[0094] In an optional example, the aforementioned check code may be a Message Digest Algorithm 5 Checksum (md5 for short) check code.

[0095] A firmware upgrade method provided by an embodiment of the present invention can verify the integrity and accuracy of the firmware to be upgraded and the firmware upgrade tool by comparing the verification code. If the verification code does not match, it means that the file may have been tampered with or damaged. Stopping the operation can avoid using the wrong or incomplete file for upgrading, thereby reducing the risk of upgrade failure. Only when the first verification code and the third verification code are the same, and the second verification code and the fourth verification code are the same, the subsequent operation is continued. It is ensured that the correct firmware and firmware upgrade tool are used, and the reliability and stability of the upgrade are improved. The verification code verification process helps to prevent malicious software or unauthorized modification, and increases the security of the system. If the verification code does not match, stopping the operation can prevent potential security threats. Using the correct firmware and firmware upgrade tool for upgrading can avoid server failure or abnormality caused by using the wrong file. Protect the normal operation of the server and improve the reliability and availability of the server. Verifying the verification code before upgrading can avoid troubleshooting and repairing after problems occur during the upgrade process, thereby saving time and resources. The record of the verification code can also provide traceability of the upgrade process, which is convenient for auditing and troubleshooting when necessary.

[0096] In this embodiment, a firmware upgrade method is provided, which can be used for the above-mentioned mobile terminal, such as a mobile phone, a tablet computer, etc. Figure 3 FIG. 1 is a flow chart of another firmware upgrade method provided by an embodiment of the present invention. Figure 3 As shown, after acquiring the address access identifier corresponding to each firmware device to be upgraded according to the firmware device name corresponding to each firmware device to be upgraded, the method flow includes the following steps:

[0097] Step S301, sorting the acquired address access identifiers to obtain a sorted first address access identifier set.

[0098] Step S302: perform a deduplication operation on the address access identifier set to obtain a second address access identifier set.

[0099] Step S303: Count the number of address access identifiers in the second address access identifier set.

[0100] Step S304: when it is determined that the number of address access identifiers is the same as the number of firmware devices to be upgraded, it is determined that a check of the address access identifiers in the second address access identifier set is passed.

[0101] Step S305: compare each address access identifier in the second address access identifier set with the address access identifiers in the pre-built address access identifier library.

[0102] Step S306: When it is determined that each address access identifier in the second address access identifier set does not match the address access identifier in the pre-built address access identifier library, it is determined that the secondary verification of the address access identifiers in the second address access identifier set passes.

[0103] Among them, the address access identifiers in the second address access identifier set that pass the secondary verification will be used to perform the firmware upgrade operation.

[0104] or,

[0105] Step S307, when it is determined that the number of address access identifiers is different from the number of firmware devices to be upgraded, and / or when it is determined that one or more address access identifiers in the second address access identifier set match the address access identifiers in the pre-built address access identifier library, it is determined that the verification of the address access identifier has failed and the operation is stopped.

[0106] Specifically, when performing the upgrade environment verification, in addition to verifying the firmware file to be upgraded and the firmware upgrade tool in the aforementioned embodiment, it may also include verifying the address access identifier.

[0107] Specifically, first, all acquired SAS addresses of system firmware devices are self-checked, that is, the acquired address access identifiers are sorted to obtain a first sorted address access identifier set; then the address access identifier set is deduplicated to obtain a second address access identifier set; and the number of address access identifiers in the second address access identifier set is counted.

[0108] Among them, the sorting operation of the address access identifier can be implemented by the command sort. Then the deduplication operation of the address access identifier is implemented by the command uniq. Afterwards, the number of address access identifiers in the second address access identifier set is obtained by the command wc -l. Then it is compared with the number of firmware devices to be upgraded. When it is determined that the number of address access identifiers in the second address access identifier set is the same as the number of firmware devices to be upgraded, it is determined that a check of the address access identifiers in the second address access identifier set has passed. On the contrary, if the number is inconsistent, an error will be reported and the machine will be repaired.

[0109] Thereafter, each address access identifier in the second address access identifier set is compared with the address access identifiers in the pre-built address access identifier library; when it is determined that each address access identifier in the second address access identifier set does not match the address access identifiers in the pre-built address access identifier library, it is determined that the secondary verification of the address access identifiers in the second address access identifier set has passed, wherein the address access identifiers in the second address access identifier set after the secondary verification has passed will be used to perform the firmware upgrade operation.

[0110] That is, the obtained SAS address is searched in the SAS address access identifier library in the diagnostic server (the SAS addresses of all previous servers are stored here) to ensure that the SAS address has not been used. If there is an abnormality, an error will be reported and the process will stop. The problem needs to be checked and confirmed before retesting. If there is no abnormality, the upgrade process will continue.

[0111] When the number of address access identifiers is the same as the number of firmware devices to be upgraded, one check passes. Then, each address access identifier in the second address access identifier set is compared with the identifier in the address access identifier library. If none of them match, the second check passes and can be used to perform the firmware upgrade operation. However, if the number of address access identifiers is different from the number of devices, or there is an identifier that matches the one in the address access identifier library, the check fails and the operation stops. In this way, it can be ensured that each firmware device to be upgraded has a unique identifier. Avoid identifier conflicts and ensure the accuracy and reliability of the upgrade operation. And when it is determined that the number of address access identifiers is the same as the number of firmware devices to be upgraded, it means that the number of identifiers allocated is correct, and the check of the address access identifiers passes. This method can improve the accuracy of the upgrade and reduce upgrade failures caused by identifier errors. Correct identifier allocation can ensure that the upgrade operation is performed on the correct firmware device and avoid misoperation on other devices. It helps to enhance the stability of the system and reduce system failures caused by upgrade errors. By automatically checking whether the number of address access identifiers is the same as the number of firmware devices to be upgraded, even if there is an address conflict, the identifier allocation error can be quickly discovered and the operation can be stopped in time, avoiding unnecessary upgrade time and resource waste, and improving production efficiency. The verification process of address access identifiers can also provide traceability of upgrade operations, facilitating auditing and troubleshooting when necessary. Accurate identifier allocation and verification can reduce maintenance costs caused by upgrade errors and improve system availability and reliability.

[0112] Based on the above method embodiment, the method may further include:

[0113] In the current upgrade phase, after completing the firmware upgrade operation corresponding to each firmware device to be upgraded in the current upgrade phase using the firmware upgrade tool according to the firmware device name corresponding to each firmware device to be upgraded, the device flag generated in the current upgrade phase, and the firmware file to be upgraded, the method may further include:

[0114] The address access identifier corresponding to each firmware device to be upgraded is stored in the pre-built address access identifier library described above.

[0115] In an optional example, the method further includes:

[0116] Step a1: in the first upgrade phase, obtain the current firmware version corresponding to the first firmware device.

[0117] The first firmware device is any firmware device among the firmware devices to be upgraded.

[0118] Step a2, generating a system firmware device matrix according to the current firmware version, the firmware device name corresponding to the first firmware device, the first firmware version to be upgraded corresponding to the first firmware device, the name of the firmware file to be upgraded corresponding to the first firmware version to be upgraded, the first verification code corresponding to the first firmware to be upgraded, the address access code corresponding to the first firmware device, and the device flag corresponding to the first firmware device generated in the first upgrade phase.

[0119] See Table 1 for details. Table 1 shows a simplified schematic diagram of the parameters included in the system firmware device matrix.

[0120] Table 1

[0121]

[0122] Specifically, by obtaining the current firmware version of the first firmware device and generating a system firmware device matrix in combination with other relevant information, it is possible to ensure that the correct firmware version and file are used during the upgrade process, thereby improving the accuracy of the upgrade. Among them, the system firmware device matrix contains key information related to the upgrade, such as the firmware device name, the firmware version to be upgraded, the checksum, etc. It helps to ensure the integrity of the upgrade process and avoid omissions or erroneous operations. The generated system firmware device matrix can be used as a record of the upgrade process to facilitate subsequent management and traceability. If a problem occurs after the upgrade, it can be quickly located and resolved through the information in the matrix. Using the system firmware device matrix can reduce manual operations and errors and improve the efficiency and reliability of the upgrade. At the same time, the information in the matrix can be reused in different upgrade stages to further improve work efficiency. Accurate upgrade operations help enhance the stability of the system and ensure the normal operation of the firmware device. By generating a system firmware device matrix, the upgrade process can be better managed and controlled, reducing the risk of system failures.

[0123] In an optional example, after generating the system firmware device matrix according to the current firmware version, the firmware device name corresponding to the first firmware device, the first firmware version to be upgraded corresponding to the first firmware device, the firmware file name to be upgraded corresponding to the first firmware version to be upgraded, the first verification code corresponding to the first firmware to be upgraded, the address access code corresponding to the first firmware device, and the device flag corresponding to the first firmware device generated in the first upgrade phase, the method further includes:

[0124] When the device flag corresponding to the first firmware device changes in any subsequent upgrade stage, the device flag corresponding to the first firmware device generated in each upgrade stage is updated to the system firmware device matrix.

[0125] Specifically, the device flags corresponding to the first firmware device generated in each upgrade stage are updated to the system firmware device matrix, which can provide a complete upgrade record. It helps to track the upgrade history of the device and facilitate subsequent maintenance and management. If problems occur during subsequent use, the upgrade stage where the problem may occur can be quickly located by viewing the changes in the device flags in the system firmware device matrix, which is convenient for troubleshooting and tracing. By updating the device flags, it can be ensured that the information in the system firmware device matrix is ​​consistent with the status of the actual device. Avoid erroneous operations or misunderstandings caused by inconsistent information. Complete upgrade records and updates of device flags can improve the reliability of the upgrade. If an abnormal situation occurs during the upgrade process, rollback or other measures can be taken according to the information in the matrix to ensure the normal operation of the device. The upgrade records and device flag changes in the system firmware device matrix provide an important reference for system maintenance. Maintenance personnel can formulate a more reasonable maintenance plan based on this information to improve the maintainability of the system.

[0126] In an optional example, in the current upgrade stage, after completing the firmware upgrade operation corresponding to each firmware device to be upgraded in the current upgrade stage using a firmware upgrade tool according to the firmware device name corresponding to each firmware device to be upgraded, the device flag generated in the current upgrade stage, and the firmware file to be upgraded, the method further includes:

[0127] Step b1, obtaining the latest firmware version corresponding to the first firmware device, and updating it to the system firmware device matrix.

[0128] Step b2: extract the firmware version to be upgraded in the system firmware device.

[0129] When it is confirmed that the latest firmware version is the same as the firmware version to be upgraded, it is determined that the upgrade of the first firmware device is successful;

[0130] Alternatively, when it is confirmed that the latest firmware version is different from the firmware version to be upgraded, it is determined that the upgrade of the first firmware device has failed.

[0131] When the firmware upgrade is complete, further checks and confirmations may also be included.

[0132] First, you can get the 2nd and 6th columns in the system firmware device matrix, that is, the firmware version to be upgraded and the current firmware version of each firmware device. If the corresponding elements of the same row in the two columns are equal, the check passes and the subsequent diagnosis process continues; if the elements of the same row in the two columns are not equal, it indicates that the firmware device upgrade has failed, which needs to be checked and confirmed, and the system firmware device upgrade process is repeated after repair.

[0133] In an optional example, during the process of updating the device logo, errors may occur, such as network failure, data inconsistency, etc. Then a corresponding error handling mechanism may be set to ensure the reliability and stability of the update operation. Specifically, the handling mechanism includes:

[0134] 1. Retry mechanism.

[0135] When an error occurs while updating the device flag, set a retry count and retry interval. Wait for the retry interval before each retry. Try to re-execute the update operation until the retry count reaches the upper limit or the update succeeds. If the retry count reaches the upper limit and still fails, log the error and take other error handling measures.

[0136] 2. Logging mechanism:

[0137] In the key steps of the update operation, record detailed log information, including the time of the operation, device logo, error information, etc. And store the log in a reliable location for subsequent analysis and troubleshooting. Of course, you can also use some log analysis tools to monitor and analyze the logs to find potential problems in time.

[0138] 3. Error prompt mechanism:

[0139] When an update operation encounters an error, an error prompt message is sent to the user or related system. In addition, the error prompt can also be sent through interface display, email, SMS, etc.

[0140] The error message should contain enough context so that the user or system administrator can understand the nature and impact of the problem.

[0141] 4. Data consistency check mechanism:

[0142] Before updating the equipment logo, perform a data consistency check to ensure the integrity and accuracy of the relevant data.

[0143] For example, check whether the device flag matches other related data and whether it complies with specific rules or constraints. If the data is inconsistent, record the error and take appropriate measures, such as repairing the data or rolling back the update operation.

[0144] 5. Exception handling mechanism:

[0145] Use the exception handling mechanism provided by the appropriate programming language and framework to capture and handle exceptions in update operations. In the exception handling code, record the exception information and decide whether to retry, roll back, or take other error handling measures based on the specific situation.

[0146] 6. Backup and recovery mechanism:

[0147] Before performing an update, back up the relevant data. This way, if the update fails or there is a data inconsistency, you can use the backup data for recovery. Regularly test the backup and recovery process to ensure its reliability.

[0148] 7. Error analysis and improvement mechanism:

[0149] Regularly analyze the error logs and data in the update operation to find out the common error types and causes. According to the analysis results, take corresponding improvement measures, such as optimizing the update algorithm, improving the data structure, strengthening error handling, etc. Continuously improve the error handling mechanism to improve the reliability and stability of the update operation.

[0150] Through the implementation of the above error handling mechanism, the reliability and stability of the device flag update operation can be improved, the impact of errors on the system can be reduced, and relevant personnel can be notified in time for processing. At the same time, through error analysis and improvement, the system can be continuously optimized to improve its overall performance and reliability. The specific implementation method should be adjusted and optimized according to actual conditions to meet the needs and requirements of the system. In addition, in order to better manage and track the upgrade process of the firmware version, the embodiment of the present application may also include: adding version control information to the system firmware device matrix. For example, record the firmware version number corresponding to each upgrade stage to facilitate tracing and comparing the device status at different stages.

[0151] For the overall operation process, see Figure 4 As shown, Figure 4 The entire implementation process has been introduced in detail in the previous article, so I will not go into details here.

[0152] In the following, a specific example is used to illustrate the specific implementation process of the above method embodiment of the present application, see as follows:

[0153] Taking the upgrade of the system firmware OSES of a 3U storage server as an example, the OSES firmware of the server device needs to upgrade 2 mainboards and 8 trays, and the mainboard firmware version and the tray firmware version are different. The mainboard OSES version is A001, and the tray OSES version is B001.

[0154] First, after the storage server starts to install the diagnostic OS, it runs to the OSES firmware upgrade diagnostic item. First, the OSES firmware version and firmware file name to be upgraded are obtained from the diagnostic server, and then the OSES firmware upgrade tool and firmware file are copied from the diagnostic server to the storage server. After the tool of this embodiment is copied, it can be directly called using commands, such as sg_ses\sg_write_buffer and other commands. By obtaining the firmware device name, firmware version, firmware file name, and md5 value corresponding to the firmware file to be upgraded of the firmware device to be upgraded in the diagnostic server, the first 4 columns of the system firmware device matrix are generated. See Table 2 for details, where Table 2 is a complete matrix, and the 4th column md5 and the 5th column SAS address are simple illustrations.

[0155] Table 2

[0156] 1 column 2 columns 3 columns 4 columns 5 columns 6 columns 7 columns EIN1 A001 A001.bin md51 SAS1 A000 sg2 EIN2 A001 A001.bin md51 SAS2 A000 sg5 LIN1 B001 BOO1.bin md52 SAS3 B000 sg6 LIN2 B001 BOO1.bin md52 SAS4 B000 sg9 LIN3 B001 BOO1.bin md52 SAS5 B000 sg11 LIN4 B001 BOO1.bin md52 SAS6 B000 sg14 LIN5 B001 BOO1.bin md52 SAS7 B000 sg18 LIN6 B001 BOO1.bin md52 SAS8 B000 sg25 LIN7 B001 BOO1.bin md52 SAS9 B000 sg29 LIN8 B001 BOO1.bin md52 SAS10 B000 sg34

[0157] Then, use the md5 sum command to obtain the firmware upgrade tool and firmware file checksum, and compare it with the correct checksum in the fourth column of the system firmware device matrix (the checksum obtained from the diagnostic service in advance). Continue after the checksum is consistent.

[0158] Get 10 OSES firmware device SAS addresses through lsscsi–sgt. First, get the number of unique SAS addresses through sort|uniq|wc–l command, and then compare the number with the expected number of SAS addresses. Here, the number of unique SAS addresses is 10, and the expected SAS address is 10 OSES devices. The verification passes.

[0159] Query the SAS address access identifier library on the diagnostic server to ensure that there are no duplicates in the 10 SAS addresses. Continue after the query confirms that there are no duplicates.

[0160] After that, use the sg_ses–r–p command to obtain the SAS addresses of all OSES firmware of the storage server, a total of 10, which are the OSES firmware SAS addresses of 2 mainboards and 8 trays, respectively. Write the SAS addresses into the 5th column of the system firmware device matrix A, query the obtained SAS address sequence, and correspond to the firmware device name in the 1st column of matrix A. Use the sg_ses–p7 command to query the version of each OSES firmware and write it into the 6th column of matrix A.

[0161] Then, using the SAS address in the fifth column of matrix A as the keyword, query the device flag corresponding to the oses device and write it into the seventh column of matrix A. For example, the query command for EIN1 is lsscsi–sgt|grep SAS1, and the device flag of EIN1 is sg2.

[0162] Finally, start the upgrade operation.

[0163] Specifically, 1) after querying the device flags of all oses devices, 10 oses upgrade processes are started in parallel. Multiple upgrade threads can be started through python or shell. The command in each upgrade process is sg_write_buffer fw file sg flag, where the fw file and sg flag can query matrix A through the SAS address of the oses device to obtain the data in the 3rd and 7th columns.

[0164] 2) After the first stage of the upgrade is completed, each oses device will restart. After the restart, the device flags of each oses device will change, such as the EIN1 device flag changes to sg5. Use the lsscsi-sgt|grep SAS command to obtain the latest device flags of the 10 oses devices respectively, and overwrite the 7th column of matrix A.

[0165] 3) Same as step 1), start 10 upgrade threads, obtain the required upgrade files and device flags through SAS address query matrix A, and execute the upgrade command after obtaining them until the upgrade is completed.

[0166] 4) After the upgrade is completed, query the latest version of each oses firmware through the command sg_ses-p7 and overwrite the 6th column of matrix A.

[0167] (5) After all firmware devices complete the OSES firmware upgrade, obtain the second and sixth columns in matrix A and compare the firmware versions of the same row in the two columns. If they are consistent, it means that all OSES devices have been successfully upgraded. Otherwise, the corresponding OSES devices need to be checked and the OSES upgrade must be performed again after the problem is eliminated.

[0168] The operation process of the above specific example can be found in Figure 5 As shown, no further description is given here.

[0169] In this embodiment, a firmware upgrade device 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 conceivable.

[0170] This embodiment provides a firmware upgrade device, such as Figure 6 As shown, it includes: an acquisition module 601, an extraction module 602, a processing module 603, a generation module 604, and an upgrade module 605.

[0171] The acquisition module 601 is used to acquire server information and firmware type;

[0172] Extraction module 602, used to extract the firmware device name, the firmware version and the firmware file name corresponding to the firmware device to be upgraded from the diagnostic server according to the server information and the firmware type;

[0173] The processing module 603 is used to obtain the firmware file to be upgraded and the firmware upgrade tool corresponding to the firmware file to be upgraded according to the name of the firmware file to be upgraded; and obtain the address access identifier corresponding to each firmware device to be upgraded according to the firmware device name corresponding to each firmware device to be upgraded;

[0174] A generating module 604, configured to sequentially generate and save a device flag corresponding to each firmware device to be upgraded in each upgrade phase according to the address access identifier corresponding to each firmware device to be upgraded;

[0175] The upgrade module 605 is used to use the firmware upgrade tool in the current upgrade stage to complete the firmware upgrade operation corresponding to each firmware device to be upgraded in the current upgrade stage according to the firmware device name corresponding to each firmware device to be upgraded, the device flag generated in the current upgrade stage, and the firmware file to be upgraded.

[0176] In an optional example, the acquisition module 601 is further used to extract a first verification code corresponding to the firmware to be upgraded and a second verification code corresponding to the firmware upgrade tool from the diagnostic server;

[0177] The processing module 603 is further used to obtain a third verification code corresponding to the firmware to be upgraded and a fourth verification code corresponding to the firmware upgrade tool respectively through a pre-configured verification code acquisition instruction; when the first verification code and the third verification code are the same, and the second verification code and the fourth verification code are the same, according to the firmware device name corresponding to each firmware device to be upgraded, obtain an address access identifier corresponding to each firmware device to be upgraded;

[0178] or,

[0179] When the first check code and the third check code are different, and / or when the second check code and the fourth check code are different, the operation is stopped.

[0180] In an optional example, the processing module 603 is further configured to:

[0181] Identify whether every two address access identifiers are the same;

[0182] When it is determined that every two address access identifiers are different, obtaining the number of address access identifiers;

[0183] When it is determined that the number of the address access identifiers is the same as the number of the firmware devices to be upgraded, determining that the verification of the address access identifiers passes;

[0184] Alternatively, when it is determined that the number of address access identifiers is different from the number of firmware devices to be upgraded, it is determined that the verification of the address access identifiers has failed, and the operation is stopped.

[0185] In an optional example, the acquisition module 601 is further configured to acquire a current firmware version corresponding to a first firmware device in a first upgrade phase, wherein the first firmware device is any firmware device among the firmware devices to be upgraded;

[0186] The generation module 604 is further used to generate a system firmware device matrix according to the current firmware version, the firmware device name corresponding to the first firmware device, the first firmware version to be upgraded corresponding to the first firmware device, the name of the firmware file to be upgraded corresponding to the first firmware version to be upgraded, the first verification code corresponding to the first firmware to be upgraded, the address access code corresponding to the first firmware device, and the device flag corresponding to the first firmware device generated in the first upgrade phase.

[0187] In an optional example, the apparatus further includes: an updating module 606;

[0188] The updating module 606 is used to update the device flags corresponding to the first firmware device generated in each upgrading stage in sequence into the system firmware device matrix when the device flag corresponding to the first firmware device changes in any subsequent upgrading stage.

[0189] In an optional example, the address access identifier is a unique identifier for identifying and accessing a Serial Attached Small Computer System Interface device.

[0190] In an optional example, the acquisition module 601 is further used to acquire the latest firmware version corresponding to the first firmware device;

[0191] The updating module 606 is further used to update the latest firmware version corresponding to the first firmware device into the system firmware device matrix;

[0192] The processing module 603 is also used to extract the firmware version to be upgraded in the system firmware device;

[0193] When it is confirmed that the latest firmware version is the same as the firmware version to be upgraded, it is determined that the upgrade of the first firmware device is successful;

[0194] Alternatively, when it is confirmed that the latest firmware version is different from the firmware version to be upgraded, it is determined that the upgrade of the first firmware device has failed.

[0195] The firmware upgrade device in this embodiment is presented in the form of a functional module, where the module refers to an application specific integrated circuit (ASIC), a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0196] 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.

[0197] A firmware upgrade device provided by an embodiment of the present invention obtains server information and firmware type, and extracts relevant information of a firmware device to be upgraded from a diagnostic server according to the server information and firmware type, including a firmware device name, a firmware version to be upgraded, and a firmware file name to be upgraded. Then, according to the firmware file name to be upgraded, the firmware file to be upgraded and the corresponding firmware upgrade tool are obtained. According to the firmware device name of each firmware device to be upgraded, the corresponding address access identifier is obtained. In each upgrade stage, a device flag is generated and saved according to the address access identifier. And in the current upgrade stage, the firmware upgrade operation of each firmware device to be upgraded is completed using the firmware upgrade tool and the device flag. Through the above steps, the automatic upgrade of the server firmware can be realized, the upgrade efficiency and accuracy can be improved, and the errors and risks of manual operation can be reduced. At the same time, by generating the device flag and operating at different upgrade stages, the orderly progress of the upgrade process can be ensured, and each firmware device can be independently upgraded. Improve the accuracy and reliability of the upgrade. Furthermore, the device flag is generated and saved at each upgrade stage according to the address access identifier, which can avoid the problem of irregular flag changes caused by the restart of the firmware device. As a result, each firmware device can be accurately identified and operated during the upgrade process, reducing the risk of upgrade interruption or failure. By solving the problem of upgrade interruption or failure, and improving the stability and accuracy of the upgrade, it is possible to reduce failures and errors in the production diagnosis process and improve production efficiency. At the same time, upgrading multiple firmware devices in parallel can also improve upgrade efficiency, thereby improving the quality and efficiency of server shipments.

[0198] The embodiment of the present invention also provides a computer device having the above Figure 6 The firmware upgrade device shown.

[0199] See also Figure 7 , Figure 7 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 7 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 7 A processor 10 is taken as an example.

[0200] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include an integrated circuit. The integrated circuit 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.

[0201] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.

[0202] 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 by the use of a computer device based on the presentation of a small program landing page, 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.

[0203] 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.

[0204] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 7 The example of connecting through bus is taken in the following.

[0205] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.

[0206] The embodiment of the present invention also provides a computer-readable storage medium. The method provided in the above embodiment of the present invention can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or is 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 and downloaded through a network, 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.

[0207] A part of the present invention 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 invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the 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 may be any available computer-readable storage medium or communication medium accessible to the computer.

[0208] 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 firmware upgrade method, characterized in that: The method comprises: Get server information and firmware type; Extracting, from the diagnostic server, a firmware device name, a firmware version, and a firmware file name corresponding to the firmware device to be upgraded according to the server information and the firmware type; According to the name of the firmware file to be upgraded, obtain the firmware file to be upgraded and the firmware upgrade tool corresponding to the firmware file to be upgraded; According to the firmware device name corresponding to each of the firmware devices to be upgraded, acquiring the address access identifier corresponding to each of the firmware devices to be upgraded; According to the address access identifier corresponding to each of the firmware devices to be upgraded, a device flag corresponding to each of the firmware devices to be upgraded is sequentially generated and saved in each upgrade stage; In the current upgrade stage, the firmware upgrade tool is used to complete the firmware upgrade operation corresponding to each firmware device to be upgraded in the current upgrade stage according to the firmware device name corresponding to each firmware device to be upgraded, the device flag generated in the current upgrade stage, and the firmware file to be upgraded.

2. The method according to claim 1, characterized in that Before acquiring the address access identifier corresponding to each firmware device to be upgraded according to the firmware device name corresponding to each firmware device to be upgraded, the method further includes: Extracting a first verification code corresponding to the firmware to be upgraded and a second verification code corresponding to the firmware upgrade tool from the diagnostic server; Acquire a third verification code corresponding to the firmware to be upgraded and a fourth verification code corresponding to the firmware upgrade tool respectively through a pre-configured verification code acquisition instruction; When the first verification code is the same as the third verification code, and the second verification code is the same as the fourth verification code, acquiring an address access identifier corresponding to each firmware device to be upgraded according to a firmware device name corresponding to each firmware device to be upgraded; or, When the first check code and the third check code are different, and / or when the second check code and the fourth check code are different, the operation is stopped.

3. The method according to claim 1 or 2, characterized in that: After acquiring the address access identifier corresponding to each firmware device to be upgraded according to the firmware device name corresponding to each firmware device to be upgraded, the method further includes: Sorting the acquired address access identifiers to obtain a sorted first address access identifier set; Performing a deduplication operation on the address access identifier set to obtain a second address access identifier set; Counting the number of the address access identifiers in the second address access identifier set; When it is determined that the number of the address access identifiers is the same as the number of the firmware devices to be upgraded, determining that a check of the address access identifiers in the second address access identifier set passes; Comparing each address access identifier in the second address access identifier set with the address access identifiers in the pre-built address access identifier library; When it is determined that each address access identifier in the second address access identifier set does not match the address access identifier in the pre-built address access identifier library, determining that the secondary verification of the address access identifiers in the second address access identifier set passes, wherein the address access identifiers in the second address access identifier set after the secondary verification passes will be used to perform the firmware upgrade operation; or, When it is determined that the number of the address access identifiers is different from the number of the firmware devices to be upgraded, and / or when it is determined that one or more address access identifiers in the second address access identifier set match the address access identifiers in the pre-built address access identifier library, it is determined that the verification of the address access identifiers has failed and the operation is stopped.

4. The method according to claim 3, characterized in that The method further comprises: In a first upgrade phase, a current firmware version corresponding to a first firmware device is obtained, wherein the first firmware device is any one of the firmware devices to be upgraded; A system firmware device matrix is ​​generated according to the current firmware version, the firmware device name corresponding to the first firmware device, the first firmware version to be upgraded corresponding to the first firmware device, the name of the firmware file to be upgraded corresponding to the first firmware version to be upgraded, the first verification code corresponding to the first firmware to be upgraded, the address access code corresponding to the first firmware device, and the device flag corresponding to the first firmware device generated in the first upgrade phase.

5. The method according to claim 4, characterized in that After generating a system firmware device matrix according to the current firmware version, the firmware device name corresponding to the first firmware device, the first firmware version to be upgraded corresponding to the first firmware device, the firmware file name to be upgraded corresponding to the first firmware version to be upgraded, the first verification code corresponding to the first firmware to be upgraded, the address access code corresponding to the first firmware device, and the device flag corresponding to the first firmware device generated in the first upgrade phase, the method further includes: When the device flag corresponding to the first firmware device changes in any subsequent upgrade stage, the device flag corresponding to the first firmware device generated in each upgrade stage is updated to the system firmware device matrix.

6. The method according to claim 4, characterized in that The address access identifier is a unique identifier used to identify and access a Serial Attached Small Computer System Interface device.

7. The method according to claim 4, characterized in that After completing the firmware upgrade operation corresponding to each of the firmware devices to be upgraded in the current upgrade phase using the firmware upgrade tool according to the firmware device name corresponding to each of the firmware devices to be upgraded, the device flag generated in the current upgrade phase, and the firmware file to be upgraded, the method further includes: Obtaining the latest firmware version corresponding to the first firmware device, and updating it to the system firmware device matrix; Extracting the firmware version to be upgraded in the system firmware device; When it is confirmed that the latest firmware version is the same as the firmware version to be upgraded, determining that the upgrade of the first firmware device is successful; or, When it is confirmed that the latest firmware version is different from the firmware version to be upgraded, it is determined that the upgrade of the first firmware device fails.

8. A firmware upgrade device, characterized in that: The device comprises: The acquisition module is used to obtain server information and firmware type; An extraction module, used to extract the firmware device name, the firmware version to be upgraded, and the firmware file name to be upgraded corresponding to the firmware device to be upgraded from the diagnostic server according to the server information and the firmware type; A processing module, configured to obtain, according to the name of the firmware file to be upgraded, the firmware file to be upgraded and the firmware upgrade tool corresponding to the firmware file to be upgraded; and to obtain, according to the firmware device name corresponding to each of the firmware devices to be upgraded, the address access identifier corresponding to each of the firmware devices to be upgraded; A generating module, configured to sequentially generate and save a device flag corresponding to each firmware device to be upgraded in each upgrade stage according to an address access identifier corresponding to each firmware device to be upgraded; The upgrade module is used to use the firmware upgrade tool in the current upgrade stage to complete the firmware upgrade operation corresponding to each firmware device to be upgraded in the current upgrade stage according to the firmware device name corresponding to each firmware device to be upgraded, the device flag generated in the current upgrade stage, and the firmware file to be upgraded.

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 upgrade method 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 upgrade method according to any one of claims 1 to 7.