CN109408153A - Software start-up method and method for upgrading software - Google Patents

Software start-up method and method for upgrading software Download PDF

Info

Publication number
CN109408153A
CN109408153A CN201811296732.4A CN201811296732A CN109408153A CN 109408153 A CN109408153 A CN 109408153A CN 201811296732 A CN201811296732 A CN 201811296732A CN 109408153 A CN109408153 A CN 109408153A
Authority
CN
China
Prior art keywords
subregion
software
currently
upgrading
judgement
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.)
Granted
Application number
CN201811296732.4A
Other languages
Chinese (zh)
Other versions
CN109408153B (en
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.)
Baidu Online Network Technology Beijing Co Ltd
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201811296732.4A priority Critical patent/CN109408153B/en
Publication of CN109408153A publication Critical patent/CN109408153A/en
Application granted granted Critical
Publication of CN109408153B publication Critical patent/CN109408153B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1433Saving, restoring, recovering or retrying at system level during software upgrading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1461Backup scheduling policy
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the present invention is related to a kind of software start-up method, wherein the software is respectively stored in the first subregion and the second subregion of storage device, the software start-up method includes: to read starting information, the starting information includes being currently up subregion, and the subregion that is currently up is first subregion or second subregion;It is currently up whether subregion can normally start the software described in judgement, if it could not, by another for being currently up that subregion is switched in first subregion and the second subregion;Start the software from the subregion that is currently up.After solving OTA upgrading, when the damage of system image caused by non-volatile memories damage (such as eMMC bad block, bad track of hard disk etc.) occurs, the problem of can not starting.It can be applicable on vehicle computing unit (automatic Pilot computing unit) at present.

Description

Software start-up method and method for upgrading software
Technical field
The present invention relates generally to computer software technical field more particularly to a kind of software start-up method and vehicle-mounted operation system OTA upgrade method of uniting and device.
Background technique
The communication technology is constantly rapidly developing, and the terminals such as computer, mobile phone, vehicle intelligent system also become more and more popular. Terminal is in addition to hardware, it is also necessary to which various softwares could normally work, such as operating system and various application software are (such as Navigation software).These softwares generally require constantly to upgrade, and system could be made more safe and perfect.For example, a vehicle-mounted behaviour Make system, operating system when factory is 4.0 versions, subsequent to need to be upgraded to 5.0 versions and more highest version.
It is often based on the upgrading of over the air (OTA, Over-the-Air) Lai Shixian terminal system in the prior art Operation.
It is operated about software upgrading, existing frequently-used has following two solution:
1. the scheme later for Android 7.0: supporting the bis- subregion upgradings of A/B after Android 7.0, current OS is in A subregion, then Refresh B subregion;Current OS then refreshes A subregion in B subregion.If starting failure, enters Recovery mode, can only pass through USB refreshes firmware, can not provide the function of normal use.
2. a most simple factory firmware built in, when starting unsuccessful, starting factory firmware only supports most simple function.
For the first scheme, once storage damage occurs, then normal function can not be provided, offline can only use USB Refresh.
For second scheme, once storage damage occurs, then an initial factory version can be rolled back to.It can deposit in this way In two problems, first is that having lost the function of all updates until the factory, it is understood that there may be it is compatible the problems such as;Once second is that old edition There are security breaches for this, then are easy to be utilized by attacker, become a hidden danger of information security.
The above content is only the technical situation that inventor is known, natural representative does not constitute the prior art of the invention.
Summary of the invention
The embodiment of the present invention provides a kind of software start-up method, wherein the software is respectively stored in the of storage device In one subregion and the second subregion, the software start-up method includes: to read starting information, and the starting information includes being currently up Subregion, the subregion that is currently up is first subregion or second subregion;Subregion is currently up described in judgement whether Normally start the software, if it could not, the subregion that is currently up is switched in first subregion and the second subregion Another;Start the software with from the subregion that is currently up.
According on one side, it includes: to sentence that the judgement, which is currently up the step of whether subregion can normally start the software, The whether verified mistake of subregion is currently up described in disconnected.
According on one side, the judgement is currently up the step of whether subregion can normally start the software further include: Whether the digital signature that subregion is currently up described in judgement matches with default signature.
According on one side, software start-up method further include: it is not verified out-of-date to be currently up subregion described in the judgement, sentences Whether the disconnected number of retries for being currently up subregion is greater than zero, subtracts one for the number of retries for being currently up subregion greater than zero, And start the software from the subregion that is currently up, the subregion that is currently up otherwise is switched to first subregion and the Another in two subregions.
According to one aspect, software start-up method further include: when the digital signature for being currently up subregion and default label Famous prime minister simultaneously, judges whether first subregion is synchronized with second subregion, if synchronized, from described current Boot partition starts the software;Otherwise, another in first subregion and the second subregion is synchronized with the current partition; When the digital signature for being currently up subregion and not identical default signature;Judge first subregion and second subregion It is whether synchronized, if synchronized, the current partition is synchronized with another in first subregion and the second subregion, And start the software from the subregion that is currently up;Otherwise, the alarm that can not restore is issued.
According on one side, software start-up method further include: it is currently up after subregion starts the software from described, It is currently up whether subregion succeeds described in verifying, if be proved to be successful, will be currently up Labelling Regions is to have verified that;Otherwise, Carry out reset operation.
According on one side, the software start-up method is that onboard operations system starts method.
The embodiment of the present invention also provides a kind of method for upgrading software, wherein the software is respectively stored in storage device In first subregion and the second subregion, the method for upgrading software includes: the upgrade package for receiving the software;Parse the upgrading Packet;With according to the upgrade package, upgrade the software of first subregion and the second partitioned storage.
According on one side, method for upgrading software further include: record first subregion and the second subregion synchronizing information, And/or check information, and/or digital signature, and/or number of retries.
According to one aspect, method for upgrading software further include: when first subregion and asynchronous the second subregion, by institute It states one for capable of normally starting in the first subregion and the second subregion and is synchronized to another.
According on one side, the software is vehicle-mounted Android system, and the method for upgrading software is executed by OTA.
The embodiment of the present invention also provides a kind of equipment, comprising: one or more processors;Storage device, for storing One or more programs;When one or more of programs are executed by one or more of processors, so that one Or multiple processors realize software start-up method as described above.
The embodiment of the present invention also provides a kind of equipment, comprising: one or more processors;Storage device, for storing One or more programs;When one or more of programs are executed by one or more of processors, so that one Or multiple processors realize method for upgrading software as described above.
The embodiment of the present invention also provides a kind of software starter, wherein the software is respectively stored in storage device In first subregion and the second subregion, the software starter includes: to read the unit of starting information, and the starting information includes It is currently up subregion, the subregion that is currently up is first subregion or second subregion;It is currently up described in judgement point Whether area can normally start the unit of the software, if being configured to normally start the software, be currently up described Subregion is switched to another in first subregion and the second subregion;Start the software with from the subregion that is currently up Unit.
The embodiment of the present invention also provides a kind of software updating apparatus, wherein the software is respectively stored in storage device In first subregion and the second subregion, the software updating apparatus includes: the unit for receiving the upgrade package of the software;Described in parsing The unit of upgrade package;With the unit for the software for upgrading first subregion and the second partitioned storage according to the upgrade package.
The embodiment of the present invention also provides a kind of computer readable storage medium, and the computer including being stored thereon can be held Row instruction, the executable instruction implement software start-up method as described above when being executed by processor.
The embodiment of the present invention also provides a kind of computer readable storage medium, and the computer including being stored thereon can be held Row instruction, the executable instruction implement method for upgrading software as described above when being executed by processor.
The embodiment provides a kind of safer method for upgrading software and starting method, guarantee the two of software The version of a subregion can be all updated, and the integrality of system image is verified by the method for digital signature, once it damages, It can make and restore of the identical version of another subregion, realize and be mutually backups, improve the robustness of software OTA upgrading.This hair The bright upgrading and starting that can be applied to various softwares, is particularly suitable for operating system software (such as Android of vehicle intelligent system System) and other software (such as navigation software) determination and upgrading.
Above-mentioned general introduction is merely to illustrate that the purpose of book, it is not intended to be limited in any way.Except foregoing description Schematical aspect, except embodiment and feature, by reference to attached drawing and the following detailed description, the present invention is further Aspect, embodiment and feature, which will be, to be readily apparent that.
Detailed description of the invention
Attached drawing is used to provide further understanding of the present invention, and constitutes part of specification, with reality of the invention It applies example to be used to explain the present invention together, not be construed as limiting the invention.In the accompanying drawings:
Fig. 1 shows a kind of flow chart of software start-up method according to an embodiment of the invention;
Fig. 2 shows system partitionings according to a second embodiment of the present invention;
Fig. 3 shows the flow chart of starting method according to a second embodiment of the present invention;
Fig. 4 shows the flow chart of method for upgrading software according to a third embodiment of the present invention;
Fig. 5 shows the block diagram of equipment according to a fourth embodiment of the present invention;
Fig. 6 shows the block diagram of equipment according to a fifth embodiment of the present invention;
Fig. 7 shows the block diagram of equipment according to a sixth embodiment of the present invention;
Fig. 8 shows the block diagram of equipment according to a seventh embodiment of the present invention;
Fig. 9 shows the block diagram of computer program product according to a eighth embodiment of the present invention;With
Figure 10 shows the block diagram of computer program product according to a ninth embodiment of the present invention.
Specific embodiment
Hereinafter, certain exemplary embodiments are simply just described.As one skilled in the art will recognize that Like that, without departing from the spirit or scope of the present invention, described embodiment can be modified by various different modes. Therefore, attached drawing and description are considered essentially illustrative rather than restrictive.
In the description of the present invention, it is to be understood that, term " center ", " longitudinal direction ", " transverse direction ", " length ", " width Degree ", " thickness ", " go up ", " under ", " preceding ", " afterwards ", " left side ", " right side ", " heavily fortified point, and directly ", " level ", " top ", " bottom ", " is interior ", " outside ", " Clockwise ", " counterclockwise " wait the orientation or positional relationship of instructions to be based on the orientation or positional relationship shown in the drawings, merely to Convenient for description the present invention and simplify description, rather than the device or element of indication or suggestion meaning must have a particular orientation, It is constructed and operated in a specific orientation, therefore is not considered as limiting the invention.In addition, term " first ", " second " are only For descriptive purposes, it is not understood to indicate or imply relative importance or implicitly indicates the number of indicated technical characteristic Amount." first " is defined as a result, the feature of " second " can explicitly or implicitly include one or more spy Sign.In the description of the present invention, " multiple " are meant that two or more, unless otherwise specifically defined.
In the description of the present invention, it should be noted that unless otherwise clearly defined and limited, term " installation ", " phase Even ", " connection " shall be understood in a broad sense, for example, it may be being fixedly connected, may be a detachable connection, or be integrally connected: can To be mechanical connection, it is also possible to be electrically connected or can mutually communicate;It can be directly connected, it can also be by between intermediary It connects connected, can be the connection inside two elements or the interaction relationship of two elements.For the ordinary skill of this field For personnel, the specific meanings of the above terms in the present invention can be understood according to specific conditions.
In the present invention unless specifically defined or limited otherwise, fisrt feature second feature its " upper " or it " under " It may include that the first and second features directly contact, also may include that the first and second features are not direct contacts but pass through it Between other characterisation contact.Moreover, fisrt feature second feature " on ", " top " and " above " include first spy Sign is right above second feature and oblique upper, or is merely representative of first feature horizontal height higher than second feature.Fisrt feature exists Second feature " under ", " lower section " and it is " following " including fisrt feature right above second feature and oblique upper, or be merely representative of First feature horizontal height is less than second feature.
Following disclosure provides many different embodiments or example is used to realize different structure of the invention.In order to Simplify disclosure of the invention, hereinafter the component of specific examples and setting are described.Certainly, they are merely examples, and And it is not intended to limit the present invention.In addition, the present invention can in different examples repeat reference numerals and/or reference letter, This repetition is for purposes of simplicity and clarity, itself not indicate between discussed various embodiments and/or setting Relationship.In addition, the present invention provides various specific techniques and material example, but those of ordinary skill in the art can be with Recognize the application of other techniques and/or the use of other materials.
Hereinafter, preferred embodiments of the present invention will be described with reference to the accompanying drawings, it should be understood that preferred reality described herein Apply example only for the purpose of illustrating and explaining the present invention and is not intended to limit the present invention.
Fig. 1 shows a kind of software start-up method 100 according to an embodiment of the invention.Software is for example respectively stored in The first subregion and the second subregion of one storage device can star the software by first subregion or the second subregion. Note that it will be appreciated by those skilled in the art that in the present invention the first subregion and the second subregion meaning, both include different physics Subregion on storage device, such as the first subregion are located on a hard disk, and the second subregion is located on SSD storage card;It also include identical Different Logic subregion on physical storage device, such as two logical partitions on same hard disk;It simultaneously also include same deposit Different files on storage device, the same logical partition.These are all within the scope of the present invention.In addition, described Software is either operating system software, such as (SuSE) Linux OS or qnx operating system, is also possible to application software, example Such as GPS navigation system software.
As shown in Figure 1, the software start-up method 100 of the present embodiment includes:
In step S101: reading the starting information of the software.The starting information includes being currently up subregion, described current Boot partition is first subregion or second subregion.In the present invention, such as the first subregion can be set to default point Area, under default conditions, being currently up subregion is the first subregion.It under specific circumstances, such as can not be normal when passing through the first subregion When starting the software, it is currently up subregion and is modified to the second subregion.
In step S102: judgement is currently up whether subregion can normally start the software by described, if it could not, will Another for being currently up that subregion is switched in first subregion and the second subregion.When cannot by being currently up subregion When normally starting the software, illustrate to be currently up the software that subregion is stored that there are problems, in this case it is desirable to be switched to another One subregion starts the software.
In step S103: starting the software from the subregion that is currently up.
Below with reference to the starting method of the operating system of Fig. 2 and Fig. 3 description in accordance with a preferred embodiment of the present invention.Wherein Fig. 2 shows a kind of implementation of system partitioning, Fig. 3 shows the starting method 200 of operating system.The present embodiment is to operate It is illustrated for system software, it is understood by one of ordinary skill in the art that the invention is not limited thereto, is readily applicable to other The software of type.
As shown in Fig. 2, the system partitioning of the present embodiment includes boot, OS A, OS B, rootfs, misc subregion.Wherein Boot subregion is responsible for the Bootloader boot l oader of storage system;OS A and OS B subregion respectively stores a operation system The kernel of system, is mutually backups;Rootfs is root file system;Misc subregion is responsible for being communicated between OS and bootloader, Store comprising be currently up subregion, whether synchronize, the whether verified mistake of each subregion mirror image, the digital signature of each mirror image and The information such as number of retries.
As shown in figure 3, the starting method 200 of the operating system of the present embodiment includes:
In step S201, system reset executes Bootloader bootloader.
In step S202, bootloader reads the starting information of misc subregion, comprising being currently up subregion, whether same One or more of information such as step, the whether verified mistake of each subregion mirror image, the digital signature of each mirror image and number of retries Or all.The information whether synchronized, such as can be a mark value, it can also be by comparing the first subregion and second point The version number of the operating system of area's storage, to judge whether two subregions are synchronized excessively.Whether each subregion mirror image The starting information of verified mistake, such as equally can be a mark, after the operating system of the partitioned storage is passed through by self-test, The mark be 1 show to have verified that by the subregion can start-up operation system, be otherwise 0, show not yet authenticated pass through Whether the subregion can start-up operation system.
In step S203, check that the whether verified mistake of current partition proceeded to step S205 if do not verified, Judge whether current partition number of retries is greater than 0, subtract 1 (step S206) greater than 0, starts current partition, otherwise it is assumed that currently Subregion is wrong version, is switched to another subregion (step S207) starting.If current partition had verified, proceed to step Rapid S204, is digitally signed current partition, compares with the signature prestored, successful then proceed to step S210, judges two Whether a subregion synchronizes, if asynchronous, current partition is synchronized to another subregion (step S211), is then opened from current partition Move the operating system (step S212).If signature failure, then it is assumed that the storage of current partition has damaged, and proceeds to step S208 judges whether two subregions are synchronized, extensive to subregion progress is currently up using another subregion if synchronized Multiple (step S209) otherwise issues the alarm that can not restore.
After step s 212, proceed to step S213, whether verifying current partition succeeds.The method of verifying includes but not It is limited to carry out System self-test after start-up.If it succeeds, proceeding to step S214, current partition is labeled as having verified, Into normal mode, the function of system is executed;Otherwise, proceed to step S215, carry out reset operation, restart system.
Note that the os starting method 200 of second embodiment is one of the starting method 100 of first embodiment excellent Embodiment is selected, wherein step S203 and step S204 is the preferred implementation of step S102.
A preferred embodiment according to the present invention, the software in first embodiment and the operation in second embodiment System for example can be vehicle-mounted operating system, such as Linux qnx operating system, and it is (automatic to be mounted on vehicle computing unit Drive computing unit) on.
Below with reference to the method for upgrading software 400 of Fig. 4 description according to a third embodiment of the present invention.Wherein with first embodiment Similar with second embodiment, the software is respectively stored in the first subregion and the second subregion of storage device.Software upgrading side Method 400 includes:
In step S401, the upgrade package of the software is received.In the embodiment of the present invention, upgrade package includes two types: Complete packet and difference packet.Complete packet includes all information and file included by system version corresponding to the upgrading, difference packet It only include existing differentiation information and file between two systems version.The data volume of usual complete packet is greater than difference packet Data volume.The present embodiment both can be used complete packet or difference packet can be used to be upgraded.
In step S402, parse the upgrade package, such as carry out file decompression, obtain version number etc..
In step S403, according to the parsing information of the upgrade package, upgrade first subregion and the second partitioned storage The software.The upgrading include but is not limited to firmware write with a brush dipped in Chinese ink, file update, configuration distributing etc..
According to a preferred embodiment of the invention, method for upgrading software 400 further include: record first subregion and The synchronizing information, and/or check information, and/or digital signature, and/or number of retries of second subregion.
According to a preferred embodiment of the invention, method for upgrading software 400 further include: when first subregion and When two subregions are asynchronous, another is synchronized to by one can normally started in first subregion and the second subregion.
According to a preferred embodiment of the invention, the software is vehicle-mounted Android system, the method for upgrading software It can be executed by way of OTA.
Starting method 100,200 and upgrade method 400 through the embodiment of the present invention provide a kind of safer soft Part upgrade method and starting method.Every time after upgrading, the version of two subregions of software can be all updated, and pass through digital signature Method verify the integrality of system image, once damaging, can make and restore of the identical version of another subregion, realize It is mutually backups, improves the robustness of software OTA upgrading.
Below with reference to a kind of equipment 500 of Fig. 5 description according to a fourth embodiment of the present invention.Equipment 500 includes one or more A processor 501 and storage device 502.It can be used for storing one or more programs in storage device 502.Work as described program When being executed by the processor so that one or more of processors realize software start-up method 100 as described above or 200。
Equipment 500 is, for example, vehicle computing unit, and software is, for example, the linux or qnx installed in vehicle computing unit Operating system or other software, such as navigation software etc..
Below with reference to a kind of equipment 600 of Fig. 6 description according to a fifth embodiment of the present invention.Equipment 600 includes: one or more A processor 601 and storage device 602.Storage device 602 is for storing one or more programs.The program is configured to work as quilt When one or more of processors execute, so that one or more of processors realize method for upgrading software as described above 400。
Equipment 600 is, for example, vehicle computing unit, and software is, for example, the linux installed in vehicle computing unit or qnx behaviour Make system or other software, such as navigation software etc..
Fig. 7 shows a kind of software starter 700 according to a sixth embodiment of the present invention.The software starter 700 include: the unit 701 for reading starting information, and the starting information includes being currently up subregion, and the subregion that is currently up is First subregion or second subregion;It is currently up whether subregion can normally start the unit of the software described in judgement 702, if being configured to normally start the software, the subregion that is currently up is switched to first subregion and second Another in subregion;From the unit 703 for being currently up subregion and starting the software.
According to the present embodiment preferred embodiment, it is described judgement be currently up subregion whether can normally start it is soft The unit 702 of part is configured to be currently up the whether verified mistake of subregion described in judgement, and is currently up subregion described in judgement Whether digital signature matches with default signature.
According to the present embodiment preferred embodiment, it is described judgement be currently up subregion whether can normally start it is soft It is not verified out-of-date that the unit 702 of part is configured to be currently up subregion described in judgement, and the weight of subregion is currently up described in judgement Whether examination number is greater than zero, subtracts one for the number of retries for being currently up subregion greater than zero, and open from the subregion that is currently up The software is moved, otherwise by another for being currently up that subregion is switched in first subregion and the second subregion.
According to the present embodiment preferred embodiment, it is described judgement be currently up subregion whether can normally start it is soft The unit 702 of part is configured to: when the digital signature for being currently up subregion is identical as default signature, judging described first point Whether area is synchronized with second subregion, if synchronized, starts the software from the subregion that is currently up;It is no Then, another in first subregion and the second subregion is synchronized with the current partition;When the number for being currently up subregion When word signature and not identical default signature;Judge whether first subregion is synchronized with second subregion, if It is synchronous, the current partition is synchronized with another in first subregion and the second subregion, and be currently up subregion from described Start the software;Otherwise, the alarm that can not restore is issued.
According to the present embodiment preferred embodiment, the software starter 700 further includes authentication unit, institute State verification units configured at: be currently up after subregion starts the software from described, subregion is currently up described in verifying is No success, if be proved to be successful, will be currently up Labelling Regions is to have verified that;Otherwise, reset operation is carried out.
Fig. 8 shows a kind of software starter 800 according to a seventh embodiment of the present invention.Wherein the software is deposited respectively Storage is in the first subregion and the second subregion of storage device.The software updating apparatus includes: the upgrade package for receiving the software Unit 801;Parse the unit 802 of the upgrade package;Upgrade first subregion and the second subregion with according to the upgrade package The unit 803 of the software of storage.
According to the present embodiment preferred embodiment, the software starter 800 further includes recording unit, institute Recording unit is stated to be configured to record the synchronizing information, and/or check information, and/or number of first subregion and the second subregion Signature, and/or number of retries.
According to the present embodiment preferred embodiment, the software starter 800 further includes synchronization unit, institute It states synchronization unit to be configured to when first subregion and asynchronous the second subregion, by energy in first subregion and the second subregion Enough one normally started are synchronized to another.
Fig. 9 shows a kind of block diagram of computer program product 900 according to a eighth embodiment of the present invention.Signaling bearer is situated between Matter 902 may be implemented as or including computer-readable medium 906, computer recordable media 908, computer communication media 910 or their combination, configurable processing unit is stored to execute the volume of all or some during being previously described Cheng Zhiling 904.These instructions may include the one or more for example handled as follows for executing one or more processors Executable instruction: reading starting information, and the starting information includes being currently up subregion, and the subregion that is currently up is described the One subregion or second subregion;It is currently up whether subregion can normally start the software described in judgement, if it could not, by institute State another for being currently up that subregion is switched in first subregion and the second subregion;Subregion starting institute is currently up from described State software.
Figure 10 shows a kind of block diagram of computer program product 1000 according to a ninth embodiment of the present invention.Signaling bearer Medium 1002 may be implemented as or lead to including computer-readable medium 1006, computer recordable media 1008, computer Believe medium 1010 or their combination, stores configurable processing unit to execute the whole or one during being previously described A little programming instructions 1004.These instructions may include for example for making one or more processors execute one handled as follows Or multiple executable instructions: the upgrade package of the software is received;Parse the upgrade package;According to the upgrade package, described in upgrading The software of first subregion and the second partitioned storage.
The embodiment provides a kind of safer method for upgrading software and starting method, guarantee the two of software The version of a subregion can be all updated, and the integrality of system image is verified by the method for digital signature, once it damages, It can make and restore of the identical version of another subregion, realize and be mutually backups, improve the robustness of software OTA upgrading.This hair The bright upgrading and starting that can be applied to various softwares, is particularly suitable for operating system software (such as Android of vehicle intelligent system System) and other software (such as navigation software) determination and upgrading.Requirement of the automotive electronics to safety is more than consumer electronics Strictly, and automatic Pilot field is emerging field, and product iteration is very rapid, this can improve the frequency of OTA.The present invention passes through The synchronization OTA of double subregions, two subregions are mutually backups, and reduce the not available wind of service as caused by OTA to a certain extent Danger.After solving OTA upgrading, (such as eMMC bad block, bad track of hard disk are damaged non-volatile memories occur Deng) caused by system image damage when, the problem of can not starting.Can be applicable to vehicle computing unit at present, (automatic Pilot calculates Unit) on.
Any process described otherwise above or method description are construed as in flow chart or herein, and expression includes It is one or more for realizing specific logical function or process the step of executable instruction code module, segment or portion Point, and the range of the preferred embodiment of the present invention includes other realization, wherein can not press shown or discussed suitable Sequence, including according to related function by it is basic simultaneously in the way of or in the opposite order, Lai Zhihang function, this should be of the invention Embodiment person of ordinary skill in the field understood.
Expression or logic and/or step described otherwise above herein in flow charts, for example, being considered use In the order list for the executable instruction for realizing logic function, may be embodied in any computer-readable medium, for Instruction execution system, device or equipment (such as computer based system, including the system of processor or other can be held from instruction The instruction fetch of row system, device or equipment and the system executed instruction) it uses, or combine these instruction execution systems, device or set It is standby and use.For the purpose of this specification, " computer-readable medium ", which can be, any may include, stores, communicates, propagates or pass Defeated program is for instruction execution system, device or equipment or the dress used in conjunction with these instruction execution systems, device or equipment It sets.The more specific example (non-exhaustive list) of computer-readable medium include the following: there is the electricity of one or more wirings Interconnecting piece (electronic device), portable computer diskette box (magnetic device), random access memory (RAM), read-only memory (ROM), erasable edit read-only storage (EPROM or flash memory), fiber device and portable read-only memory (CDROM).In addition, computer-readable medium can even is that the paper that can print described program on it or other suitable Jie Matter, because can then be edited, be interpreted or when necessary with other for example by carrying out optical scanner to paper or other media Suitable method is handled electronically to obtain described program, is then stored in computer storage.
It should be appreciated that each section of the invention can be realized with hardware, software, firmware or their combination.Above-mentioned In embodiment, software that multiple steps or method can be executed in memory and by suitable instruction execution system with storage Or firmware is realized.It, and in another embodiment, can be under well known in the art for example, if realized with hardware Any one of column technology or their combination are realized: having a logic gates for realizing logic function to data-signal Discrete logic, with suitable combinational logic gate circuit specific integrated circuit, programmable gate array (PGA), scene Programmable gate array (FPGA) etc..
Those skilled in the art are understood that realize all or part of step that above-described embodiment method carries It suddenly is that relevant hardware can be instructed to complete by program, the program can store in a kind of computer-readable storage medium In matter, which when being executed, includes the steps that one or a combination set of embodiment of the method.
It, can also be in addition, each functional unit in each embodiment of the present invention can integrate in a processing module It is that each unit physically exists alone, can also be integrated in two or more units in a module.Above-mentioned integrated mould Block both can take the form of hardware realization, can also be realized in the form of software function module.The integrated module is such as Fruit is realized and when sold or used as an independent product in the form of software function module, also can store in a computer In readable storage medium storing program for executing.The storage medium can be read-only memory, disk or CD etc..
Finally, it should be noted that the foregoing is only a preferred embodiment of the present invention, it is not intended to restrict the invention, Although the present invention is described in detail referring to the foregoing embodiments, for those skilled in the art, still may be used To modify the technical solutions described in the foregoing embodiments or equivalent replacement of some of the technical features. All within the spirits and principles of the present invention, any modification, equivalent replacement, improvement and so on should be included in of the invention Within protection scope.

Claims (17)

1. a kind of software start-up method, wherein the software is respectively stored in the first subregion and the second subregion of storage device, The software start-up method includes:
Starting information is read, the starting information includes being currently up subregion, and the subregion that is currently up is first subregion With one in second subregion;
It is currently up whether subregion can normally start the software described in judgement, if it could not, the subregion that is currently up is cut It is changed to another in first subregion and the second subregion;With
Start the software from the subregion that is currently up.
2. software start-up method according to claim 1, which is characterized in that whether the judgement is currently up subregion can be just The step of often starting the software includes: to be currently up the whether verified mistake of subregion described in judgement.
3. software start-up method according to claim 1 or 2, which is characterized in that whether the judgement is currently up subregion The step of software can normally be started further include: be currently up described in judgement subregion digital signature whether with default signature phase Matching.
4. software start-up method according to claim 2, which is characterized in that further include: it is currently up described in the judgement point Qu Wei is verified out-of-date, and whether the number of retries that subregion is currently up described in judgement is greater than zero, will be currently up greater than zero point The number of retries in area subtracts one, and starts the software from the subregion that is currently up, and is otherwise currently up subregion switching for described For another in first subregion and the second subregion.
5. software start-up method according to claim 3, which is characterized in that further include:
When the digital signature for being currently up subregion is identical as default signature, first subregion and described second point are judged Whether area is synchronized, if synchronized, starts the software from the subregion that is currently up;Otherwise, with described current Subregion synchronizes another in first subregion and the second subregion;
When the digital signature for being currently up subregion and not identical default signature;Judge first subregion and described second Whether subregion is synchronized, if synchronized, is synchronized with another in first subregion and the second subregion described current Subregion, and start the software from the subregion that is currently up;Otherwise, the alarm that can not restore is issued.
6. software start-up method described in any one of -2 according to claim 1, which is characterized in that further include: work as from described After preceding boot partition starts the software, it is currently up whether subregion succeeds described in verifying, it, will be current if be proved to be successful Boot partition is labeled as having verified that;Otherwise, reset operation is carried out.
7. software start-up method described in any one of -2 according to claim 1, which is characterized in that the software start-up method is Onboard operations system starts method.
8. a kind of method for upgrading software, wherein the software is respectively stored in the first subregion and the second subregion of storage device, The method for upgrading software includes:
Receive the upgrade package of the software;
Parse the upgrade package;With
According to the upgrade package, upgrade the software of first subregion and the second partitioned storage.
9. method for upgrading software according to claim 8, which is characterized in that further include: record first subregion and The synchronizing information, and/or check information, and/or digital signature, and/or number of retries of two subregions.
10. method for upgrading software according to claim 8, which is characterized in that further include: when first subregion and second When subregion is asynchronous, another is synchronized to by one can normally started in first subregion and the second subregion.
11. the method for upgrading software according to any one of claim 8-10, which is characterized in that the software is vehicle-mounted behaviour Make system, the method for upgrading software is executed by OTA.
12. a kind of equipment, comprising:
One or more processors;
Storage device, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processors Realize the software start-up method as described in any one of claims 1 to 7.
13. a kind of equipment, comprising:
One or more processors;
Storage device, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processors Realize the method for upgrading software as described in any one of claim 8 to 11.
14. a kind of software starter, wherein the software is respectively stored in the first subregion and the second subregion of storage device, The software starter includes:
The unit of starting information is read, the starting information includes being currently up subregion, and the subregion that is currently up is described the One subregion or second subregion;
It is currently up whether subregion can normally start the unit of the software described in judgement, if being configured to normally start institute Software is stated, by another for being currently up that subregion is switched in first subregion and the second subregion;With
From the unit for being currently up subregion and starting the software.
15. a kind of software updating apparatus, wherein the software is respectively stored in the first subregion and the second subregion of storage device, The software updating apparatus includes:
Receive the unit of the upgrade package of the software;
Parse the unit of the upgrade package;With
Upgrade the unit of the software of first subregion and the second partitioned storage according to the upgrade package.
16. a kind of computer readable storage medium, including the computer executable instructions being stored thereon, the executable instruction Implement such as software start-up method of any of claims 1-7 when being executed by processor.
17. a kind of computer readable storage medium, including the computer executable instructions being stored thereon, the executable instruction Implement the method for upgrading software as described in any one of claim 8-11 when being executed by processor.
CN201811296732.4A 2018-11-01 2018-11-01 Software starting method and software upgrading method Active CN109408153B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811296732.4A CN109408153B (en) 2018-11-01 2018-11-01 Software starting method and software upgrading method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811296732.4A CN109408153B (en) 2018-11-01 2018-11-01 Software starting method and software upgrading method

