CN117234559A - Firmware updating method and device and electronic equipment - Google Patents

Firmware updating method and device and electronic equipment Download PDF

Info

Publication number
CN117234559A
CN117234559A CN202311278378.3A CN202311278378A CN117234559A CN 117234559 A CN117234559 A CN 117234559A CN 202311278378 A CN202311278378 A CN 202311278378A CN 117234559 A CN117234559 A CN 117234559A
Authority
CN
China
Prior art keywords
firmware
firmware update
amount
updating
updated
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311278378.3A
Other languages
Chinese (zh)
Inventor
王鹤来
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN202311278378.3A priority Critical patent/CN117234559A/en
Publication of CN117234559A publication Critical patent/CN117234559A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The application provides a firmware updating method, a firmware updating device and electronic equipment; the method comprises the following steps: determining a first firmware update amount and a second firmware update amount, the first firmware update amount being smaller in size than the second firmware update amount; determining the electric quantity required by updating the first firmware updating quantity; determining whether a component to be updated is capable of performing a firmware update operation based on the second firmware update amount based on an amount of power required for the first firmware update amount to be updated, the first firmware update amount, and the second firmware update amount.

Description

Firmware updating method and device and electronic equipment
Technical Field
The present application relates to the field of update technologies, and in particular, to a firmware update method, apparatus, and electronic device.
Background
Firmware updates must be made with sufficient battery charge. The existing firmware updating method can update the firmware by setting that the current battery power is larger than a set value. As the battery life increases, the battery power and performance may decrease, and firmware update may not be completed when the battery power is greater than a set value. In some cases, the firmware update can be accomplished even though the battery level is below the set point. Therefore, the existing firmware update method does not consider the influence of battery aging, and can cause equipment breakdown or unusable in the firmware update process. Meanwhile, the problem that the reserved electric quantity is larger than the electric quantity required by firmware update, but the firmware update can be performed after charging is also solved.
Disclosure of Invention
The embodiment of the application provides a firmware updating method, a firmware updating device and electronic equipment.
According to a first aspect of the present application, there is provided a firmware update method comprising: determining a first firmware update amount and a second firmware update amount, the first firmware update amount being smaller in size than the second firmware update amount; determining the electric quantity required by updating the first firmware updating quantity; determining whether a component to be updated is capable of performing a firmware update operation based on the second firmware update amount based on an amount of power required for the first firmware update amount to be updated, the first firmware update amount, and the second firmware update amount.
According to an embodiment of the present application, the determining the amount of power required for updating the first firmware update amount includes: switching the electronic equipment from a first power supply mode to a second power supply mode in response to the electronic equipment corresponding to the part to be updated being in the first power supply mode; and determining the electric quantity required by updating the first firmware updating quantity when the electronic equipment is in the second power supply mode.
According to an embodiment of the present application, the determining, when the electronic device is in the second power mode, an amount of power required for updating the first firmware update amount includes: performing test updating on the test updating area of the component to be updated based on the first firmware updating amount to obtain the electric quantity required by updating the first firmware updating amount; and switching the electronic equipment from the second power supply mode to the first power supply mode.
According to an embodiment of the present application, the determining whether the component to be updated is capable of performing a firmware update operation based on the second firmware update amount, the amount of power required for updating based on the first firmware update amount, and the second firmware update amount includes: calculating the update electric quantity required by the to-be-updated component based on the electric quantity required by the update of the first firmware update quantity, the first firmware update quantity and the second firmware update quantity; based on the updated charge, it is determined whether the component to be updated is capable of performing a firmware update operation based on the second firmware update amount.
According to an embodiment of the present application, the calculating the update power required for the component to be updated based on the power required for updating the first firmware update amount, and the second firmware update amount includes: determining a first ratio between the magnitude of the second firmware update amount and the magnitude of the first firmware update amount; multiplying the first ratio by the electric quantity required by updating the first firmware updating quantity to obtain a first electric quantity, and determining the first electric quantity as the updating electric quantity.
According to an embodiment of the present application, the calculating the update power required for the component to be updated based on the power required for updating the first firmware update amount, and the second firmware update amount includes: determining a first ratio between the magnitude of the second firmware update amount and the magnitude of the first firmware update amount; multiplying the first ratio by the electric quantity required by updating the first firmware updating quantity to obtain a first electric quantity; acquiring the full charge capacity of the battery; multiplying the full capacitance by a preset proportion to obtain a second electric quantity; and adding the first electric quantity and the second electric quantity to obtain the updated electric quantity.
According to an embodiment of the present application, the determining, based on the update power, whether the component to be updated is capable of performing a firmware update operation based on the second firmware update amount includes: acquiring the current electric quantity of the battery; determining that the component to be updated is capable of performing the firmware update operation based on the second firmware update amount in response to the current power being greater than or equal to the update power; and in response to the current power being less than the updated power, determining that the component to be updated cannot perform the firmware update operation based on the second firmware update amount.
According to an embodiment of the present application, after the determining that the component to be updated cannot perform the firmware update operation based on the second firmware update amount in response to the current power being smaller than the update power, the method further includes: in response to the electronic device being in a first power mode, determining a time at which the component to be updated is capable of performing the firmware update operation based on the second firmware update amount based on the current power level, the updated power level, and a charging speed of the battery.
According to a second aspect of the present application, there is provided a firmware updating apparatus comprising: the reading module is used for determining a first firmware updating amount and a second firmware updating amount, and the size of the first firmware updating amount is smaller than that of the second firmware updating amount; the test module is used for determining the electric quantity required by updating the first firmware updating quantity; and the determining module is used for determining whether the component to be updated can execute firmware updating operation based on the second firmware updating amount or not based on the electric quantity required by updating the first firmware updating amount, the first firmware updating amount and the second firmware updating amount.
According to a third aspect of the present application, there is provided an electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the methods of the present application.
Drawings
The above, as well as additional purposes, features, and advantages of exemplary embodiments of the present application will become readily apparent from the following detailed description when read in conjunction with the accompanying drawings. Several embodiments of the present application are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which:
in the drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
Fig. 1 is a schematic process flow diagram of a firmware update method according to an embodiment of the present application;
fig. 2 is a flowchart illustrating a firmware update method according to a second embodiment of the present application;
fig. 3 is a flowchart illustrating a firmware update method according to a third embodiment of the present application;
fig. 4 is a flowchart illustrating a firmware update method according to a fourth embodiment of the present application;
Fig. 5 is a flowchart illustrating a firmware update method according to a fifth embodiment of the present application;
FIG. 6 shows an application scenario diagram of a firmware update method provided by an embodiment of the present application;
FIG. 7 shows another application scenario diagram of a firmware update method provided by an embodiment of the present application;
FIG. 8 is an alternative schematic diagram of a firmware update apparatus according to an embodiment of the present application;
fig. 9 shows a schematic diagram of a composition structure of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, features and advantages of the present application more comprehensible, the technical solutions according to the embodiments of the present application will be clearly described in the following with reference to the accompanying drawings, and it is obvious that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is to be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments and can be combined with one another without conflict.
In the following description, the terms "first", "second", and the like are merely used to distinguish between similar objects and do not represent a particular ordering of the objects, it being understood that the "first", "second", or the like may be interchanged with one another, if permitted, to enable embodiments of the application described herein to be practiced otherwise than as illustrated or described herein.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of the application only and is not intended to be limiting of the application.
The processing flow in the firmware updating method provided by the embodiment of the application is explained. Referring to fig. 1, fig. 1 is a schematic process flow diagram of a firmware update method according to an embodiment of the present application, and will be described with reference to steps S101 to S103 shown in fig. 1.
Step S101, determining a first firmware update amount and a second firmware update amount.
In some embodiments, the first firmware update amount may be a swipe procedure. The second firmware update amount may be: the firmware update program that needs to be performed by the component to be updated of the electronic device. The size of the first firmware update amount is smaller than the size of the second firmware update amount. The brushing program is independent of the firmware update program that the electronic device needs to perform. The test update area of the memory of the corresponding firmware is flushed by the test program. The firmware update program that the electronic device needs to perform corresponds to a formal update area of the memory of the firmware. The test update area does not overlap with the formal update area, and the capacity of the test update area is smaller than that of the formal update area. The firmware may include: BIOS (Basic Input/Output System), EC (Embedded Controller ), PD (Power Delivery), camera, and the like. Embodiments of the application are not limited to specific firmware. The memory of the firmware may include: SPI ROM (Serial Peripheral Interface Read Only Memory, serial peripheral interface read-Only Memory), FLASH (FLASH), EPROM (Electrically Programmable Read-Only Memory), etc. Embodiments of the application are not limited to a particular firmware memory.
Step S102, determining the electric quantity required by the update of the first firmware update quantity.
In some embodiments, the battery level before the update is first determined. And updating the test update area based on the first firmware update amount. And determining the updated battery power. And finally, calculating the difference value of the battery electric quantity before and after updating to obtain the electric quantity required by updating the first firmware updating quantity. The determination of the amount of power required for updating the first firmware update amount may also be performed when the power mode of the electronic device corresponding to the firmware is in DC
As an example, the amount of power Ce required for updating the first firmware update amount may be determined when the electronic device corresponding to the firmware is at DC by the following formula (1).
Ce = RC1 - RC2 (1)
Wherein RC1 represents the battery power before the test update area is updated based on the first firmware update amount, and RC2 represents the battery power after the test update area is updated based on the first firmware update amount.
Step S103, determining whether the component to be updated is capable of performing a firmware update operation based on the second firmware update amount, based on the amount of power required for the update of the first firmware update amount, and the second firmware update amount.
In some embodiments, the component to be updated is in an electronic device. The electronic device may include a computer, a cell phone, a television, etc. The embodiment of the application is not limited to specific electronic equipment. The component to be updated may include BIOS, EC, PD, camera, etc. The embodiment of the application is not limited to the specific parts to be updated. And calculating the update electric quantity required by the to-be-updated component of the electronic device based on the electric quantity required by the update of the first firmware update quantity, the first firmware update quantity and the second firmware update quantity. And determining whether the component to be updated can execute firmware updating operation based on the second firmware updating amount based on the updated electric quantity and the current electric quantity of the electronic equipment.
For steps S101-S103, when embodied, may include: a first firmware update amount and a second firmware update amount of the component to be updated are determined, the first firmware update amount being of a smaller size than the second firmware update amount. The method comprises the steps of determining the battery capacity before updating of the electronic equipment where a part to be updated is located, updating a test updating area based on a first firmware updating amount, determining the battery capacity after updating, calculating the difference value between the battery capacity before updating and the battery capacity after updating, and obtaining the electric capacity required by updating the first firmware updating amount. And calculating the update electric quantity required by the to-be-updated component of the electronic device based on the electric quantity required by the update of the first firmware update quantity, the first firmware update quantity and the second firmware update quantity. And determining whether the component to be updated can execute firmware updating operation based on the second firmware updating amount based on the updated electric quantity and the current electric quantity of the electronic equipment.
According to the method provided by the embodiment of the application, through the steps S101-S103, the updating electric quantity required by firmware updating can be adjusted in real time in the firmware updating process, so that the components to be updated can be completely and safely updated, and the situation that the electronic equipment is crashed or cannot be used due to the interruption of the firmware updating can be prevented. Meanwhile, the firmware can be updated immediately when the reserved electric quantity is larger than or equal to the update electric quantity required by firmware update, so that the occupied time of the firmware update is reduced, and the efficiency of the firmware update is further improved.
Specific processing flows in the firmware updating method provided by the embodiment of the application are described. Referring to fig. 2, fig. 2 is a flow chart illustrating a firmware updating method according to a second embodiment of the present application.
As shown in fig. 2, determining the amount of power required for updating the first firmware update amount in step S102 includes:
step S201, determining a power mode of the electronic device corresponding to the component to be updated.
In this embodiment, the component to be updated is in the electronic device. The electronic device may include a computer, a cell phone, a television, etc. The embodiment of the application is not limited to specific electronic equipment. The component to be updated may include BIOS, EC, PD, camera, etc. The embodiment of the application is not limited to the specific parts to be updated. The power modes may include AC (Alternating Current, alternating Current supply) and DC (Direct Current supply).
In step S202a, in response to the electronic device corresponding to the component to be updated being in the first power mode, the electronic device is switched from the first power mode to the second power mode.
In this embodiment, taking the component to be updated as the BIOS as an example, the first power mode may be AC, and the second power mode may be DC. The electronic device is in AC mode, the BIOS sends a power mode switching signal to the EC, which switches the electronic device from AC to DC in response to the power mode switching signal.
Step S202b, in response to the electronic device corresponding to the component to be updated being in the second power mode, performing test update on the test update area of the component to be updated based on the first firmware update amount, to obtain an electric quantity required for updating the first firmware update amount.
In this embodiment, taking the component to be updated as the BIOS as an example, the test update area of the component to be updated may be a test update area Tz in an SPI Flash Part (Serial Peripheral Interface Flash Part ) corresponding to the BIOS, where the SPI Flash Part further includes a formal update area BIOS ROM, tz and the BIOS ROM do not overlap, and the capacity of the test update area is smaller than that of the formal update area. For example, a region of 16MB is allocated to the corresponding BIOS in the SPI Flash Part, where the BIOS ROM may occupy 10MB in 16MB, and tz may occupy 1MB in 6MB except the BIOS ROM in the SPI Flash Part.
And responding to the electronic equipment corresponding to the BIOS at DC, sending a recorded electric quantity signal 1 to the EC by the BIOS, and reading and recording the current battery electric quantity RC1 by the EC in response to the recorded electric quantity signal 1. The BIOS performs a test update to Tz based on the test brushing program of the BIOS. In response to the Tz test update being completed, the BIOS sends a recorded power signal 2 to the EC, and the EC reads and records the current battery power RC2 in response to the recorded power signal 2. And finally, the RC1 and the RC2 are differenced to obtain the electric quantity required by the test update of the test brushing program of the BIOS.
In step S203a, when the electronic device is in the second power mode, the test update area of the component to be updated is updated based on the first firmware update amount, so as to obtain the electric quantity required by updating the first firmware update amount.
In this embodiment, in response to the electronic device corresponding to the BIOS being at DC, the BIOS sends the recorded power signal 1 to the EC, and the EC reads and records the current battery power RC1 in response to the recorded power signal 1. The BIOS performs a test update to Tz based on the test brushing program of the BIOS. In response to the Tz test update being completed, the BIOS sends a recorded power signal 2 to the EC, and the EC reads and records the current battery power RC2 in response to the recorded power signal 2. And finally, the RC1 and the RC2 are differenced to obtain the electric quantity required by the test update of the test brushing program of the BIOS.
Step S204, the electronic device is switched from the second power mode to the first power mode.
In this embodiment, in response to the Tz test update being completed, the BIOS sends a power mode switching signal to the EC, which switches the electronic device from DC to AC in response to the power mode switching signal.
According to the method provided by the embodiment of the application, through the steps S201-S204, the updating electric quantity required by firmware updating can be adjusted in real time in the firmware updating process, so that the components to be updated can be completely and safely updated, and the situation that the electronic equipment is crashed or cannot be used due to the interruption of the firmware updating can be prevented. Meanwhile, the firmware can be updated immediately when the reserved electric quantity is larger than or equal to the update electric quantity required by firmware update, so that the occupied time of the firmware update is reduced, and the efficiency of the firmware update is further improved.
Specific processing flows in the firmware updating method provided by the embodiment of the application are described. Referring to fig. 3, fig. 3 is a flowchart illustrating a firmware update method according to a third embodiment of the present application.
As shown in fig. 3, determining whether the component to be updated is capable of performing a firmware update operation based on the second firmware update amount, the amount of power required for updating based on the first firmware update amount, and the second firmware update amount in step S103 includes:
in step S301, an update power required for the component to be updated is calculated based on the power required for the update by the first firmware update amount, and the second firmware update amount.
In this embodiment, the updated charge may be an updated charge value of the battery. The updated charge may also be an updated charge interval of the battery.
In this embodiment, step S301 may include steps S3021 to S3022.
In step S3021, a first ratio between the size of the second firmware update amount and the size of the first firmware update amount is determined.
In step S3022, the first ratio is multiplied by the amount of power required for updating the first firmware update amount to obtain a first amount of power, and the first amount of power is determined as the updated amount of power.
As an example, for steps S3021 to S3022, the update amount Sd1 required for the component to be updated can be determined by the following formula (2).
Sd1 =(Uz/Tz)* Ce (2)
Where Uz represents the size of the second firmware update amount, tz represents the size of the first firmware update amount, and Ce represents the amount of power required for updating the first firmware update amount.
Step S302, based on the update power amount, it is determined whether the component to be updated is capable of performing a firmware update operation based on the second firmware update amount.
According to the method provided by the embodiment of the application, through the steps S301-S302, the updating electric quantity required by firmware updating can be adjusted in real time in the firmware updating process, so that the components to be updated can be completely and safely updated, and the situation that the electronic equipment is crashed or cannot be used due to the interruption of the firmware updating can be prevented. Meanwhile, the firmware can be updated immediately when the reserved electric quantity is larger than or equal to the update electric quantity required by firmware update, so that the occupied time of the firmware update is reduced, and the efficiency of the firmware update is further improved.
Specific processing flows in the firmware updating method provided by the embodiment of the application are described. Referring to fig. 4, fig. 4 is a flowchart illustrating a firmware update method according to a fourth embodiment of the present application.
As shown in fig. 4, the calculating of the update power required for the component to be updated based on the power required for the update of the first firmware update amount, and the second firmware update amount in step S301 includes:
step S401, determining a first ratio between the size of the second firmware update amount and the size of the first firmware update amount.
In step S402, the first ratio is multiplied by the electric quantity required for updating the first firmware updating quantity to obtain a first electric quantity.
In step S403, the full charge capacity of the battery is obtained.
Step S404, multiplying the full charge capacity by a preset ratio to obtain a second electric quantity.
In this embodiment, the full charge capacity of the battery may include: the battery is charged with the corresponding capacitance. The preset ratio may include: a predetermined safe charge ratio, such as 5%. The embodiments of the present application are not limited to specific proportions.
Step S405, the first electric quantity and the second electric quantity are added to obtain an updated electric quantity.
As an example, with respect to steps S401 to S405, the update electric quantity Sd2 required for the component to be updated can be determined by the following formula (3).
Sd2=(Uz/Tz)*Ce+FCC*n%(2)
Where Uz represents the size of the second firmware update amount, tz represents the size of the first firmware update amount, ce represents the amount of electricity required for updating the first firmware update amount, FCC represents the full capacity of the battery, and n% represents a preset ratio.
According to the method provided by the embodiment of the application, through the steps S401-S405, the updating electric quantity required by firmware updating can be adjusted in real time in the firmware updating process, so that the components to be updated can be completely and safely updated, and the situation that the electronic equipment is crashed or cannot be used due to the interruption of the firmware updating can be prevented. Meanwhile, the firmware can be updated immediately when the reserved electric quantity is larger than or equal to the update electric quantity required by firmware update, so that the occupied time of the firmware update is reduced, and the efficiency of the firmware update is further improved.
Specific processing flows in the firmware updating method provided by the embodiment of the application are described. Referring to fig. 5, fig. 5 is a flowchart illustrating a firmware update method according to a fifth embodiment of the present application.
As shown in fig. 5, determining whether the component to be updated is capable of performing a firmware update operation based on the second firmware update amount based on the update power amount in step S302 includes:
step S501, the current electric quantity of the battery is obtained.
In this embodiment, taking the component to be updated as the BIOS, the BIOS sends a signal for recording the current electric quantity to the EC, and the EC reads and records the current battery electric quantity of the battery in response to the signal for recording the current electric quantity.
In step S502a, in response to the current power being greater than or equal to the updated power, it is determined that the component to be updated is capable of performing a firmware update operation based on the second firmware update amount.
In this embodiment, the updated power may be a battery power value. The updated charge may also be an updated charge interval of the battery. And in response to the current electric quantity being greater than or equal to the battery update electric quantity value, determining that the component to be updated is capable of performing a firmware update operation on the formal update area based on the second firmware update quantity.
Or, in response to the current power being greater than the maximum value of the updated power interval of the battery, determining that the component to be updated is capable of performing a firmware update operation on the formal update area based on the second firmware update amount.
Or, in response to the current electric quantity being within the updated electric quantity interval of the battery, determining that the component to be updated can perform firmware updating operation on the formal updating area based on the second firmware updating quantity.
As an example, the current power is 35% power, the updated power may be 30% power, the current power is greater than the updated power, and it is determined that the component to be updated is capable of performing a firmware update operation on the formal update area based on the second firmware update amount.
As an example, the current power is 45% power, the updated power may be 30% power-40% power, the current power is greater than the maximum 40% power of the updated power interval of the battery, and it is determined that the component to be updated is capable of performing a firmware update operation on the formal update area based on the second firmware update amount.
As an example, the current power is 35% power, the updated power may be 30% power-40% power, the current power is within an updated power interval of the battery, and it is determined that the component to be updated is capable of performing a firmware update operation on the formal update area based on the second firmware update amount.
In step S503a, based on the second firmware update amount, a timing at which the component to be updated can perform the completion firmware update operation based on the second firmware update amount is determined.
In this embodiment, the firmware update operation is performed on the BIOS ROM based on the second firmware update amount of the BIOS, and the time when the firmware update operation is completed by the BIOS is calculated according to the data processing speed of the BIOS and the second firmware update amount.
In step S502b, in response to the current power being less than the updated power, it is determined that the component to be updated cannot perform the firmware update operation based on the second firmware update amount.
In this embodiment, in response to the current power being less than the battery update power value, it is determined that the component to be updated cannot perform a firmware update operation on the formal update area based on the second firmware update amount.
Or, in response to the current power being less than the minimum value of the updated power interval of the battery, determining that the component to be updated cannot perform a firmware update operation on the formal update area based on the second firmware update amount.
In this embodiment, after step S502b, the method further includes: the user is notified to power the electronic device to place the electronic device in the first power mode.
In step S503b, in response to the electronic device being in the first power mode, a time at which the component to be updated is able to perform the firmware update operation based on the second firmware update amount is determined based on the current power, the update power, and the charging speed of the battery.
In this embodiment, the charging speed of the battery is determined in response to the electronic device being at AC. And determining the charging electric quantity required to be charged by the battery according to the difference value of the current electric quantity and the updated electric quantity value. And calculating the moment when the component to be updated can execute the firmware updating operation based on the second firmware updating amount according to the charging speed and the charging electric quantity.
Or, in response to the electronic device being at AC, determining a charging speed of the battery. And determining the charging electric quantity required to be charged by the battery according to the difference value of the minimum value of the current electric quantity and the updated electric quantity interval. And calculating the moment when the component to be updated can execute the firmware updating operation based on the second firmware updating amount according to the charging speed and the charging electric quantity.
According to the method provided by the embodiment of the application, through the steps S501-S503b, the updating electric quantity required by firmware updating can be adjusted in real time in the firmware updating process, so that the components to be updated can be completely and safely updated, and the situation that the electronic equipment is crashed or cannot be used due to the interruption of the firmware updating can be prevented. Meanwhile, the firmware can be updated immediately when the reserved electric quantity is larger than or equal to the update electric quantity required by firmware update, so that the occupied time of the firmware update is reduced, and the efficiency of the firmware update is further improved.
FIG. 6 shows an application scenario diagram of a firmware update method provided by an embodiment of the present application;
referring to fig. 6, an application scenario diagram of a firmware update method provided by an embodiment of the present application is applied to a component to be updated BIOS to perform a firmware update operation based on a firmware update program. First, a firmware update program and a brush program which need to be updated are pushed to the BIOS. And calling UFOI to package the firmware updating program and the brushing program into a Capsule, and restarting the system. If the electronic device is in the AC mode, the BIOS sends a power mode switching signal to the EC, which switches the AC from the AC to the DC in response to the power mode switching signal. And responding to the electronic equipment corresponding to the BIOS at DC, sending a recorded electric quantity signal 1 to the EC by the BIOS, and reading and recording the current battery electric quantity RC1 by the EC in response to the recorded electric quantity signal 1. The BIOS performs a test update on the Tz region based on a swipe program of the BIOS. In response to the Tz region test update being completed, the BIOS sends a recorded power signal 2 to the EC, and the EC reads and records the current battery power RC2 in response to the recorded power signal 2, starts the AC, and switches the electronic equipment from DC to AC. And (3) differentiating RC1 and RC2 to obtain the electric quantity required by the test update of the test brushing program of the BIOS. Based on the electric quantity required by the test update of the test program, the size of the test program and the size of the firmware update program, the update electric quantity Sd required by the BIOS to execute the firmware update operation on the BIOS ROM based on the firmware update program is calculated. The BIOS sends a recorded power signal 3 to the EC, and the EC reads and records the current battery power RC3 in response to the recorded power signal 3. In response to RC3 being greater than or equal to Sd, the BIOS performs a firmware update operation on the BIOS ROM based on the firmware update program, and after the firmware update is completed, the system is restarted. And in response to the RC3 being smaller than Sd, notifying a user to plug in a power supply to charge the electronic equipment until the RC3 is larger than or equal to Sd, executing firmware updating operation on the BIOS ROM by the BIOS based on a firmware updating program, and restarting the system after the firmware updating is completed.
FIG. 7 shows another application scenario diagram of a firmware update method provided by an embodiment of the present application;
referring to fig. 7, another application scenario diagram of the firmware update method provided by the embodiment of the present application is applied to division of firmware update areas where the BIOS of the component to be updated performs firmware update. The memory corresponding to the BIOS of the component to be updated is SPI FLASH PART. Wherein, the update area corresponding to the first firmware update amount is Tz hole. The BIOS may perform a test update to the Tz hole based on the first firmware update amount. The update area corresponding to the second firmware update amount is BIOS ROM. The BIOS may perform a formal firmware update to the BIOS ROM based on the first amount of firmware update. The first firmware update amount may be a test program. The second firmware update amount may be: the firmware update program that needs to be performed by the component to be updated of the electronic device. The size of the first firmware update amount is smaller than the size of the second firmware update amount. The brushing program is independent of the firmware update program that the electronic device needs to perform.
It can be understood that the application scenarios of the firmware update method of fig. 6 and fig. 7 are only some exemplary implementations of the embodiment of the present application, and the application scenarios of the firmware update method of the embodiment of the present application include, but are not limited to, the application scenarios of the firmware update method shown in fig. 6 and fig. 7.
Continuing with the description below of an exemplary architecture of firmware update apparatus 70 implemented as a software module provided by an embodiment of the present application, in some embodiments, as shown in fig. 8, the software modules in firmware update apparatus 70 may include: a reading module 701, configured to determine a first firmware update amount and a second firmware update amount, where the first firmware update amount is smaller than the second firmware update amount; a test module 702, configured to determine an amount of power required for updating the first firmware update amount; the determining module 703 may be configured to determine, based on the amount of power required for updating the first firmware update amount, and the second firmware update amount, whether the component to be updated is capable of performing a firmware update operation based on the second firmware update amount.
It should be noted that, the description of the apparatus according to the embodiment of the present application is similar to the description of the embodiment of the method described above, and has similar beneficial effects as the embodiment of the method, so that a detailed description is omitted. The technical details of the firmware updating apparatus provided in the embodiment of the present application may be understood from the description of any one of fig. 1 to fig. 7.
According to an embodiment of the present application, the present application also provides an electronic device and a non-transitory computer-readable storage medium.
Fig. 9 shows a schematic block diagram of an example electronic device 800 that may be used to implement an embodiment of the application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the applications described and/or claimed herein.
As shown in fig. 9, the electronic device 800 includes a computing unit 801 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 802 or a computer program loaded from a storage unit 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to the bus 804.
Various components in electronic device 800 are connected to I/O interface 805, including: an input unit 806 such as a keyboard, mouse, etc.; an output unit 807 such as various types of displays, speakers, and the like; a storage unit 808, such as a magnetic disk, optical disk, etc.; and a communication unit 809, such as a network card, modem, wireless communication transceiver, or the like. The communication unit 809 allows the electronic device 800 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunication networks.
The computing unit 801 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 801 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the respective methods and processes described above, such as a firmware update method. For example, in some embodiments, the firmware update method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 808. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 800 via the ROM 802 and/or the communication unit 809. When a computer program is loaded into RAM 803 and executed by computing unit 801, one or more steps of the firmware update method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the firmware update method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present application may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present application, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in this disclosure may be performed in parallel, sequentially, or in a different order, provided that the desired results of the disclosed embodiments are achieved, and are not limited herein.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present application, the meaning of "a plurality" is two or more, unless explicitly defined otherwise.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A firmware update method, comprising:
determining a first firmware update amount and a second firmware update amount, the first firmware update amount being smaller in size than the second firmware update amount;
determining the electric quantity required by updating the first firmware updating quantity;
determining whether a component to be updated is capable of performing a firmware update operation based on the second firmware update amount based on an amount of power required for the first firmware update amount to be updated, the first firmware update amount, and the second firmware update amount.
2. The method of claim 1, the determining an amount of power required for the first firmware update amount to update comprising:
switching the electronic equipment from a first power supply mode to a second power supply mode in response to the electronic equipment corresponding to the part to be updated being in the first power supply mode;
and determining the electric quantity required by updating the first firmware updating quantity when the electronic equipment is in the second power supply mode.
3. The method of claim 2, the determining an amount of power required for the first amount of firmware update to update while the electronic device is in a second power mode, comprising:
performing test updating on the test updating area of the component to be updated based on the first firmware updating amount to obtain the electric quantity required by updating the first firmware updating amount;
And switching the electronic equipment from the second power supply mode to the first power supply mode.
4. The method of claim 1, the determining whether a component to be updated is capable of performing a firmware update operation based on the second firmware update amount based on an amount of power required for the update of the first firmware update amount, and the second firmware update amount, comprising:
calculating the update electric quantity required by the to-be-updated component based on the electric quantity required by the update of the first firmware update quantity, the first firmware update quantity and the second firmware update quantity;
based on the updated charge, it is determined whether the component to be updated is capable of performing a firmware update operation based on the second firmware update amount.
5. The method of claim 4, the calculating an update power required for the component to be updated based on the power required for the update of the first firmware update amount, and the second firmware update amount, comprising:
determining a first ratio between the magnitude of the second firmware update amount and the magnitude of the first firmware update amount;
multiplying the first ratio by the electric quantity required by updating the first firmware updating quantity to obtain a first electric quantity, and determining the first electric quantity as the updating electric quantity.
6. The method of claim 4, the calculating an update power required for the component to be updated based on the power required for the update of the first firmware update amount, and the second firmware update amount, comprising:
determining a first ratio between the magnitude of the second firmware update amount and the magnitude of the first firmware update amount;
multiplying the first ratio by the electric quantity required by updating the first firmware updating quantity to obtain a first electric quantity;
acquiring the full charge capacity of the battery;
multiplying the full capacitance by a preset proportion to obtain a second electric quantity;
and adding the first electric quantity and the second electric quantity to obtain the updated electric quantity.
7. The method of claim 4, the determining, based on the updated charge, whether the component to be updated is capable of performing a firmware update operation based on the second firmware update amount, comprising:
acquiring the current electric quantity of the battery;
determining that the component to be updated is capable of performing the firmware update operation based on the second firmware update amount in response to the current power being greater than or equal to the update power;
and in response to the current power being less than the updated power, determining that the component to be updated cannot perform the firmware update operation based on the second firmware update amount.
8. The method of claim 7, the method further comprising, after determining that the component to be updated cannot perform the firmware update operation based on the second firmware update amount in response to the current power being less than the update power:
in response to the electronic device being in a first power mode, determining a time at which the component to be updated is capable of performing the firmware update operation based on the second firmware update amount based on the current power level, the updated power level, and a charging speed of the battery.
9. A firmware updating apparatus, comprising:
the reading module is used for determining a first firmware updating amount and a second firmware updating amount, and the size of the first firmware updating amount is smaller than that of the second firmware updating amount;
the test module is used for determining the electric quantity required by updating the first firmware updating quantity;
and the determining module is used for determining whether the component to be updated can execute firmware updating operation based on the second firmware updating amount or not based on the electric quantity required by updating the first firmware updating amount, the first firmware updating amount and the second firmware updating amount.
10. An electronic device, comprising:
At least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.
CN202311278378.3A 2023-09-28 2023-09-28 Firmware updating method and device and electronic equipment Pending CN117234559A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311278378.3A CN117234559A (en) 2023-09-28 2023-09-28 Firmware updating method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311278378.3A CN117234559A (en) 2023-09-28 2023-09-28 Firmware updating method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN117234559A true CN117234559A (en) 2023-12-15

