Control method, device and equipment, computer storage medium and computer program product

By obtaining the size of the firmware file to be updated and the target size of the firmware block, only the firmware files that need to be updated are updated, solving the problems of large resource occupation and high implementation difficulty when updating FFS in the prior art, and achieving efficient resource utilization and simplified implementation process.

CN120045208APending Publication Date: 2025-05-27CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510125631.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-26
Publication Date
2025-05-27

AI Technical Summary

Technical Problem

In the prior art, when updating the firmware file system (FFS), the entire firmware volume needs to be updated, resulting in large resource usage and high implementation difficulty.

Method used

By obtaining the size of the firmware file to be updated in the boot system of the control device and the target size of the firmware block, only the firmware files that need to be updated are updated to avoid updating unnecessary related firmware files.

Benefits of technology

It effectively solves the problem of large resource occupancy when updating FFS, reduces the difficulty of implementation, and only updates necessary firmware files, which improves resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120045208A_ABST
    Figure CN120045208A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a control method. The method comprises the steps that the size of a to-be-updated firmware file in a boot system of control equipment is acquired; obtaining a target size of a firmware block in the boot system; and updating the to-be-updated firmware file on the basis of the size of the to-be-updated firmware file and the target size, thereby solving the problem of relatively large occupied space in updating the FFS in related technologies, and reducing the implementation difficulty. The embodiment of the invention further discloses a control device, equipment, a computer storage medium and a computer program product.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to control technologies in the field of communications, and in particular, to a control method, apparatus, device, computer storage medium, and computer program product. Background Art

[0002] In fields such as servers and motherboards, the boot system (Basic Input Output System, BIOS) first initializes the resources required by the system, and then transfers the control right to the operating system. Currently, the design of BIOS mainly follows the EDKII open source protocol. The EDKII design stipulates that firmware volumes (FV) are composed of firmware file systems (FFS), and then BIOS is composed of FV. In R & D, testing, and subsequent BIOS maintenance, for BIOS updates, R & D personnel first completely recompile based on the old BIOS according to requirements to generate a new version of BIOS, and then use the new BIOS to update the entire BIOS area, or update BIOS in a way that excludes the user data area FV. For existing situations where only FFS data needs to be updated, R & D personnel need to recompile and then submit it to maintenance or testing personnel for updating, resulting in low resource utilization. Based on this, methods for only updating FFS in BIOS files or BIOS already burned on machines have emerged in related technologies; however, in the FFS update methods in related technologies, in addition to updating the currently required FFS, other related FFS also need to be updated, resulting in the files to be integrated containing multiple FFS, occupying a large space, and being technically difficult to implement. Summary of the Invention

[0003] To solve the above technical problems, embodiments of the present application provide a control method, apparatus, device, computer storage medium, and computer program product, which solve the problem of large occupied space in updating FFS in related technologies and reduce the implementation difficulty.

[0004] To achieve the above object, the technical solution of the embodiments of the present application is implemented as follows:

[0005] A control method, the method includes:

[0006] Obtain the size of the firmware file to be updated in the boot system of the control device;

[0007] Obtain the target size of the firmware block in the boot system;

[0008] Update the firmware file to be updated based on the size of the firmware file to be updated and the target size.

[0009] In the above solution, obtaining the target size of the firmware block in the boot system includes:

[0010] Obtaining the size of the free space in the firmware block in the boot system; wherein, the target size includes the size of the free space;

[0011] Correspondingly, updating the firmware file to be updated based on the size of the firmware file to be updated and the target size includes:

[0012] Adding the firmware file to be updated in the firmware block based on the size of the firmware file to be updated and the size of the free space.

[0013] In the above solution, adding the firmware file to be updated in the firmware block based on the size of the firmware file to be updated and the size of the free space includes:

[0014] If the size of the firmware file to be updated is less than or equal to the size of the free space, adding the firmware file to be updated at the free space.

[0015] In the above solution, obtaining the target size of the firmware block in the boot system includes:

[0016] Obtaining the size of the firmware block; wherein, the target size includes the size of the firmware block;

[0017] Correspondingly, updating the firmware file to be updated based on the size of the firmware file to be updated and the target size includes:

[0018] Obtaining the size of the updated firmware file corresponding to the firmware file to be updated;

[0019] Updating the firmware file to be updated based on the size of the updated firmware file, the size of the firmware block, and the size of the firmware file to be updated.

[0020] In the above solution, updating the firmware file to be updated based on the size of the updated firmware file, the size of the firmware block, and the size of the firmware file to be updated includes:

[0021] Determining a first relationship between the updated firmware block and the firmware block based on the size of the updated firmware file, the size of the firmware file to be updated, and the size of the firmware block;

[0022] Updating the firmware file to be updated based on the first relationship.

[0023] In the above solution, updating the firmware file to be updated based on the first relationship includes:

[0024] If the first relationship is that the corresponding range of the updated firmware block does not exceed the corresponding range of the firmware block, determine the second relationship between the firmware files with corresponding relationships in the firmware file to be updated and the updated firmware file;

[0025] Update the firmware file to be updated based on the second relationship.

[0026] In the above solution, the updating the firmware file to be updated based on the second relationship includes:

[0027] If the second relationship is that the firmware file with the corresponding relationship in the updated firmware file is larger than the firmware file with the corresponding relationship in the firmware file to be updated, update the firmware file to be updated sequentially starting from the last firmware file of the firmware file to be updated;

[0028] If the second relationship is that the firmware file with the corresponding relationship in the updated firmware file is smaller than the firmware file with the corresponding relationship in the firmware file to be updated, update the firmware file to be updated sequentially starting from the first firmware file of the firmware file to be updated.

[0029] A control device, comprising:

[0030] A first acquisition unit, configured to acquire the size of the firmware file to be updated in the boot system of the control device;

[0031] A second acquisition unit, configured to acquire the target size of the firmware block in the boot system;

[0032] A processing unit, configured to update the firmware file to be updated based on the size of the firmware file to be updated and the target size.

[0033] A control device, the device comprising: a processor, a memory, and a communication bus;

[0034] The communication bus is used to implement a communication connection between the processor and the memory;

[0035] The processor is configured to execute a control program in the memory to implement the steps of the above control method.

[0036] A computer-readable storage medium, the computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the above control method.

[0037] A computer program product, the computer program product includes a computer program, and the computer program implements the above method when executed by a processor.

[0038] The control method, device, equipment, computer storage medium, and computer program product provided by the embodiments of the present application can obtain the size of the firmware file to be updated in the boot system, obtain the target size of the firmware block in the boot system, and update the firmware to be updated based on the size of the firmware file to be updated and the target size. In this way, the firmware file to be updated can be updated according to the size of the firmware file to be updated and the target size of the firmware block, and only the firmware file that needs to be updated is updated, rather than also updating other related firmware files as in the related art. This solves the problem that the occupied space is relatively large when updating the FFS in the related art and reduces the implementation difficulty. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 is a schematic flowchart of a control method provided by an embodiment of the present application;

[0040] Figure 2 is a schematic diagram of the FV before and after update corresponding to a control method provided by an embodiment of the present application;

[0041] Figure 3 is a schematic diagram of obtaining FFS data and FFS Header in a control method provided by an embodiment of the present application;

[0042] Figure 4 is a schematic structural diagram of a control device provided by an embodiment of the present application;

[0043] Figure 5 is a schematic structural diagram of a control device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0044] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application.

[0045] It should be understood that the "embodiments of the present application" or "the foregoing embodiments" mentioned throughout the specification mean that specific features, structures, or characteristics related to the embodiments are included in at least one embodiment of the present application. Therefore, the appearances of "in the embodiments of the present application" or "in the foregoing embodiments" throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In various embodiments of the present application, the order numbers of the above processes do not mean the order of execution. The order of execution of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application. The serial numbers of the embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.

[0046] Unless otherwise specified, when an electronic device executes any step in the embodiments of the present application, it may be the processor of the electronic device that executes this step. It is also worth noting that the embodiments of the present application do not limit the order in which the electronic device executes the following steps. In addition, the methods used to process data in different embodiments may be the same method or different methods. It should also be noted that any step in the embodiments of the present application can be independently executed by the electronic device, that is, when the electronic device executes any step in the following embodiments, it may not depend on the execution of other steps.

[0047] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0048] An embodiment of the present application provides a control method, which can be applied to a control device. Referring to Figure 1 as shown, the method may include the following steps:

