A firmware upgrade method and device

By obtaining and flashing the firmware upgrade file until all firmware updates are completed and then restarting, the problem of frequent restarts in firmware upgrades is solved, the efficiency of firmware upgrades is improved and confusion of repeated upgrades is avoided.

CN113050968BActive Publication Date: 2024-09-17LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110337215.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-29
Publication Date
2024-09-17
Estimated Expiration
2041-03-29

AI Technical Summary

Technical Problem

In the existing technology, firmware upgrade requires frequent restarts, which affects the upgrade efficiency. Especially when upgrading multiple firmwares in batches, the number of restart operations is large, which affects the efficiency.

Method used

Obtain the identification of the firmware to be updated, obtain and flash the corresponding upgrade file, and complete the upgrade with a single restart after all firmware updates are completed to avoid repeated restarts.

Benefits of technology

It achieves a one-time restart to complete the upgrade after all firmware updates are completed, reducing the number of restart operations, improving the efficiency of firmware upgrades, and avoiding repeated upgrades and confusion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113050968B
    Figure CN113050968B
Patent Text Reader

Abstract

The present application discloses a firmware upgrade method and device, the method comprising: obtaining an identifier of at least one firmware to be updated stored in a preset form; obtaining upgrade files corresponding to all firmware to be updated according to the identifier of the firmware to be updated; flashing the upgrade files corresponding to the firmware to be updated into the corresponding firmware to be updated respectively through a basic input and output system, so as to update the firmware to be updated according to the upgrade files; and when it is determined that all firmware to be updated have been updated, executing a device restart operation through the basic input and output system to complete the upgrade of the firmware to be updated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the computer field, and in particular to a firmware upgrade method and device. Background Art

[0002] Firmware is software used to control hardware devices. It is written into hardware such as BIOS (Basic Input Output System), ME (Intel Management Engine), EC (embedded controller), etc., and is responsible for the most basic and lowest level of work in a system. In hardware devices, firmware is the soul of the hardware device. In some hardware devices, there is no other software except firmware.

[0003] In the prior art, when upgrading the firmware, each time a firmware is successfully updated, the device needs to be restarted once to complete the firmware upgrade. Therefore, if multiple firmwares are upgraded in batches, multiple restart operations are required, which affects the upgrade efficiency. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a firmware upgrade method and device.

[0005] The embodiment of the present application adopts the following technical solution: a firmware upgrade method, comprising:

[0006] Obtaining an identifier of at least one firmware to be updated stored in a preset form;

[0007] Obtaining all upgrade files corresponding to the firmware to be updated according to the identifier of the firmware to be updated;

[0008] Flashing the upgrade files corresponding to the firmware to be updated into the corresponding firmware to be updated respectively through the basic input and output system, so as to update the firmware to be updated according to the upgrade files;

[0009] When it is determined that all the firmware to be updated have been updated, a device restart operation is performed through the basic input and output system to complete the upgrade of the firmware to be updated.

[0010] The beneficial effects of the present application are: the identifiers of multiple firmware to be updated stored in a preset form can be obtained, and then the upgrade files corresponding to all the firmware to be updated can be obtained according to the identifiers of the firmware to be updated; the upgrade files corresponding to the firmware to be updated are respectively flashed into the corresponding firmware to be updated through the basic input and output system to update the firmware to be updated according to the upgrade files; when it is determined that all the firmware to be updated have been updated, the basic input and output system is used to perform a device restart operation to complete the upgrade operation of the firmware to be updated. By adopting the solution provided by the present application, the restart operation can be performed only when all the firmware to be updated have been updated. Therefore, only one restart operation is needed to batch upgrade multiple firmwares, which reduces the number of execution times of the restart operation and improves the firmware upgrade efficiency.

[0011] In one embodiment, after acquiring all upgrade files corresponding to the firmware to be updated according to the identifier of the firmware to be updated, the method further includes:

[0012] Constructing a data structure that is composed of a plurality of upgrade files corresponding to the firmware to be updated and can be recognized by a basic input and output system;

