CN114153483A - Fota upgrading method for reducing number of backup partitions - Google Patents
Fota upgrading method for reducing number of backup partitions Download PDFInfo
- Publication number
- CN114153483A CN114153483A CN202111295050.3A CN202111295050A CN114153483A CN 114153483 A CN114153483 A CN 114153483A CN 202111295050 A CN202111295050 A CN 202111295050A CN 114153483 A CN114153483 A CN 114153483A
- Authority
- CN
- China
- Prior art keywords
- file content
- modem
- fota
- aboot
- file
- 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
- 238000005192 partition Methods 0.000 title claims abstract description 106
- 238000000034 method Methods 0.000 title claims abstract description 36
- 230000009191 jumping Effects 0.000 claims abstract description 4
- 230000000694 effects Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000000638 solvent extraction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
- G06F8/654—Updates using techniques specially adapted for alterable solid state memories, e.g. for EEPROM or flash memories
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
- G06F8/63—Image based installation; Cloning; Build to order
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention provides a fota upgrading method for reducing the number of backup partitions, which relates to the technical field of firmware upgrading and comprises the following steps: s1, making an upgrade file package, storing the modem file content behind the packet head, and placing the upgrade file package on a fona server to form a fona package; s2, downloading and processing the packet header by the mifi equipment, and acquiring a fota packet from a fota server; s3, downloading the modem file content in the fota package into a system backup partition; s4, verifying whether the modem file content in the system backup partition is complete through the mifi equipment, copying the modem file content in the system backup partition into the modem main partition when the modem file content in the system backup partition is complete, and jumping to the step S5; s5, temporarily storing the aboot file content and the system file content in the fota package, and restarting the mifi equipment; and S6, in the restarting process of the mifi equipment, copying the aboot file content in the aboot backup partition and the system file content in the system backup partition into the corresponding main partition by the LK bootstrap program, and finishing upgrading.
Description
Technical Field
The invention relates to the technical field of firmware upgrading, in particular to a fota upgrading method for reducing the number of backup partitions.
Background
In the existing upgrading mode, one image file needs to be stored in a main partition and a backup partition, and 3 image files need to be stored in 6 partitions in the current flash layout. Flash is a memory device for storing Linux operating system image files (aboot), modem image files (modem) and root file system (system) image files, and the storage space of Flash is divided into 6 partitions: the system comprises an aboot main partition, an aboot backup partition, a modem main partition, a modem backup partition, a system main partition and a system backup partition, wherein the aboot main partition and the aboot backup partition store aboot images, the modem main partition and the modem backup partition store modem images, and the system main partition and the system backup partition store system images.
This partitioning scheme with backup partitions can cause a certain amount of wasted space, especially when the flash space is small, which can make the use of flash very tight. On some projects for reducing the flash capacity, enough space is barely available by optimizing space occupation and codes; the current space is not rich, the function cannot be newly added, and the product competitiveness is reduced, so that the existing upgrading scheme is urgently needed to be optimized under the current situation, and a reserved space is provided for the new function of the subsequent product.
In the three mirror image files, the modem files are large, the file size accounts for about 20% of the whole flash, a large amount of space is reserved for the mifi device by removing the backup partition of the modem, the saved space is respectively allocated to the system main partition and the system backup partition, and then more application programs can be put into the two partitions, so that the problem of product space shortage is solved, and a foundation is laid for expanding the product functions later.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides a fota upgrading method for reducing the number of backup partitions, so as to solve the technical problems.
The technical method for solving the technical problem is as follows: in a fota upgrade method for reducing the number of backup partitions, the improvement comprising: the method comprises the following steps: s1, making an upgrade file package, storing the modem file content behind the packet head, and placing the upgrade file package on a fota server to form a fota package, wherein the modem file is a modem mirror image file; s2, downloading and processing the packet header by the mifi equipment, and acquiring a fota packet from a fota server; s3, downloading the modem file content in the fota package into a system backup partition; s4, verifying whether the modem file content in the system backup partition is complete through the mifi equipment, copying the modem file content in the system backup partition into the modem main partition when the modem file content in the system backup partition is complete, and jumping to the step S5; when the mobile terminal is not complete, the mifi equipment closes the connection with the fota server, and the upgrading is quitted; s5, downloading the aboot file content and the system file content in the fota package, and restarting the mifi device; and S6, in the restarting process of the mifi equipment, copying the aboot file content in the aboot backup partition to the aboot main partition by the LK bootstrap program, copying the system file content in the system backup partition to the system main partition, and finishing upgrading, wherein the LK is the bootstrap program for starting the equipment.
In the above method, the step S1 includes the following steps:
s11, storing the modem file content, the aboot file content and the system file content into an upgrade file package, wherein the package format of the upgrade file package is as follows: the method comprises the steps of adding a header, modem file content, aboot file content and system file content to a data file;
s12, storing the modem file content behind the packet header;
s13, the upgrade file package is placed on a fota server to form a fota package, wherein the fota is Firmware Over the Air, namely Firmware Over the Air upgrade.
In the above method, the step S2 includes the following steps:
s21, the mifi equipment downloads the packet header to the local, and the mifi equipment is a portable broadband wireless device;
s22, an upgrading application program in the mifi device identifies information in the packet header, judges whether the modem file content is stored behind the packet header, normally downloads the modem file content when the modem file content is stored behind the packet header, acquires the content of the fota packet from the fota server, and jumps to the step S3; and when the modem file content is not stored behind the header, exiting the upgrade.
In the above method, in step S22, the upgrading application identifies information in the packet header, and determines whether the modem file content is stored behind the packet header, including the following steps:
s221, the upgrading application program reads out the structure array in the packet header;
s222, identifying the length of the structure array, namely the number of files contained in the fona packet;
s223, traversing all the structure elements of the whole structure array according to the length of the structure array, judging whether the name field in the structure element has a modem character string, and finding the structure element with the modem character string in the name field;
s224, judging whether a structure element with a modem character string in the name field is at a first position in the structure array, and storing the modem file content behind a header if the structure element is at the first position; when not in the first location, then the modem file contents are not stored behind the header.
In the above method, the step S5 includes the following steps:
s51, downloading the aboot file content in the fota package to an aboot backup partition, and downloading the system file content in the fota package to a system backup partition;
s52, verifying whether the aboot file content in the aboot backup partition and the system file content in the system backup partition are complete by the mifi device, and automatically restarting the mifi device when the aboot file content in the aboot backup partition and the system file content in the system backup partition are complete; and when the upgrade is not complete, exiting the upgrade.
The invention has the beneficial effects that: the method comprises the steps that the contents of a modem file are placed into a system backup partition in the upgrading process, after downloading is completed, a main partition of the modem is directly covered under the condition of not restarting, an additional modem backup partition is not needed to be used as a downloading buffer, and a large amount of space is reserved for an mifi device; the saved space can be allocated to the system main partition and the system backup partition, so that more application programs can be put into the system main partition and the system backup partition, the problem of product space shortage is solved, and the space for expanding the product functions is increased.
Drawings
FIG. 1 is a flowchart of a fota upgrade method for reducing the number of backup partitions according to the present invention.
Detailed Description
The invention is further illustrated with reference to the following figures and examples.
The conception, the specific structure, and the technical effects produced by the present invention will be clearly and completely described below in conjunction with the embodiments and the accompanying drawings to fully understand the objects, the features, and the effects of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all embodiments, and those skilled in the art can obtain other embodiments without inventive effort based on the embodiments of the present invention, and all embodiments are within the protection scope of the present invention. In addition, all the connection/connection relations referred to in the patent do not mean that the components are directly connected, but mean that a better connection structure can be formed by adding or reducing connection auxiliary components according to specific implementation conditions. All technical characteristics in the invention can be interactively combined on the premise of not conflicting with each other.
Referring to fig. 1, a fota upgrade method for reducing the number of backup partitions according to the present invention includes the following steps:
s1, making an upgrade file package, storing the modem file content behind the packet head, and placing the upgrade file package on a fota server to form a fota package, wherein the modem file is a modem mirror image file;
specifically, the method comprises the following steps:
s11, storing the modem file content, the aboot file content and the system file content into an upgrade file package, wherein the package format of the upgrade file package is as follows: the method comprises the steps of adding a header, modem file content, aboot file content and system file content, wherein the aboot file is a Linux operating system mirror image file, and the system file is a root file system mirror image file;
s12, storing the modem file content behind the packet header, so that the modem file content can be downloaded firstly in the subsequent downloading process;
s13, the upgrade file package is placed on a fota server to form a fota package, wherein the fota is Firmware Over the Air, namely Firmware Over the Air upgrade.
S2, downloading and processing the packet header by the mifi equipment, and acquiring a fota packet from a fota server;
specifically, the method comprises the following steps:
s21, the mifi equipment downloads the packet header to the local, and the mifi equipment is a portable broadband wireless device;
s22, an upgrading application program in the mifi device identifies information in the packet header, judges whether the modem file content is stored behind the packet header, normally downloads the modem file content when the modem file content is stored behind the packet header, acquires the content of the fota packet from the fota server, and jumps to the step S3; when the modem file content is not stored behind the header, exiting upgrading;
specifically, the upgrading application program identifies the information in the packet header and judges whether the modem file content is stored behind the packet header, and the method comprises the following steps:
s221, the upgrading application program reads out the structure array in the packet header;
s222, identifying the length of the structure array, namely the number of files contained in the fona packet;
s223, traversing all the structure elements of the whole structure array according to the length of the structure array, and finding the structure elements with the modem character strings in the name fields by judging whether the name fields in the structure elements have the modem character strings or not because the fona packet contains the modem file contents;
s224, judging whether a structure element with a modem character string in the name field is at a first position in the structure array, and storing the modem file content behind a header if the structure element is at the first position; when not in the first location, then the modem file contents are not stored behind the header.
S3, downloading the modem file contents in the fota package into a system backup partition without using an additional modem backup partition as a download buffer;
s4, verifying whether the modem file content in the system backup partition is complete through the mifi equipment, copying the modem file content in the system backup partition into the modem main partition when the modem file content in the system backup partition is complete, and jumping to the step S5; when the mobile terminal is not complete, the mifi equipment closes the connection with the fota server, and the upgrading is quitted;
s5, downloading the aboot file content and the system file content in the fota package, and restarting the mifi device;
specifically, the method comprises the following steps:
s51, downloading the aboot file content in the fota package to an aboot backup partition, and downloading the system file content in the fota package to a system backup partition;
s52, verifying whether the aboot file content in the aboot backup partition and the system file content in the system backup partition are complete by the mifi device, and automatically restarting the mifi device when the aboot file content in the aboot backup partition and the system file content in the system backup partition are complete; and when the upgrade is not complete, exiting the upgrade.
S6, in the restarting process of the mifi device, copying the aboot file content in the aboot backup partition to an aboot main partition by an LK bootstrap program, copying the system file content in the system backup partition to the system main partition, so far, all the main partitions including the modem main partition, the aboot main partition and the system main partition are latest executable files, and upgrading is completed, wherein the LK is the bootstrap program for starting the device.
The method has the advantages that the contents of the modem files are put into the system backup partition in the upgrading process, after the downloading is finished, the main partition of the modem is directly covered without restarting, and an extra modem backup partition is not needed to be used as a downloading buffer, so that a large amount of space is reserved for the mifi device; the saved space can be allocated to the system main partition and the system backup partition, so that more application programs can be put into the system main partition and the system backup partition, the problem of product space shortage is solved, and the space for expanding the product functions is increased.
While the preferred embodiments of the present invention have been illustrated and described, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.
Claims (5)
1. A fota upgrading method for reducing the number of backup partitions is characterized in that: the method comprises the following steps:
s1, making an upgrade file package, storing the modem file content behind the packet head, and placing the upgrade file package on a fota server to form a fota package, wherein the modem file is a modem mirror image file;
s2, downloading and processing the packet header by the mifi equipment, and acquiring a fota packet from a fota server;
s3, downloading the modem file content in the fota package into a system backup partition;
s4, verifying whether the modem file content in the system backup partition is complete through the mifi equipment, copying the modem file content in the system backup partition into the modem main partition when the modem file content in the system backup partition is complete, and jumping to the step S5; when the mobile terminal is not complete, the mifi equipment closes the connection with the fota server, and the upgrading is quitted;
s5, downloading the aboot file content and the system file content in the fota package, and restarting the mifi device;
and S6, in the restarting process of the mifi equipment, copying the aboot file content in the aboot backup partition to the aboot main partition by the LK bootstrap program, copying the system file content in the system backup partition to the system main partition, and finishing upgrading, wherein the LK is the bootstrap program for starting the equipment.
2. The fota upgrade method to reduce the number of backup partitions of claim 1, wherein: the step S1 includes the following steps:
s11, storing the modem file content, the aboot file content and the system file content into an upgrade file package, wherein the package format of the upgrade file package is as follows: the method comprises the steps of adding a header, modem file content, aboot file content and system file content to a data file;
s12, storing the modem file content behind the packet header;
s13, the upgrade file package is placed on a fota server to form a fota package, wherein the fota is Firmware Over the Air, namely Firmware Over the Air upgrade.
3. The fota upgrade method to reduce the number of backup partitions of claim 2, wherein: the step S2 includes the following steps:
s21, the mifi equipment downloads the packet header to the local, and the mifi equipment is a portable broadband wireless device;
s22, an upgrading application program in the mifi device identifies information in the packet header, judges whether the modem file content is stored behind the packet header, normally downloads the modem file content when the modem file content is stored behind the packet header, acquires the content of the fota packet from the fota server, and jumps to the step S3; and when the modem file content is not stored behind the header, exiting the upgrade.
4. The fota upgrade method to reduce the number of backup partitions of claim 2, wherein: in step S22, the upgrading application identifies information in the packet header, and determines whether the modem file content is stored behind the packet header, including the following steps:
s221, the upgrading application program reads out the structure array in the packet header;
s222, identifying the length of the structure array, namely the number of files contained in the fona packet;
s223, traversing all the structure elements of the whole structure array according to the length of the structure array, judging whether the name field in the structure element has a modem character string, and finding the structure element with the modem character string in the name field;
s224, judging whether a structure element with a modem character string in the name field is at a first position in the structure array, and storing the modem file content behind a header if the structure element is at the first position; when not in the first location, then the modem file contents are not stored behind the header.
5. The fota upgrade method to reduce the number of backup partitions of claim 1, wherein: the step S5 includes the following steps:
s51, downloading the aboot file content in the fota package to an aboot backup partition, and downloading the system file content in the fota package to a system backup partition;
s52, verifying whether the aboot file content in the aboot backup partition and the system file content in the system backup partition are complete by the mifi device, and automatically restarting the mifi device when the aboot file content in the aboot backup partition and the system file content in the system backup partition are complete; and when the upgrade is not complete, exiting the upgrade.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111295050.3A CN114153483A (en) | 2021-11-03 | 2021-11-03 | Fota upgrading method for reducing number of backup partitions |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111295050.3A CN114153483A (en) | 2021-11-03 | 2021-11-03 | Fota upgrading method for reducing number of backup partitions |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114153483A true CN114153483A (en) | 2022-03-08 |
Family
ID=80458887
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111295050.3A Pending CN114153483A (en) | 2021-11-03 | 2021-11-03 | Fota upgrading method for reducing number of backup partitions |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114153483A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105446769A (en) * | 2015-11-03 | 2016-03-30 | 广东欧珀移动通信有限公司 | Mirror image file update processing method and apparatus and terminal device |
CN107247603A (en) * | 2017-04-18 | 2017-10-13 | 深圳市广和通无线股份有限公司 | Support the remote upgrade method and system of firmware auto restore facility |
CN109032632A (en) * | 2018-07-13 | 2018-12-18 | 深圳高新兴物联科技有限公司 | A kind of FOTA upgrade method, wireless communication terminal and storage medium |
CN110750286A (en) * | 2019-10-17 | 2020-02-04 | 福州汇思博信息技术有限公司 | Management method, device, system, equipment and medium for upgrading Mbn through OTA |
-
2021
- 2021-11-03 CN CN202111295050.3A patent/CN114153483A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105446769A (en) * | 2015-11-03 | 2016-03-30 | 广东欧珀移动通信有限公司 | Mirror image file update processing method and apparatus and terminal device |
CN107247603A (en) * | 2017-04-18 | 2017-10-13 | 深圳市广和通无线股份有限公司 | Support the remote upgrade method and system of firmware auto restore facility |
CN109032632A (en) * | 2018-07-13 | 2018-12-18 | 深圳高新兴物联科技有限公司 | A kind of FOTA upgrade method, wireless communication terminal and storage medium |
CN110750286A (en) * | 2019-10-17 | 2020-02-04 | 福州汇思博信息技术有限公司 | Management method, device, system, equipment and medium for upgrading Mbn through OTA |
Non-Patent Citations (2)
Title |
---|
CHESTER_CARSON: "浅谈安卓ADB和fastboot升级", pages 1 - 7, Retrieved from the Internet <URL:《https://blog.csdn.net/muchong123/article/details/96033318》> * |
胡晨耕: "基于MTK平台的Android手机Modem驱动开发研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》, no. 01, 15 January 2018 (2018-01-15), pages 138 - 570 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111796856B (en) | Differential upgrading method and device, storage medium and computer equipment | |
CN105843656B (en) | System upgrading method for insufficient disk space, terminal equipment and server | |
CN104991793A (en) | Method, device and system used for application program subpackage | |
CN110597542B (en) | Software automatic OTA (over the air) upgrading method and device and electronic equipment | |
CN105867947A (en) | Data processing method and device after upgrades of preset applications | |
CN111263354B (en) | OTA differential upgrading method and device | |
CN108874437B (en) | Online cloud updating method for android application program | |
CN109947450B (en) | System file upgrading method and device, mobile terminal and readable storage medium | |
CN112328293A (en) | Differential upgrading method of embedded equipment and related components | |
CN111309354A (en) | OTA (over the air) upgrading method and device of networking equipment | |
CN102375744B (en) | Network television upgrade method | |
CN108984198A (en) | A kind of upgrade method and device of android system | |
CN110750286A (en) | Management method, device, system, equipment and medium for upgrading Mbn through OTA | |
CN105930184A (en) | System upgrade method and device | |
CN106708507B (en) | Method for optimizing boot application installation time based on Android system | |
CN110750280A (en) | Application upgrading method and system based on Android platform and storage medium | |
CN112162773A (en) | Differential upgrading method and device, storage medium and terminal | |
CN111290773A (en) | System upgrading method, device and readable storage medium | |
CN114153483A (en) | Fota upgrading method for reducing number of backup partitions | |
CN107222341B (en) | Method for updating radio frequency protocol parameters and electronic equipment | |
CN114745269A (en) | Firmware upgrading method and device, electronic equipment and storage medium | |
KR100619824B1 (en) | Memory control method for mobile communication device | |
CN110309018B (en) | Charging equipment system switching method, charging equipment and readable storage medium | |
CN111176693B (en) | Upgrading method of digital television system | |
CN113590179A (en) | Plug-in detection method and device, electronic equipment and storage 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 |