[0049] Step 101, obtain the size of the firmware file to be updated in the boot system of the control device.

[0050] Among them, the boot system may refer to BIOS; the firmware file to be updated may refer to the firmware file that needs to be updated in BIOS. It should be noted that the firmware file may refer to FFS; the firmware file to be updated may refer to the FFS to be updated.

[0051] Step 102, obtain the target size of the firmware block in the boot system.

[0052] Among them, the firmware block may refer to the FV of the boot system. Specifically, the target size of the firmware block may refer to the size of a specific space in the FV.

[0053] It should be noted that the target size of the firmware block may include the size of the free space in the FV and the size of the FV.

[0054] Step 103, update the firmware file to be updated based on the size of the firmware file to be updated and the target size.

[0055] In the embodiments of the present application, the size of the FFS to be updated can be analyzed with the target size corresponding to the FV, and the FFS to be updated can be added or modified according to the analysis result.

[0056] In other embodiments of the present application, the above step 102 can be implemented in the following manner:

[0057] A1, obtain the size of the free space in the firmware block in the boot system.

[0058] Among them, the target size includes the size of the free space.

[0059] In the embodiments of the present application, the size of the free space may refer to the size of the unused space in the FV; specifically, the size of the free space may refer to Figure 2 the size of Free in the FV shown.

[0060] In other embodiments of the present application, when step 102 is implemented by A1, the above step 103 may be implemented in the following manner:

[0061] B1. Add the firmware file to be updated in the firmware block based on the size of the firmware file to be updated and the size of the free space.

[0062] Among them, the size relationship between the FFS to be updated and Free in the FV can be compared, and the FFS to be updated can be added in the FV according to this size relationship; that is to say, the FFS to be updated is the FFS that needs to be newly added.

[0063] In other embodiments of the present application, the above "add the firmware file to be updated in the firmware block based on the size of the firmware file to be updated and the size of the free space" includes:

[0064] If the size of the firmware file to be updated is less than or equal to the size of the free space, add the firmware file to be updated at the free space.

[0065] Specifically, if the size of Free in the FV is greater than or equal to the size of the FFS to be updated, it means that the current Free space in the FV is sufficient to hold the FFS to be updated. At this time, the FFS to be updated can be directly added at Free; if the size of the FFS to be updated is greater than the size of Free in the FV, it means that the current Free space in the FV cannot hold the FFS to be updated, and then the new addition operation is not performed.

[0066] In other embodiments of the present application, the above step 102 may also be implemented in the following manner:

[0067] A2. Obtain the size of the firmware block.

[0068] Among them, the target size includes the size of the firmware block.

[0069] Specifically, the size of the firmware block may refer to the size of the FV.

[0070] In other embodiments of the present application, when step 102 is implemented by A2, the above step 103 may be implemented in the following manner:

[0071] B2. Obtain the size of the updated firmware file corresponding to the firmware file to be updated.

[0072] Among them, the size of the updated firmware file may refer to the size of the new FFS to which the FFS to be updated corresponds. It should be noted that the firmware file to be updated may include one FFS to be updated or multiple FFSs to be updated.

[0073] In a feasible implementation, as Figure 2 shown, the firmware file to be updated may include the FFSs from m to n in the FV, and the corresponding positions may be denoted as m e to n e ; the updated firmware file may include the FFSs from m 1 to n 1 in the updated firmware block, and the corresponding positions may be denoted as m 1e to n 1e . Then, the size of the updated firmware file may refer to Figure 2 the size of the FFSs corresponding to m 1e to n 1e among them.

[0074] B3. Update the firmware file to be updated based on the size of the updated firmware file, the size of the firmware block, and the size of the firmware file to be updated.

[0075] Among them, the size of the firmware file to be updated may refer to Figure 2 the size of the FFSs corresponding to m 1 to n 1 among them. Specifically, the size of the FFSs corresponding to m 1 to n 1 can be counted, the size of the FFSs corresponding to m 1e to n 1e can be counted, and the sizes of the FFSs to be updated, the updated FFSs, and the FV are analyzed to update the FFSs to be updated according to the analysis results.

[0076] In other embodiments of the present application, the above "update the firmware file to be updated based on the size of the updated firmware file, the size of the firmware block, and the size of the firmware file to be updated" includes:

[0077] Determine the first relationship between the updated firmware block and the firmware block based on the size of the updated firmware file, the size of the firmware file to be updated, and the size of the firmware block;

[0078] Update the firmware file to be updated based on the first relationship.

[0079] Among them, the control device can analyze the size of the updated FFS, the size of the FFS to be updated, and the size of the FV, and determine whether the address corresponding to the updated FV exceeds the address range corresponding to the FV; if the address corresponding to the updated FV exceeds the address range corresponding to the FV, it means that the corresponding range of the updated FV does not exceed the corresponding range of the FV. It should be noted that the first relationship can refer to the relationship between the corresponding range of the updated firmware block and the corresponding range of the firmware block.

[0080] In other embodiments of the present application, the above-mentioned updating the firmware file to be updated based on the first relationship includes:

[0081] If the first relationship is that the corresponding range of the updated firmware block does not exceed the corresponding range of the firmware block, determine the second relationship between the firmware files with corresponding relationships in the firmware file to be updated and the updated firmware file;

[0082] Update the firmware file to be updated based on the second relationship.

[0083] Specifically, if the address range corresponding to the updated FV does not exceed the address range corresponding to the FV, it means that the FFS to be updated can be normally updated; at this time, the size relationship between the FFS with corresponding relationships in the FFS to be updated and the updated FFS can be determined, and the FFS to be updated can be updated according to this size relationship. Among them, the FFS with corresponding relationships in the updated FFS and the FFS to be updated can refer to the FFS of the same field. Specifically, as Figure 2 shown, n and n 1 can be compared in size, or m and m 1 can be compared in size to obtain the second relationship. It should be noted that the second relationship can refer to the size relationship between the firmware files with corresponding relationships in the firmware file to be updated and the updated firmware file.

[0084] It should be noted that if the address range corresponding to the updated FV exceeds the address range corresponding to the FV, it means that the FFS to be updated cannot be normally updated, and the update of the FFS is not performed.

[0085] In other embodiments of the present application, the above-mentioned updating the firmware file to be updated based on the second relationship includes:

[0086] If the second relationship is that the firmware file with corresponding relationship in the updated firmware file is larger than the firmware file with corresponding relationship in the firmware file to be updated, update the firmware file to be updated in sequence starting from the last firmware file of the firmware file to be updated.

[0087] Among them, as Figure 2 shown, if the second relationship is that n 1 is greater than n, then update each FFS to be updated in sequence starting from the end of all FFSs to be updated. Specifically, asFigure 2 First, update n, and after updating n, when it is determined that n is not equal to m, update n - 1 until m is updated.

[0088] If the second relationship is that the firmware files with corresponding relationships in the updated firmware file are less than the firmware files with corresponding relationships in the firmware file to be updated, update the firmware file to be updated sequentially starting from the first firmware file of the firmware file to be updated.

[0089] Among them, as Figure 2 shown, if the second relationship is that n 1 is less than n, then update each to-be-updated FFS sequentially starting from the first to-be-updated FFS of all to-be-updated FFSs. Specifically, as Figure 2 shown, first update m, and after updating m, when it is determined that m is not equal to n, update m + 1 until n is updated.

[0090] In other embodiments of the present application, the to-be-updated FFS in the present application may refer to the to-be-updated FFS Data, or may refer to the to-be-updated FFS Header; among them, as Figure 3 shown, the FFSData can be obtained in the following ways: 1. Download the FFSData that complies with the EDKII specification, such as the drivers of certain specific devices, etc.; 2. Generate the FFSData by R & D personnel. This FFSData is generally used during the BIOS startup process or data used in certain scenarios. The FFS Header can be obtained in the following ways: 1. For updating the existing FFS, the R & D personnel query the Globally Unique Identifier (GUID) or the location information of the FFS to be updated, input the program to obtain the old FFS Header in the BIOS, and modify data such as its FFS size and check code to generate a new FFS Header; 2. For updating the existing FFS, the R & D personnel can generate the FFS Header when generating the FFSData; 3. For adding a new FFS, the present update tool can generate the FFS Header.