[0013] The step of flashing the upgrade files corresponding to the firmware to be updated into the corresponding firmware to be updated respectively through the basic input and output system includes:

[0014] identifying the upgrade file in the data structure through a basic input and output system;

[0015] The corresponding upgrade file is flashed into the corresponding firmware to be updated through the basic input and output system according to the device specifications of different firmware to be updated.

[0016] In one embodiment, the method further comprises:

[0017] Receive the firmware upgrade file sent by the server;

[0018] Determine the identifier of the firmware to be updated according to the firmware upgrade file;

[0019] The identification of the firmware to be updated is stored in a preset form.

[0020] In one embodiment, the method further comprises:

[0021] Store the firmware upgrade file to the preset location;

[0022] The step of obtaining, according to the identifier of the firmware to be updated, upgrade files corresponding to all the firmware to be updated includes:

[0023] Obtain all firmware upgrade files at the preset location;

[0024] Selecting an upgrade file corresponding to the identifier of the firmware to be updated from all the upgrade files in the preset location;

[0025] Determine that the selected upgrade file corresponding to the identifier of the firmware to be updated is the upgrade file corresponding to the firmware to be updated.

[0026] In one embodiment, after selecting the upgrade file corresponding to the identifier of the firmware to be updated from all the upgrade files in the preset location, the method further includes:

[0027] Deleting the upgrade file corresponding to the identifier of the firmware to be updated and stored in the preset location;

[0028] or

[0029] Delete all upgrade files in the preset location.

[0030] The beneficial effect of this embodiment is that after selecting the upgrade file corresponding to the identifier of the firmware to be updated from all the upgrade files in the preset location, the upgrade file corresponding to the identifier of the firmware to be updated stored in the preset location is deleted, or all the upgrade files in the preset location are deleted, thereby avoiding confusion between the upgrade file received by the subsequent operating system and the upgrade file that has been used, and avoiding repeated upgrades of the firmware.

[0031] In one embodiment, the method further comprises:

[0032] When it is detected that a firmware update is completed, determining whether there is any firmware that has not been updated;

[0033] If there are firmwares that have not been completely updated, continue to monitor the update status of the remaining firmwares until all firmware updates are completed.

[0034] In one embodiment, after obtaining the identification of at least one firmware to be updated stored in the preset form, the method further includes:

[0035] The identifier of the firmware to be updated stored in the preset form is deleted.

[0036] The beneficial effect of this embodiment is that after obtaining the identifier of at least one firmware to be updated stored in the preset form, by deleting the identifier of the firmware to be updated stored in the preset form, confusion with a new upgrade file received subsequently is avoided, thereby avoiding repeated upgrades.

[0037] The present application also provides a firmware upgrade device, comprising:

[0038] A first acquisition module, used to acquire an identifier of at least one firmware to be updated stored in a preset form;

[0039] A second acquisition module, used to acquire the upgrade files corresponding to all the firmware to be updated according to the identifier of the firmware to be updated;

[0040] A flashing module, used for flashing the upgrade files corresponding to the firmware to be updated into the corresponding firmware to be updated respectively through the basic input and output system, so as to update the firmware to be updated according to the upgrade files;

[0041] The execution module is used to execute a device restart operation through a basic input and output system to complete the upgrade of the firmware to be updated when it is determined that all the firmware to be updated has been updated.

[0042] In one embodiment, the apparatus further comprises:

[0043] A construction module, configured to construct a data structure that can be recognized by a basic input and output system and is composed of a plurality of upgrade files corresponding to the firmware to be updated, after acquiring all upgrade files corresponding to the firmware to be updated according to the identifier of the firmware to be updated;

[0044] The flashing module includes:

[0045] An identification submodule, used for identifying the upgrade file in the data structure through a basic input and output system;

[0046] The flashing submodule is used to flash the corresponding upgrade file into the corresponding firmware to be updated according to the device specifications of different firmware to be updated through the basic input and output system.

[0047] In one embodiment, the apparatus further comprises:

[0048] A receiving module, used for receiving the firmware upgrade file sent by the server;

[0049] A determination module, used to determine the identifier of the firmware to be updated according to the firmware upgrade file;

[0050] The storage module is used to store the identifier of the firmware to be updated in a preset form.

[0051] In one embodiment, the apparatus further comprises:

[0052] The storage module is also used to store the firmware upgrade file in a preset location;

[0053] The second acquisition module includes:

[0054] An acquisition submodule, used to acquire all firmware upgrade files at the preset location;

[0055] A selection submodule, used to select an upgrade file corresponding to the identifier of the firmware to be updated from all the upgrade files in the preset location;

[0056] The determination submodule is used to determine that the selected upgrade file corresponding to the identifier of the firmware to be updated is the upgrade file corresponding to the firmware to be updated.

[0057] In one embodiment, the apparatus further comprises:

[0058] a deleting module, configured to delete the upgrade file corresponding to the identifier of the firmware to be updated stored in the preset location after selecting the upgrade file corresponding to the identifier of the firmware to be updated from all the upgrade files in the preset location;

[0059] The deletion module is also used to delete all upgrade files in the preset location.

[0060] In one embodiment, the apparatus further comprises:

[0061] A determination module, for determining whether there is any firmware that has not been updated when a firmware update is detected to be completed;

[0062] The monitoring module is used to continue monitoring the update status of the remaining firmware in the case where there is firmware that has not been updated until all firmware updates are completed.

[0063] In one embodiment, the deleting module is further configured to, after acquiring at least one identifier of the firmware to be updated stored in the preset form, delete the identifier of the firmware to be updated stored in the preset form. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] Figure 1 This is a flowchart of a firmware upgrade method in one embodiment of the present application;

[0065] Figure 2 The flowchart of the firmware upgrade in the prior art is shown in one embodiment of the present application.

[0066] Figure 3 This is a flowchart of a firmware upgrade method in another embodiment of the present application;

[0067] Figure 4 This is a flow chart of simultaneously upgrading multiple different firmwares in one embodiment of the present application;

[0068] Figure 5 This is a flowchart of a firmware upgrade method in another embodiment of the present application;

[0069] Figure 6 A block diagram of a firmware upgrade device according to an embodiment of the present application. DETAILED DESCRIPTION

[0070] Various aspects and features of the present application are described herein with reference to the accompanying drawings.

[0071] It should be understood that various modifications may be made to the embodiments of the present application. Therefore, the above description should not be considered as limiting, but only as an example of an embodiment. Other modifications within the scope and spirit of the present application will occur to those skilled in the art.

[0072] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.

[0073] These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.

[0074] It should also be understood that although the present application has been described with reference to some specific examples, those skilled in the art will be able to readily implement many other equivalent forms of the present application.

[0075] The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.

[0076] Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments applied for are merely examples of the present application, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that obscure the present application. Therefore, the specific structural and functional details applied for herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present application in a variety of ways with substantially any suitable detailed structure.

[0077] This specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present application.

[0078] Figure 1 This is a flowchart of a firmware upgrade method according to an embodiment of the present application. The firmware upgrade method includes the following steps S11-S14:

[0079] In step S11, an identifier of at least one firmware to be updated stored in a preset form is obtained;

[0080] In step S12, all upgrade files corresponding to the firmware to be updated are obtained according to the identifier of the firmware to be updated;

[0081] In step S13, the upgrade files corresponding to the firmware to be updated are respectively flashed into the corresponding firmware to be updated through the basic input and output system, so as to update the firmware to be updated according to the upgrade files;

[0082] In step S14, when it is determined that all the firmware to be updated have been updated, a device restart operation is performed through the basic input and output system to complete the upgrade of the firmware to be updated.

[0083] Firmware refers to software used to control hardware devices. For example, it can be a driver for a hardware device. Firmware can not only control the hardware device, but also establish a connection between the operating system and the hardware device. The hardware device can refer to BIOS, ME, EC and other hardware. Figure 2 It is a flowchart of firmware upgrade in the prior art, from Figure 2 It can be seen that in the prior art, the operating system downloads and installs the firmware, and then restarts the system. During the restart process, the system's startup file finds a firmware upgrade package, then the system's startup file finds the firmware and verifies the firmware file, the device triggers the firmware upgrade, the system's startup file finds that the upgrade is successful, and then restarts the system again to complete the firmware upgrade.

[0084] It can be seen that in the prior art, a restart operation is required each time a firmware is downloaded and installed, while in the present application, after receiving the firmware upgrade file, the system stores the upgrade file in a specified location, and puts the identifier of the firmware to be updated in a preset form. When updating the firmware, at least one identifier of the firmware to be updated stored in the preset form is obtained; after obtaining the identifier, the identifier of the firmware to be updated stored in the preset form needs to be deleted to avoid confusion with the subsequently received upgrade file, resulting in repeated upgrades.

[0085] According to the identification of the firmware to be updated, all the upgrade files corresponding to the firmware to be updated are obtained; at this time, a data structure that can be recognized by the basic input and output system can be constructed through all the acquired upgrade files. The basic input and output system is used to boot the operating system and can also perform the firmware upgrade operation. When the operating system is booted, it is actually executed by Figure 2 The system startup file mentioned in is used to start the operating system.

[0086] The upgrade files corresponding to the firmware to be updated are flashed into the corresponding firmware to be updated through the basic input and output system, so as to update the firmware to be updated according to the upgrade files; specifically, the upgrade files in the data structure are identified through the basic input and output system, and the corresponding upgrade files are flashed into the corresponding firmware to be updated through the basic input and output system according to the device specifications of different firmware to be updated.

[0087] For example, the firmware identifiers obtained are the BIOS firmware identifier, the camera firmware identifier, and the hard disk firmware identifier. Then, when flashing, the BIOS upgrade file is flashed into the firmware corresponding to the BIOS according to the device specification of the BIOS, the camera upgrade file is flashed into the firmware corresponding to the camera device according to the device specification of the camera firmware, and the hard disk upgrade file is flashed into the firmware corresponding to the hard disk. After flashing, the firmware will update itself based on the flashed upgrade file. When it is detected that a firmware update is completed, determine whether there is any firmware that has not been updated; if there is any firmware that has not been updated, continue to monitor the update status of the remaining firmware until all firmware updates are completed. When it is determined that all firmware to be updated has been updated, perform a device restart operation through the basic input and output system to complete the upgrade of the firmware to be updated.

[0088] It should be noted that this application is used to solve the problem of frequent restarts during the firmware update process. Therefore, a threshold can be set. Before executing the above step S11, the preset form can be polled. The above step S11 is executed only when the number of identifiers of the firmware to be updated stored in the preset form reaches or exceeds the threshold. The following Table 1 is an example of a preset form, in which the specific description language is not shown in Table 1 because the description language in the preset form is not the research target of this application.

[0089] Table 1

[0090] name length Location describe Firmware quantity 4 0 Firmware Table Version 4 4 Firmware Table Target Firmware 1 Identification 32 12 Firmware version 4 44 Firmware address 32 48 Firmware Upgrade Tool 32 80 ... Firmware 1 Identification 32 12 Firmware version 4 44 Firmware address 32 48 Firmware Upgrade Tool 32 80

[0091] The beneficial effects of the present application are: the identifiers of multiple firmware to be updated stored in a preset form can be obtained, and then the upgrade files corresponding to all the firmware to be updated can be obtained according to the identifiers of the firmware to be updated; the upgrade files corresponding to the firmware to be updated are respectively flashed into the corresponding firmware to be updated through the basic input and output system to update the firmware to be updated according to the upgrade files; when it is determined that all the firmware to be updated have been updated, the basic input and output system is used to perform a device restart operation to complete the upgrade operation of the firmware to be updated. By adopting the solution provided by the present application, the restart operation can be performed only when all the firmware to be updated have been updated. Therefore, only one restart operation is needed to batch upgrade multiple firmwares, which reduces the number of execution times of the restart operation and improves the firmware upgrade efficiency.

