CN115904450A - Embedded equipment firmware upgrading device and method, embedded equipment and storage medium - Google Patents
Embedded equipment firmware upgrading device and method, embedded equipment and storage medium Download PDFInfo
- Publication number
- CN115904450A CN115904450A CN202211362817.4A CN202211362817A CN115904450A CN 115904450 A CN115904450 A CN 115904450A CN 202211362817 A CN202211362817 A CN 202211362817A CN 115904450 A CN115904450 A CN 115904450A
- Authority
- CN
- China
- Prior art keywords
- firmware
- partition
- upgrading
- parameter
- partitions
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 35
- 238000005192 partition Methods 0.000 claims abstract description 181
- 238000011161 development Methods 0.000 abstract description 2
- 230000002159 abnormal effect Effects 0.000 description 4
- 238000004891 communication Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 230000005055 memory storage Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000005856 abnormality Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000007405 data analysis Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
Images
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Abstract
The embodiment provides an embedded device firmware upgrading method and device, an embedded device and a storage medium, and belongs to the technical field of embedded development. The device comprises: at least two firmware partitions with the same basic firmware burned therein; a uboot partition storing a boot loader for determining a firmware partition used when the system is started from among the at least two firmware partitions; and the uboot-env subarea stores parameter configuration information, and the parameter configuration information at least comprises a subarea parameter used for indicating a firmware subarea used when the system is started and an upgrading time parameter used for indicating the times of upgrading failure of basic firmware and judging whether the subarea parameter needs to be updated. By means of at least two firmware partitions with the same basic firmware burned, when the embedded device cannot be started due to failure of firmware upgrade, the firmware partitions used when the system is started can be automatically switched, stability of the system is improved, and user experience is improved.
Description
Technical Field
The present application relates to the field of embedded development technologies, and in particular, to an apparatus and a method for upgrading firmware of an embedded device, and a computer-readable storage medium.
Background
Embedded devices are widely used in the aspects of daily life of people, and as technologies are updated iteratively, embedded devices also need to update firmware continuously, however, when firmware is updated, firmware update fails due to a series of reasons such as update data packet analysis error, update firmware abnormity, embedded device power failure, and the like, so that a system of the embedded devices cannot be started, and poor use experience is brought to consumers, and consumers are not professional technicians in the field.
Disclosure of Invention
The main purpose of the embodiments of the present invention is to provide an embedded device firmware upgrading apparatus, an embedded device firmware upgrading method, an embedded device, and a computer readable storage medium, so that the embedded device can still normally start a system when the firmware upgrading fails, thereby improving the user experience.
In order to achieve the above object, a first aspect of the embodiments of the present invention provides an apparatus for upgrading firmware of an embedded device, where the apparatus includes:
the firmware interface comprises at least two firmware partitions, wherein the same basic firmware is burnt in the at least two firmware partitions;
the boot program is used for determining a firmware partition used when the system is started from the at least two firmware partitions;
the uboot-env subarea is used for storing parameter configuration information, the parameter configuration information at least comprises a subarea parameter and an upgrading time parameter, the subarea parameter is used for indicating a firmware subarea used when a system is started, the upgrading time parameter is used for indicating the number of times of upgrading failure of the basic firmware, and the subarea parameter is updated when the upgrading time parameter is larger than or equal to a preset threshold value.
In some embodiments, the boot loader reads the parameter configuration information from the uboot-env partition, and determines a system boot environment of the embedded device according to the parameter configuration information, where the system boot environment includes at least a firmware partition used when a system is booted.
In some embodiments, the apparatus further comprises a file system for reading and modifying the parameter configuration information.
In some embodiments, the embedded device firmware upgrade apparatus is a flash memory.
An embedded device firmware upgrade method applied to the apparatus of any one of claims 1 to 4, the method comprising:
configuring at least two firmware partitions, wherein the same basic firmware is burned in the at least two firmware partitions;
determining a firmware upgrading partition from the firmware partitions according to the partition parameters, and upgrading the basic firmware in the firmware upgrading partition;
restarting the system in the firmware upgrading partition, and updating the upgrading time parameter after starting the system each time;
updating the partition parameters under the condition that the system is failed to restart and the upgrading time parameter is not less than a preset threshold value;
and determining a firmware partition used when the system is started from the firmware partition according to the updated partition parameters, and starting the system in the corresponding firmware partition.
In some embodiments, each firmware partition is provided with a corresponding preset number, the determining a firmware upgrade partition from the firmware partitions according to the partition parameters, and upgrading the basic firmware in the firmware upgrade partition includes:
taking the firmware partition with the preset number equal to the partition parameter as the firmware upgrading partition;
and writing upgrading firmware into the firmware upgrading partition so as to upgrade the basic firmware.
In some embodiments, after restarting the system in the firmware upgrade partition and updating the upgrade time parameter after each restart of the system, the method further includes:
and restarting the system in the firmware upgrading partition under the condition that the system is failed to restart and the upgrading time parameter is smaller than a preset threshold value.
In some embodiments, the method further comprises:
and initializing the upgrading time parameter under the condition of successfully starting the system.
An embedded device comprising an apparatus as described in any of the embodiments of the first aspect.
A computer readable storage medium for computer readable storage, wherein the computer readable storage medium stores one or more programs which are executable by one or more processors to implement the embedded device firmware upgrade method as described in any one of the second aspect embodiments.
The embedded device firmware upgrading device and method, the embedded device and the computer readable storage medium provided by the embodiment of the invention are characterized in that at least two firmware partitions burnt with the same basic firmware are configured in the embedded device firmware upgrading device, partition parameters and upgrading time parameters are configured in the uboot-env partition as parameter configuration information, wherein the partition parameters are used for indicating the firmware partitions used when a system is started, the upgrading time parameters are used for indicating the times of system upgrading basic firmware failure, a starting boot program stored in the uboot partition reads the parameter configuration information from the uboot-env partition, the firmware partitions used when the system is started are determined according to the read partition parameters, the basic firmware burnt in the firmware partitions are upgraded, when the system cannot be successfully started from the firmware partitions after the basic firmware is upgraded, the firmware upgrading is regarded as failed, the upgrading time parameters are updated, and when the upgrading time parameters are not less than a preset threshold value, the partition parameters are updated, the firmware partitions used when the system is started are switched, and the system is started in the firmware partitions. Based on the embedded device firmware upgrading device and method, the embedded device, and the computer readable storage medium provided by the embodiment of the invention, by configuring at least two firmware partitions in which the same basic firmware is burned, when the embedded device fails to start from the corresponding firmware partition due to firmware upgrading, the firmware partition used when the system starts can be automatically switched, so that the system of the embedded device can be normally started, the stability of the system is improved, and the user experience is improved.
Drawings
FIG. 1 is a simulation block diagram of an embedded device firmware upgrade apparatus according to an embodiment of the present invention;
FIG. 2 is a flowchart of steps of a method for upgrading firmware of an embedded device according to an embodiment of the present invention;
FIG. 3 is a flowchart of an embedded device firmware upgrade method according to an embodiment of the present invention;
FIG. 4 is a sub-flowchart of an embedded device firmware upgrade method according to an embodiment of the present invention;
the accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the example serve to explain the principles of the invention and not to limit the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of and not restrictive on the broad application.
It is noted that while functional block divisions are provided in device diagrams and logical sequences are shown in flowcharts, in some cases, the steps shown or described may be executed out of order from that shown or the flowchart. The terms first, second and the like in the description and in the claims, and the drawings described above, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
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 present application only and is not intended to be limiting of the application.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the disclosure.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flowcharts shown in the figures are illustrative only and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be run in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual operation sequence may be changed according to the actual situation.
Embedded devices are widely used in the aspects of daily life of people, and as technologies are updated iteratively, embedded devices also need to update firmware continuously, however, when firmware is updated, firmware update fails due to a series of reasons such as data transmission fluctuation, data analysis error, firmware update abnormality, embedded device power failure, and the like, so that a system of the embedded devices cannot be started, which brings a poor use experience to consumers, and consumers are not professional technicians in the field. Based on this, the embodiment of the invention provides an embedded device firmware upgrading device, an embedded device firmware upgrading method, an embedded device and a computer readable storage medium.
The method for upgrading the firmware of the embedded equipment, provided by the embodiment of the invention, can be applied to a terminal, a server side and software running in the terminal or the server side. In some embodiments, the terminal may be a smartphone, tablet, laptop, desktop computer, smart watch, or the like; the server side can be configured into an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, and cloud servers for providing basic cloud computing services such as cloud service, a cloud database, cloud computing, cloud functions, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN (content delivery network) and big data and artificial intelligence platforms; the software may be an application or the like implementing the embedded device firmware upgrade method, but is not limited to the above form.
Embodiments of the invention are operational with numerous general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like. The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote memory storage media including memory storage devices.
Referring to fig. 1, an embodiment of the present invention provides an apparatus for upgrading firmware of an embedded device, including:
the firmware interface comprises at least two firmware partitions, wherein the same basic firmware is burnt in the at least two firmware partitions;
the boot-up program is used for determining a firmware partition used when the system is started from at least two firmware partitions;
the uboot-env subarea is stored with parameter configuration information, the parameter configuration information at least comprises a subarea parameter and an upgrading time parameter, the subarea parameter is used for indicating a firmware subarea used when the system is started, the upgrading time parameter is used for indicating the number of times of basic firmware upgrading failure, and the subarea parameter is updated when the upgrading time parameter is larger than or equal to a preset threshold value.
In some embodiments, a boot program stored in an uboot partition in the firmware upgrade apparatus of the embedded device determines a boot environment when the system is started by reading parameter configuration information stored in the uboot-env partition, and when the partition parameters are read, the firmware partition used when the system is started is determined according to the partition parameters.
In some embodiments, the apparatus further comprises a config partition to store a configuration file for system operation.
In some embodiments, the apparatus further includes a file system, where the file system may access the parameter configuration information maintained in the uboot-env partition, and add, delete, modify, and check the parameter configuration information in the uboot-env partition through an fw _ printenv tool and/or an fw _ setenv tool, so as to modify an environment variable at system startup, and by modifying a partition parameter, a firmware partition used at system startup may be switched.
In some embodiments, the embedded device firmware upgrade apparatus may be a flash memory, such as nand flash and nor flash, and the file system may be jffs, jffs2, etc. when the embedded device firmware upgrade apparatus is nor flash, and yaffs, yaffs2, etc. when the embedded device firmware upgrade apparatus is nand flash.
The firmware upgrading device of the embedded device is provided based on the embodiment of the invention, at least two firmware partitions which are burned with the same basic firmware capable of normally starting an operating system of the embedded device are used, partition parameters and upgrading time parameters are set in the uboot-env partitions which can be accessed by both the uboot partition and the file system, the partition parameters are used for determining the firmware partition used when the system is started, the upgrading time parameters are used for indicating the times of failure of firmware upgrading, when the upgrading time parameters are greater than or equal to a preset threshold value, the system is failed to start for multiple times and the upgraded basic firmware is abnormal, and the partition parameters are modified at the moment, so that the firmware partition used when the system is started is switched, and the system is started in the firmware partition. Therefore, when the basic firmware of the embedded equipment fails to be upgraded, the embodiment of the invention can still automatically switch to another firmware partition to normally start the system, thereby enhancing the stability of the system of the embedded equipment and improving the user experience.
The embodiment of the present invention further provides an embedded device firmware upgrading method, which includes, but is not limited to, the following steps S201 to S205.
Step S201, configuring at least two firmware partitions, wherein the same basic firmware is burned in the at least two firmware partitions;
step S202, determining a firmware upgrading partition from the firmware partitions according to the partition parameters, and upgrading the basic firmware in the firmware upgrading partition;
step S203, restarting the system in the firmware upgrading partition, and updating the upgrading time parameter after starting the system each time;
step S204, updating the partition parameters under the condition that the system is failed to restart and the upgrading time parameter is not less than a preset threshold value;
step S205, determining a firmware partition used when the system is started from the firmware partitions according to the updated partition parameters, and starting the system in the corresponding firmware partition.
In some embodiments, the at least two firmware partitions are configured to point to at least two firmware partitions, where the at least two firmware partitions are burned with the same basic firmware that can be used for normally booting the embedded device.
In some embodiments, referring to fig. 3, taking the example where the firmware partition includes a first firmware partition and a second firmware partition, and the default partition parameters initially point to the first firmware partition, a boot loader stored in the uboot partition reads parameter configuration information from the uboot-env partition, and determining to upgrade the basic firmware in the first firmware partition according to the partition parameters in the parameter configuration information, after the base firmware in the first firmware partition is upgraded, the system is booted from the first firmware partition, at which point, if the system fails to start in the kernel start stage after the new firmware is applied, namely, the upgrade of the basic firmware is failed, and after the startup of the kernel in the startup stage fails, the software watchdog of the kernel automatically restarts the system, and re-entering the uboot starting stage, updating the upgrading time parameter every time the uboot is started, specifically, even if the upgrade time parameter is increased, the boot program is started to read the partition parameter and the upgrade time parameter from the uboot-env partition again, when the upgrade time parameter is smaller than the preset threshold value, the system restart failure is considered to be caused by the power failure of the embedded device or other accidental factors, the system is tried to be restarted, after the system is restarted and uboot is entered, the upgrading times parameter is increased progressively, the steps are circulated until the upgrading times parameter is accumulated to be more than or equal to a preset threshold value, the system fails to start for many times, the system start-up failure is considered to be caused by the upgraded basic firmware exception, and based on this, when the upgrade number parameter is not less than the preset threshold value, updating the partition parameters to enable the partition parameters to point to the second firmware partition, starting a bootstrap program after reading the updated partition parameters, the operating system of the embedded device is booted from the second firmware partition using the base firmware without upgrading.
Based on this, in the embodiment of the present invention, two firmware partitions in which the same basic firmware is burned are configured, a partition parameter for indicating a firmware partition used when a system is started and an upgrade frequency parameter for indicating the number of times of upgrade failure of the basic firmware and accordingly whether the partition parameter needs to be updated are set in the uboot-env partition, after the basic firmware is upgraded in a certain firmware partition, if the system fails to be started from the partition for many times, the upgraded basic firmware is considered to be abnormal, at this time, the partition parameter is updated, so that the system is switched to the firmware partition in which the basic firmware which is not upgraded is stored for starting, thereby improving the stability of the system and improving the user experience.
Referring to fig. 4, in some embodiments, step S202 includes, but is not limited to, the following steps S401 to S402:
step S401, taking the firmware partition with the preset number equal to the partition parameter as a firmware upgrading partition;
step S402, writing upgrading firmware into the firmware upgrading partition to upgrade the basic firmware.
In some embodiments, the system may set a corresponding preset number for each firmware partition in advance, after the uboot is started, read a partition parameter from the uboot-env by starting a boot program, match the corresponding preset number according to a value of the partition parameter, use the firmware partition corresponding to the preset number as a firmware upgrade partition, and write upgrade firmware into the firmware upgrade partition, so as to upgrade basic firmware in the partition. Based on the method provided by the embodiment of the invention, at least two firmware partitions in which the same basic firmware is burned are configured, each firmware partition is numbered, the firmware partitions with the preset numbers equal to the preset numbers are matched as firmware upgrading partitions according to the starting parameters, the upgrading firmware is written into the partitions to upgrade the basic firmware in the partitions without influencing the basic firmware stored in other firmware partitions, so that the firmware partitions used when the system is started can be modified by updating the partition parameters after the firmware upgrading fails, the normal starting of the system is ensured, the system stability of the embedded device is improved, and the user experience is improved.
Referring to fig. 3, it can be understood that, in some embodiments, the upgrade time parameter may be incremented each time the uboot is started, however, when the basic firmware is successfully upgraded and the system kernel can be normally started by using the upgraded basic firmware, if the user restarts the device for multiple times, the upgrade time parameter is also accumulated to a preset threshold value to cause updating of the start parameter, and the firmware partition used when the system is started is switched, so that the device is rolled back to a state before firmware upgrade, and in order to avoid the defect, after the system kernel is successfully started each time, the upgrade time parameter is initialized by the file system, thereby avoiding a situation that the user manually restarts the device for multiple times to cause updating of the start parameter and switching of the firmware partition. In addition, the upgrade time parameter is increased progressively when the uboot is started every time, and the upgrade time parameter is initialized through the file system after the system is started successfully every time, so that when the system is started for multiple times and enters the uboot, but the system is not started successfully, the situation that basic firmware stored in a firmware partition used by the embedded equipment at present is abnormal and cannot be started normally can be judged, and when the upgrade time parameter is increased progressively to a preset threshold value, the partition parameter can be updated, so that the firmware partition used when the system is started is switched, the system can be started from the firmware partition in which the normal basic firmware is stored, the stability of the system is improved, and user experience is improved.
The embodiment of the invention also provides the embedded equipment, which comprises the firmware upgrading device of the embedded equipment.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, where a computer-executable program is stored, and the computer-executable program is executed by one or more control processors, for example, the above steps S201 to S205 in fig. 2, and steps S401 to S402 in fig. 4 are executed, by configuring two firmware partitions with the same basic firmware burned therein, setting a partition parameter for indicating a firmware partition used when starting a system and an upgrade time parameter for indicating the upgrade failure time of the basic firmware and accordingly whether the partition parameter needs to be updated in the uboot-env partition, and after upgrading the basic firmware in a certain firmware partition, if the system fails to start from the partition for multiple times, regarding the upgraded basic firmware as abnormal, at this time, updating the partition parameter, and switching the system to the firmware partition with the basic firmware stored therein, so as to improve the stability of the system and improve the user experience.
The embodiment described in the embodiment of the present invention is for more clearly illustrating the technical solution of the embodiment of the present invention, and does not constitute a limitation to the technical solution provided in the embodiment of the present invention, and it is known to a person skilled in the art that, with the evolution of the technology and the occurrence of a new application scenario, the technical solution provided in the embodiment of the present invention is also applicable to similar technical problems.
It will be appreciated by persons skilled in the art that the solution shown in the figures does not constitute a limitation of the embodiments of the invention, and may comprise more or less steps than those shown, or some steps in combination, or different steps.
The above described embodiments of the apparatus are merely illustrative, wherein the units illustrated as separate components may or may not be physically separate, may be located in one place, or may be distributed over a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
One of ordinary skill in the art will appreciate that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof.
The terms "first," "second," "third," "fourth," and the like in the description of the application and the above-described figures, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be implemented in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that in the present application, "at least one" means one or more, "a plurality" means two or more.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units into only one type of logical functional division may be implemented in practice in other ways, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, which is stored in a computer-readable storage medium and includes multiple instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned computer-readable storage media comprise: various media capable of storing programs, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The preferred embodiments of the present invention have been described above with reference to the accompanying drawings, and are not intended to limit the scope of the embodiments of the invention. Any modifications, equivalents and improvements that may occur to those skilled in the art without departing from the scope and spirit of the embodiments of the present invention are intended to be within the scope of the claims of the embodiments of the present invention.
Claims (10)
1. An embedded device firmware upgrade apparatus, the apparatus comprising:
the firmware interface comprises at least two firmware partitions, wherein the same basic firmware is burnt in the at least two firmware partitions;
the boot program is used for determining a firmware partition used when the system is started from the at least two firmware partitions;
the uboot-env subarea is used for storing parameter configuration information, the parameter configuration information at least comprises a subarea parameter and an upgrading time parameter, the subarea parameter is used for indicating a firmware subarea used when a system is started, the upgrading time parameter is used for indicating the times of upgrading failure of the basic firmware, and the subarea parameter is updated when the upgrading time parameter is larger than or equal to a preset threshold value.
2. The apparatus of claim 1, wherein the boot loader reads the parameter configuration information from the uboot-env partition and determines a system boot environment of the embedded device according to the parameter configuration information, wherein the system boot environment at least includes a firmware partition used when booting a system.
3. The apparatus of claim 1, further comprising a file system configured to read and modify the parameter configuration information.
4. The apparatus of claim 1, wherein the embedded device firmware upgrade apparatus is a flash memory.
5. An embedded device firmware upgrading method applied to the device of any one of claims 1 to 4, the method comprising:
configuring at least two firmware partitions, wherein the same basic firmware is burned in the at least two firmware partitions;
determining a firmware upgrading partition from the firmware partitions according to the partition parameters, and upgrading the basic firmware in the firmware upgrading partition;
restarting the system in the firmware upgrading partition, and updating the upgrading time parameter after starting the system each time;
updating the partition parameters under the condition that the system is failed to restart and the upgrading time parameter is not less than a preset threshold value;
and determining a firmware partition used when the system is started from the firmware partition according to the updated partition parameters, and starting the system in the corresponding firmware partition.
6. The method of claim 5, wherein each firmware partition is provided with a corresponding preset number, and wherein determining a firmware upgrade partition from the firmware partitions according to the partition parameters, in which the base firmware is upgraded, comprises:
taking the firmware partition with the preset number equal to the partition parameter as the firmware upgrading partition;
and writing upgrading firmware into the firmware upgrading partition so as to upgrade the basic firmware.
7. The method of claim 5, wherein restarting the system in the firmware upgrade partition, and after updating the upgrade count parameter after each restart of the system, further comprises:
and restarting the system in the firmware upgrading partition under the condition that the system is failed to restart and the upgrading time parameter is smaller than a preset threshold value.
8. The method of claim 5, further comprising:
and initializing the upgrading time parameter under the condition of successfully starting the system.
9. An embedded device comprising the apparatus of any of claims 1-4.
10. A computer-readable storage medium for computer-readable storage, wherein the computer-readable storage medium stores one or more programs, the one or more programs being executable by one or more processors to implement the embedded device firmware upgrade method of any one of claims 5 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211362817.4A CN115904450A (en) | 2022-11-02 | 2022-11-02 | Embedded equipment firmware upgrading device and method, embedded equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211362817.4A CN115904450A (en) | 2022-11-02 | 2022-11-02 | Embedded equipment firmware upgrading device and method, embedded equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115904450A true CN115904450A (en) | 2023-04-04 |
Family
ID=86494214
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211362817.4A Pending CN115904450A (en) | 2022-11-02 | 2022-11-02 | Embedded equipment firmware upgrading device and method, embedded equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115904450A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103530143A (en) * | 2013-09-02 | 2014-01-22 | 福建二菱电子有限公司 | Network player upgrading method and system partitioning structure |
US20160266894A1 (en) * | 2015-03-11 | 2016-09-15 | Cavium, Inc. | Systems and methods for live upgrade and update of firmware on an embedded networking device |
CN110737449A (en) * | 2019-08-23 | 2020-01-31 | 上海商米科技集团股份有限公司 | Method, apparatus, and machine-readable storage medium for processing device firmware |
CN112527322A (en) * | 2019-08-28 | 2021-03-19 | 阿里巴巴集团控股有限公司 | System upgrading method, device, equipment and storage medium in Internet of things equipment |
CN113641390A (en) * | 2021-10-18 | 2021-11-12 | 苏州万店掌软件技术有限公司 | System upgrading method, device, equipment and storage medium |
-
2022
- 2022-11-02 CN CN202211362817.4A patent/CN115904450A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103530143A (en) * | 2013-09-02 | 2014-01-22 | 福建二菱电子有限公司 | Network player upgrading method and system partitioning structure |
US20160266894A1 (en) * | 2015-03-11 | 2016-09-15 | Cavium, Inc. | Systems and methods for live upgrade and update of firmware on an embedded networking device |
CN110737449A (en) * | 2019-08-23 | 2020-01-31 | 上海商米科技集团股份有限公司 | Method, apparatus, and machine-readable storage medium for processing device firmware |
CN112527322A (en) * | 2019-08-28 | 2021-03-19 | 阿里巴巴集团控股有限公司 | System upgrading method, device, equipment and storage medium in Internet of things equipment |
CN113641390A (en) * | 2021-10-18 | 2021-11-12 | 苏州万店掌软件技术有限公司 | System upgrading method, device, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8423991B2 (en) | Embedded network device and firmware upgrading method | |
CN111492347A (en) | System and method for updating containers | |
CN110134426A (en) | A kind of embedded system upgrade method, device and terminal device | |
CN110162429B (en) | System repair method, server and storage medium | |
CN104915226A (en) | Network device software starting method, device and network device | |
CN112631625B (en) | System upgrading method and device for embedded equipment and embedded equipment | |
WO2020222959A1 (en) | Snapshot recovery states | |
CN114385251A (en) | Operating system booting method, system, terminal and storage medium based on memory | |
CN113032183A (en) | System management method, device, computer equipment and storage medium | |
CN112860297A (en) | Storage system based on automobile binocular camera and system updating method | |
CN106484442B (en) | Server system and method for updating startup mapping file | |
CN115904450A (en) | Embedded equipment firmware upgrading device and method, embedded equipment and storage medium | |
CN109032649B (en) | OTA (over the air) upgrading method, device, equipment and storage medium | |
CN106528114A (en) | Android firmware application, android firmware and firmware upgrading method | |
US20150212866A1 (en) | Management system for service of multiple operating environments, and methods thereof | |
CN108958823B (en) | Method for modifying set value of basic input and output system | |
CN116339908A (en) | Virtual machine starting method, device, computer equipment and storage medium | |
CN114153503A (en) | BIOS control method, device and medium | |
CN108418720A (en) | A kind of restoration methods, device and the routing device of routing device configuration information | |
CN113721959A (en) | Information processing method and device and electronic equipment | |
CN109976940A (en) | A kind of soft start network equipment | |
CN104216797A (en) | Embedded system set value setting system and method and electronic device | |
CN109358871B (en) | Method and device for replacing application system of embedded system equipment and storage medium | |
KR102142905B1 (en) | Automatic Restoring Method of User File System in Communication Terminal | |
CN116841789A (en) | Memory fault processing 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 |