CN103810004B - Method and device for upgrading embedded system as well as equipment - Google Patents
Method and device for upgrading embedded system as well as equipment Download PDFInfo
- Publication number
- CN103810004B CN103810004B CN201310598439.4A CN201310598439A CN103810004B CN 103810004 B CN103810004 B CN 103810004B CN 201310598439 A CN201310598439 A CN 201310598439A CN 103810004 B CN103810004 B CN 103810004B
- Authority
- CN
- China
- Prior art keywords
- embedded system
- embedded
- upgrading
- startup
- storage media
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 48
- 238000012795 verification Methods 0.000 claims description 14
- 238000012937 correction Methods 0.000 claims description 6
- 238000000638 solvent extraction Methods 0.000 claims description 6
- 239000007943 implant Substances 0.000 claims description 3
- 238000005192 partition Methods 0.000 abstract description 6
- 230000006854 communication Effects 0.000 description 18
- 238000004891 communication Methods 0.000 description 17
- 230000006870 function Effects 0.000 description 11
- 230000008569 process Effects 0.000 description 8
- 230000004913 activation Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 238000001514 detection method Methods 0.000 description 3
- 238000013507 mapping Methods 0.000 description 3
- 230000002159 abnormal effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000012790 confirmation Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000005484 gravity Effects 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 230000007774 longterm Effects 0.000 description 2
- 238000010295 mobile communication Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- 230000004888 barrier function Effects 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000005314 correlation function Methods 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 230000000977 initiatory effect Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000008054 signal transmission Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000010897 surface acoustic wave method Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 1
Landscapes
- Stored Programmes (AREA)
Abstract
The invention relates to a method and a device for upgrading an embedded system as well as equipment, and belongs to the technical field of computers. The method is as follows: an embedded system with the largest system version number and the starting capacity at present in at least two existing embedded systems is determined as a to-be-started first embedded system, and the first embedded system is started; and a system upgrade patch is acquired under the first embedded system and written in a storage medium partition corresponding to a second embedded system, and upgrade of the second embedded system is finished. The embedded system with the largest system version number and the starting capacity at present in at least two existing embedded systems is determined as the to-be-started first embedded system, the system upgrade patch acquired under the first embedded system is written in the storage medium partition corresponding to the second embedded system after the first embedded system is started, upgrade of the second embedded system is finished, and the upgrade method of the embedded system is expanded.
Description
Technical field
The disclosure is directed to field of computer technology, especially a kind of method of embedded system upgrading, device and equipment.
Background technology
With the continuous progress of society, high reliability and height that the embedded device of embedded system has by which is implanted into
The features such as life span, it is widely used to the fields such as traffic, water conservancy.In computer technology fast development instantly, each field
The system performance requirements of embedded device are also increasingly being improved.Therefore, how the embedded system of embedded device is carried out
Upgrading, to meet the system performance requirements that each field is increasingly improved to embedded device, becomes those skilled in the art more
One problem of concern.
Correlation technique was implanted in the storage media of embedded device single embedding before upgrading to embedded system
Embedded system.When upgrading to embedded system, it is first determined whether embedded device is with the exploitation main frame of distal end
(host) set up network connection;After it is determined that embedded device sets up network connection with the exploitation main frame of distal end, by serial ports
Or network interface obtains the AKU of embedded system from exploitation main frame;Afterwards, the AKU of the embedded system for getting is write
Enter in the storage media of embedded device, and start the embedded system after upgrading.
During the present invention is realized, inventor has found that correlation technique at least has problems with:
Only it is implanted in the storage media of embedded device in the embedded system upgrading mode that correlation technique is provided single
Embedded system, therefore it is required that can not there are abnormal conditions in escalation process, such as, in escalation process, embedded device is not
Can not there is exception in energy power-off or AKU itself;If there are abnormal conditions in escalation process, embedded system may be caused
System upgrading failure, even results in that whole embedded device is unavailable, thus the upgrading mode of this kind of embedded system have it is very strong
Limitation.
The content of the invention
For overcoming problem present in correlation technique, the disclosure provide a kind of method of embedded system upgrading, device and
Equipment.
On the one hand, present disclose provides a kind of method of embedded system upgrading;Methods described includes:
In already present at least two embedded system, it is determined that currently having the system version highest of startup ability
Embedded system is used as the first embedded system to be launched, and starts first embedded system;
System upgrade bag is obtained under first embedded system, and the system upgrade bag is write into the second embedded system
Unite in corresponding storage media subregion, complete the upgrading to second embedded system.
Alternatively, also include:
For the different corresponding storage media subregions of embedded system logical partitioning, and in corresponding storage media subregion
It is implanted into corresponding embedded system.
Alternatively, first embedded system includes kernel image file and root file system image file, and described
The kernel image file and root file system image file that first embedded system includes is stored in first embedded system
In corresponding storage media subregion;
It is described to start first embedded system, including:
In first embedded system that will be stored in first embedded system corresponding storage media subregion
Core image file is run in being loaded into internal memory, and the root file system image file of the first embedded system described in carry.
Alternatively, the kernel image file and root file system image file after the system upgrade bag includes upgrading;
It is described to write the system upgrade bag in the corresponding storage media subregion of the second embedded system, including:By institute
State the kernel image file after the upgrading that system upgrade bag includes and the write of root file system image file is described second embedded
In the corresponding storage media subregion of system.
Alternatively, also include:
The system upgrade bag is verified;
After verification success, the system upgrade bag is write in the corresponding storage media subregion of the second embedded system.
Alternatively, it is described in already present at least two embedded system, it is determined that the system currently with startup ability
Version number's highest embedded system as the first embedded system to be launched, including:
According to first start mark determine under the upper embedded system for once starting it is whether not actuated embedded to other
Formula system is upgraded;
If under the upper embedded system for once starting, the embedded system not actuated to other is upgraded, root
Start the embedded system that mark determines last upgrading according to second, and the embedded system after last upgrading is defined as working as
The front system version highest embedded system with the ability of startup, and by the current system version number with startup ability most
High embedded system is used as the first embedded system to be launched;
Wherein, described first starts whether mark is not opened to other under the upper embedded system for once starting for mark
Dynamic embedded system is upgraded;Described second starts mark for identifying the embedded system of last startup.
Alternatively, also include:
If the embedded system not actuated to other is not upgraded under the upper embedded system for once starting, will
The last embedded system for starting is defined as the currently system version highest embedded system with startup ability, and will
The current system version highest embedded system with startup ability is used as the first embedded system to be launched.
Alternatively, it is described in already present at least two embedded system, it is determined that the system currently with startup ability
Version number's highest embedded system as the first embedded system to be launched, including:
If the embedded device with already present at least two embedded system is initial start-up, according to the
Three currencys for starting mark determine current first embedded system to be launched;
Wherein, the described 3rd starts mark for identifying the embedded system being currently up.
On the other hand, present disclose provides a kind of device of embedded system upgrading;Described device includes:
Determining module, for determining that in already present at least two embedded system current treating with startup ability is opened
The first dynamic embedded system;
Starting module, for starting the first embedded system that the determining module determines;
Acquisition module, for obtaining system upgrade bag under the first embedded system that the starting module starts;
Upgraded module, it is corresponding that the system upgrade bag for the acquisition module is got writes the second embedded system
In storage media subregion, the upgrading to second embedded system is completed.
Alternatively, described device also includes:
Division module, for for the different corresponding storage media subregions of embedded system logical partitioning;
Implant module, it is corresponding embedded for being implanted in the corresponding storage media subregion that divides in the division module
System.
Alternatively, first embedded system includes kernel image file and root file system image file, and described
The kernel image file and root file system image file that first embedded system includes is stored in first embedded system
In corresponding storage media subregion;
The starting module, including:
Loading unit, described first for will store in first embedded system corresponding storage media subregion are embedding
The kernel image file of embedded system is run in being loaded into internal memory;
Carry unit, for the root file system image file of the first embedded system described in carry.
Alternatively, the kernel image file and root file system image file after the system upgrade bag includes upgrading;
The upgraded module, for the kernel image file after the upgrading that includes the system upgrade bag and root file system
System image file is write in the corresponding storage media subregion of second embedded system.
Alternatively, described device also includes:
Correction verification module, for verifying to the system upgrade bag;
The upgraded module, for after the correction verification module verifies success, will be system upgrade bag write second embedding
In the corresponding storage media subregion of embedded system.
Alternatively, the determining module includes:
Whether the first determining unit is right under the upper embedded system for once starting for starting mark determination according to first
Other not actuated embedded systems are upgraded;
Second determining unit, for determining under the upper embedded system for once starting to which when first determining unit
After his not actuated embedded system is upgraded, start the embedded system that mark determines last upgrading according to second,
And the embedded system after last upgrading is defined as into the currently embedded system of system version highest with startup ability
System, and using the current system version highest embedded system with startup ability as the first embedded system to be launched
System;
Wherein, described first starts whether mark is not opened to other under the upper embedded system for once starting for mark
Dynamic embedded system is upgraded;Described second starts mark for identifying the embedded system of last startup.
Alternatively, the determining module also includes:
3rd determining unit is not right under the upper embedded system for once starting for working as first determining unit determination
After other not actuated embedded systems are upgraded, the last embedded system for starting is defined as current with startup energy
The system version highest embedded system of power, and currently there is the embedded system of system version highest of startup ability
System is used as the first embedded system to be launched.
Alternatively, the determining module includes:
4th determining unit, is first for working as the embedded device with already present at least two embedded system
During secondary startup, current first embedded system to be launched is determined according to the 3rd currency for starting mark;
Wherein, the described 3rd starts mark for identifying the embedded system being currently up.
Another further aspect, present disclose provides a kind of equipment of embedded system upgrading;The equipment includes memorizer, with
And one or more than one program, one of them or more than one program storage in memorizer, and be configured to by
One or more than one computing device, one or more than one program bag contain the finger for carrying out following operation
Order:
In already present at least two embedded system, it is determined that currently having the system version highest of startup ability
Embedded system is used as the first embedded system to be launched, and starts first embedded system;
System upgrade bag is obtained under first embedded system, and the system upgrade bag is write into the second embedded system
Unite in corresponding storage media subregion, complete the upgrading to second embedded system.
Some beneficial effects of the disclosure can include:
The current system version highest with startup ability is determined in already present at least two embedded system
Embedded system as the first embedded system to be launched, and after starting the first embedded system, in the first embedded system
Lower acquisition system upgrade bag, and system upgrade bag is write in the corresponding storage media of the second embedded system, so as to extend
The mode of embedded system upgrading, has reached the purpose of embedded system upgrading.
It should be appreciated that the general description of the above and detailed description hereinafter are only exemplary, this can not be limited
It is open.
Description of the drawings
Accompanying drawing described herein is used for providing further understanding of the disclosure, constitutes the part of the application, not
Constitute restriction of this disclosure.In the accompanying drawings:
Fig. 1 is a kind of exemplary process diagram of the method for embedded system upgrading that disclosure one embodiment is provided;
Fig. 2 is a kind of exemplary process diagram of the method for embedded system upgrading that the disclosure another embodiment is provided;
Fig. 3 is that the example arrangement of the device of the first embedded system upgrading that the disclosure another embodiment is provided is shown
It is intended to;
Fig. 4 is that the example arrangement of the device of second embedded system upgrading that the disclosure another embodiment is provided is shown
It is intended to;
Fig. 5 is a kind of exemplary internal structure schematic diagram of starting module that the disclosure another embodiment is provided;
Fig. 6 is that the example arrangement of the device of the third embedded system upgrading that the disclosure another embodiment is provided is shown
It is intended to;
Fig. 7 is the exemplary internal structure schematic diagram of the first determining module that the disclosure another embodiment is provided;
Fig. 8 is the exemplary internal structure schematic diagram of second determining module that the disclosure another embodiment is provided;
Fig. 9 is the exemplary internal structure schematic diagram of the third determining module that the disclosure another embodiment is provided;
Figure 10 is that a kind of example arrangement of the equipment of embedded system upgrading that the disclosure another embodiment is provided is shown
It is intended to.
By above-mentioned accompanying drawing, it has been shown that the clear and definite embodiment of the disclosure, will hereinafter be described in more detail.These accompanying drawings
It is not intended to limit the scope of disclosure design by any mode with word description, but by reference to specific embodiment is
Those skilled in the art illustrate the concept of the disclosure.
Specific embodiment
Purpose, technical scheme and advantage for making the disclosure becomes more apparent, with reference to embodiment and accompanying drawing, right
The disclosure is described in further details.Here, the exemplary embodiment of the disclosure and its illustrate for explaining the disclosure, but and
Not as restriction of this disclosure.
The embodiment of the present disclosure provides a kind of method of embedded system upgrading, is applied to be implanted with the embedded of embedded system
Formula equipment or terminal.In embedded systems, include BootLoader (system start-up loader), which is located at embedded device
Or the section start of the flash memory of terminal, it is mainly used to activation system.BootLoader was transported before the kernel operation of embedded system
OK.Can with initiating hardware equipment, set up memory headroom mapping graph, so as to take the hardware environment of embedded system to one
Suitable state, so that the kernel for finally calling embedded system gets out correct environment.Below in conjunction with accompanying drawing and above-mentioned
Content is described in detail to the disclosure.
In one embodiment, as shown in figure 1, the method for embedded system upgrading includes:
In step S101, in already present at least two embedded system, it is determined that currently have startup ability is
System version number's highest embedded system is used as the first embedded system to be launched, and starts the first embedded system;
In another embodiment, also include:
For the different corresponding storage media subregions of embedded system logical partitioning, and in corresponding storage media subregion
It is implanted into corresponding embedded system.
In another embodiment, in already present at least two embedded system, it is determined that currently having startup ability
System version highest embedded system as the first embedded system to be launched, including but not limited to:
According to first start mark determine under the upper embedded system for once starting it is whether not actuated embedded to other
Formula system is upgraded;
If under the upper embedded system for once starting, the embedded system not actuated to other is upgraded, root
Start the embedded system that mark determines last upgrading according to second, and the embedded system after last upgrading is defined as working as
The front system version highest embedded system with the ability of startup, and by the current system version number with startup ability most
High embedded system is used as the first embedded system to be launched;
Wherein, whether the first startup mark is not actuated to other under the upper embedded system for once starting for identifying
Embedded system is upgraded;Second starts mark for identifying the embedded system of last startup.
In another embodiment, also include:
If the embedded system not actuated to other is not upgraded under the upper embedded system for once starting, will
The last embedded system for starting is defined as the currently system version highest embedded system with startup ability, and will
The current system version highest embedded system with startup ability is used as the first embedded system to be launched.
In another embodiment, in already present at least two embedded system, it is determined that currently having startup ability
System version highest embedded system as the first embedded system to be launched, including but not limited to:
If the embedded device with already present at least two embedded system is initial start-up, open according to the 3rd
The currency of dynamic mark determines current first embedded system to be launched;
Wherein, the 3rd starts mark for identifying the embedded system being currently up.
In another embodiment, the first embedded system includes kernel image file and root file system image file,
And first the kernel image file that includes of embedded system and root file system image file be stored in the first embedded system pair
In the storage media subregion answered;
Start the first embedded system, including but not limited to:
By the kernel image text of the first embedded system stored in the first embedded system corresponding storage media subregion
Part is run in being loaded into internal memory, and the root file system image file of the first embedded system of carry;
In step s 102, system upgrade bag is obtained under the first embedded system, will be the write second of system upgrade bag embedding
In the corresponding storage media subregion of embedded system, the upgrading to the second embedded system is completed.
In another embodiment, the kernel image file and root file system image text after system upgrade bag includes upgrading
Part;
System upgrade bag is write in the corresponding storage media subregion of the second embedded system, including:
Kernel image file after the upgrading that system upgrade bag is included and the write second of root file system image file are embedding
In the corresponding storage media subregion of embedded system.
In another embodiment, also include:
System upgrade bag is verified;
After verification success, system upgrade bag is write in the corresponding storage media subregion of the second embedded system.
The method that the present embodiment is provided, determines currently there is startup ability in already present at least two embedded system
System version highest embedded system as the first embedded system to be launched, and after starting the first embedded system,
The system upgrade bag got under the first embedded system is write in the corresponding storage media subregion of the second embedded system,
So as to complete the upgrading of the second embedded system, the purpose of embedded system upgrading is reached.Under this kind of method, even if embedding first
System upgrade bag is not got under embedded system, the first embedded system can be also continued to run with, even if so the second embedded system
System upgrading failure, is also not result in that whole embedded device is unavailable, therefore, the upgrading mode of this kind of embedded system has good
Good autgmentability.
In another embodiment, as a example by it there are two embedded systems in embedded device, the disclosure is provided
The method of embedded system upgrading carries out explanation explained in detail.As shown in Fig. 2 the method for embedded system upgrading includes:
In step s 201, the current system version with startup ability of determination in already present two embedded systems
This number highest embedded system is used as the first embedded system to be launched, and starts the first embedded system;
For the step, before this step is performed, logical partition is carried out to the storage media of embedded device in advance, with
The each self-corresponding storage media subregion of to be implanted two embedded system is obtained, so as to divide in corresponding storage media subregion
Corresponding embedded system is not implanted into.
Wherein, when the storage media to embedded device carries out logical partition, the quantity of the storage media subregion for obtaining
Concretely 8, certainly, outside the number of partitions divider value 8 of storage media, can also be other numerical value, for example, 16 or 32 etc.
Deng the present embodiment is not especially limited to the quantity of storage media subregion, depending on the number of visual embedded system to be implanted.
Additionally, the size of each storage media subregion can be the same or different.For example, the less storage matchmaker of memory space can be divided
Matter subregion, starts mark for storing a class;The larger storage media subregion of memory space can be also divided, it is embedding for storing two
The associated documents of embedded system.Wherein, the big I of the less storage media subregion of memory space is 64 kilobytes;Memory space
The size of larger storage media subregion concretely 4 gigabit.Certainly, the little storage media subregion of memory space and memory space
The size of big storage media subregion in addition to above-mentioned numerical value, can also be other numerical value, such as 32 kilobytes or 2 gigabits, this reality
Apply example to be equally not especially limited the size of each storage media subregion.
In another embodiment, the different storage media subregions in embedded device are implanted into corresponding embedded system respectively
The implementation of system, including but not limited to:By the kernel image file and root file system image file of two embedded systems
It is respectively written into corresponding storage media subregion;And two embedded systems are write in other storage media subregions
BootLoader。
Wherein, in embedded device, presence (preserves into disk file shape to the kernel of embedded system in the form of a file
Formula), i.e. kernel image file;In embedded device, equally presence (preserves into disk text to root file system in the form of a file
Part form), i.e. root file system image file.Further, since the effect of the BootLoader of each embedded system and program
Code is consistent, therefore, when the kernel image file and root file system image file of two embedded systems is write, it is only necessary to
Two embedded systems of write just can be actuated for control, save storage so as to reach by one BootLoader of write
The purpose in space.
Except above-mentioned in addition to the different storage media subregions of embedded device write the mode of corresponding embedded system, also
Other writing modes, the present embodiment can be taken to be not especially limited this.
In another embodiment, it is current with startup energy in order to determine in already present two embedded systems
, used as the first embedded system to be launched, the method that the present embodiment is provided is also for the system version highest embedded system of power
Start mark, the second startup including setting first to identify and the 3rd startup mark, and start mark, the second startup by first and identify
And the 3rd start mark and be respectively written into step in the storage media subregion of embedded device.
Wherein, first starts mark, can be identified with symbol flag_where_reboot, be opened for current subsystem
For dynamic, for representing whether carried out system upgrade in the upper embedded system for once starting;The present embodiment is with flag_
Where_reboot=1 represents " having carried out system upgrade in the upper embedded system for once starting ";flag_where_
Reboot=0 represents " not carrying out system upgrade in the upper embedded system for once starting ".
Second starts mark, can be identified with symbol flag_last_success, starts to come for current subsystem
Say, for identifying the last system for successfully starting up is which system in two embedded systems;For example, if with system 1
Identify two embedded systems of write with system 2 respectively, can be with flag_last_success=0 marks in the present embodiment
The system for once successfully starting up is system 1;It is to be that the last system for successfully starting up is identified with flag_last_success=1
System 2.
3rd starts mark, can be identified with symbol flag_last_boot_try, be opened for embedded system for the first time
For dynamic, can start when mark determines embedded system initial start-up which embedded system started according to the 3rd.
For example, if identifying two embedded systems of write with system 1 and system 2 respectively, can be with flag_last_ in the present embodiment
Boot_try=0 answers activation system 1 when representing embedded system initial start-up;Represent embedding with flag_last_boot_try=0
Activation system 2 is answered during embedded system initial start-up.
It should be noted that above-mentioned 3rd startup mark is upgraded successfully in embedded system or embedded system normally starts
When, will not play a role.When embedded system initial start-up or during embedded system startup separator, can just play a role.
It is in order to which system should be started when determining and starting first, and when it is determined that the system start-up fails it is another to continue to start
Individual system, prevents repeatedly start fault embedded system and arranges.Its concrete effect can combine program in subsequent step
Code is explained.
In another embodiment, after above three startup mark is set, respectively three start mark and assign initial values
0.When the storage media subregion write above three to embedded device starts mark, in order to prevent to storage media subregion
Middle write is broken down in starting identification procedure, so as to the startup indicating failure for causing to be successfully written, so above three is opened
Dynamic mark is write in the storage media subregion of three files for being different from two embedded systems of storage respectively.
Three based on above-mentioned setting start mark, and the determination in already present two embedded systems currently has and starts
Implementation of the system version highest embedded system of ability as the first embedded system to be launched, including but not
It is limited to:
According to first start mark determine under the upper embedded system for once starting it is whether not actuated embedded to other
Formula system is upgraded;
If under the upper embedded system for once starting, the embedded system not actuated to other is upgraded, root
Start the embedded system that mark determines last upgrading according to second, and the embedded system after last upgrading is defined as working as
The front system version highest embedded system with the ability of startup, and by the current system version number with startup ability most
High embedded system is used as the first embedded system to be launched.
If the embedded system not actuated to other is not upgraded under the upper embedded system for once starting, will
The last embedded system for starting is defined as the currently system version highest embedded system with startup ability, and will
The current system version highest embedded system with startup ability is used as the first embedded system to be launched.
In another embodiment, in already present at least two embedded system, it is determined that currently having startup ability
System version highest embedded system as the first embedded system to be launched, including but not limited to:
If the embedded device with already present at least two embedded system is initial start-up, open according to the 3rd
The currency of dynamic mark determines current first embedded system to be launched.
Two embedded systems are identified respectively with system 1 and system 2 now, the first startup is designated flag_where_
Reboot, and the value of flag_where_reboot is 0 or 1, the second startup is designated flag_last_success, and flag_
The value of last_success is 0 or 1, the 3rd startup mark flag_last _ boot_try, and flag_last_boot_try
As a example by being worth for 0 or 1, the current system version number with startup ability is determined in already present two embedded systems to above-mentioned
Highest embedded system is visually illustrated as the first embedded system to be launched.Wherein, each starts mark
The concrete meaning that the numerical value of knowledge is represented is introduced in the previous section of this step, and here is omitted.Comprise the following steps that:
The first step:Determine that the first startup identifies the currency of flag_where_reboot;
Second step:If the currency of flag_where_reboot is 1, by the currency of flag_where_reboot
0 is assigned, and continues to determine the second currency for starting mark flag_last_success;
3rd step:In second step, if the currency of flag_last_success is 1, it is determined that current to be launched
First embedded system is system 1;If the currency of flag_last_success is 0, it is determined that currently to be launched first
Embedded system is system 2;
4th step:In the first step, if the currency of flag_where_reboot is 0, continue to determine that second starts
The currency of mark flag_last_success;
5th step:In the 4th step, if the second currency for starting mark flag_last_success is 1, start
System 2;If the second currency for starting mark flag_last_success is 0, continue to determine that the 3rd starts mark
The currency of flag_last_boot_try;
6th step:In the 5th step, if the 3rd currency for starting mark flag_last_boot_try is 0, open
Dynamic system 1, and flag_last_boot_try is assigned into 1;If the 3rd currency for starting mark flag_last_boot_try
For 1, then activation system 2.
The implementation of the above-mentioned first step to the 6th step, can also be realized by program code, program code is specifically such as
Under:
In another embodiment, start the implementation of the first embedded system, including but not limited to:
The kernel image file of the first embedded system stored in the first embedded system corresponding storage media is added
Run in being downloaded to internal memory, and the root file system image file of the first embedded system of carry.
Wherein, carry refer to by an equipment (typically storage device, for example, storage media) be articulated to one it is existing
Catalogue on.During file in storage device to be accessed, the subregion that file is located need to be mounted in an already present catalogue,
Then by accessing this catalogue accessing storage device.
In order to the root file system image file of the first embedded system of successful carry, in the first embedded system of carry
Before the root file system image file of system, also need address to be respectively provided with for each storage media subregion, and set up storage media
Subregion and the mapping table of address.So as to search the mapping table according to storage media partition address, just to find first embedding
The place storage media subregion of the root file system image file of embedded system;And then the root of the first embedded system of successful carry
File system image file.
In step S202, system upgrade bag is obtained under the first embedded system, will be the write second of system upgrade bag embedding
In the corresponding storage media subregion of embedded system, the upgrading to the second embedded system is completed.
For the step, after embedded device sets up network connection with the exploitation main frame of distal end, main frame conduct is developed
The promoter of system upgrade task, when new system upgrade bag is detected the presence of, just actively sends system to embedded device
Upgrade command, to indicate that embedded device carries out system upgrade.And in order to make, when embedded device is clear and definite obtains system
AKU, the method that the present embodiment is provided is the step of also comprise determining whether that receiving system upgrade indicates.
With regard to judging whether to receive the implementation of system upgrade instruction, including but not limited to:
Judge whether to receive the system upgrade order comprising specific character that exploitation main frame sends;If receive included
The system upgrade order of specific character, then send to exploitation main frame and confirm to carry out replying message for system upgrade;If do not received
To the system upgrade order comprising specific character, then not execution system updating operation.
Wherein, concretely ACK (Acknowledgement confirms character) message is replied message, certainly, is replied message
In addition to ACK message, can also be other kinds of message, the present embodiment is not especially limited to the type for replying message.
In another embodiment, under the first embedded system obtain system upgrade bag implementation, including but not
It is limited to:
First embedded system receives each packet that distal end exploitation main frame sends, after often receiving a packet,
Send to the exploitation main frame of distal end and confirm message, while the verification data bag that the exploitation main frame for receiving distal end sends, if packet
Verification it is errorless, then judge successfully to obtain the packet, and to distal end exploitation main frame back-checking result and continue to next
Individual packet;If packet verification is wrong, judge not getting the packet.
Wherein, each packet by distal end exploitation main frame in advance by the kernel image file of latest edition and root file system
System image file is split as multiple data cells of regular length, and constitutes packet by core of each data cell.Wherein,
Packet includes data packet head mark, command header, packet sequence, data cell, CRC check code, packet tail tag will and total bag number
Deng.
After system upgrade bag is got, it is whether the content of the system upgrade bag that confirmation gets is complete, after guarantee
The system upgrade bag that continuous basis gets successfully is upgraded to system, and the method that the present embodiment is provided also is included to system upgrade
The step of bag is verified.
Wherein, the implementation for system upgrade bag being verified, including but not limited to:
Whether the bag number of the packet that confirmation is received is consistent with the total bag number included in each packet;If received
Packet bag number it is consistent with the total bag number included in each packet, then system upgrade bag is verified successfully, it is determined that obtain
The content intact of the AKU for arriving.
Certainly, in addition to the above-mentioned mode verified to system upgrade bag, other verification modes, this enforcement can also be taken
Example is not especially limited to this.
Alternatively, after to the verification success of system upgrade bag, system upgrade bag can be written to the second embedded system pair
In the storage media subregion answered.Wherein, system upgrade bag is written in the corresponding storage media subregion of the second embedded system
Implementation, including but not limited to:
The original packet stored in second embedded system corresponding storage media subregion is wiped, the system that will be obtained
AKU is written in the corresponding storage media subregion of the second embedded system.As system upgrade bag includes the kernel after upgrading
Image file and root file system image file, then write the corresponding storage media point of the second embedded system by system upgrade bag
Qu Zhong, including:Kernel image file after the upgrading that system upgrade bag is included and root file system image file write second
In the corresponding storage media subregion of embedded system.Kernel image file and root file system image file after by upgrading is write
After entering in the corresponding storage media subregion of the second embedded system, due in the first embedded system to the second embedded system
System is upgraded, therefore, the currency that first starts mark need to be updated, i.e., by flag_where_reboot=0 more
It is newly flag_where_reboot=1.
Alternatively, it is as the version of system upgrade bag is better than the version of the first embedded system, embedded in order to ensure
The system service behaviour of system, then need to carry out embedded system switching, that is, it is out of service to control the first embedded system, and opens
The second embedded system after dynamic upgrading.The kernel image file for controlling the first embedded system by BootLoader stops
Operation.After the first embedded system of control is out of service, restart the second embedded system.
Wherein, start the implementation of the second embedded system after upgrading, including but not limited to:
The kernel image file that the system upgrade bag stored in second embedded system corresponding storage media includes is added
Run in being downloaded to internal memory, and the root file system image file that carry system upgrade bag includes.
In another embodiment, when the second embedded system after upgrading is started, the method that the present embodiment is provided is also
Comprise determining whether the step of successfully starting up the second embedded system after upgrading;If successfully starting up after upgrading second to be embedded in
Formula system, the then currency for starting mark by second and the 3rd currency for starting mark are updated.
With regard to judging whether to successfully start up the implementation of the second embedded system after upgrading, including but not limited to:Sentence
Whether the initialization program of the second embedded system after disconnected upgrading starts;If the second embedded system after upgrading is initial
Change program successful operation, then judge the second embedded system after successfully starting up upgrading;If the second embedded system after upgrading
The unsuccessful startup of initialization of system, then judge unsuccessful the second embedded system started after upgrading.
If additionally, successfully started up the second embedded system after upgrading, the currency for starting mark by second and the
Three currencys for starting mark are updated.So that the second embedded system after upgrading is for system 1 as an example, successfully starting up it is then
After system 1, the currency that second starts mark flag_last_success is entered as into 0, the 3rd starts mark flag_last_
The currency of boot_try is entered as 0.
Additionally, the present embodiment is only as a example by having two embedded systems in embedded device, what the disclosure was provided is embedding
The method of embedded system upgrading is explained explanation.When there is plural embedded system in embedded device, it is
System upgrading mode is similar to upgrading mode when there is two embedded systems.There is system A, system B in embedded device
And tri- embedded systems of system C, as a example by the first embedded system that this starts is system A, then gets under system A and be
After system AKU, system upgrade bag can be respectively written into the corresponding storage of corresponding storage media subregion neutralized system C of system B
In medium subregion, namely system B and system C are upgraded;So, in upper once activation system, can be by system B after upgrading
It is defined as the system version highest embedded system with the ability of startup with any system in system C after upgrading, and
This is had the system version highest embedded system of startup ability as this first embedded system to be launched, and
Start first embedded system.System upgrade bag is obtained under first embedded system, by system upgrade bag write the
In the corresponding storage media subregion of two embedded systems, the upgrading to the second embedded system is completed.Wherein, this is second embedded
System includes two embedded systems;If system B after upgrading is defined as the system version number with the ability of startup most
High embedded system, then second embedded system include system A and system C;If system C after upgrading is defined as
With start ability system version highest embedded system, then second embedded system include system A and system
B。
The method that the present embodiment is provided, determines currently there is startup ability in already present at least two embedded system
System version highest embedded system as the first embedded system to be launched, and start the first embedded system
Afterwards, the system upgrade bag got under the first embedded system is write into the corresponding storage media subregion of the second embedded system
In, so as to complete the upgrading of the second embedded system, reach the purpose of embedded system upgrading.Under this kind of method, even if
System upgrade bag is not got under one embedded system, the first embedded system can be also continued to run with, even if so second is embedded
Formula system upgrade fails, and is also not result in that whole embedded device is unavailable, therefore, the upgrading mode of this kind of embedded system has
There is good autgmentability.
In another embodiment, as shown in figure 3, the device of embedded system upgrading includes:
Determining module 31, for what the determination in already present at least two embedded system currently had startup ability be
System version number's highest embedded system is used as the first embedded system to be launched;
Starting module 32, for starting the first embedded system of the determination of determining module 31;
Acquisition module 33, for obtaining system upgrade bag under the first embedded system that starting module 32 starts;
Upgraded module 34, it is corresponding that the system upgrade bag for acquisition module 33 is got writes the second embedded system
In storage media subregion, the upgrading to the second embedded system is completed.
In another embodiment, referring to Fig. 4, the device also includes:
Division module 35, for for the different corresponding storage media subregions of embedded system logical partitioning;
Implant module 36, it is corresponding embedded for being implanted in the corresponding storage media subregion that divides in division module 35
System.
In another embodiment, the first embedded system includes kernel image file and root file system image file,
And first the kernel image file that includes of embedded system and root file system image file be stored in the first embedded system pair
In the storage media subregion answered;
Referring to Fig. 5, starting module 32, including:
Loading unit 321, first for will store in the first embedded system corresponding storage media subregion are embedded
The kernel image file of system is run in being loaded into internal memory;
Carry unit 322, for the root file system image file of the first embedded system of carry.
In another embodiment, the kernel image file and root file system image text after system upgrade bag includes upgrading
Part;
Upgraded module 34, for kernel image file and root file system image after the upgrading that includes system upgrade bag
File is write in the corresponding storage media subregion of the second embedded system.
In another embodiment, referring to Fig. 6, the device also includes:
Correction verification module 37, for verifying to system upgrade bag;
Upgraded module 34, for, after correction verification module 37 verifies success, writing the second embedded system by system upgrade bag
In corresponding storage media subregion.
In another embodiment, referring to Fig. 7, determining module 31 includes:
First determining unit 311, for starting mark determination according to first under the upper embedded system for once starting be
The no embedded system not actuated to other is upgraded;
Second determining unit 312, for when the first determining unit 311 determine it is right under the upper embedded system for once starting
After other not actuated embedded systems are upgraded, start the embedded system that mark determines last upgrading according to second
System, and the system version highest that the embedded system after last upgrading is defined as currently with startup ability is embedded
System, and using the current system version highest embedded system with startup ability as the first embedded system to be launched
System;
Wherein, whether the first startup mark is not actuated to other under the upper embedded system for once starting for identifying
Embedded system is upgraded;Second starts mark for identifying the embedded system of last startup.
In another embodiment, referring to Fig. 8, determining module 31 also includes:
3rd determining unit 313, for determining under the upper embedded system for once starting not when the first determining unit 311
After to other, not actuated embedded system is upgraded, the last embedded system for starting is defined as current with startup
The system version highest embedded system of ability, and will be the current system version highest with startup ability embedded
System is used as the first embedded system to be launched.
In another embodiment, referring to Fig. 9, determining module 31 includes,
4th determining unit 314, is first for working as the embedded device with already present at least two embedded system
During secondary startup, current first embedded system to be launched is determined according to the 3rd currency for starting mark;
Wherein, the 3rd starts mark for identifying the embedded system being currently up.
The device that the present embodiment is provided, determines currently there is startup ability in already present at least two embedded system
System version highest embedded system as the first embedded system to be launched, and start the first embedded system
Afterwards, the system upgrade bag got under the first embedded system is write into the corresponding storage media subregion of the second embedded system
In, so as to complete the upgrading of the second embedded system, reach the purpose of embedded system upgrading.Even if in the first embedded system
Under do not get system upgrade bag, can also continue to run with the first embedded system, even if so the second embedded system upgrading lose
Lose, be also not result in that whole embedded device is unavailable, therefore, the upgrading mode of this kind of embedded system has good extension
Property.
In another embodiment, Figure 10 be the equipment of embedded system upgrading in the embodiment of the present invention (can be requesting party
Terminal or associated terminal) structural representation.Referring to Figure 10, the side that the equipment is provided in can be used for implementing above-described embodiment
Method.Preferably:
Equipment 1000 can include communication unit 110, include one or more computer-readable recording mediums
Memorizer 120, input block 130, display unit 140, sensor 150, voicefrequency circuit 160, WIFI (Wireless
Fidelity, Wireless Fidelity) module 170, the processor 180 for including or more than one processing core, and power supply
190 grade parts.It will be understood by those skilled in the art that the device structure illustrated in figure does not constitute the restriction to equipment, can be with
Including than illustrating more or less of part, or some parts are combined, or different part arrangements.Wherein:
Communication unit 110 can be used to receiving and sending messages or communication process in, the reception and transmission of signal, the communication unit 110
Can for RF (Radio Frequency, radio frequency) circuit, router, modem, etc. network communication equipment.Especially, when
When communication unit 110 is RF circuits, after the downlink information of base station is received, transfer at one or more than one processor 180
Reason;In addition, up data is activation will be related to base station.Usually as communication unit RF circuits include but is not limited to antenna,
At least one amplifier, tuner, one or more agitators, subscriber identity module (SIM) card, transceiver, bonder,
LNA (Low Noise Amplifier, low-noise amplifier), duplexer etc..Additionally, communication unit 110 can also be by wireless
Communication is communicated with network and other equipment.The radio communication can use arbitrary communication standard or agreement, including but not limited to
GSM (Global System of Mobile communication, global system for mobile communications), GPRS (General
Packet Radio Service, general packet radio service), CDMA (Code Division Multiple Access, code
Point multiple access), WCDMA (Wideband Code Division Multiple Access, WCDMA), LTE (Long
Term Evolution, Long Term Evolution), Email, SMS (Short Messaging Service, Short Message Service) etc..
Memorizer 120 can be used to store software program and module, and processor 180 is stored in the software journey of memorizer 120 by operation
Sequence and module, so that perform various function application and data processing.Memorizer 120 can mainly include storing program area and deposit
Storage data field, wherein, storing program area can storage program area, the application program needed at least one function (such as broadcast by sound
Playing function, image player function etc.) etc.;Storage data field can be stored and use created data (such as according to equipment 1000
Voice data, phone directory etc.) etc..Additionally, memorizer 120 can include high-speed random access memory, can also include non-easy
The property lost memorizer, for example, at least one disk memory, flush memory device or other volatile solid-state parts.Correspondingly,
Memorizer 120 can also include Memory Controller, to provide the visit of processor 180 and input block 130 to memorizer 120
Ask.
Input block 130 can be used for the numeral of receives input or character information, and produce and user's setting and function
The relevant keyboard of control, mouse, action bars, optics or trace ball signal input.Alternatively, input block 130 may include to touch
Sensitive surfaces 131 and other input equipments 132.Touch sensitive surface 131, also referred to as touch display screen or Trackpad, can collect use
Family thereon or neighbouring touch operation (such as user is using any suitable objects such as finger, stylus or adnexa in touch-sensitive table
Operation on face 131 or near the Touch sensitive surface 131), and corresponding attachment means are driven according to formula set in advance.It is optional
, Touch sensitive surface 131 may include two parts of touch detecting apparatus and touch controller.Wherein, touch detecting apparatus detection is used
The touch orientation at family, and the signal that touch operation brings is detected, transmit a signal to touch controller;Touch controller is from touch
Touch information is received in detection means, and is converted into contact coordinate, then give processor 180, and can receiving processor 180
The order sent simultaneously is performed.Furthermore, it is possible to adopt the polytypes such as resistance-type, condenser type, infrared ray and surface acoustic wave
Realize Touch sensitive surface 131.Except Touch sensitive surface 131, input block 130 can also include other input equipments 132.Alternatively,
Other input equipments 132 can include but is not limited to physical keyboard, function key (such as volume control button, switch key etc.),
One or more in trace ball, mouse, action bars etc..
Display unit 140 can be used to showing by user input information or be supplied to information and the equipment 1000 of user
Various graphical user interface, these graphical user interface can be made up of figure, text, icon, video and its combination in any.
Display unit 140 may include display floater 141, optionally, can adopt LCD (Liquid Crystal Display, liquid crystal
Show device), the form such as OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) to be configuring display floater
141.Further, Touch sensitive surface 131 can cover display floater 141, when Touch sensitive surface 131 is detected thereon or neighbouring is touched
After touching operation, processor 180 is sent to determine the type of touch event, with preprocessor 180 according to the type of touch event
Corresponding visual output is provided on display floater 141.Although in Fig. 10, Touch sensitive surface 131 is to make with display floater 141
Realize input and output function for two independent parts, but in some embodiments it is possible to by Touch sensitive surface 131 with it is aobvious
Show panel 141 integrated and realize input and output function.
Equipment 1000 may also include at least one sensor 150, such as optical sensor, motion sensor and other sensings
Device.Optical sensor may include ambient light sensor and proximity transducer, and wherein, ambient light sensor can be according to the bright of ambient light
Secretly adjusting the brightness of display floater 141, proximity transducer can cut out display floater 141 when equipment 1000 is moved in one's ear
And/or backlight.Used as one kind of motion sensor, in the detectable all directions of Gravity accelerometer, (generally three axles) add
The size of speed, can detect that size and the direction of gravity when static, can be used to recognize application (the such as horizontal/vertical screen of mobile phone attitude
Switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap) etc.;As for equipment
The other sensors such as 1000 gyroscopes that can also configure, barometer, drimeter, thermometer, infrared ray sensor, here are no longer gone to live in the household of one's in-laws on getting married
State.
Voicefrequency circuit 160, speaker 161, microphone 162 can provide the audio interface between user and equipment 1000.Sound
The signal of telecommunication after the voice data for receiving conversion can be transferred to speaker 161, is converted to by speaker 161 by frequency circuit 160
Acoustical signal is exported;On the other hand, the acoustical signal of collection is converted to the signal of telecommunication by microphone 162, is received by voicefrequency circuit 160
After be converted to voice data, then after voice data output processor 180 is processed, Jing RF circuits 110 are such as another to be sent to
Terminal unit, or voice data is exported to memorizer 120 further to process.Voicefrequency circuit 160 is also possible that ear
Tip jack, to provide the communication of peripheral hardware earphone and equipment 1000.
In order to realize radio communication, wireless communication unit 170 on the equipment, can be configured with, the wireless communication unit 170
It can be WIFI module.WIFI belongs to short range wireless transmission technology, and equipment 1000 can be helped by wireless communication unit 170
User sends and receive e-mail, browses webpage and access streaming video etc., and it has provided the user wireless broadband internet and has accessed.
Although showing wireless communication unit 170 in figure, but it is understood that, which is simultaneously not belonging to must be configured into for equipment 1000,
Can omit in the scope of essence for not changing invention as needed completely.
Processor 180 is the control centre of equipment 1000, using each portion of various interfaces and connection whole mobile phone
Point, software program and/or module in memorizer 120 is stored in by running or performing, and call and be stored in memorizer
Data in 120, perform the various functions and processing data of equipment 1000, so as to carry out integral monitoring to mobile phone.Optionally, locate
Reason device 180 may include one or more processing cores;Preferably, processor 180 can integrated application processor and modulatedemodulate mediate
Reason device, wherein, application processor mainly processes operating system, user interface and application program etc., and modem processor is main
Process radio communication.It is understood that above-mentioned modem processor can not also be integrated in processor 180.
Equipment 1000 also includes the power supply 190 (such as battery) powered to all parts, it is preferred that power supply can be by electricity
Management system is logically contiguous with processor 180, so as to realize management charging, electric discharge and power consumption by power-supply management system
The functions such as management.Power supply 190 can also include one or more direct current or alternating current power supply, recharging system, power supply event
The random component such as barrier detection circuit, power supply changeover device or inverter, power supply status indicator.
Although not shown, equipment 1000 can also include photographic head, bluetooth module etc., will not be described here.In this enforcement
Example in, embedded system upgrading equipment also include memorizer, and one or more than one program, one of them or
Person more than one program storage in memorizer, and be configured to by one or more than one computing device it is one or
Person more than one program bag is containing for carrying out the instruction of method provided in an embodiment of the present invention.
Although content disclosed above shows the exemplary embodiment of the disclosure, it should be noted that without departing substantially from power
On the premise of profit requires the scope of the present disclosure for limiting, may be many modifications and change.According to described herein open real
Function, step and/or the action for applying the claim to a method of example is not required to perform with any particular order.Although additionally, the disclosure
Element can be described with individual form or be required, it is also contemplated that multiple, be odd number unless explicitly limited.
Above-described specific embodiment, purpose of this disclosure, technical scheme and beneficial effect have been carried out further
Describe in detail, the be should be understood that specific embodiment that the foregoing is only the disclosure, be not used to limit the disclosure
Protection domain, all within the spirit and principle of the disclosure, any modification, equivalent substitution and improvements done etc. all should be included
Within the protection domain of the disclosure.
Claims (15)
1. a kind of method that embedded system is upgraded, it is characterised in that methods described includes:
In already present at least two embedded system, it is determined that the system version highest currently with startup ability is embedded in
Formula system is used as the first embedded system to be launched, and starts first embedded system;
System upgrade bag is obtained under first embedded system, and the system upgrade bag is write into the second embedded system pair
In the storage media subregion answered, the upgrading to second embedded system is completed;
Wherein, it is described in already present at least two embedded system, it is determined that currently having the system version number of startup ability
Highest embedded system as the first embedded system to be launched, including:
Start mark according to first and determine under the upper embedded system for once starting the whether embedded system not actuated to other
System is upgraded;
If the embedded system not actuated to other is upgraded under the upper embedded system for once starting, according to
Two start the embedded systems that mark determines last upgrading, the embedded system after last upgrading are defined as currently have
The system version highest embedded system of startup ability, and will be the current system version highest with startup ability embedding
Embedded system is used as the first embedded system to be launched;
Wherein, whether the first startup mark is not actuated to other under the upper embedded system for once starting for identifying
Embedded system is upgraded;Described second starts mark for identifying the embedded system of last startup.
2. method according to claim 1, it is characterised in that also include:
For the different corresponding storage media subregions of embedded system logical partitioning, and it is implanted in corresponding storage media subregion
Corresponding embedded system.
3. method according to claim 1, it is characterised in that first embedded system include kernel image file and
Root file system image file, and the kernel image file that includes of first embedded system and root file system image file
It is stored in the corresponding storage media subregion of first embedded system;
It is described to start first embedded system, including:
The kernel of first embedded system stored in first embedded system corresponding storage media subregion is reflected
Run as file is loaded in internal memory, and the root file system image file of the first embedded system described in carry.
4. method according to claim 1, it is characterised in that the system upgrade bag include upgrading after kernel image text
Part and root file system image file;
It is described to write the system upgrade bag in the corresponding storage media subregion of the second embedded system, including:
Kernel image file after the upgrading that the system upgrade bag is included and root file system image file write described the
In the corresponding storage media subregion of two embedded systems.
5. method according to claim 1, it is characterised in that also include:
The system upgrade bag is verified;
After verification success, the system upgrade bag is write in the corresponding storage media subregion of the second embedded system.
6. method according to claim 1, it is characterised in that also include:
If the embedded system not actuated to other is not upgraded under the upper embedded system for once starting, by upper one
The embedded system of secondary startup is defined as the currently system version highest embedded system with startup ability, and will be current
System version highest embedded system with the ability of startup is used as the first embedded system to be launched.
7. method according to claim 1, it is characterised in that described in already present at least two embedded system,
It is determined that currently there is the system version highest embedded system of startup ability as the first embedded system to be launched, bag
Include:
If the embedded device with already present at least two embedded system is initial start-up, open according to the 3rd
The currency of dynamic mark determines current first embedded system to be launched;
Wherein, the described 3rd starts mark for identifying the embedded system being currently up.
8. the device that a kind of embedded system is upgraded, it is characterised in that described device includes:
Determining module, for determining the current system version with startup ability in already present at least two embedded system
Number highest embedded system is used as the first embedded system to be launched;
Starting module, for starting the first embedded system that the determining module determines;
Acquisition module, for obtaining system upgrade bag under the first embedded system that the starting module starts;
Upgraded module, the system upgrade bag for the acquisition module is got write the corresponding storage of the second embedded system
In medium subregion, the upgrading to second embedded system is completed;
Wherein, the determining module includes:
Whether the first determining unit, determine under the upper embedded system for once starting to other for starting mark according to first
Not actuated embedded system is upgraded;
Second determining unit, for when first determining unit determine under the upper embedded system for once starting to other not
After the embedded system of startup is upgraded, start the embedded system that mark determines last upgrading according to second, and will
Embedded system after last upgrading is defined as the currently system version highest embedded system with startup ability, and
Using the current system version highest embedded system with startup ability as the first embedded system to be launched;
Wherein, whether the first startup mark is not actuated to other under the upper embedded system for once starting for identifying
Embedded system is upgraded;Described second starts mark for identifying the embedded system of last startup.
9. device according to claim 8, it is characterised in that described device also includes:
Division module, for for the different corresponding storage media subregions of embedded system logical partitioning;
Implant module, for being implanted into corresponding embedded system in the corresponding storage media subregion that divides in the division module
System.
10. device according to claim 8, it is characterised in that first embedded system includes kernel image file
And root file system image file, and the kernel image file that includes of first embedded system and root file system image text
Part is stored in the corresponding storage media subregion of first embedded system;
The starting module, including:
Loading unit, described first for will store in first embedded system corresponding storage media subregion are embedded
The kernel image file of system is run in being loaded into internal memory;
Carry unit, for the root file system image file of the first embedded system described in carry.
11. devices according to claim 8, it is characterised in that the system upgrade bag includes the kernel image after upgrading
File and root file system image file;
The upgraded module, reflects for the kernel image file and root file system after the upgrading that includes the system upgrade bag
As file is write in the corresponding storage media subregion of second embedded system.
12. devices according to claim 8, it is characterised in that described device also includes:
Correction verification module, for verifying to the system upgrade bag;
The upgraded module, for after the correction verification module verifies success, will be system upgrade bag write second embedded
In the corresponding storage media subregion of system.
13. devices according to claim 8, it is characterised in that the determining module also includes:
3rd determining unit, for determining under the upper embedded system for once starting not to other when first determining unit
After not actuated embedded system is upgraded, the last embedded system for starting is defined as into currently having startup ability
System version highest embedded system, and the current system version highest embedded system with startup ability is made
For the first embedded system to be launched.
14. devices according to claim 8, it is characterised in that the determining module includes:
4th determining unit, for working as the embedded device with already present at least two embedded system for opening for the first time
When dynamic, current first embedded system to be launched is determined according to the 3rd currency for starting mark;
Wherein, the described 3rd starts mark for identifying the embedded system being currently up.
The equipment of 15. a kind of embedded systems upgradings, it is characterised in that the equipment includes memorizer, and one or
More than one program, one of them or more than one program storage is in memorizer, and is configured to by one or one
Individual above computing device, one or more than one program bag contain the instruction for carrying out following operation:
In already present at least two embedded system, it is determined that the system version highest currently with startup ability is embedded in
Formula system is used as the first embedded system to be launched, and starts first embedded system;
System upgrade bag is obtained under first embedded system, and the system upgrade bag is write into the second embedded system pair
In the storage media answered, the upgrading to second embedded system is completed;
Wherein, it is described in already present at least two embedded system, it is determined that currently having the system version number of startup ability
Highest embedded system as the first embedded system to be launched, including:
Start mark according to first and determine under the upper embedded system for once starting the whether embedded system not actuated to other
System is upgraded;
If the embedded system not actuated to other is upgraded under the upper embedded system for once starting, according to
Two start the embedded systems that mark determines last upgrading, the embedded system after last upgrading are defined as currently have
The system version highest embedded system of startup ability, and will be the current system version highest with startup ability embedding
Embedded system is used as the first embedded system to be launched;
Wherein, whether the first startup mark is not actuated to other under the upper embedded system for once starting for identifying
Embedded system is upgraded;Described second starts mark for identifying the embedded system of last startup.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201310598439.4A CN103810004B (en) | 2013-11-22 | 2013-11-22 | Method and device for upgrading embedded system as well as equipment |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201310598439.4A CN103810004B (en) | 2013-11-22 | 2013-11-22 | Method and device for upgrading embedded system as well as equipment |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN103810004A CN103810004A (en) | 2014-05-21 |
| CN103810004B true CN103810004B (en) | 2017-03-22 |
Family
ID=50706819
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201310598439.4A Active CN103810004B (en) | 2013-11-22 | 2013-11-22 | Method and device for upgrading embedded system as well as equipment |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN103810004B (en) |
Families Citing this family (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US10282194B2 (en) * | 2014-10-07 | 2019-05-07 | Ford Global Technologies, Llc | Methods and systems to update a vehicle computing system |
| CN104484200B (en) * | 2014-12-09 | 2018-05-25 | 小米科技有限责任公司 | The method and device upgraded to firmware |
| CN105722119B (en) * | 2016-01-27 | 2019-09-06 | 努比亚技术有限公司 | Mobile terminal and its method for upgrading system |
| CN107291490A (en) * | 2017-05-03 | 2017-10-24 | 上海上讯信息技术股份有限公司 | A kind of method and apparatus of system upgrade |
| CN107704756B (en) * | 2017-09-26 | 2021-10-19 | 晶晨半导体(上海)股份有限公司 | A security verification method and system before system upgrade |
| CN108121554A (en) * | 2017-12-20 | 2018-06-05 | 浙江亿邦通信科技股份有限公司 | A kind of upgrade method and upgrade-system of open air embedded device system |
| CN109358871B (en) * | 2018-09-18 | 2022-11-15 | 深圳Tcl数字技术有限公司 | Method and device for replacing application system of embedded system equipment and storage medium |
| CN110865837B (en) * | 2019-11-14 | 2023-08-18 | 青岛海信移动通信技术有限公司 | Method and terminal for system upgrade |
| CN110908687B (en) | 2019-11-22 | 2021-12-07 | 歌尔股份有限公司 | Earphone upgrading method, earphone assembly, upgrading device and readable storage medium |
| CN114265603B (en) * | 2021-11-24 | 2025-10-03 | 青岛海尔科技有限公司 | System upgrade method, device and electronic device based on asymmetric partitioning |
| CN114546440A (en) * | 2022-01-28 | 2022-05-27 | 新华三智能终端有限公司 | A system upgrade method and device |
| CN114741119A (en) * | 2022-03-22 | 2022-07-12 | 深圳数马电子技术有限公司 | System starting method and device, computer equipment and storage medium |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102622280A (en) * | 2011-01-06 | 2012-08-01 | 苏州科达科技有限公司 | Control method and control device used for software version upgrade and based on dual file system |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20090138865A1 (en) * | 2004-12-10 | 2009-05-28 | Furbee Richard L | Performing an operating system upgrade without multiple system interruptions |
| US8473692B2 (en) * | 2010-10-27 | 2013-06-25 | International Business Machines Corporation | Operating system image management |
-
2013
- 2013-11-22 CN CN201310598439.4A patent/CN103810004B/en active Active
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102622280A (en) * | 2011-01-06 | 2012-08-01 | 苏州科达科技有限公司 | Control method and control device used for software version upgrade and based on dual file system |
Also Published As
| Publication number | Publication date |
|---|---|
| CN103810004A (en) | 2014-05-21 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN103810004B (en) | Method and device for upgrading embedded system as well as equipment | |
| CN103327102B (en) | A kind of method and apparatus recommending application program | |
| CN103544033B (en) | Method, device and associated equipment for rolling back application program | |
| CN103455348B (en) | Subarea adjustment, device, terminal, server and system | |
| CN107273160A (en) | A kind of method and device of edition upgrading | |
| CN103279288B (en) | Data transmission method, device and terminal unit | |
| CN106066686B (en) | An information processing method and terminal device | |
| CN105278937A (en) | Method and device for displaying pop-up box messages | |
| CN103942113A (en) | System restarting reason detection method, device and terminal equipment | |
| CN106502703B (en) | Function calling method and device | |
| CN104951212A (en) | Method, device and system for processing desktop data of mobile terminal | |
| CN104780164A (en) | Method and device for operating game client | |
| CN106708734A (en) | Software abnormality detection method and apparatus | |
| CN104142868A (en) | Connection establishment method and device | |
| CN104135728B (en) | Method for connecting network and device | |
| CN104965722B (en) | A kind of method and device of display information | |
| CN104717341A (en) | Message prompting method and terminal | |
| CN108228230A (en) | Upgrade method, terminal and the computer readable storage medium of UFS firmwares | |
| CN104253870A (en) | Method and device for controlling data access period | |
| CN108090345A (en) | Linux system external command performs method and device | |
| CN103713943A (en) | Native terminal operating system based application function realization method and device | |
| CN103631625A (en) | Data acquisition method, user terminal, server and system | |
| CN104699501A (en) | Method and device for running application program | |
| CN104243394A (en) | Multimedia file playing method and device | |
| CN106445719A (en) | Recovery-mode Recovery instruction reading and writing method and device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant | ||
| TR01 | Transfer of patent right |
Effective date of registration: 20221109 Address after: 430000 No. 006, floor 1, No. 66, Jiufeng 1st Road, Donghu New Technology Development Zone, Wuhan, Hubei Province (Wuhan area of free trade zone) Patentee after: Xiaomi Technology (Wuhan) Co.,Ltd. Patentee after: Xiaomi Technology Co.,Ltd. Address before: 100085 Beijing Haidian District Qinghe middle street 68 Huarun colorful shopping mall two phase 13 level. Patentee before: Xiaomi Technology Co.,Ltd. |
|
| TR01 | Transfer of patent right |