[0092] In one embodiment, Figure 3 As shown, after obtaining all upgrade files corresponding to the firmware to be updated according to the identifier of the firmware to be updated, the method further includes the following steps S31:

[0093] In step S31, a data structure that can be recognized by a basic input and output system is constructed, which is composed of a plurality of upgrade files corresponding to the firmware to be updated;

[0094] The above step S13 can be implemented as the following steps S32-S33:

[0095] In step S32, the upgrade file in the data structure is identified by the basic input and output system;

[0096] In step S33, the corresponding upgrade file is flashed into the corresponding firmware to be updated through the basic input and output system according to the device specifications of different firmware to be updated.

[0097] In this embodiment, a data structure that can be recognized by the basic input and output system is constructed, which is composed of multiple upgrade files corresponding to the firmware to be updated. The specific data structure is as follows: Figure 3 As shown, Figure 3 It contains three levels of content. The first level is completed by the operating system, which constructs a data structure consisting of a directory table, installation files and certificate files. This data structure is a data structure that can be recognized by the basic input and output system. It should be noted that when reading, the basic input and output system only reads the firmware identifier in the directory table, and the installation files and certificate files are set to meet the specifications of the operating system. The second level is executed by the system startup file. Specifically, the system startup file is executed by the basic input and output system, and the system startup file calls the update program. The third level is executed by the basic input and output system. Specifically, the basic input and output system identifies the upgrade file in the data structure and flashes the corresponding upgrade file into the corresponding firmware to be updated according to the device specifications of different firmware to be updated. Figure 4 In the example, the upgrade of BIOS firmware, camera firmware and hard disk firmware is taken as an example. Specifically, the firmware identifiers obtained are the BIOS firmware identifier, the camera firmware identifier and the hard disk firmware identifier. Then, when flashing, the BIOS upgrade file is flashed into the firmware corresponding to the BIOS according to the BIOS device specification, the camera upgrade file is flashed into the firmware corresponding to the camera device according to the camera firmware device specification, and the hard disk upgrade file is flashed into the firmware corresponding to the hard disk.

[0098] In one embodiment, the method can also be implemented as the following steps S51-S53:

[0099] In step S51, receiving a firmware upgrade file sent by a server;

[0100] In step S52, the identifier of the firmware to be updated is determined according to the firmware upgrade file;

[0101] In step S53, the identifier of the firmware to be updated is stored in a preset table.

[0102] The operating system is provided with different types of hardware, and the hardware provider will update the firmware of the hardware to improve the hardware function. Therefore, in this embodiment, the operating system can receive the firmware upgrade file sent by the server, and the server can be the server corresponding to each hardware provider. The identifier of the firmware to be updated is determined according to the firmware upgrade file; the identifier of the firmware to be updated is stored in a preset form. When the hardware is updated later, which firmware needs to be updated can be known by obtaining the identifier of the firmware to be updated in the preset form.

[0103] In one embodiment, the method can also be implemented as the following steps A1:

[0104] In step A1, the firmware upgrade file is stored in a preset location;

[0105] The above step S12 can be implemented as the following steps A2-A4:

[0106] In step A2, all firmware upgrade files in a preset location are obtained;

[0107] In step A3, an upgrade file corresponding to the identifier of the firmware to be updated is selected from all upgrade files in the preset location;

[0108] In step A4, it is determined that the selected upgrade file corresponding to the identifier of the firmware to be updated is the upgrade file corresponding to the firmware to be updated.

[0109] In this embodiment, after the operating system receives the upgrade file sent by the hardware provider server, the upgrade file will be stored in a preset location. At the same time, the identifier of the firmware to be updated corresponding to the upgrade file will be placed in a preset form. Therefore, when the upgrade is performed later, the identifier of the firmware to be updated is obtained from the preset form, and then the upgrade file corresponding to the identifier of the firmware to be updated is selected from the preset location according to the identifier of the firmware to be updated, and it is determined that the selected upgrade file corresponding to the identifier of the firmware to be updated is the upgrade file corresponding to the firmware to be updated.

[0110] In one embodiment, after the above step A3, the method may also be implemented as the following steps B1 or B2:

[0111] In step B1, the upgrade file corresponding to the identifier of the firmware to be updated and stored in the preset location is deleted;

[0112] In step B2, all upgrade files in the preset location are deleted.

[0113] Taking into account that the preset location will subsequently store newly received firmware upgrade files, in this embodiment, after selecting the upgrade file corresponding to the identifier of the firmware to be updated from all upgrade files at the preset location, the upgrade file corresponding to the identifier of the firmware to be updated stored in the preset location is deleted, or all upgrade files at the preset location are deleted.

[0114] The beneficial effect of this embodiment is that after selecting the upgrade file corresponding to the identifier of the firmware to be updated from all the upgrade files in the preset location, the upgrade file corresponding to the identifier of the firmware to be updated stored in the preset location is deleted, or all the upgrade files in the preset location are deleted, thereby avoiding confusion between the upgrade file received by the subsequent operating system and the upgrade file that has been used, and avoiding repeated upgrades of the firmware.

[0115] In one embodiment, the method can also be implemented as the following steps C1-C2:

[0116] In step C1, when it is detected that a firmware update is completed, it is determined whether there is any firmware that has not been updated;

[0117] In step C2, if there is firmware that has not been updated, the update status of the remaining firmware continues to be monitored until all firmware updates are completed.

[0118] Many firmwares need to be restarted after upgrading, because only by restarting the device can the old firmware be disabled and the new firmware be enabled. Therefore, usually, the device will be restarted after the firmware is upgraded. This application is used to solve the problem of frequent restarts during firmware batch upgrades. Therefore, in this application, when it is detected that a firmware update is completed, it will not be restarted directly, but it will be determined whether there is any firmware that has not been updated. If so, it will continue to detect the update status of the remaining firmware until all firmware updates are completed, so that only one restart is required to complete the upgrade of all firmware.

[0119] In one embodiment, after the above step S11, the method may also be implemented as the following steps:

[0120] Delete the ID of the firmware to be updated stored in the preset table.

[0121] Considering that the operating system will subsequently receive upgrade files sent by the hardware provider's server, the preset form will subsequently store the newly received firmware upgrade files. Therefore, in this embodiment, after obtaining the identifier of at least one firmware to be updated stored in the preset form, it is necessary to delete the identifier of the firmware to be updated stored in the preset form to avoid confusion with the subsequently received upgrade files, resulting in repeated upgrades.

[0122] The triggering conditions of S11 can be considered based on the following aspects:

[0123] First, before executing the above step S11, poll the preset form to determine whether the number of identifiers of the firmware to be updated stored in the preset form reaches the preset number. When the number of identifiers of the firmware to be updated stored in the preset form reaches the preset number, execute the above step S11, thereby ensuring that the number of firmware updated each time reaches a certain number to achieve batch update.

[0124] Secondly, considering that the firmware update timing of each hardware provider is not fixed, therefore, if you must wait until the number of identifiers of the firmware to be updated stored in the preset form reaches the preset number before executing step S11, it may take a long time to wait. Therefore, based on the above scheme, a time threshold can also be set. If the time interval between the current time and the last upgrade of the firmware to be updated has reached the preset time, regardless of whether the number of identifiers of the firmware to be updated stored in the preset form reaches the preset number, the above step S11 is still executed.

[0125] At the same time, some hardware providers may only update the firmware to add some new functions, while sometimes it may be to fix some high-risk vulnerabilities. In view of this, in the process of rotating the preset form, you can check the corresponding upgrade file in the preset location according to the identification information in the preset form, analyze the upgrade file, determine the type of the upgrade file, and determine the priority of the upgrade file according to the type of the upgrade file. For example, if it is an upgrade file that fixes a high-risk vulnerability, it will be given a higher priority, and if it is an upgrade file that adds new functions, it will be given a lower priority.