Publications (2)

Publication Number Publication Date
CN109408153A true CN109408153A (en) 2019-03-01
CN109408153B CN109408153B (en) 2022-03-01

Family

ID=65470938

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811296732.4A Active CN109408153B (en) 2018-11-01 2018-11-01 Software starting method and software upgrading method

Country Status (1)

Country Link
CN (1) CN109408153B (en)

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110333882A (en) * 2019-05-09 2019-10-15 百度在线网络技术(北京)有限公司 Upgrade method, device, equipment and the computer-readable medium of system
CN110377308A (en) * 2019-07-18 2019-10-25 上海擎感智能科技有限公司 Data updating method, system
CN110471680A (en) * 2019-07-23 2019-11-19 武汉格罗夫氢能汽车有限公司 Control method for the upgrading of hydrogen energy automobile controller software and failure rollback
CN111209141A (en) * 2019-12-30 2020-05-29 晶晨半导体(深圳)有限公司 Dual-system switching method and device applied to system iteration
CN111881101A (en) * 2020-08-03 2020-11-03 南京创通微新通信有限公司 Double-file system synchronization method
CN112256285A (en) * 2020-10-16 2021-01-22 宝能(广州)汽车研究院有限公司 OTA (over the air) upgrading method of vehicle, computer-readable storage medium and electronic equipment
CN112612524A (en) * 2020-12-22 2021-04-06 西人马(西安)测控科技有限公司 Method, device and equipment for starting Linux system and storage medium
CN112631626A (en) * 2020-12-02 2021-04-09 广东中兴新支点技术有限公司 System upgrading method and device based on dual systems and storage medium
CN113114730A (en) * 2021-03-22 2021-07-13 深圳市晨北科技有限公司 Upgrading method and device, terminal equipment and storage medium
CN113609476A (en) * 2021-07-28 2021-11-05 南京慧尔视智能科技有限公司 Radar firmware remote upgrading method and upgrading system
CN113821263A (en) * 2021-06-15 2021-12-21 荣耀终端有限公司 Management method, device, storage medium and computer program product of operating system
CN113821235A (en) * 2021-06-15 2021-12-21 荣耀终端有限公司 Operating system data updating method, operating system data updating apparatus, storage medium, and program product
CN113824620A (en) * 2021-08-20 2021-12-21 中国第一汽车股份有限公司 Partition switching method, device, vehicle and storage medium
CN114116023A (en) * 2021-06-15 2022-03-01 荣耀终端有限公司 Operating system starting method, operating system starting device, storage medium and computer program product
CN114138343A (en) * 2020-09-04 2022-03-04 青岛海信移动通信技术股份有限公司 Terminal and terminal starting method
CN114461257A (en) * 2021-07-29 2022-05-10 荣耀终端有限公司 Operating system data configuration method, operating system data configuration device, storage medium and program product
CN114489814A (en) * 2021-08-20 2022-05-13 荣耀终端有限公司 Terminal equipment starting method and terminal equipment
WO2022262744A1 (en) * 2021-06-15 2022-12-22 荣耀终端有限公司 Upgrade method for operating system, and device, storage medium and computer program product
US11989435B2 (en) 2021-05-17 2024-05-21 Elektrobit Automotive Gmbh Re-partitioning of a flash memory device
US12131144B2 (en) 2021-06-15 2024-10-29 Honor Device Co., Ltd. Updating operating system data in a static partition of an electronic device

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100584338B1 (en) * 2003-09-17 2006-05-26 삼성전자주식회사 Method and system for updating software
CN101126920A (en) * 2007-09-30 2008-02-20 浙江中控技术有限公司 Method and device implementing on-line upgrading of a fixed programme
CN101437106A (en) * 2007-11-16 2009-05-20 深圳Tcl工业研究院有限公司 Set-top box system and self-repairing method thereof
CN101650662A (en) * 2009-08-26 2010-02-17 中兴通讯股份有限公司 Memory device of embedded system and staring method and upgrading of firmware
CN102779081A (en) * 2012-07-05 2012-11-14 深圳市华曦达科技股份有限公司 Method and device for safe updating of electric device system
CN104636171A (en) * 2015-03-04 2015-05-20 深圳市欧珀通信软件有限公司 Upgrading method and device and mobile device
CN105786510A (en) * 2016-02-29 2016-07-20 深圳市美贝壳科技有限公司 Upgrading and partitioning system and security upgrading method for single-chip microcomputer
CN106055430A (en) * 2016-05-27 2016-10-26 北京奇虎科技有限公司 System backup updating method and device for PTZ camera
CN106293822A (en) * 2016-08-04 2017-01-04 青岛海信电器股份有限公司 A kind of from the method and device processing chip upgrade
CN108121554A (en) * 2017-12-20 2018-06-05 浙江亿邦通信科技股份有限公司 A kind of upgrade method and upgrade-system of open air embedded device system

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100584338B1 (en) * 2003-09-17 2006-05-26 삼성전자주식회사 Method and system for updating software
CN101126920A (en) * 2007-09-30 2008-02-20 浙江中控技术有限公司 Method and device implementing on-line upgrading of a fixed programme
CN101437106A (en) * 2007-11-16 2009-05-20 深圳Tcl工业研究院有限公司 Set-top box system and self-repairing method thereof
CN101650662A (en) * 2009-08-26 2010-02-17 中兴通讯股份有限公司 Memory device of embedded system and staring method and upgrading of firmware
CN102779081A (en) * 2012-07-05 2012-11-14 深圳市华曦达科技股份有限公司 Method and device for safe updating of electric device system
CN104636171A (en) * 2015-03-04 2015-05-20 深圳市欧珀通信软件有限公司 Upgrading method and device and mobile device
CN105786510A (en) * 2016-02-29 2016-07-20 深圳市美贝壳科技有限公司 Upgrading and partitioning system and security upgrading method for single-chip microcomputer
CN106055430A (en) * 2016-05-27 2016-10-26 北京奇虎科技有限公司 System backup updating method and device for PTZ camera
CN106293822A (en) * 2016-08-04 2017-01-04 青岛海信电器股份有限公司 A kind of from the method and device processing chip upgrade
CN108121554A (en) * 2017-12-20 2018-06-05 浙江亿邦通信科技股份有限公司 A kind of upgrade method and upgrade-system of open air embedded device system