[0091] It should be noted that the solution of the present application can not only update the BIOS file to reduce the R & D cost, but also update the burned BIOS, facing the environment with strict requirements for the memory environment, to reduce the maintenance cost; moreover, it is a new BIOS update technology launched for companies, R & D personnel, maintenance personnel and third-party manufacturers. It can prevent incorrect erasure of other areas when updating the current area, which is safer and more reliable; at the same time, it does not require creating a large temporary space, the usage conditions are simpler, and in terms of code programming, it can be implemented through functions such as recursion, and the programming is simpler, so the security is higher.

[0092] The control method provided by the embodiments of the present application can update the firmware file to be updated according to the size of the firmware file to be updated and the target size of the firmware block, and only update the firmware file that needs to be updated, rather than updating other related firmware files in addition to the firmware file that needs to be updated as in the related art. This solves the problem of large occupied space in updating the FFS in the related art and reduces the implementation difficulty.

[0093] Based on the foregoing embodiments, an embodiment of the present application provides a control device, which can be applied to Figure 1 the control method provided by the corresponding embodiment, with reference to Figure 4 As shown, the control device 2 may include: a first acquisition unit 21, a first acquisition unit 22, and a processing unit 23, where:

[0094] The first acquisition unit 21 is configured to acquire the size of the firmware file to be updated in the boot system of the control device;

[0095] The first acquisition unit 22 is configured to acquire the target size of the firmware block in the boot system;

[0096] The processing unit 23 is configured to update the firmware file to be updated based on the size of the firmware file to be updated and the target size.

[0097] In other embodiments of the present application, the first acquisition unit 22 is further configured to acquire the size of the free space in the firmware block; wherein, the target size includes the size of the free space.

[0098] In other embodiments of the present application, the processing unit 23 is further configured to add the firmware file to be updated in the firmware block based on the size of the firmware file to be updated and the size of the free space.

[0099] In other embodiments of the present application, the processing unit 23 is further configured to, if the size of the firmware file to be updated is less than or equal to the size of the free space, add the firmware file to be updated at the free space.

[0100] In other embodiments of the present application, the first acquisition unit 22 is further configured to acquire the size of the firmware block; wherein, the target size includes the size of the firmware block.

[0101] In other embodiments of the present application, the processing unit 23 is further configured to perform the following steps:

[0102] Acquire the size of the updated firmware file corresponding to the firmware file to be updated;

[0103] Update the firmware file to be updated based on the size of the updated firmware file, the size of the firmware block, and the size of the firmware file to be updated.

[0104] In other embodiments of the present application, the processing unit 23 is further configured to perform the following steps:

[0105] Based on the size of the updated firmware file, the size of the firmware file to be updated, and the size of the firmware block, determine a first relationship between the updated firmware block and the firmware block;

[0106] Update the firmware file to be updated based on the first relationship.

[0107] In other embodiments of the present application, the processing unit 23 is further configured to perform the following steps:

[0108] If the first relationship is that the corresponding range of the updated firmware block does not exceed the corresponding range of the firmware block, determine a second relationship between the firmware files with corresponding relationships in the firmware file to be updated and the updated firmware file;

[0109] Update the firmware file to be updated based on the second relationship.

[0110] In other embodiments of the present application, the processing unit 23 is further configured to perform the following steps:

[0111] If the second relationship is that the firmware file with the corresponding relationship in the updated firmware file is larger than the firmware file with the corresponding relationship in the firmware file to be updated, update the firmware file to be updated sequentially starting from the last firmware file of the firmware file to be updated;

[0112] If the second relationship is that the firmware file with the corresponding relationship in the updated firmware file is smaller than the firmware file with the corresponding relationship in the firmware file to be updated, update the firmware file to be updated sequentially starting from the first firmware file of the firmware file to be updated.

[0113] It should be noted that for the specific implementation process of the steps executed by each unit in the embodiments of the present application, reference may be made to Figure 1 the implementation process in the control method provided in the corresponding embodiment, which will not be elaborated here.

[0114] The control device provided by the embodiments of the present application can update the firmware file to be updated according to the size of the firmware file to be updated and the target size of the firmware block, and only update the firmware files that need to be updated, rather than also updating other related firmware files as in the related art, solving the problem of large occupied space in updating FFS in the related art and reducing the implementation difficulty.

[0115] Based on the foregoing embodiments, an embodiment of the present application provides a control device, which can be applied to Figure 1 the control method provided in the corresponding embodiment, with reference to Figure 5 as shown, the control device 3 may include: a processor 31, a memory 32, and a communication bus 33, where:

[0116] The communication bus 33 is used to implement the communication connection between the processor 31 and the memory 32;

[0117] The processor 31 is used to execute the control program in the memory 32 to implement the following steps:

[0118] Obtain the size of the firmware file to be updated in the boot system of the control device;

[0119] Obtain the target size of the firmware block in the boot system;

[0120] Update the firmware file to be updated based on the size of the firmware file to be updated and the target size.

[0121] In other embodiments of the present application, the processor 31 is used to execute the control program in the memory 32 to obtain the target size of the firmware block in the boot system to implement the following steps:

[0122] Obtain the size of the free space in the firmware block in the boot system; wherein, the target size includes the size of the free space.

[0123] In other embodiments of the present application, the processor 31 is used to execute the control program in the memory 32 to update the firmware file to be updated based on the size of the firmware file to be updated and the target size to implement the following steps:

[0124] Add the firmware file to be updated in the firmware block based on the size of the firmware file to be updated and the size of the free space.

[0125] In other embodiments of the present application, the processor 31 is used to execute the control program in the memory 32 to add the firmware file to be updated in the firmware block based on the size of the firmware file to be updated and the size of the free space to implement the following steps:

[0126] If the size of the firmware file to be updated is less than or equal to the size of the free space, add the firmware file to be updated at the free space.

[0127] In other embodiments of the present application, the processor 31 is used to execute the control program in the memory 32 to obtain the target size of the firmware block in the boot system to implement the following steps:

[0128] Obtain the size of the firmware block; wherein, the target size includes the size of the firmware block.

[0129] In other embodiments of the present application, the processor 31 is used to execute the control program in the memory 32 to update the firmware file to be updated based on the size of the firmware file to be updated and the target size to implement the following steps:

[0130] Obtain the size of the updated firmware file corresponding to the firmware file to be updated;

[0131] Update the firmware file to be updated based on the size of the updated firmware file, the size of the firmware block, and the size of the firmware file to be updated.

[0132] In other embodiments of the present application, the processor 31 is used to execute the control program in the memory 32 to update the firmware file to be updated based on the size of the updated firmware file, the size of the firmware block, and the size of the firmware file to be updated, so as to implement the following steps:

[0133] Determine the first relationship between the updated firmware block and the firmware block based on the size of the updated firmware file, the size of the firmware file to be updated, and the size of the firmware block;

[0134] Update the firmware file to be updated based on the first relationship.

[0135] In other embodiments of the present application, the processor 31 is used to execute the control program in the memory 32 to update the firmware file to be updated based on the first relationship, so as to implement the following steps:

[0136] If the first relationship is that the corresponding range of the updated firmware block does not exceed the corresponding range of the firmware block, determine the second relationship between the firmware files with corresponding relationships in the firmware file to be updated and the updated firmware file;

[0137] Update the firmware file to be updated based on the second relationship.

[0138] In other embodiments of the present application, the processor 31 is used to execute the control program in the memory 32 to update the firmware file to be updated based on the second relationship, so as to implement the following steps:

[0139] If the second relationship is that the firmware file with the corresponding relationship in the updated firmware file is larger than the firmware file with the corresponding relationship in the firmware file to be updated, update the firmware file to be updated sequentially starting from the last firmware file of the firmware file to be updated;

[0140] If the second relationship is that the firmware file with the corresponding relationship in the updated firmware file is smaller than the firmware file with the corresponding relationship in the firmware file to be updated, update the firmware file to be updated sequentially starting from the first firmware file of the firmware file to be updated.

[0141] It should be noted that the specific description of the steps executed by the processor can be referred to Figure 1 In the control method provided in the corresponding embodiment, it will not be elaborated here.

[0142] The control device provided by the embodiments of the present application can update the firmware file to be updated according to the size of the firmware file to be updated and the target size of the firmware block, and only update the firmware file that needs to be updated, rather than updating other related firmware files in addition to the firmware file that needs to be updated as in the related art, which solves the problem of large occupied space in updating the FFS in the related art and reduces the implementation difficulty.