[0126] In addition, some hardware is relatively important hardware. After receiving the upgrade file sent by the server, it should be upgraded as soon as possible and recorded locally in advance. Therefore, when training the preset form in rotation, the type of firmware to be updated can be determined based on the identifier of the firmware to be updated in the preset form trained. When the firmware to be updated is the identifier of the hardware recorded locally in advance, the above step S11 is executed.

[0127] Figure 6 This is a block diagram of a firmware upgrade device according to an embodiment of the present application, and the firmware upgrade device includes the following modules:

[0128] A first acquisition module 61 is used to acquire an identifier of at least one firmware to be updated stored in a preset form;

[0129] A second acquisition module 62, configured to acquire all upgrade files corresponding to the firmware to be updated according to the identifier of the firmware to be updated;

[0130] The flashing module 63 is used to flash the upgrade files corresponding to the firmware to be updated into the corresponding firmware to be updated through the basic input and output system, so as to update the firmware to be updated according to the upgrade files;

[0131] The execution module 64 is used to execute a device restart operation through the basic input and output system to complete the upgrade of the firmware to be updated when it is determined that all the firmware to be updated has been updated.

[0132] In one embodiment, the apparatus further comprises:

[0133] A construction module, configured to construct a data structure that can be recognized by a basic input and output system and is composed of a plurality of upgrade files corresponding to the firmware to be updated, after acquiring all upgrade files corresponding to the firmware to be updated according to the identifier of the firmware to be updated;

[0134] Flashing modules, including:

[0135] An identification submodule, used for identifying an upgrade file in a data structure through a basic input and output system;

[0136] The flashing submodule is used to flash the corresponding upgrade file into the corresponding firmware to be updated according to the device specifications of different firmware to be updated through the basic input and output system.

[0137] In one embodiment, the apparatus further comprises:

[0138] A receiving module, used for receiving the firmware upgrade file sent by the server;

[0139] A determination module, used to determine the identifier of the firmware to be updated according to the firmware upgrade file;

[0140] The storage module is used to store the identifier of the firmware to be updated in a preset form.

[0141] In one embodiment, the apparatus further comprises:

[0142] The storage module is also used to store the firmware upgrade file in a preset location;

[0143] The second acquisition module includes:

[0144] The acquisition submodule is used to obtain all firmware upgrade files at the preset location;

[0145] A selection submodule, used to select an upgrade file corresponding to the identifier of the firmware to be updated from all upgrade files in a preset location;

[0146] The determination submodule is used to determine that the selected upgrade file corresponding to the identifier of the firmware to be updated is the upgrade file corresponding to the firmware to be updated.

[0147] In one embodiment, the apparatus further comprises:

[0148] A deleting module, configured to delete the upgrade file corresponding to the identifier of the firmware to be updated stored in the preset location after selecting the upgrade file corresponding to the identifier of the firmware to be updated from all the upgrade files in the preset location;

[0149] The deletion module is also used to delete all upgrade files in the preset location.

[0150] In one embodiment, the apparatus further comprises:

[0151] A determination module, for determining whether there is any firmware that has not been updated when a firmware update is detected to be completed;

[0152] The monitoring module is used to continue monitoring the update status of the remaining firmware in the case where there is firmware that has not been updated until all firmware updates are completed.

[0153] In one embodiment, the deleting module is further configured to, after acquiring at least one identifier of the firmware to be updated stored in the preset form, delete the identifier of the firmware to be updated stored in the preset form.

[0154] The above embodiments are only exemplary embodiments of the present application and are not intended to limit the present application. The protection scope of the present application is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present application within the essence and protection scope of the present application, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present application.

Claims