Cited By (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110333882A (en) * 2019-05-09 2019-10-15 百度在线网络技术(北京)有限公司 Upgrade method, device, equipment and the computer-readable medium of system
CN110333882B (en) * 2019-05-09 2023-03-14 阿波罗智联(北京)科技有限公司 System upgrading method, device, equipment and computer readable medium
CN110377308A (en) * 2019-07-18 2019-10-25 上海擎感智能科技有限公司 Data updating method, system
CN110471680A (en) * 2019-07-23 2019-11-19 武汉格罗夫氢能汽车有限公司 Control method for the upgrading of hydrogen energy automobile controller software and failure rollback
CN111209141A (en) * 2019-12-30 2020-05-29 晶晨半导体(深圳)有限公司 Dual-system switching method and device applied to system iteration
CN111881101A (en) * 2020-08-03 2020-11-03 南京创通微新通信有限公司 Double-file system synchronization method
CN114138343A (en) * 2020-09-04 2022-03-04 青岛海信移动通信技术股份有限公司 Terminal and terminal starting method
CN112256285A (en) * 2020-10-16 2021-01-22 宝能(广州)汽车研究院有限公司 OTA (over the air) upgrading method of vehicle, computer-readable storage medium and electronic equipment
CN112631626B (en) * 2020-12-02 2023-11-14 广东中兴新支点技术有限公司 System upgrading method and device based on double systems and storage medium
CN112631626A (en) * 2020-12-02 2021-04-09 广东中兴新支点技术有限公司 System upgrading method and device based on dual systems and storage medium
CN112612524A (en) * 2020-12-22 2021-04-06 西人马(西安)测控科技有限公司 Method, device and equipment for starting Linux system and storage medium
CN113114730A (en) * 2021-03-22 2021-07-13 深圳市晨北科技有限公司 Upgrading method and device, terminal equipment and storage medium
CN113114730B (en) * 2021-03-22 2022-09-27 深圳市晨北科技有限公司 Upgrading method and device, terminal equipment and storage medium
US11989435B2 (en) 2021-05-17 2024-05-21 Elektrobit Automotive Gmbh Re-partitioning of a flash memory device
CN116302119A (en) * 2021-06-15 2023-06-23 荣耀终端有限公司 Operating system management method, device, storage medium and computer program product
CN113821263A (en) * 2021-06-15 2021-12-21 荣耀终端有限公司 Management method, device, storage medium and computer program product of operating system
US12131144B2 (en) 2021-06-15 2024-10-29 Honor Device Co., Ltd. Updating operating system data in a static partition of an electronic device
CN114116023A (en) * 2021-06-15 2022-03-01 荣耀终端有限公司 Operating system starting method, operating system starting device, storage medium and computer program product
WO2022262748A1 (en) * 2021-06-15 2022-12-22 荣耀终端有限公司 Management method for operating system, device, storage medium, and computer program product
WO2022262744A1 (en) * 2021-06-15 2022-12-22 荣耀终端有限公司 Upgrade method for operating system, and device, storage medium and computer program product
US12093678B2 (en) 2021-06-15 2024-09-17 Honor Device Co., Ltd. Operating system management method, device, storage medium, and computer program product
CN113821235B (en) * 2021-06-15 2023-10-20 荣耀终端有限公司 Operating system data updating method, device, storage medium and program product
CN113821235A (en) * 2021-06-15 2021-12-21 荣耀终端有限公司 Operating system data updating method, operating system data updating apparatus, storage medium, and program product
CN113609476A (en) * 2021-07-28 2021-11-05 南京慧尔视智能科技有限公司 Radar firmware remote upgrading method and upgrading system
CN114461257A (en) * 2021-07-29 2022-05-10 荣耀终端有限公司 Operating system data configuration method, operating system data configuration device, storage medium and program product
CN113824620A (en) * 2021-08-20 2021-12-21 中国第一汽车股份有限公司 Partition switching method, device, vehicle and storage medium
CN114489814B (en) * 2021-08-20 2023-01-17 荣耀终端有限公司 Terminal equipment starting method and terminal equipment
CN114489814A (en) * 2021-08-20 2022-05-13 荣耀终端有限公司 Terminal equipment starting method and terminal equipment

Also Published As

Publication number Publication date
CN109408153B (en) 2022-03-01

Similar Documents

Publication Publication Date Title
CN109408153A (en) Software start-up method and method for upgrading software
US9507604B2 (en) Boot method and boot system
CN108287999A (en) A kind of startup method that system based on TrustZone is credible
US8060736B2 (en) Navigation system and method with switchable multi-language interfaces
CN109684849A (en) Information processing unit, its control method and storage medium
US8903361B2 (en) Network locking method and apparatus for terminal
CN104636171A (en) Upgrading method and device and mobile device
CN112732310A (en) Firmware upgrading method, system, equipment and medium based on embedded boot partition
CN106033362A (en) Method and device for processing flash memory partition
BR112017028239B1 (en) ELECTRONIC UNIT AND METHOD PERFORMED IN SUCH AN ELECTRONIC UNIT
CN113114730B (en) Upgrading method and device, terminal equipment and storage medium
CN106406939A (en) EMMC chip-based mobile terminal rollback prevention method and system
WO2007105120A1 (en) Automatically configurable smart card and method of automatically configuring a smart card
CN114780019A (en) Electronic device management method and device, electronic device and storage medium
CN113238790A (en) Firmware program updating method and system based on SD card and EEPROM
CN116149714A (en) Operating system data configuration method, device, storage medium and program product
CN108762790A (en) Unmanned machine battery reboot process method, apparatus and storage medium
US8819664B2 (en) Upgrade firmware with upgrade information from a tape cartridge in a wireless manner
US10223294B2 (en) Fast secure boot from embedded flash memory
US11301566B2 (en) Firmware anti-rollback
CN110134456B (en) Method, apparatus, device and storage medium for managing operating system
CN109508532A (en) Equipment safety starting method, apparatus and terminal based on TEE
CN109189457B (en) Firmware upgrading system and method of intelligent inertial navigation sensing system
CN111124763B (en) Communication equipment starting configuration data backup synchronization method
CN108958819B (en) Starting method of multi-partition system and multi-partition system

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
GR01 Patent grant
GR01 Patent grant