CN112667444A - System upgrading method, storage medium and terminal equipment - Google Patents

System upgrading method, storage medium and terminal equipment Download PDF

Info

Publication number
CN112667444A
CN112667444A CN202011640215.1A CN202011640215A CN112667444A CN 112667444 A CN112667444 A CN 112667444A CN 202011640215 A CN202011640215 A CN 202011640215A CN 112667444 A CN112667444 A CN 112667444A
Authority
CN
China
Prior art keywords
system data
data
updated
upgrading
integrity
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
CN202011640215.1A
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.)
Shenzhen Konka Electronic Technology Co Ltd
Original Assignee
Shenzhen Konka Electronic Technology Co 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 Shenzhen Konka Electronic Technology Co Ltd filed Critical Shenzhen Konka Electronic Technology Co Ltd
Priority to CN202011640215.1A priority Critical patent/CN112667444A/en
Publication of CN112667444A publication Critical patent/CN112667444A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses a system upgrading method, a storage medium and a terminal device, which are applied to the terminal device, wherein the terminal device is configured with first system data and second system data, and the method comprises the following steps: reading data header information of target system data, wherein the target system data is first system data or second system data; checking the integrity of the data header information; and selecting system data to be updated from the first system data and the second system data according to the integrity, and upgrading the system data to be updated. The invention ensures that the data loaded by the system is complete, the other system data is the system data to be updated, the system data to be updated is loaded and used when the next start is carried out after the system data to be updated is successfully updated, and if the update fails, the other complete data can be normally started, thereby avoiding the problem that the terminal equipment cannot be used due to the failure of the system update in the prior art and improving the stability of the update process.

Description

System upgrading method, storage medium and terminal equipment
Technical Field
The invention relates to the technical field of communication, in particular to a system upgrading method, a storage medium and terminal equipment.
Background
With the development of internet technology, terminal devices are occupying more and more important positions in people's lives. In the existing terminal equipment products, due to the continuous perfection of the functions, the system upgrading operation is required to be frequently carried out. In the process of upgrading the terminal device, it may be interrupted due to some external factors, for example, in the process of upgrading the terminal device, a power failure occurs, which causes an abnormal shutdown of the terminal device, in this case, the upgrading program is forced to be interrupted, the executed upgrading program is also erased, which causes a failure of the upgrading, after the power of the terminal device is turned on again, the upgrading process is abnormal, and the upgrading operation cannot be continued, and in a serious case, the system is started abnormally, which causes the user to fail to normally start the terminal device.
Accordingly, there is a need for improvements and developments in the art.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a system upgrading method, a storage medium and a terminal device, aiming at solving the problem that an upgrading program or a system start program may be abnormal after upgrading is interrupted due to an abnormal condition in the upgrading process of the terminal device in the prior art.
In order to achieve the purpose, the invention adopts the following technical scheme:
in a first aspect, an embodiment of the present invention provides a system upgrade method, which is applied to a terminal device, where the terminal device is configured with first system data and second system data, and the method includes:
reading data header information of target system data, wherein the target system data is first system data or second system data;
checking the integrity of the data header information;
and selecting system data to be updated from the first system data and the second system data according to the integrity, and upgrading the system data to be updated.
As a further improved technical solution, the selecting system data to be updated from the first system data and the second system data according to the integrity, and the updating the system data to be updated specifically includes:
selecting system data to be updated from the first system data and the second system data according to the integrity;
and acquiring upgrading data corresponding to the system data to be updated, and upgrading the system data to be updated based on the acquired upgrading data.
As a further improved technical solution, the selecting, according to the integrity, system data to be updated from the first system data and the second system data specifically includes:
when the target system data is complete data, reading an identifier corresponding to the target system data, wherein the identifier comprises an updating identifier and a loading identifier;
and when the mark corresponding to the read target system data is the updating mark, the target system data corresponding to the updating mark is the system data to be updated.
As a further improved technical solution, before selecting the system data to be updated from the first system data and the second system data according to the integrity and upgrading the system data to be updated, the method further includes:
and selecting system data to be loaded from the first system data and the second system data according to the integrity, and loading the system data to be loaded to start the system.
As a further improved technical solution, the selecting, according to the integrity, system data to be updated from the first system data and the second system data, and after the updating the system data to be updated, further includes:
and modifying the identifier corresponding to the target system data into a loading identifier.
As a further improved technical solution, the first system data is stored in a first storage area, and the second system data is stored in a second storage area.
As a further improved solution, the first system header information and the second system header information are stored in a third storage area.
As a further improved technical solution, the identifier is a storage area address corresponding to the target system data.
In a second aspect, the present invention provides a computer-readable storage medium storing one or more programs, which are executable by one or more processors to implement the steps in the system upgrade method as described in any one of the above.
In a third aspect, an embodiment of the present invention provides a terminal device, which includes: a processor and memory and a communication bus; the memory has stored thereon a computer readable program executable by the processor;
the communication bus realizes connection communication between the processor and the memory;
the processor, when executing the computer readable program, implements the steps in the system upgrade method as described in any one of the above.
Has the advantages that: compared with the prior art, the invention provides a system upgrading method, a storage medium and a terminal device, which are applied to the terminal device, wherein the terminal device is configured with first system data and second system data, and the method comprises the following steps: reading data header information of target system data, wherein the target system data is first system data or second system data; checking the integrity of the data header information; and selecting system data to be updated from the first system data and the second system data according to the integrity, and upgrading the system data to be updated. The invention ensures that the data loaded by the system is complete, the other system data is the system data to be updated, the system data to be updated is loaded and used when the next start is carried out after the system data to be updated is successfully updated, and if the update fails, the other complete data can be normally started, thereby avoiding the problem that the terminal equipment cannot be used due to the failure of the system update in the prior art and improving the stability of the update process.
Drawings
Fig. 1 is a flowchart of a system upgrading method provided by the present invention.
Fig. 2 is a schematic structural diagram of a terminal device provided in the present invention.
Detailed Description
The present invention provides a system upgrade method, a storage medium and a terminal device, and in order to make the objects, technical solutions and effects of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
The invention will be further explained by the description of the embodiments with reference to the drawings.
The embodiment provides a system upgrade method, which is applied to a terminal device, where the terminal device is configured with first system data and second system data, as shown in fig. 1, the method includes:
s100, reading data header information of target system data, wherein the target system data is first system data or second system data.
Specifically, the system data is stored in advance in emmc (embedded multimediacard), nand flash and other storage devices, which can be read and written without losing power-down data, so as to ensure that the data system data is not lost and can be updated or modified.
In this embodiment, the data header information of the preset system data is read by a boot loader, where the boot loader is a first section of code executed by the embedded system after power-up, and after the boot loader completes initialization of the CPU and related hardware, the boot loader loads an operating system image or a cured embedded application program into the memory and then jumps to a space where the operating system is located, so as to start the operating system to run.
In this embodiment, the system data burned in the terminal device includes two sets of system data, the two sets of system data are completely consistent during initialization, and subsequent system operation or update is performed on the basis of the two sets of system data. If the data of one part is incomplete due to update failure, the system can also operate by using the data of the other part, and update or repair the incomplete data. That is, when the system is booted up at any one time, the data of the two operating systems may be consistent or different, and optionally, one of the operating systems is updated in version compared with the other operating system.
In this embodiment, the target system data is preconfigured with an identifier, that is, the first system data and the second system data are both configured with identifiers, and the identifier may change correspondingly with each upgrade, and in practical applications, the identifier includes an update identifier and a load identifier (the update identifier may be 1, and the load identifier may be 2).
And S200, verifying the integrity of the data header information.
In this embodiment, the first system data and the second system data are stored in different areas, specifically, the first system data is stored in a first storage area, and the second system data is stored in a second storage area. Each system data includes a data header of the data, a Bootloader and other data of the system. When reading the header information of two pieces of data, the Bootloader needs to obtain the header information from different areas. It should be noted that the header information of the first system and the second system is stored in the third storage area, so that the Bootloader can directly obtain the header information of the two pieces of data from the third storage area when reading the header information of the two pieces of data. It should be noted that, when the system data to be updated is updated, the header information of the system data to be updated is also changed accordingly. The invention also ensures the stability of the upgrading process by verifying the integrity of the data header information.
S300, selecting system data to be updated from the first system data and the second system data according to the integrity, and upgrading the system data to be updated.
In this embodiment, the situation that both the system data are incomplete does not occur. Therefore, when one system data is incomplete, the system can be loaded by the other system data, and the stability of the upgrading process is guaranteed.
In an implementation manner of this embodiment, the selecting, according to the integrity, system data to be updated from the first system data and the second system data, and upgrading the system data to be updated specifically includes:
s301, selecting system data to be updated from the first system data and the second system data according to the integrity;
s302, obtaining upgrading data corresponding to the system data to be updated, and upgrading the system data to be updated based on the obtained upgrading data.
In this embodiment, the upgrading method of the system is performed by OTA, and in practical application, the terminal device sends a request to the server to obtain upgrading data corresponding to the current system (system data to be updated), and then upgrades the system data to be updated according to the obtained upgrading data. Therefore, the embodiment of the invention upgrades in a differential mode, only the differential part of data is needed to be upgraded, but not the whole data to be updated, so that the quick upgrade can be realized, and meanwhile, the influence of the erasing chip on the service life of the single equipment is also reduced.
Further, when the mark corresponding to the read target system data is an update mark, the target system data corresponding to the update mark is system data to be updated. It should be noted that, after the update and upgrade are completed, the identifier corresponding to the target system data is modified into a loading identifier.
Further, the identifier of the data to be updated is the address of the storage area of the system data, for example, when the system data to be updated is the first system data, and the storage area is the first storage area, the address of the first storage area is directly sent to the processor, and the processor can find the system data that needs to be updated according to the address.
In practical application, before selecting the system data to be updated from the first system data and the second system data according to the integrity and upgrading the system data to be updated, the method further includes: and selecting system data to be loaded from the first system data and the second system data according to the integrity, and loading the system data to be loaded to start the system.
In this embodiment, the current boot mode may be determined by Bootloader, where the boot mode includes two types, one type is a boot mode, that is, a normal boot operation of the device. The other is an upgrade mode, i.e., a mode in which the system restarts after the system data is updated. In this embodiment, Bootloader may determine which mode is currently through system history information.
Further, if the current starting mode is the upgrading mode, the identifier of the data to be updated is sent to a processor of the system, and the processor finishes upgrading the data of the system to be updated.
In this embodiment, the identifier of the system data to be updated may be A, B or other letters or other symbols with identifiers, and after receiving the identifier, the processor can determine which system data needs to be updated according to the correspondence between the pre-stored identifier and the data, and then perform the update operation.
And when the upgrading is successful, restarting the system, so that the system executes the steps again, and loading the upgraded system data to realize the upgrading of the system.
In summary, compared with the prior art, the embodiment of the invention has the following advantages:
the invention discloses a system upgrading method, which is applied to terminal equipment, wherein the terminal equipment is configured with first system data and second system data, and the method comprises the following steps: reading data header information of target system data, wherein the target system data is first system data or second system data; checking the integrity of the data header information; and selecting system data to be updated from the first system data and the second system data according to the integrity, and upgrading the system data to be updated. The invention ensures that the data loaded by the system is complete, the other system data is the system data to be updated, the system data to be updated is loaded and used when the next start is carried out after the system data to be updated is successfully updated, and if the update fails, the other complete data can be normally started, thereby avoiding the problem that the terminal equipment cannot be used due to the failure of the system update in the prior art and improving the stability of the update process. Meanwhile, the size of the upgrade package is greatly reduced by a differential upgrade mode, so that the fast upgrade and the fast start are realized, and the erasing pressure of the memory chip is reduced.
Based on the system upgrading method, the present invention further provides a computer-readable storage medium, where one or more programs are stored, and the one or more programs are executable by one or more processors (in this embodiment, the processor 11) to implement the steps in the upgrading method of the present invention, specifically, as described in the foregoing method.
Based on the system upgrade method, the present invention further provides a terminal device, as shown in fig. 2, where the terminal device 100 includes a processor 11 and a memory 22 connected to the processor 11, and fig. 2 only shows some components of the terminal device 100, but it should be understood that not all of the shown components are required to be implemented, and more or fewer components may be implemented instead.
The memory 22 may be an internal storage unit of the terminal device 100 in some embodiments, such as a memory of the terminal device 100. The memory 22 may also be an external storage device of the terminal device 100 in other embodiments, such as a plug-in usb disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the terminal device 100. Further, the memory 22 may also include both an internal storage unit and an external storage device of the terminal device 100. The memory 22 is used for storing application software installed in the terminal device 100 and various data, such as an upgrade program code of the desktop starter. The memory 22 may also be used to temporarily store data that has been output or is to be output. In an embodiment, the memory 22 stores an upgrade program of the desktop launcher, and the upgrade program of the desktop launcher can be executed by the processor 11, so as to implement the upgrade method in the present application, specifically the method described above.
The processor 11 may be, in some embodiments, a Central Processing Unit (CPU), a microprocessor, a mobile phone baseband processor or other data Processing chip, and is configured to run program codes stored in the memory 22 or process data, for example, execute the upgrading method, and the like, as described in the above method.
Those skilled in the art will appreciate that fig. 2 is a block diagram of only a portion of the structure associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, and that a particular terminal device may include more or less components than those shown, or may have some components combined, or may have a different arrangement of components. The steps of the system upgrade method described above are implemented when the processor executes the computer program, which is specifically described above.
Of course, it will be understood by those skilled in the art that all or part of the processes of the methods of the above embodiments may be implemented by a computer program instructing relevant hardware (such as a processor, a controller, etc.), and the program may be stored in a computer readable storage medium, and when executed, the program may include the processes of the above method embodiments. The storage medium may be a memory, a magnetic disk, an optical disk, etc.
It is to be understood that the invention is not limited to the examples described above, but that modifications and variations may be effected thereto by those of ordinary skill in the art in light of the foregoing description, and that all such modifications and variations are intended to be within the scope of the invention as defined by the appended claims.

Claims (10)

1. A system upgrading method is applied to a terminal device, the terminal device is configured with first system data and second system data, and the method comprises the following steps:
reading data header information of target system data, wherein the target system data is first system data or second system data;
checking the integrity of the data header information;
and selecting system data to be updated from the first system data and the second system data according to the integrity, and upgrading the system data to be updated.
2. The system upgrading method according to claim 1, wherein the selecting of the system data to be updated from the first system data and the second system data according to the integrity and the upgrading of the system data to be updated specifically comprises:
selecting system data to be updated from the first system data and the second system data according to the integrity;
and acquiring upgrading data corresponding to the system data to be updated, and upgrading the system data to be updated based on the acquired upgrading data.
3. The system upgrade method according to claim 1 or 2, wherein the selecting of the system data to be updated from the first system data and the second system data according to the integrity specifically comprises:
when the target system data is complete data, reading an identifier corresponding to the target system data, wherein the identifier comprises an updating identifier and a loading identifier;
and when the mark corresponding to the read target system data is the updating mark, the target system data corresponding to the updating mark is the system data to be updated.
4. The method for upgrading a system according to claim 1, wherein before the selecting the system data to be updated from the first system data and the second system data according to the integrity and upgrading the system data to be updated, the method further comprises:
and selecting system data to be loaded from the first system data and the second system data according to the integrity, and loading the system data to be loaded to start the system.
5. The system upgrading method according to claim 1, wherein the selecting the system data to be updated from the first system data and the second system data according to the integrity, and after upgrading the system data to be updated, further comprises:
and modifying the identifier corresponding to the target system data into a loading identifier.
6. The system upgrade method according to claim 1, wherein the first system data is stored in a first storage area, and the second system data is stored in a second storage area.
7. The system upgrade method according to claim 1, wherein the first system header information and the second system header information are stored in a third storage area.
8. The system upgrade method according to claim 3, wherein the identifier is a storage area address corresponding to the target system data.
9. A computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to perform the steps of the system upgrade method according to any one of claims 1 to 8.
10. A terminal device, comprising: a processor and memory and a communication bus; the memory has stored thereon a computer readable program executable by the processor;
the communication bus realizes connection communication between the processor and the memory;
the processor, when executing the computer readable program, implements the steps in the system upgrade method according to any one of claims 1 to 8.
CN202011640215.1A 2020-12-31 2020-12-31 System upgrading method, storage medium and terminal equipment Pending CN112667444A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011640215.1A CN112667444A (en) 2020-12-31 2020-12-31 System upgrading method, storage medium and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011640215.1A CN112667444A (en) 2020-12-31 2020-12-31 System upgrading method, storage medium and terminal equipment

Publications (1)

Publication Number Publication Date
CN112667444A true CN112667444A (en) 2021-04-16

Family

ID=75413722

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011640215.1A Pending CN112667444A (en) 2020-12-31 2020-12-31 System upgrading method, storage medium and terminal equipment

Country Status (1)

Country Link
CN (1) CN112667444A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113568633A (en) * 2021-06-24 2021-10-29 东莞市奥海科技股份有限公司 Server power supply online updating method and device, computer equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105677409A (en) * 2015-12-31 2016-06-15 中科创达软件股份有限公司 System upgrading method and device
WO2018024198A1 (en) * 2016-08-01 2018-02-08 深圳市创维软件有限公司 Application upgrade method and system for set-top box, and set-top box
CN108958752A (en) * 2018-07-09 2018-12-07 迈普通信技术股份有限公司 Single-chip microcontroller online upgrade system and method
CN109032846A (en) * 2018-08-08 2018-12-18 京信通信系统(中国)有限公司 Equipment remote backup upgrade method, device, computer storage medium and equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105677409A (en) * 2015-12-31 2016-06-15 中科创达软件股份有限公司 System upgrading method and device
WO2018024198A1 (en) * 2016-08-01 2018-02-08 深圳市创维软件有限公司 Application upgrade method and system for set-top box, and set-top box
CN108958752A (en) * 2018-07-09 2018-12-07 迈普通信技术股份有限公司 Single-chip microcontroller online upgrade system and method
CN109032846A (en) * 2018-08-08 2018-12-18 京信通信系统(中国)有限公司 Equipment remote backup upgrade method, device, computer storage medium and equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113568633A (en) * 2021-06-24 2021-10-29 东莞市奥海科技股份有限公司 Server power supply online updating method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
US9507604B2 (en) Boot method and boot system
CN109634645B (en) Firmware upgrading method and terminal
US8423991B2 (en) Embedded network device and firmware upgrading method
US10437580B2 (en) Software updating methods and systems
US20110283274A1 (en) Firmware image update and management
US8136108B2 (en) Updating firmware with multiple processors
CN111813428A (en) Method and device for upgrading terminal firmware, electronic equipment and storage medium
CN110874237A (en) Software upgrading method, device, terminal and readable storage medium
CN105677409A (en) System upgrading method and device
CN111026417A (en) Embedded equipment upgrading method and embedded equipment
CN113238790B (en) Firmware program updating method and system based on SD card and EEPROM
CN112667444A (en) System upgrading method, storage medium and terminal equipment
CN117130672A (en) Server start flow control method, system, terminal and storage medium
WO2021012170A1 (en) Firmware booting method and device, and computer-readable storage medium
CN115176232A (en) Firmware corruption recovery
CN115658152A (en) Firmware upgrading method, firmware, electronic device and computer readable storage medium
US11768669B2 (en) Installing application program code on a vehicle control system
WO2022050938A1 (en) Firmware event recovery
CN110007973B (en) Information processing method and electronic equipment
CN117714281A (en) Upgrading method and device of switch firmware and related products
CN107066277B (en) Method for updating universal unique identification code based on serial port
CN114760621A (en) Terminal flashing method and device, computer equipment and storage medium
CN114265603A (en) System upgrading method and device based on asymmetric partition and electronic equipment
CN113064608A (en) OTA (over the air) upgrading method, device, equipment and medium
CN113687851A (en) Embedded equipment upgrading method and device

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