1. A firmware upgrade method, comprising: After receiving the firmware upgrade file, the upgrade file is stored in a designated location, and the identification of the firmware to be updated is added to a preset form; When the number of identifiers of the firmware to be updated stored in the preset form reaches or exceeds a threshold, obtaining an identifier of at least one firmware to be updated stored in the preset form; Obtaining upgrade files corresponding to all firmware to be updated at a specified location according to the identifier of the firmware to be updated; Flashing the upgrade files corresponding to the firmware to be updated into the corresponding firmware to be updated respectively through the basic input and output system, so as to update the firmware to be updated according to the upgrade files; When it is determined that all the firmware to be updated have been updated, a device restart operation is performed through the basic input and output system to complete the upgrade of the firmware to be updated.

2. The method according to claim 1, after obtaining the upgrade files corresponding to all the firmware to be updated according to the identifier of the firmware to be updated, the method further comprises: Constructing a data structure that is composed of a plurality of upgrade files corresponding to the firmware to be updated and can be recognized by a basic input and output system; The step of flashing the upgrade files corresponding to the firmware to be updated into the corresponding firmware to be updated respectively through the basic input and output system includes: identifying the upgrade file in the data structure through a basic input and output system; The corresponding upgrade file is flashed into the corresponding firmware to be updated through the basic input and output system according to the device specifications of different firmware to be updated.

3. The method of claim 1, further comprising: Receive the firmware upgrade file sent by the server; Determine the identifier of the firmware to be updated according to the firmware upgrade file; The identification of the firmware to be updated is stored in a preset form.

4. The method of claim 1, further comprising: Store the firmware upgrade file to the preset location; The step of obtaining, according to the identifier of the firmware to be updated, upgrade files corresponding to all the firmware to be updated includes: Obtain all firmware upgrade files at the preset location; Selecting an upgrade file corresponding to the identifier of the firmware to be updated from all the upgrade files in the preset location; Determine that the selected upgrade file corresponding to the identifier of the firmware to be updated is the upgrade file corresponding to the firmware to be updated.

5. The method according to claim 4, after selecting the upgrade file corresponding to the identifier of the firmware to be updated from all the upgrade files in the preset location, the method further comprises: Deleting the upgrade file corresponding to the identifier of the firmware to be updated and stored in the preset location; or Delete all upgrade files in the preset location.

6. The method of claim 1, further comprising: When it is detected that a firmware update is completed, determining whether there is any firmware that has not been updated; If there are firmwares that have not been completely updated, continue to monitor the update status of the remaining firmwares until all firmware updates are completed.

7. The method according to claim 1, after obtaining the identification of at least one firmware to be updated stored in the preset form, the method further comprises: The identifier of the firmware to be updated stored in the preset form is deleted.

8. A firmware upgrade device, comprising: A processing module, for storing the firmware upgrade file in a designated location after receiving the firmware upgrade file, and adding the identification of the firmware to be updated to a preset form; A first acquisition module, configured to acquire an identifier of at least one firmware to be updated stored in a preset form when the number of identifiers of the firmware to be updated stored in the preset form reaches or exceeds a threshold; A second acquisition module is used to acquire the upgrade files corresponding to all the firmware to be updated at the specified location according to the identifier of the firmware to be updated; A flashing module, used for flashing the upgrade files corresponding to the firmware to be updated into the corresponding firmware to be updated respectively through the basic input and output system, so as to update the firmware to be updated according to the upgrade files; The execution module is used to execute a device restart operation through a basic input and output system to complete the upgrade of the firmware to be updated when it is determined that all the firmware to be updated has been updated.

9. The device of claim 8, further comprising: A construction module, configured to construct a data structure that can be recognized by a basic input and output system and is composed of a plurality of upgrade files corresponding to the firmware to be updated, after acquiring all upgrade files corresponding to the firmware to be updated according to the identifier of the firmware to be updated; The flashing module includes: An identification submodule, used for identifying the upgrade file in the data structure through a basic input and output system; The flashing submodule is used to flash the corresponding upgrade file into the corresponding firmware to be updated according to the device specifications of different firmware to be updated through the basic input and output system.

10. The device of claim 8, further comprising: A receiving module, used for receiving the firmware upgrade file sent by the server; A determination module, used to determine the identifier of the firmware to be updated according to the firmware upgrade file; The storage module is used to store the identifier of the firmware to be updated in a preset form.