[0143] Based on the foregoing embodiments, the embodiments of the present application provide a computer-readable storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement Figure 1 the steps of the control method provided by the corresponding embodiments.

[0144] Based on the foregoing embodiments, the embodiments of the present application provide a computer program product, including a computer program, and the computer program can be executed by the processor 31 to complete Figure 1 the steps of the control method provided by the corresponding embodiments.

[0145] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can adopt the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.

[0146] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, and the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the specified functions in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0147] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured product including an instruction device, and the instruction device implements the functions in Figure 1 one process or multiple processes and / or blocks Figure 1The functions specified in one or more boxes.

[0148] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide for implementing the steps of the functions specified in one Figure 1 one process or more processes and / or boxes Figure 1 step of the functions specified in one box or more boxes.

[0149] As described above, it is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed by this application can easily think of changes or substitutions, which should all be covered within the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

Claims

1. A control method, characterized in that: The method comprises: Obtain the size of the firmware file to be updated in the boot system of the control device; Obtaining a target size of a firmware block in the boot system; The firmware file to be updated is updated based on the size of the firmware file to be updated and the target size.

2. The method according to claim 1, characterized in that The obtaining of the target size of the firmware block in the boot system includes: Acquire the size of the free space in the firmware block in the boot system; wherein the target size includes the size of the free space; Accordingly, updating the firmware file to be updated based on the size of the firmware file to be updated and the target size includes: Based on the size of the firmware file to be updated and the size of the free space, the firmware file to be updated is added to the firmware block.

3. The method according to claim 2, characterized in that The adding the firmware file to be updated in the firmware block based on the size of the firmware file to be updated and the size of the free space includes: If the size of the firmware file to be updated is smaller than or equal to the size of the free space, the firmware file to be updated is added to the free space.

4. The method according to claim 1, characterized in that: The obtaining of the target size of the firmware block in the boot system includes: Obtaining the size of the firmware block; wherein the target size includes the size of the firmware block; Accordingly, updating the firmware file to be updated based on the size of the firmware file to be updated and the target size includes: Obtaining the updated firmware file size corresponding to the firmware file to be updated; The firmware file to be updated is updated based on the size of the updated firmware file, the size of the firmware block, and the size of the firmware file to be updated.

5. The method according to claim 4, characterized in that The updating of the firmware file to be updated based on the size of the updated firmware file, the size of the firmware block and the size of the firmware file to be updated includes: Determine a first relationship between the updated firmware block and the firmware block based on the updated firmware file size, the to-be-updated firmware file size, and the size of the firmware block; The firmware file to be updated is updated based on the first relationship.

6. The method according to claim 5, characterized in that The updating of the firmware file to be updated based on the first relationship includes: If the first relationship is that the updated firmware block corresponding range does not exceed the firmware block corresponding range, determining a second relationship between the firmware file to be updated and the firmware file having a corresponding relationship in the updated firmware file; The firmware file to be updated is updated based on the second relationship.

7. The method according to claim 6, characterized in that The updating of the firmware file to be updated based on the second relationship includes: If the second relationship is that the firmware file with the corresponding relationship in the updated firmware file is larger than the firmware file with the corresponding relationship in the firmware file to be updated, the firmware files to be updated are updated sequentially starting from the last firmware file in the firmware file to be updated; If the second relationship is that the firmware files with corresponding relationships in the updated firmware files are smaller than the firmware files with corresponding relationships in the firmware files to be updated, the firmware files to be updated are updated sequentially starting from the first firmware file of the firmware files to be updated.

8. A control device, characterized in that: include: A first obtaining unit, used to obtain the size of the firmware file to be updated in the boot system of the control device; A second acquisition unit, configured to acquire a target size of a firmware block in the boot system; The processing unit is configured to update the firmware file to be updated based on the size of the firmware file to be updated and the target size.

9. A control device, characterized in that: The device comprises: a processor, a memory and a communication bus; The communication bus is used to realize the communication connection between the processor and the memory; The processor is used to execute the control program in the memory to implement the steps of the control method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the control method according to any one of claims 1 to 7.

11. A computer program product, comprising a computer program, characterized in that: When the computer program is executed by a processor, the computer program implements the method according to any one of claims 1 to 7.