Family

ID=89084118

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311278378.3A Pending CN117234559A (en) 2023-09-28 2023-09-28 Firmware updating method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN117234559A (en)

Similar Documents

Publication Publication Date Title
CN106772091B (en) Method and device for updating battery capacity value and terminal
CN111800462A (en) Micro-service instance processing method and device, computer equipment and storage medium
CN114978292A (en) Satellite network connection method, system, electronic equipment and storage medium
CN103425539B (en) Information processing method and device
EP4311074A1 (en) Charging method and apparatus for energy storage power source, and device and medium
CN117234559A (en) Firmware updating method and device and electronic equipment
CN116545905A (en) Service health detection method and device, electronic equipment and storage medium
CN115469561A (en) Simulation test method and device, electronic device and storage medium
CN109542604A (en) The method, apparatus, equipment and storage medium of grouting socket in thread
CN117742925A (en) Data processing method and device, electronic equipment and storage medium
EP4307515A1 (en) Method and apparatus for charge control, terminal device and storage medium
CN116440504B (en) Game resource processing method, device and storage medium
CN117411128A (en) Charging control method, device, equipment and storage medium
CN110996374B (en) Wireless network control method, device, equipment and medium
CN117369616A (en) Electronic equipment power consumption control method and device, electronic equipment and storage medium
CN116905604A (en) Multi-mode control method, device, equipment and medium for hybrid engineering machinery
CN116091161A (en) Operation management method and device of filter element, electronic equipment and storage medium
CN118170470A (en) Display interface switching method and device, electronic equipment and storage medium
CN115390992A (en) Virtual machine creating method, device, equipment and storage medium
CN116298970A (en) Electric quantity calculation method and device, electronic equipment and storage medium
CN116559706A (en) Cell cycle life prediction method and device, electronic equipment and storage medium
CN117774767A (en) Power battery voltage screening method and device and vehicle
CN117096985A (en) External charging method, device, equipment and storage medium
CN115424658A (en) Storage unit testing method and device, electronic equipment and storage medium
CN118051173A (en) Storage process management method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination