CN102830984B - Method, chip and the communication terminal that firmware updates - Google Patents

Method, chip and the communication terminal that firmware updates Download PDF

Info

Publication number
CN102830984B
CN102830984B CN201110159548.7A CN201110159548A CN102830984B CN 102830984 B CN102830984 B CN 102830984B CN 201110159548 A CN201110159548 A CN 201110159548A CN 102830984 B CN102830984 B CN 102830984B
Authority
CN
China
Prior art keywords
firmware
communication terminal
value
predetermined flag
updated
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
Application number
CN201110159548.7A
Other languages
Chinese (zh)
Other versions
CN102830984A (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.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201110159548.7A priority Critical patent/CN102830984B/en
Publication of CN102830984A publication Critical patent/CN102830984A/en
Application granted granted Critical
Publication of CN102830984B publication Critical patent/CN102830984B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

Embodiments of the invention provide method, chip and the communication terminal that firmware updates, and wherein, the method that firmware updates includes: communication terminal knows that the second firmware needs to update;Communication terminal is downloaded the second firmware and is updated the more new data needed;Predetermined flag position is set to the second value by communication terminal;When communication terminal is again started up, the first firmware knows that predetermined flag position is after the second value, it is determined that more new data writing position in the second firmware, and the more new data that the second firmware updates needs writes this writing position, it is achieved the renewal of the second firmware;After second firmware is updated successfully, predetermined flag position is set to the first value by the first firmware;Wherein, the first firmware is firmware more new module, and the second firmware includes: operating system nucleus.Method, chip and the communication terminal that the firmware provided by the embodiment of the present invention is updated, it may be achieved directly completed the renewal of firmware by terminal.

Description

Method, chip and the communication terminal that firmware updates
Technical field
The present invention relates to the communications field, particularly relate to method, chip and communication terminal that firmware updates.
Background technology
Development along with science and technology, mobile terminal intelligence degree is more and more higher, along with continuing to optimize of each version, most of firmware in mobile terminal frequently needs upgrading, and except at present upgrading except being realized operating system by operating system nucleus can directly complete on mobile terminals, include the firmware that all the other needs of operating system nucleus update, also can only first pass through network and upgrade file is downloaded to PC (PC), re-use PC pair be connected with mobile terminal realize update.
Summary of the invention
In order to enable the terminals to directly the firmware wherein needing upgrading is updated, the embodiment of the present invention provides a kind of method that firmware updates, it is adaptable to communication terminal, and the method includes:
Communication terminal knows that the second firmware needs to update;
Communication terminal is downloaded the second firmware and is updated the more new data needed;
Predetermined flag position is set to the second value by communication terminal;
When communication terminal is again started up, the first firmware knows that predetermined flag position is after the second value, it is determined that more new data writing position in the second firmware, and the more new data that the second firmware updates needs writes this writing position, it is achieved the renewal of the second firmware;
After second firmware is updated successfully, predetermined flag position is set to the first value by the first firmware;
Wherein, the first firmware is firmware more new module, and the second firmware includes: operating system nucleus.
Preferably, the more new data packets that communication terminal is downloaded the second firmware renewal and needed is drawn together: the second firmware is updated the more new data needed and is verified by communication terminal, and will be stored in precalculated position by the more new data verified;
The more new data that second firmware renewal needs is write this writing position include: obtain the second firmware from precalculated position and update the more new data of needs, and the more new data that the second firmware updates needs writes this writing position.
Preferably, communication terminal download second firmware update need more new data packets draw together: communication terminal download second firmware update need difference bag;
The more new data that second firmware renewal needs is write this writing position and includes by the first firmware: the first firmware uses pre-defined algorithm that difference bag is write this writing position.
Preferably, the more new data packets that communication terminal is downloaded the second firmware renewal and needed is drawn together: the second firmware is updated the more new data needed and is verified by communication terminal, and will be stored in precalculated position by the more new data verified;
The more new data that second firmware renewal needs is write this writing position include: obtain the second firmware from precalculated position and update the more new data of needs, and the more new data that the second firmware updates needs writes this writing position.
Preferably, when communication terminal is again started up, the first firmware knows that predetermined flag position is that the second value includes:
When communication terminal is again started up, the 3rd firmware after knowing that predetermined flag position is set to the second value, loading the first firmware, predetermined flag position is the second value to make the first firmware know;
Wherein, the 3rd firmware is, in communication terminal start-up course, is loaded directly into the firmware of the first firmware.
Further, communication terminal includes processor, and processor includes the first core and the second core, and the first firmware is positioned at the second core, and operating system nucleus is positioned at the second core;
Second firmware farther includes: be positioned at the firmware of the first core.
Further, the second value is for indicating the state of any one firmware in the second firmware to update for needs.
Preferably, after the second firmware is updated successfully, predetermined flag position is set to the first value and specifically includes by the first firmware:
After second firmware is updated successfully, predetermined flag position is set to the 3rd value;
Operating system nucleus judges that operating system that operating system nucleus is corresponding is the need of renewal;
If needing to update, operating system is updated by operating system nucleus, after being updated successfully, notifies the first firmware;
Predetermined flag position is set to the first value by the first firmware.
More excellent, after predetermined flag position is set to the 3rd value, before predetermined flag position is set to the first value by the first firmware, method farther includes:
If communication terminal is again started up, the second firmware knows that predetermined flag position is the 3rd value, returns the step that operating system is updated.
Further, before the second firmware is updated successfully, the first firmware determines that more after new data writing position in the second firmware, method farther includes:
Second firmware is updated the more new data needed and writes this writing position, it is achieved the renewal of the second firmware.
The embodiment of the present invention provides the method that another kind of firmware updates simultaneously, it is adaptable to communication terminal, including:
Communication terminal knows that the 5th firmware needs to update;
Communication terminal is downloaded the 5th firmware and is updated the more new data needed;
Predetermined flag position is set to the 4th value by communication terminal;
When communication terminal is again started up, 4th firmware knows that predetermined flag position is after the 4th value, form the backup firmware of the 5th firmware, determine that the 5th firmware updates the more new data needed the first writing position in the backup firmware of the 5th firmware, and the more new data that the 5th firmware updates needs writes the first writing position, form the backup updating firmware of the 5th firmware;
The second writing position in the 5th firmware determined by 4th firmware, by the data in the backup updating firmware of the 5th firmware, writes the second writing position, it is achieved the renewal of the 5th firmware;
After 5th firmware is updated successfully, predetermined flag position is set to the 5th value by the 4th firmware;
Wherein, the 4th firmware is firmware more new module, and the 5th firmware is the 4th firmware, and/or in communication terminal start-up course, it is necessary to leading loading just can make the firmware of the 4th firmware loads.
Preferably, communication terminal is downloaded the 5th firmware and is updated the more new data of needs specifically, the more new data that the 5th firmware is updated needs by communication terminal is verified, and the more new data that the 5th firmware by verifying updates needs is stored in precalculated position;
The more new data that 5th firmware renewal needs is write the first writing position include: obtain the 5th firmware from precalculated position and update the more new data of needs, and the more new data that the 5th firmware updates needs writes the first writing position.
Preferably, the 5th firmware updates the more new data needed is that the 5th firmware updates the difference bag needed;
The more new data that 5th firmware renewal needs is write the first writing position and includes by the 4th firmware: the 4th firmware uses pre-defined algorithm that the difference bag that the 5th firmware updates needs is write the first writing position.
Preferably, after the 4th firmware forms the backup firmware of the 5th firmware, method farther includes: predetermined flag position is set to the 6th value by the 4th firmware;
Before the 5th firmware is updated successfully, method farther includes:
If communication terminal is again started up, the 4th firmware knows that predetermined flag position is the 6th value, returns the step determining that the 5th firmware updates the more new data needed the first writing position in the backup firmware of the 5th firmware.
Preferably, after the 4th firmware forms the backup updating firmware of the 5th firmware, method farther includes: predetermined flag position is set to the 7th value by the 4th firmware;
Before the 5th firmware is updated successfully, method farther includes:
If communication terminal is again started up, the 4th firmware knows that predetermined flag position is the 7th value, then return the step of the second writing position determined in the 5th firmware.
More excellent, when communication terminal is again started up, know that predetermined flag position farther includes before being the 7th value at the 4th firmware:
6th firmware knows that predetermined flag position is after the 7th value, the loading of the 5th firmware will replace with the loading of the backup updating firmware to the 5th firmware.
Preferably, the method farther includes:
Communication terminal knows that the 7th firmware needs to update;
Communication terminal is downloaded the 7th firmware and is updated the more new data needed;
Predetermined flag position is set to the 8th value by communication terminal;
When communication terminal is again started up, 4th firmware knows that predetermined flag position is after the 8th value, determine that the 7th firmware updates the more new data needed writing position in the 7th firmware, and the more new data that the 7th firmware updates needs writes this writing position, it is achieved the renewal of the 7th firmware;
After 7th firmware is updated successfully, predetermined flag position is set to the 5th value by the 4th firmware;
Wherein, the 7th firmware includes: operating system nucleus.
More excellent, communication terminal includes processor, and processor includes the 3rd core and the 4th core, and the 4th firmware is positioned at the 4th core, and operating system nucleus is positioned at the 4th core, and the 7th firmware farther includes: be positioned at the firmware of the 3rd core.
Preferably, after the 7th firmware is updated successfully, predetermined flag position is set to the 5th value and specifically includes by the 4th firmware:
After 7th firmware is updated successfully, predetermined flag position is set to the 9th value;
Operating system nucleus judges that operating system that operating system nucleus is corresponding is the need of renewal;
If needing to update, operating system is updated by operating system nucleus, after being updated successfully, notifies the 4th firmware;
Predetermined flag position is set to the 5th value by the 4th firmware.
More excellent, after predetermined flag position is set to the 9th value, before predetermined flag position is set to the 5th value by the 4th firmware, method farther includes: if communication terminal is again started up, operating system nucleus knows that predetermined flag position is the 9th value, returns the step that operating system is updated.
Preferably, before the 7th firmware is updated successfully, after 4th firmware determines that the 7th firmware updates the more new data needed writing position in the 7th firmware, method farther includes: the 7th firmware is updated the more new data needed and writes this writing position, it is achieved the renewal of the 7th firmware.
The embodiment of the present invention also provides for a kind of chip simultaneously, is applied in communication terminal, and chip comprises the first firmware and the second firmware, and wherein, the first firmware comprises:
Predetermined flag position read module, after knowing that the predetermined flag position on communication terminal is the second value, knows that the second firmware needs to update;
Writing position determines module, after knowing that the second firmware needs renewal for predetermined flag position read module, it is determined that the second firmware updates the more new data needed writing position in the second firmware;
Update writing module, after determining that module determines that the second firmware updates the more new data needed writing position in the second firmware for writing position, the second firmware is updated the more new data needed and writes the writing position in the second firmware;
Predetermined flag position arranges module, for, after the second firmware is updated successfully, predetermined flag position being set to the first value;
Wherein, the first firmware is firmware more new module, and the second firmware includes: operating system nucleus.
Preferably, chip includes the first core and the second core, and the first firmware and operating system nucleus are positioned at the second core;
Second firmware farther includes: be positioned at the firmware of the first core.
Preferably, predetermined flag position arranges module and is further used for, and after the second firmware is updated successfully, predetermined flag position is set to the 3rd value, and notifies operating system nucleus;And receive operating system nucleus be updated successfully notice after, predetermined flag position is set to the first value;
Operating system nucleus is further used for, it is judged that operating system, the need of renewal, if needing to update, is then updated by the operating system of self correspondence, and is updated successfully notice to the first firmware transmission after being updated successfully.
The embodiment of the present invention provides another kind of chip simultaneously, is applied in communication terminal, and chip comprises the 4th firmware and the 5th firmware, and the 4th firmware comprises:
Predetermined flag position read module, after knowing that the predetermined flag position on communication terminal is the 4th value, knows that the 5th firmware needs to update;
Firmware backup module, is used for knowing that described predetermined flag position is after the 4th value, forms the backup firmware of described 5th firmware;
First writing position determines module, after forming the backup firmware of described 5th firmware, it is determined that the 5th firmware updates the more new data needed the first writing position in the backup firmware of the 5th firmware;
Backup firmware is new module more, writes the first writing position for the 5th firmware is updated the more new data needed, forms the backup updating firmware of the 5th firmware;
Second writing position determines module, form the backup updating firmware of the 5th firmware for backup firmware more new module after, it is determined that the second writing position in the 5th firmware;
Backup updating firmware writing module, after determining for the second writing position, by the data in the backup updating firmware of the 5th firmware, writes the second writing position, it is achieved the renewal of the 5th firmware;
Predetermined flag position arranges module, for, after the 5th firmware is updated successfully, predetermined flag position being set to the 5th value;
Wherein, the 4th firmware is firmware more new module, and the 5th firmware is the 4th firmware, and/or in communication terminal start-up course, it is necessary to leading loading just can make the firmware of the 4th firmware loads.
More excellent, predetermined flag position arranges module and is further used for, and after described firmware backup module forms the backup firmware of described 5th firmware, described predetermined flag position is set to the 6th value;
Described predetermined flag position read module is further used for, and when described communication terminal is again started up, after the predetermined flag position known on communication terminal is the 6th value, notifies that described backup firmware more new module forms the backup updating firmware of described 5th firmware.
Preferably, predetermined flag position arranges module and is further used for, and after backup firmware more new module forms the backup updating firmware of the 5th firmware, predetermined flag position is set to the 7th value;
Predetermined flag position read module is further used for, and when communication terminal is again started up, after the predetermined flag position known on communication terminal is the 7th value, notice backup updating firmware writing module realizes the renewal of the 5th firmware.
More excellent, chip comprises the 6th firmware further, for when communication terminal is again started up, after knowing that predetermined flag position is the 7th value, the loading of the 5th firmware will replace with the loading of the backup updating firmware to the 5th firmware.
Preferably, chip comprises the 7th firmware further;Predetermined flag position read module is further used for, and when predetermined flag position is set to eight values, knows that the 7th firmware needs to update;
4th firmware comprises further:
Writing position determines module, after knowing that described 7th firmware needs renewal for described predetermined flag position read module, it is determined that described 7th firmware updates the more new data needed writing position in described 7th firmware;And
Update writing module, after determining that described 7th firmware updates the more new data needed writing position in described 7th firmware for said write position determination module, described 7th firmware is updated the writing position in more new data write the 7th firmware needed, it is achieved the renewal of the 7th firmware;
Predetermined flag position arranges module and is further used for, and after the 7th firmware is updated successfully, predetermined flag position is set to the 5th value;
7th firmware includes: operating system nucleus.
The embodiment of the present invention also provides for a kind of communication terminal, comprises the first firmware and the second firmware, and communication terminal comprises further:
More new state knows module, is used for knowing that the second firmware needs to update;
Download module, the more new data needed for downloading the second firmware to update;And
Flag bit arranges module, after knowing that module knows that the second firmware needs renewal for more new state, predetermined flag position is set to the second value;
First firmware is used for, and when communication terminal is again started up, after knowing that predetermined flag position is the second value, it is determined that more new data writing position in the second firmware, and the more new data that the second firmware updates needs writes this writing position, it is achieved the renewal of the second firmware;And after the second firmware is updated successfully, predetermined flag position is set to the first value;
Wherein, the first firmware is firmware more new module, and the second firmware includes: operating system nucleus.
The embodiment of the present invention also provides for another kind of communication terminal, comprises the 4th firmware and the 5th firmware, and communication terminal comprises further:
More new state knows module, is used for knowing that the 5th firmware needs to update;
Download module, the more new data needed for downloading the 5th firmware to update;And
Flag bit arranges module, after knowing that module knows that the 5th firmware needs renewal for more new state, predetermined flag position is set to the 4th value;
4th firmware is used for, when communication terminal is again started up, after knowing that predetermined flag position is the 4th value, form the backup firmware of the 5th firmware, determine that the 5th firmware updates the more new data needed the first writing position in the backup firmware of the 5th firmware, and the more new data that the 5th firmware updates needs writes the first writing position, form the backup updating firmware of the 5th firmware;It is then determined that the second writing position in the 5th firmware, by the data in backup updating firmware, write the second writing position, it is achieved the renewal of the 5th firmware;After the 5th firmware is updated successfully, predetermined flag position is set to the 5th value;
Wherein, the 4th firmware is firmware more new module, and the 5th firmware is the 4th firmware, and/or in communication terminal start-up course, it is necessary to leading loading just can make the firmware of the 4th firmware loads.
The update method of firmware, chip and the communication terminal that the embodiment of the present invention provides, communication terminal can be made to rely on the renewal that can realize self firmware alternately of self and network-side, breaking away from is upgraded by PC to need in terminal the dependence of the firmware of upgrading, adds the safety updated or upgrade and reliability simultaneously.
Accompanying drawing explanation
Fig. 1 is the method flow schematic diagram of one embodiment of the invention;
Fig. 2 is the double-core firmware framework schematic diagram of one embodiment of the invention;
Fig. 3 is the method flow schematic diagram of one embodiment of the invention;
Fig. 4 is one embodiment of the invention chip structure schematic diagram;
Fig. 5 one embodiment of the invention chip structure schematic diagram;
Fig. 6 is one embodiment of the invention chip structure schematic diagram.
Detailed description of the invention
In order to make the purpose of the embodiment of the present invention, technical scheme and advantage clearly understand, below in conjunction with embodiment and accompanying drawing, the embodiment of the present invention is described in detail.At this, the illustrative examples of the present invention and explanation are used for explaining the present invention, but not as a limitation of the invention.
Present invention generally provides the firmware upgrade method of a kind of communication terminal especially intelligent terminal, and adopt terminal in this way, reduce the dependence that personal computer is carried out intelligent terminal's firmware upgrade, the employing that the New function of accelerating terminal newly services, improve the efficiency repairing, service and solve fault, the service life of terminal can be extended simultaneously, improve the user satisfaction of user.
Referring to Fig. 1, the invention provides the method embodiment that a kind of firmware updates, it is adaptable to communication terminal, including:
Communication terminal knows that the second firmware needs to update;
Communication terminal is downloaded described second firmware and is updated the more new data needed;
Predetermined flag position is set to the second value by communication terminal;
When communication terminal is again started up, the first firmware knows that predetermined flag position is after the second value, it is determined that more new data writing position in the second firmware, and the second firmware updates the more new data writing position needed, it is achieved the renewal of the second firmware;
After second firmware is updated successfully, predetermined flag position is set to the first value by the first firmware;
Wherein, the first firmware is firmware more new module, and the second firmware includes: operating system nucleus.
High pass dual processor chip QSD7xxx and QSD8xxx family chip with intelligent mobile terminal employing illustrate following embodiment provided by the invention below.This chip is dual processor (referred to as double-core) chip, is made up of with application processor (ApplicationProcessor, AP) dual processor baseband processor (BasebandProcessor, BP).As in figure 2 it is shown, chip is made up of ARM9 (BP) and two processors of ARM11 (AP), the two processor is realized by shared drive (SharedMemory) alternately.ARM9 is responsible for processing communication protocol, radio frequency, universal input/output (GPIO) etc..ARM11 is responsible for usual task, and the operating system nucleus of operation is Linux, is loaded on the LINUX firmware of ARM11, and operating system Android is called by LINUX firmware, is loaded on ANDROID firmware.ARM11 is called by ARM9 and loads, ARM9 and the main control chip on ordinary meaning.Below against Fig. 2, the Main firmware of high pass QSD8 system chip is substantially described below:
PBL (PrimaryBootLoader) i.e. is basic start-up loading device: be positioned at ARM9, is in onboard read-only memory (Read-OnlyMemory, ROM), has the original code that terminal starts, and is responsible for loading following DBL, generally without updating.
DBL (DeviceBootLoader) i.e. equipment start-up loading device: be positioned at ARM9, adopt, by reading flash memory flash, following OSBL, FSBL are loaded into random access memory (randomaccessmemory, RAM) mode in, carry out the basic equipment configuration of terminal initialization, generally without updating.
FSBL (Fail-safeBootLoader) namely starts recovery loader of makeing mistakes: be positioned at ARM9, for the recovery made mistakes during terminal is started, and loads following OSBL, generally without updating.The processor chips of some manufacturer do not have independent FSBL, and its function is completed by DBL.
OSBL (OperatingSystemBootLoader) i.e. os starting loader: be positioned at ARM9, for loading following A DSP, AMSS, APPSBL, and realize ARM9 processor end SD card upgrade, checking verification and and call the display etc. of start logo.
APPSBL (Applicationsystembootloader) application system start-up loading device: be positioned at ARM11, it it is the loader of ARM11 processor, it is used for realizing ARM11 processor end SD card upgrade, and loads operating system nucleus (KERNEL) etc..In present processor chip, operating system nucleus is LINUX.
ADSP: be positioned at ARM9 end, is the digital signal processor (DigitalSignalProcessing, DSP) of ARM9 end, by the loading of above-mentioned OSBL when terminal starts.
AMSS (AdvancedMobileSubscriberSoftware): be positioned at ARM9 end, is the operating system (OperatingSystem, OS) of processor ARM9, by the loading of above-mentioned OSBL when terminal starts.
LINUX (linuxkernel): be positioned at ARM11 end, is the operating system nucleus of processor ARM11, by the loading of above-mentioned APPSBL when terminal starts.
ANDROID (androidsystem): the operating system of ARM11 core, by the loading of above-mentioned LINUX when terminal starts.
Shown in each firmware arrow line called sequentially in Fig. 2 in terminal start-up course, OSBL in baseband processor (BP) loads with it with ADSP, AMSS of core, and the APPSBL of application processor (AP), it is achieved load across core (processor).
Fig. 2 also comprises the firmware more new module of a Fota_ua by name, i.e. wireless firmware update (FirmwareOver-the-Air, FOTA) renewal agency (updateagent), it is positioned on the LINUX of ARM11 end, for firmware is updated, when terminal starts by the loading of above-mentioned APPSBL.In the prior art, owing to firmware more new module itself is positioned on LINUX, so the renewal of the ANDROID to its loading can only be realized by LINUX, and other need the firmware that updates, such as AMSS, ADSP, and the firmware such as LINUX itself, because not being loaded by LINUX, (LINUX also cannot realize self and update, can only be realized it by PC to update), so LINUX then cannot be passed through, it is updated, namely cannot realize completing either directly through mobile terminal the renewal of these firmwares.
In one embodiment of the invention, firmware more new module is realized the renewal to other firmwares separately as a firmware, first firmware and firmware more new module is Fota-ua (hereinafter referred to as Fota), operating system nucleus is LINUX, and the operating system firmware of its loading is ANDROID (corresponding operating system is Android software system).
Communication terminal knows that LINUX needs to update, then downloading LINUX needs to update required more new data, and predetermined flag position is set to a certain particular value, is used for representing that LINUX needs to update.It is again started up in process in terminal, being loaded into Fota place, Fota reads the value of this predetermined flag position, knows that LINUX needs to update, it is thus determined that the writing position that above-mentioned more new data is in LINUX, and above-mentioned more new data is write this position realize the renewal to LINUX.If writing successfully, this predetermined flag position is set to another particular value by Fota, and mark LINUX is updated successfully.
Above-mentioned communication terminal knows that LINUX needs to update, it is when LINUX has had more redaction, obtained latest edition by server end and in the way of radio broadcasting, notify all communication terminals (if the communication terminal of fixing connected mode, then notified by fixed network circuit) and know.Server end by the mirror image respectively of version before the latest edition of LINUX and its or data, can utilize pre-defined algorithm to make the mirror image of two versions or the difference bag of data, and preserve.
Latest edition relatively before version compare, it may be possible to upgraded version, it is also possible to needs, because of some mistake of version before, the legacy version being reduced into, so above-mentioned renewal can be upgrading or reduce.And utilize difference bag and the incremental data of two versions that pre-defined algorithm produces, it is possible to it is the data directly increased or covers the data to the former data position of part, or both comprise.The above-mentioned different update status of pre-defined algorithm used, it is possible to for any of incremental data algorithm or retrieving algorithm etc., such as server end can use the Redband algorithm provided and instrument to make mirror image difference bag.
Server end can not also make difference bag, but directly preserves the full content of redaction, directly downloads the total data of redaction for communication terminal, it is determined that the covering position on LINUX, the data of redaction is directly overlayed on LINUX.But the data volume that this mode makes terminal downloads is relatively big, the speed of renewal is also relatively slow, especially to using the mobile terminal of wireless network and the terminal that internal memory is less, uses the writing mode more advantage of difference bag.
Above-mentioned communication terminal knows that LINUX needs to update, it is the file system (FileSystem being operated by system firmware (i.e. ANDROID), FS) unit detects that server end has firmware (for LINUX in this example) to need to update, FS unit then downloads above-mentioned image difference bag (having mirror image difference bag for server end in this example), and it is deposited in the presumptive area of communication terminal, in the particular zones of presumptive area such as nand (a kind of flash memory), or on emmc card (a kind of embedded memory, be usually used in mobile terminal).Or can also be detected, by the software run on ANDROID, the difference bag whether server end has firmware to update, notify after difference bag having been detected that FS unit is downloaded, or this software directly downloads to communication terminal.
After FS unit has downloaded the LINUX mirror image difference bag updating needs, a status information file writes the LINUX mark needing to update, then restarts terminal;This status information file can update status indicator for firmware, is referred to herein as flag bit FOTA_FLAG, can be read by DBL, FSBL (when this firmware exists) and Fota and LINUX.LINUX needs the mark updated to be above-mentioned second value, it is assumed here that be 2 (being herein only for example, such as can represent with binary number 0010).The initial value of flag bit FOTA_FLAG is assumed to be 1 (binary number 0001, i.e. above-mentioned first value), and initial value represents that in terminal, each firmware is all without being updated.
In the process that terminal is again started up, DBL reads the value of flag bit FOTA_FLAG, knows that the firmware needing to update is LINUX, then without processing especially, basic equipment configuration is loaded, maintains normal loading sequence, make terminal progressively be loaded into APPSBL.Above-mentioned DBL reads the value of flag bit FOTA_FLAG also can be undertaken by FSBL, only because some chip products do not have independent FSBL, this place is only described with the DBL value reading flag bit FOTA_FLAG.Owing to the process without being again started up in terminal being made process especially, so the reading of flag bit FOTA_FLAG is not realized steps necessary LINUX being updated by Fota by DBL and FSBL.After APPSBL loads Fota, Fota reads the value of flag bit FOTA_FLAG, namely know that LINUX needs to update, then first confirm that the writing position in LINUX of the data in above-mentioned image difference bag, then utilize RedBend algorithm to write this position and realize the renewal to LINUX.
After completing above-mentioned write, namely after being updated successfully, Fota writes complement mark in flag bit FOTA_FLAG, this complement mark can identify being updated successfully of LINUX (i.e. other firmwares be updated successfully other values of use) specially, initial value 1 (above-mentioned first value) can also be directly returned to, because initial value mark does not have firmware to need to update, and the renewal of LINUX is complete, and there is no other firmwares simultaneously need to when updating (general seldom several firmwares occur simultaneously need to more news), also can represent that LINUX has been updated over initial value.Fota does not carry out the wireless renewal of firmware only, and when wired renewal, Fota can use update mode described in this application equally, it is achieved the renewal to firmware.
In a specific embodiment, the more new data packets that communication terminal is downloaded above-mentioned second firmware renewal and needed is drawn together: the more new data of the second firmware renewal needs is verified by communication terminal, and the more new data by verifying is stored in precalculated position;
The more new data write said write position that being updated by described second firmware needs includes: obtains the second firmware from described precalculated position and updates the more new data of needs, and the second firmware updates the more new data write said write position needed.
After FS unit on terminal ANDROID has downloaded mirror image difference bag, presumptive area can be directly stored in, first buffer memory being verified after can also downloading, such as server end and information publisher are identified, if be information publisher's (such as LINUX mirror image difference bag is not issued by official) of forged identity.After being verified, then mirror image difference bag is write presumptive area.And in follow-up renewal step, Fota by verifying, and will be saved in LINUX in this presumptive area and update the difference bag needed and read and write.
In another specific embodiment, the mirror image difference bag of LINUX is write the particular zones of nand by FS unit, and after FOTA_FLAG is arranged the LINUX ident value needing renewal, directly guiding terminal entrance can be again started up state, also display reminding message can be first passed through, ask whether to restart terminal, if user selects to skip renewal link, then flag bit FOTA_FLAG identifies LINUX needs the value of the flag bit updated to be left 2, LINUX updates the mirror image difference bag needed and is also retained in the particular zones of nand, the LINUX being continuing with in terminal current version, until when terminal starts next time, when being read this flag bit by Fota, carry out the renewal of LINUX again.
In another embodiment, Fota oneself itself does not directly read the value of flag bit FOTA_FLAG.Meet above-mentioned FS and downloaded the difference bag that LINUX renewal needs, and when being again started up by communication terminal, the first firmware knows that predetermined flag position is that the second value includes:
After being known that predetermined flag position is set to the second value by the 3rd firmware, calling described first firmware, described predetermined flag position is the second value to make described first firmware know;
Wherein, described 3rd firmware is, in described communication terminal start-up course, is loaded directly into the firmware of described first firmware.
The 3rd above-mentioned firmware is APPSBL, and Fota is loaded by it in terminal start-up course.After APPSBL loads, the value reading flag bit FOTA_FLAG is 2, namely know that LINUX needs to update, then loading the value of notification flag position FOTA_FLAG during Fota is 2 (value having flag bit FOTA_FLAG in Fota identifies the synopsis of content with it), or directly notice LINUX needs to update, make Fota be determined by the more new data writing position of LINUX and be updated the write of data in this position, complete the renewal to LINUX.
In another embodiment, communication terminal includes the processor containing the first core and the second core, and the first firmware is positioned at the second core, and operating system nucleus is positioned at the second core;And the second firmware farther includes: be positioned at the firmware of the first core.
In this embodiment, the second firmware also comprises ADSP and AMSS.First firmware Fota and operating system nucleus LINUX is arranged in the second core and ARM11, and ADSP and AMSS is respectively positioned in the first core and ARM9.Fota not only can update the firmware LINUX of core same with it (being namely positioned at same processor, hereinafter referred to as same core), moreover it is possible to updates firmware ADSP and the AMSS in ARM9 across core.Because being interacted by shared drive between dinuclear, so ADSP or AMSS downloaded by the FS unit of ANDROID updates the difference bag needed (for convenience of describing, hereafter all realize firmware and update writing differential data) it is stored in the particular zones of nand, it is can be realized updating for reading to ADSP or AMSS being in different IPs with it by Fota.The particular zones of nand in this example, same particular zones can be shared with the particular zones of nand in precedent, which firmware the difference bag that the identification information wrapped by difference is distinguished in subregion belongs to, LINUX, ADSP and AMSS can also be made to update the difference bag needed and to be stored in the particular zones of different nand respectively, namely can recognise that from the position of subregion which firmware the difference bag being stored in belongs to.After the relevant position of ADSP or AMSS is successfully written difference bag by Fota, feeding back to OSBL, ADSP or AMSS after allowing OSBL re invocation update enters internal memory.
The value of the flag bit FOTA_FLAG in above-described embodiment be 2 only mark LINUX need to update (i.e. a concrete firmware need renewal), ADSP and AMSS needs the flag bit updated to could be arranged to other values (such as binary number 0011 and 0100) so that Fota knows when reading flag bit FOTA_FLAG which concrete firmware needs to update.In an alternative embodiment, the value of flag bit FOTA_FLAG is that 2 any one or the multiple firmwares that also can identify in LINUX, ADSP or AMSS need to update, because the update mode of these several firmwares is roughly the same, can playback a class firmware.Owing to more new data (difference bag) carrying the identification information of different firmware, Fota is reading flag bit FOTA_FLAG knows it is after which kind of firmware needs renewal, can according to these identification informations in more new data, judge which concrete firmware needs to update, flag bit is so made to become simple, such as only needing 8 binary systems i.e. 1 Byte to arrange the length of flag bit, embodiment follow-up herein is illustrated description all in this way.Two or three firmwares in LINUX, ADSP and AMSS are simultaneously need to the scene updated is little, even if running into this kind of scene, Fota knows this type of firmware that be there is a need to update in the identification information from difference bag, only after this type of firmware that be there is a need to update all is successfully obtained renewal, the value of flag bit FOTA_FLAG just can be set to the first value (such as initial value 1) by Fota.
In another embodiment, after above-mentioned second firmware is updated successfully, predetermined flag position is set to the first value and specifically includes by the first firmware:
After second firmware is updated successfully, predetermined flag position is set to the 3rd value;
Operating system nucleus judges that operating system that operating system nucleus is corresponding is the need of renewal;
If needing to update, operating system is updated by operating system nucleus, after being updated successfully, notifies the first firmware;
Predetermined flag position is set to the first value by the first firmware.
In a specific embodiment, FS unit updates, from the firmware more new data packets that server end is downloaded, the difference bag needed containing LINUX, ADSP and/or AMSS, and ANDROID updates the difference bag needed.Certainly, ADSP and/or AMSS and ANDROID is simultaneously need to the scene updated is little, and only on rare occasion, LINUX and ANDROID is simultaneously need to update.When only one of which flag bit FOTA_FLAG, the value of flag bit FOTA_FLAG is set to 2, and being used to refer to LINUX, ADSP and/or AMSS needs to update, and now Fota cannot know whether ANDROID is also required to update.In this embodiment, after LINUX, ADSP and/or AMSS are updated successfully, Fota is first changed flag bit FOTA_FLAG into 3 by 2, then notifies LINUX, LINUX judge that ANDROID is the need of renewal.If ANDROID need not update, then LINUX changes flag bit FOTA_FLAG into 1 (0001).1 is original state, does not namely have any firmware to need renewal or all firmwares to be updated successfully.If ANDROID needs to update, then LINUX determines that difference wraps in the writing position in ANDROID, and difference bag is write this position, completes the renewal to ANDROID.
In a preferred embodiment on above-described embodiment basis, after predetermined flag position is set to the 3rd value, before predetermined flag position is set to the first value by the first firmware, this firmware update farther includes:
If communication terminal is again started up, the second firmware knows that predetermined flag position is the 3rd value, returns the step that operating system is updated.
Known that by flag bit FOTA_FLAG which or which the class firmware of terminal needs to update, when this updates unsuccessfully, in next time, start-up course can navigate to rapidly the firmware needing to update and again carry out the renewal of this firmware.
In these embodiments above-mentioned, at Fota to LINUX, when ADSP or AMSS is updated, Fota determines that difference wraps in LINUX, after writing position in ADSP or AMSS, difference is wrapped in when this position reads break down (including terminal power down), terminal is caused to be again started up, owing to the value of flag bit FOTA_FLAG is still 2, terminal is again started up in process, Fota knows LINUX from the value of flag bit FOTA_FLAG, this type of firmware of ADSP or AMSS needs to update, then by last time renewal process it has been determined that LINUX, in the writing position of ADSP or AMSS more new data, the corresponding more new data of write again, realize LINUX, the renewal of ADSP or AMSS.After being updated successfully, the value of flag bit FOTA_FLAG is arranged back initial value by Fota.If this renewal still runs into fault, then, in upper once start-up course, continue the above-mentioned renewal to LINUX, ADSP or AMSS.
After flag bit FOTA_FLAG is set to 3 by above-mentioned Fota, if LINUX judges, ANDROID needs to update, and then ANDROID is updated.When the renewal process of ANDROID is broken down by LINUX, so when the value of flag bit FOTA_FLAG is not also set to 1 by LINUX, terminal is again started up because updating fault, and the value of flag bit FOTA_FLAG is left 3.In the process being again started up, it is 3 that Fota reads the value of flag bit FOTA_FLAG, then know that ANDROID needs to update, and then directly ANDROID is updated by notice LINUX.After ANDROID is updated successfully by LINUX, the value of flag bit FOTA_FLAG is set to 1, if the renewal failure again that LINUX is to ANDROID, still may proceed to above-mentioned terminal be again started up and Fota to read the value of flag bit FOTA_FLAG be 3, and notify the LINUX step that ANDROID is updated.
Mention in described above, communication terminal needs the firmware updated also to include OSBL, APPSBL and Fota self, it is directed to OSBL, when APPSBL and Fota self needs to update, if realizing terminal self only with the method in above-described embodiment these firmwares are updated, at Fota to OSBL, in the process that APPSBL is updated, OSBL is caused if there is fault, APPSBL damages, due to OSBL, APPSBL loads Fota after successfully and could load, so OSBL or APPSBL cannot be recovered when terminal is again started up, then cannot load Fota to continue the renewal being not fully complete last time.It addition, self also be cannot be carried out updating by Fota.As it is shown on figure 3, the embodiment of the present invention carries out firmware renewal in the following way:
Communication terminal knows that the 5th firmware needs to update;
Communication terminal is downloaded the 5th firmware and is updated the more new data needed;
Predetermined flag position is set to the 4th value by communication terminal;
When communication terminal is again started up, 4th firmware knows that predetermined flag position is after the 3rd value, form the backup firmware of the 5th firmware, determine that the 5th firmware updates the more new data needed the first writing position in the backup firmware of the 5th firmware, and the more new data that the 5th firmware updates needs writes the first writing position, form the backup updating firmware of the 5th firmware;
The second writing position in the 5th firmware determined by 4th firmware, by the data in backup updating firmware, writes the second writing position, it is achieved the renewal of the 5th firmware;
After 5th firmware is updated successfully, predetermined flag position is set to the 5th value by the 4th firmware;
Wherein, the 4th firmware is firmware more new module, and the 5th firmware is the 4th firmware, and/or in communication terminal start-up course, early than the 4th invoked firmware of firmware.
Above-mentioned 5th firmware includes OSBL, APPSBL and Fota self, certainly ADSP, AMSS and LINUX can also be comprised, but adopt previously mentioned various embodiments all can realize the renewal of rear three, so the update method of OSBL, APPSBL and Fota self is only described below.Still it is described for difference bag the broadcast announcement communication terminal of server end making mirror image or data below.
In a specific embodiment, by running an inspection software on FS unit or ANDROID, communication terminal knows that OSBL and above-mentioned 5th firmware need upgrading (this example for firmware upgrade), OSBL is updated the difference bag needed and is downloaded on emmc card (certainly also can be stored in the particular zones of nand) by FS unit or inspection software (hereafter for FS unit), the value of predetermined flag position (under be described for flag bit FOTA_FLAG) is set to 2 (herein only for citing, such as 2 i.e. binary number 0010, mark OSBL needs to update), i.e. above-mentioned 4th value.
When terminal is again started up, above-mentioned 4th firmware and Fota are 2 know that the 5th firmware (OSBL) needs to update by reading the value of flag bit FOTA_FLAG, then in the presumptive area of terminal, (such as in RAM), form the backup firmware of OSBL, it is then determined that OSBL updates the difference needed wraps in the writing position on the backup firmware of OSBL i.e. the first writing position, and the difference bag that OSBL updates needs writes the first writing position, the backup firmware of OSBL is upgraded.Namely the backup updating firmware of OSBL is generated after upgrading successfully.
Now Fota first determines second writing position of OSBL, and the backup updating firmware of OSBL is write this second writing position.In general, in the write of this second position, it is the covering to OSBL prototype version, is also achieved that the renewal of OSBL when covering successfully.Covering after successfully, the value of flag bit FOTA_FLAG is reverted to 1 (initial value) by Fota, does not namely have firmware to need to update.Because OSBL is successfully updated, so " not having firmware to need to update " also can be used to identify OSBL and be updated successfully.
In another embodiment, communication terminal knows that Fota itself needs to update, at above-mentioned FS unit, Fota is updated the difference bag needed and be downloaded on emmc card, and flag bit FOTA_FLAG is set to 2, in this example, 2 mark these class firmwares of OSBL, APPSBL and Fota need to update, and specifically which firmware needs to update, then can know from the identification information that difference is wrapped.After terminal is again started up, Fota is known from flag bit FOTA_FLAG self to be needed to update, in presumptive area, then (such as in RAM), form the backup firmware of Fota, it is then determined that Fota updates the difference needed wraps in the writing position on the backup firmware of Fota i.e. the first writing position, and the difference bag that Fota updates needs writes the first writing position, the backup firmware of Fota is upgraded, generates the backup updating firmware of Fota.Then, Fota determines the second writing position of self, makes the backup updating firmware of Fota write this second writing position.Writing after successfully, the value of flag bit FOTA_FLAG is reverted to initial value 1 by Fota.
In a preferred embodiment, the more new data that above-mentioned communication terminal is downloaded the 5th firmware renewal and needed is specially, 5th firmware is updated the more new data needed and is verified by communication terminal, and the more new data that the 5th firmware by verifying updates needs is stored in precalculated position;
The more new data that 5th firmware renewal needs is write the first writing position include: obtain the 5th firmware from precalculated position and update the more new data of needs, and the more new data that the 5th firmware updates needs writes the first writing position.
After FS unit on communication terminal ANDROID has downloaded mirror image or the data difference subpackage of the 5th firmware, presumptive area can be directly stored in, first buffer memory being verified after can also downloading, such as server end and information publisher are identified, if be information publisher's (mirror image of such as OSBL or data difference subpackage are not issued by official) of forged identity.After being verified, then above-mentioned image or data difference subpackage are write presumptive area.And in follow-up renewal step, Fota will by verify, and be saved in this presumptive area the 5th firmware (such as OSBL) update need difference bag read and write.
In a specific embodiment, after flag bit FOTA_FLAG is configured, FS unit guiding terminal entrance can be again started up state, it is possible to first passes through display reminding message, asks whether to restart terminal, if user selects to skip renewal link, then the value of flag bit FOTA_FLAG is left mirror images that 2, OSBL renewals need or data difference subpackage is also retained on emmc card, until when terminal starts next time, by Fota read the value of this flag bit be 2 time, then OSBL upgrades by row.
In another embodiment, above-mentioned 5th firmware updates the more new data needed is that the 5th firmware updates the difference bag needed;
The more new data that 5th firmware renewal needs is write the first writing position and includes by the 4th firmware: the 4th firmware uses pre-defined algorithm that the difference bag that the 5th firmware updates needs is write the first writing position.
In a specific embodiment, more new data is the mirror image difference bag (following abbreviation difference bag) of the 5th new and old two versions of firmware (such as APPSBL), after difference bag is stored in the presumptive area of terminal by the FS unit in operating system, Fota i.e. the 4th firmware is initially formed the backup firmware of APPSBL, APPSBL updates the firmware needed the first writing position on the backup firmware of APPSBL to utilize pre-defined algorithm to determine, difference bag is read, forms the backup updating firmware of APPSBL.Pre-defined algorithm can be any of incremental data and corresponding incremental data retrieving algorithm, as used the Redband algorithm provided and instrument.
Alternative embodiment can also be with it, terminal directly downloads the full content of APPSBL latest edition, when the backup firmware of APPSBL is updated, latest edition is completely covered on legacy version, namely without using difference algorithm to determine the writing position of difference bag and to carry out difference write.
In above-mentioned renewal process, 5th firmware experienced by the link of backup-renewal-covering, and any of which link is if there is fault, flag bit FOTA_FLAG can be used to indicate that firmware updates state in which, in order to can navigate to rapidly, in upper once start-up course, the link broken down and carry out the process that continues.Namely occurring that any failure or power down etc. are unexpected in updating (most for upgrading) process, Fota can both according to FOTA_FLAG knows which kind of state that stops in terminal last renewal process.
In another specific embodiment, the 4th firmware farther includes following steps: predetermined flag position is set to the 6th value by the 4th firmware after forming the backup firmware of the 5th firmware;
Before the 5th firmware is updated successfully, the method farther includes:
If communication terminal is again started up, the 4th firmware knows that predetermined flag position is the 6th value, returns the step determining that the 5th firmware updates the more new data needed the first writing position in the backup firmware of the 5th firmware.
Still need to be updated to example with OSBL, after the 4th firmware Fota forms the backup firmware of the 5th firmware OSBL, predetermined flag position and flag bit FOTA_FLAG are recorded as above-mentioned 6th value by Fota, it is such as 3 (in this example, after down loading updating difference bag, the value of this flag bit is still set to 2), in the upgrading being by the backup firmware to OSBL.If the upgrading of the backup firmware of OSBL is broken down and again restarts, Fota is 3 namely would know that the backup firmware of OSBL is formed from the value of FOTA_FLAG flag bit, and to the upgrading of the backup firmware of OSBL and be not fully complete (namely the backup updating firmware of OSBL is not successfully generated), so the first writing position place that Fota can directly determine in updating last time, carry out OSBL and update the write that the difference needed wraps on the backup firmware of OSBL, the first writing position can also be redefined, then carry out the renewal of the backup firmware of OSBL.
On the basis of above-described embodiment, or in another independent embodiment, after the 4th firmware forms the backup updating firmware of the 5th firmware, the method farther includes: predetermined flag position is set to the 7th value by the 4th firmware;
Before the 5th firmware is updated successfully, the method farther includes:
If communication terminal is again started up, the 4th firmware knows that predetermined flag position is the 7th value, then return the step of the second writing position determined in described 5th firmware.
In one embodiment, if upgrading successfully the backup firmware of OSBL, then the value of flag bit FOTA_FLAG is set to the 7th value (being such as 4) by Fota, then proceeds by the covering to former OSBL of the backup updating firmware of OSBL.Before the value of FOTA_FLAG is set to 4, its value can be 3, the backup firmware of mark OSBL has been formed and the backup updating firmware of OSBL does not also generate, can also be 2, namely only mark OSBL needs to be updated, and does not adjust the value of flag bit FOTA_FLAG when the backup firmware of OSBL is formed.In the case of the latter, if covering unsuccessfully, then terminal is again started up in process, will be unable to know that the backup firmware of OSBL is formed, and Fota also needs again to generate the backup firmware of OSBL.
On the basis of above-mentioned two embodiment, or in another independent embodiment, after the 4th firmware forms the backup updating firmware of the 5th firmware, the method farther includes: predetermined flag position is set to the 7th value by the 4th firmware;
Before the 5th firmware is updated successfully, the method farther includes:
If communication terminal is again started up, the 4th firmware knows that predetermined flag position is the 7th value, then return the step of the second writing position determined in the 5th firmware.
In a specific embodiment, if the covering success that the backup updating firmware of OSBL is to OSBL, the value (by 4, continue above-described embodiment) of flag bit FOTA_FLAG is again set at initial value 1 by Fota, it was shown that OSBL updates complete.If overwrite procedure breaks down, the value of flag bit FOTA_FLAG is left 4, when terminal is again started up to Fota, it is 4 that Fota reads the value of FOTA_FLAG, know that the backup updating firmware of OSBL generates, and owing to overwrite procedure occurs in that fault, then Fota directly makes the backup updating firmware of OSBL cover the second writing position on OSBL, or redefine the second writing position, then OSBL is covered.
Owing to OSBL, APPSBL or Fota backup updating firmware overwrite procedure on former firmware breaks down, cannot normal load Fota when being likely to cause terminal to be again started up, so in the process that is again started up of terminal, the 6th firmware (including DBL or FSBL) also can read the value of flag bit FOTA_FLAG.This example, for DBL, when the value that DBL reads flag bit FOTA_FLAG is 4, then can change the loading sequence of firmware.In this example, the covering link that the value of flag bit FOTA_FLAG is in 4 renewals only identifying this class firmware of OSBL, APPSBL or Fota goes wrong, and specifically do not indicate in the renewal process of which firmware therein, the covering of former firmware is gone wrong by backup updating firmware, so DBL reads the value of flag bit FOTA_FLAG when being 4, also need to update, in conjunction with firmware, the identification information that the difference needed is wrapped, which concrete firmware is confirmed.
Such as when the value of flag bit FOTA_FLAG is 4, that the overwrite procedure of backup updating firmware of judging DBL breaks down is OSBL, then DBL is changed firmware loads order into FSBL-OSBL ' APPSBL, OSBL by FSBL-OSBL-APPSBL ' i.e. the backup updating firmware of OSBL.When being loaded into Fota, Fota knows that the value of flag bit FOTA_FLAG is 4, and the identification information wrapped also by difference knows the fault being occur in the renewal process of OSBL, then the backup updating firmware of OSBL the second writing position on OSBL is covered.
When DBL judge that the overwrite procedure of backup updating firmware breaks down be APPSBL time, FSBL-OSBL-APPSBL change loading sequence into FSBL-OSBL-APPSBL ', APPSBL ' i.e. the backup updating firmware of APPSBL.When DBL judge that the overwrite procedure of backup updating firmware breaks down be Fota time, OSBL-APPSBL-Fota change loading sequence into OSBL-APPSBL-Fota ', Fota ' i.e. the backup updating firmware of Fota.
It should be noted that, DBL will read the value of flag bit FOTA_FLAG in each start-up course of terminal, when not needing it and changing firmware loads order, it is loaded into Fota in the normal order, the value being read flag bit FOTA_FLAG by Fota judges the more new state that terminal is current, is further continued for corresponding process;And when at needs, it changes firmware loads order, loading sequence is adjusted, thus avoiding the occurrence of the above-mentioned situation that cannot restart.
The above-mentioned situation that need not change firmware loads order includes: needs load in advance, when firmware (such as OSBL, APPSBL) that Fota could load or Fota self need to update, break down not due to the covering of backup updating firmware and make terminal need the situation being again started up;And early than, be later than or load with Fota simultaneously, but its firmware (such as ADSP, AMSS, LINUX and ANDROID) whether successfully loading the loading not interfering with Fota needs situation when updating.
In a specific embodiment, this firmware update farther includes:
Communication terminal knows that the 7th firmware needs to update;
Communication terminal is downloaded the 7th firmware and is updated the more new data needed;
Predetermined flag position is set to the 8th value by communication terminal;
When communication terminal is again started up, 4th firmware knows that predetermined flag position is after the 8th value, determine that the 7th firmware updates the more new data needed writing position in the 7th firmware, and the more new data that the 7th firmware updates needs writes this writing position, it is achieved the renewal of the 7th firmware;
After 7th firmware is updated successfully, predetermined flag position is set to the first value by the 4th firmware;
Wherein, described 7th firmware includes: operating system nucleus.
Above-mentioned 7th firmware includes LINUX, after by FS unit, communication terminal knows that LINUX needs renewal, flag bit FOTA_FLAG is rewritten as after FS unit download difference bag the 8th value (being such as 5), and guiding terminal is again started up.In terminal restarting process, it is after 5 that Fota reads the value of flag bit FOTA_FLAG, it is not necessary to generate the backup firmware of LINUX, so directly determining the writing position of the more new data of LINUX, and this writing position on LINUX, write above-mentioned difference bag.
In another embodiment, communication terminal includes processor, and processor includes the 3rd core and the 4th core, and the 4th firmware is positioned at the 4th core, and operating system nucleus is positioned at the 4th core, and the 7th firmware farther includes: be positioned at the firmware of the 3rd core.
In a specific embodiment, the processor that terminal adopts is double-core and baseband processor (BP) and application processor (AP), and the 3rd core is BP, and the 4th core is AP.Fota and LINUX is positioned on AP, and the 7th firmware comprises ADSP or AMSS being positioned on BP further.Interacted by shared drive between dinuclear, so ADSP or AMSS downloaded by the FS unit of ANDROID updates the difference bag needed and be stored in presumptive area, it is can be realized updating for reading to ADSP or AMSS being in different IPs with it by Fota.
On the basis of above-described embodiment, after the 7th firmware is updated successfully, predetermined flag position is set to the 5th value and specifically includes by described 4th firmware:
After 7th firmware is updated successfully, predetermined flag position is set to the 9th value;
Operating system nucleus judges that operating system that operating system nucleus is corresponding is the need of renewal;
If needing to update, operating system is updated by operating system nucleus, after being updated successfully, notifies the 4th firmware;
Described predetermined flag position is set to the 5th value by the 4th firmware.
To after being updated successfully of the 7th firmware, flag bit FOTA_FLAG is set to the 9th value (being such as 6) by Fota, and notify that LINUX judges whether to need ANDROID is updated, if it is judged that need not update for ANDROID, then flag bit FOTA_FLAG is set to the 5th value that is 1 (binary number 0001) by LINUX, or LINUX notifies Fota, Fota flag bit FOTA_FLAG is set to 1.If it is judged that need to update for ANDROID, then LINUX determines that difference wraps in the writing position in ANDROID, and difference bag is write this position, it is achieved the renewal to ANDROID.It should be noted that, if whole renewal process only has ANDROID to need to update, FS starts to be set to 6 by flag bit FOTA_FLAG, Fota can directly invoke LINUX ANDROID is updated after obtaining the value of flag bit FOTA_FLAG, thus above-mentioned update mode mostly be LINUX and ANDROID issued redaction simultaneously thus simultaneously need to the occasion updated is recommended.
Further, after predetermined flag position is set to the 9th value, before predetermined flag position is set to the 5th value by the 4th firmware, the method farther includes: if communication terminal is again started up, operating system nucleus knows that predetermined flag position is the 9th value, then return the step that operating system is updated.
Concrete, if LINUX breaks down to cause in the renewal process to ANDROID updates unsuccessfully (power-off in such as renewal process), then the value of flag bit FOTA_FLAG is maintained as 6 (the 9th values), in the upper once start-up course of terminal, it is 6 that Fota identifies flag bit FOTA_FLAG, then ANDROID is updated by notice LINUX, after being updated successfully until ANDROID, LINUX notifies Fota, flag bit FOTA_FLAG is set to the 5th value (i.e. initial value 1) by Fota, completes whole renewal process.
In one embodiment, before the 7th firmware is updated successfully, after 4th firmware determines that the 7th firmware updates the more new data needed writing position in the 7th firmware, the method farther includes: the 7th firmware is updated the more new data needed and writes this writing position, it is achieved the renewal of the 7th firmware.
If the 7th firmware (such as ADSP) breaks down at no point in the update process, cause that terminal is again started up, to Fota be loaded time, from the value of flag bit FOTA_FLAG be the 8th value (5) identify the 7th firmware need be updated, then ADSP is updated the difference bag needed and writes the writing position on ADSP determined in renewal process last time, it is achieved the renewal to ADSP.
Present invention also offers a kind of chip, as shown in Figure 4, be applied in communication terminal, chip comprises the first firmware and the second firmware, and wherein, the first firmware comprises:
Predetermined flag position read module, after knowing that the predetermined flag position on communication terminal is the second value, knows that the second firmware needs to update;
Writing position determines module, after knowing that described second firmware needs renewal for described predetermined flag position read module, it is determined that described second firmware updates the more new data needed writing position in described second firmware;
Update writing module, after determining that described second firmware updates the more new data needed writing position in described second firmware for said write position determination module, described second firmware is updated the more new data needed and writes the writing position in described second firmware;
Predetermined flag position arranges module, for, after described second firmware is updated successfully, described predetermined flag position being set to the first value;
Wherein, described first firmware is firmware more new module, and described second firmware includes: operating system nucleus.
Above-mentioned first firmware and operating system nucleus, corresponding with the first firmware (Fota) in said method embodiment and operating system nucleus (LINUX) respectively, it is included in the chip of above-mentioned offer.Predetermined flag position read module, after the predetermined flag position known on communication terminal and flag bit FOTA_FLAG are the second value (such as 2), knows that LINUX needs to update;Writing position determines that module is then after predetermined flag position read module knows that LINUX needs renewal, it is determined that LINUX updates the more new data needed writing position in LINUX;Update writing module after writing position determines that module determines that LINUX updates the more new data needed writing position in LINUX, LINUX is updated the more new data needed and writes this writing position;Predetermined flag position arranges module after LINUX is updated successfully, and flag bit FOTA_FLAG is set to the first value (such as initial value 1 is used for identifying status praesens for not having firmware to need to update, also indicates that this is updated successfully).
Further, said chip includes the first core and the second core, and described first firmware and described operating system nucleus are positioned at described second core;
Described second firmware farther includes: be positioned at the firmware of described first core.
See in said method embodiment, for double-core chip, Fota and LINUX is all positioned on the second core (ARM11 namely AP), ADSP and AMSS is all located on the first core (ARM9 namely BP), and Fota also can realize updating across core ADSP and AMSS by above-mentioned each module.
Further, above-mentioned predetermined flag position arranges module and is further used for, and after described second firmware is updated successfully, described predetermined flag position is set to the 3rd value, and notifies described operating system nucleus;And receive described operating system nucleus be updated successfully notice after, described predetermined flag position is set to the first value;
Described operating system nucleus is further used for, it is judged that described operating system, the need of renewal, if needing to update, is then updated by the operating system of self correspondence, and is updated successfully notice to described in described first firmware transmission after being updated successfully.
When flag bit FOTA_FLAG once can only arrange a value, be likely to occur LINUX and ANDROID simultaneously need to update scene (ADSP and AMSS and ANDROID simultaneously need to renewal scene occur hardly), so if there is LINUX and ANDROID simultaneously need to update scene, flag bit FOTA_FLAG can be set to the second value by the FS unit of ANDROID, namely instruction LINUX needs to update, after LINUX is updated successfully, LINUX (or its notice Fota, by Fota) flag bit FOTA_FLAG is set to the 3rd value (such as 3), then gone to judge that ANDROID is the need of renewal by LINUX.If LINUX judges that ANDROID needs to update, then ANDROID is updated by LINUX, and after being updated successfully (or its notice Fota, by Fota) flag bit FOTA_FLAG arranged back initial value (1);If LINUX judges that ANDROID need not update, then (or its notice Fota, by Fota) flag bit FOTA_FLAG arranged back initial value (1).
Same, if broken down in the process updating LINUX, ADSP or AMSS, when terminal starts again at startup, flag bit FOTA_FLAG is still left 2, when then Fota reads the value of flag bit FOTA_FLAG, just would know that it is that the renewal process of LINUX, ADSP or AMSS occurs in that fault, then proceed the renewal to LINUX, ADSP or AMSS.
The present invention additionally provides a kind of chip simultaneously, is applied in communication terminal, and this chip comprises the 4th firmware and the 5th firmware, and wherein the 4th firmware comprises:
Predetermined flag position read module, after knowing that the predetermined flag position on communication terminal is the 4th value, knows that the 5th firmware needs to update;
Firmware backup module, is used for knowing that described predetermined flag position is after the 4th value, forms the backup firmware of described 5th firmware;
First writing position determines module, after forming the backup firmware of described 5th firmware, it is determined that described 5th firmware updates the more new data needed the first writing position in the backup firmware of described 5th firmware;
Backup firmware is new module more, writes described first writing position for described 5th firmware is updated the more new data needed, forms the backup updating firmware of described 5th firmware;
Second writing position determines module, form the backup updating firmware of described 5th firmware for backup firmware more new module after, it is determined that the second writing position in described 5th firmware;
Backup updating firmware writing module, after determining for described second writing position, by the data in the backup updating firmware of described 5th firmware, writes described second writing position, it is achieved the renewal of described 5th firmware;
Predetermined flag position arranges module, for, after described 5th firmware is updated successfully, described predetermined flag position being set to the 5th value;
Wherein, described 4th firmware is firmware more new module, and described 5th firmware is described 4th firmware, and/or in described communication terminal start-up course, it is necessary to leading loading just can make the firmware of the 4th firmware loads.
Above-mentioned 4th firmware and operating system nucleus, corresponding with the 4th firmware (Fota) in said method embodiment and the 5th firmware (OSBL, APPSBL and Fota self can be comprised) respectively, it is included in the chip of above-mentioned offer.Predetermined flag position read module, after the predetermined flag position known on communication terminal and flag bit FOTA_FLAG are the 4th value (such as 2), knows that the 5th firmware (such as OSBL) needs to update;Firmware backup module, knowing that described predetermined flag position is after 2, forms the backup firmware of OSBL;First writing position determines that module is after firmware backup module forms the backup firmware of OSBL, it is determined that OSBL updates the more new data needed the first writing position in the backup firmware of OSBL;OSBL is then updated the more new data needed and writes the first writing position by backup firmware more new module, forms the backup updating firmware of OSBL;Second writing position determines that module is after backup firmware more new module forms the backup updating firmware of OSBL, it is determined that the second writing position in OSBL;Backup updating firmware writing module is after the second writing position is determined, by the data in the backup updating firmware of OSBL, writes the second writing position, it is achieved the renewal of OSBL;Predetermined flag position arranges module after OSBL is updated successfully, and predetermined flag position and flag bit FOTA_FLAG are set to the 5th value (such as initial value 1 is used for identifying status praesens for not having firmware to need to update, also indicates that this is updated successfully).
Further, predetermined flag position arranges module and is further used for, and after described firmware backup module forms the backup firmware of described 5th firmware, described predetermined flag position is set to the 6th value;
Described predetermined flag position read module is further used for, and when described communication terminal is again started up, after the predetermined flag position known on communication terminal is the 6th value, notifies that described backup firmware more new module forms the backup updating firmware of described 5th firmware.
After firmware backup module in Fota forms the backup firmware of OSBL, predetermined flag position in Fota arranges module and flag bit FOTA_FLAG is set to the 6th value (such as 3), so, break down when updating when namely the backup firmware of OSBL is updated by link at the next one, when communication terminal is again started up, predetermined flag position read module in Fota knows that flag bit FOTA_FLAG is after 3, and notice backup firmware more new module forms the backup updating firmware of OSBL.
Further, described predetermined flag position arranges module and is further used for, and after described backup firmware more new module forms the backup updating firmware of described 5th firmware, described predetermined flag position is set to the 7th value;
Described predetermined flag position read module is further used for, and when described communication terminal is again started up, after the predetermined flag position known on communication terminal is the 7th value, notifies that described backup updating firmware writing module realizes the renewal of described 5th firmware.
When predetermined flag position arranges module after backup firmware more new module forms the backup updating firmware of OSBL, flag bit FOTA_FLAG is set to the 7th value (such as 4);When described communication terminal is again started up, predetermined flag position read module is knowing that flag bit FOTA_FLAG is after 4, and notice backup updating firmware writing module realizes the renewal of OSBL.
Further, this chip comprises the 6th firmware further, for when communication terminal is again started up, after knowing that predetermined flag position is the 7th value, the loading of described 5th firmware will replace with the loading of the backup updating firmware to described 5th firmware.
Safer pattern is, 6th firmware (DBL or FSBL) is in the process that terminal each time starts, the value of flag bit FOTA_FLAG can be read, if above-mentioned the second writing position at OSBL breaks down when writing the content of the backup updating firmware of OSBL, the value of flag bit FOTA_FLAG is left 4 i.e. the 7th value in once starting in terminal, when the value of DBL or FSBL reading flag bit FOTA_FLAG is 4, change the loading sequence of firmware on chip.Still it is updated to example with OSBL, the firmware that DBL or FSBL breaks down when being informed in the content of the second writing position corresponding backup updating firmware of write in conjunction with the identification information that difference is wrapped is OSBL, then firmware loads order is adjusted to FSBL-OSBL ' APPSBL ', OSBL by FSBL-OSBL-APPSBL ' i.e. the backup updating firmware of OSBL.
Above-mentioned when backup firmware is successfully formed and backup updating firmware is successfully formed Fota the value of flag bit FOTA_FLAG is configured, identify the link that renewal process is residing at present, quickly to navigate to the link broken down when terminal is again started up, the structure chart of this chip is as shown in Figure 6, backup firmware more new module and backup updating firmware writing module, arrange module with predetermined flag position read module and predetermined flag position all respectively to be connected, in order to the rapid delivery of status information.
Further, this chip comprises the 7th firmware further;Described predetermined flag position read module is further used for, and when described predetermined flag position is set to eight values, knows that described 7th firmware needs to update;
Described 4th firmware comprises further:
Writing position determines module, after knowing that described 7th firmware needs renewal for described predetermined flag position read module, it is determined that described 7th firmware updates the more new data needed writing position in described 7th firmware;And
Update writing module, after determining that described 7th firmware updates the more new data needed writing position in described 7th firmware for said write position determination module, described 7th firmware is updated the more new data needed and writes the writing position in described 7th firmware, it is achieved the renewal of described 7th firmware;
Described predetermined flag position arranges module and is further used for, and after described 7th firmware is updated successfully, described predetermined flag position is set to the 5th value;
Described 7th firmware includes: operating system nucleus.
7th firmware includes LINUX, it is possible to comprise with the 4th firmware Fota and LINUX not at OSBL and APPSBL of same core.In the embodiment of said chip, Fota states on the function of the renewal of OSBL, APPSBL and Fota self in realization, the renewal to LINUX, ADSP and AMSS can be realized simultaneously, the function of its module comprised and execution, similar with the module in the embodiment of aforementioned chip provided by the invention and function, do not repeat them here.In like manner, Fota realizes the renewal of operating system ANDROID also as aforementioned by LINUX.
The present invention also provides for a kind of communication terminal, comprises the first firmware and the second firmware, and described communication terminal comprises further:
More new state knows module, is used for knowing that described second firmware needs to update;
Download module, updates, for downloading described second firmware, the more new data needed;And
Flag bit arranges module, after knowing that module knows that described second firmware needs renewal for described more new state, predetermined flag position is set to the second value;
Described first firmware is used for, when described communication terminal is again started up, after knowing that described predetermined flag position is the second value, more new data writing position in described second firmware described in determining, and described second firmware is updated the more new data write said write position needed, it is achieved the renewal of described second firmware;And after described second firmware is updated successfully, described predetermined flag position is set to the first value;
Wherein, described first firmware is firmware more new module, and described second firmware includes: operating system nucleus.
Above-mentioned first firmware and operating system nucleus, corresponding with the first firmware (Fota) in said method embodiment and operating system nucleus (LINUX) respectively, it is included in the chip of above-mentioned offer.More new state knows that module is known when LINUX needs to update, download module LINUX is updated the more new data needed and download and preserve;Flag bit arranges module, after more new state knows that module knows that LINUX needs renewal, predetermined flag position FOTA_FLAG is set to the second value (such as 2);When communication terminal is again started up, first firmware Fota is knowing that flag bit FOTA_FLAG is after 2, determine that LINUX updates required more new data writing position in LINUX, and the more new data that LINUX updates needs writes this writing position, it is achieved the renewal to LINUX;After LINUX is updated successfully, flag bit FOTA_FLAG is set to the first value (such as 1) by Fota.
nullThe embodiment of the various optimizations mentioned in said method,Such as use the form of difference bag,The firmware being updated is done difference write,Such as the second firmware also comprises ADSP and/or AMSS (being all on different core) from Fota,Fota can use above-mentioned same mode to realize updating across core the two,The operating system ANDROID that the 3rd value (such as 3) arranging flag bit FOTA_FLAG for another example indicates LINUX corresponding is the state needing to update,If broken down in the renewal process of any firmware,Fota can pass through the reading of the value to flag bit FOTA_FLAG,Understand and update state in which at present,Thus the state before quickly navigating to corresponding firmware and breaking down accordingly,Realize the renewal to firmware,Repeat no more herein.
The embodiment of the present invention provides another kind of communication terminal simultaneously, comprises the 4th firmware and the 5th firmware, and described communication terminal comprises further:
More new state knows module, is used for knowing that the 5th firmware needs to update;
Download module, the more new data needed for downloading the 5th firmware to update;And
Flag bit arranges module, after knowing that module knows that described 5th firmware needs renewal for described more new state, predetermined flag position is set to the 4th value;
Described 4th firmware is used for, when described communication terminal is again started up, after knowing that described predetermined flag position is the 4th value, form the backup firmware of described 5th firmware, determine that described 5th firmware updates the more new data needed the first writing position in the backup firmware of described 5th firmware, and described 5th firmware is updated more new data described first writing position of write needed, form the backup updating firmware of described 5th firmware;It is then determined that the second writing position in described 5th firmware, by the data in described backup updating firmware, write described second writing position, it is achieved the renewal of described 5th firmware;After described 5th firmware is updated successfully, described predetermined flag position is set to the 5th value;
Wherein, described 4th firmware is firmware more new module, and described 5th firmware is described 4th firmware, and/or in described communication terminal start-up course, it is necessary to leading loading just can make the firmware of the 4th firmware loads.
Above-mentioned 4th firmware and operating system nucleus, corresponding with the 4th firmware (Fota) in said method embodiment and the 5th firmware (OSBL, APPSBL and Fota can be comprised) respectively, it is included in the chip of above-mentioned offer.More new state knows that module is known when the 5th firmware such as OSBL needs to update, download module OSBL is updated the more new data needed and download and preserve;Flag bit arranges module after more new state knows that module knows that OSBL needs renewal, and predetermined flag position FOTA_FLAG is set to the 4th value (such as 2);When communication terminal is again started up, 4th firmware Fota is knowing that flag bit FOTA_FLAG is after 2, form the backup firmware of OSBL, it is then determined that OSBL updates the more new data needed the first writing position in the backup firmware of OSBL, and OSBL is updated more new data described first writing position of write needed, form the backup updating firmware of OSBL;Then, Fota determines the second writing position in OSBL, by the data in the backup updating firmware of OSBL, writes this second writing position, it is achieved the renewal of OSBL;After OSBL is updated successfully, flag bit FOTA_FLAG is set to the 5th value (such as initial value 1, mark needs to update) currently without firmware by Fota.
The embodiment of the various optimizations mentioned in said method, such as use difference bag form, the firmware being updated is done difference write, such as learnt firmware need update time ask whether to restart immediately to be updated.nullFor another example when obtaining the backup firmware that need to update firmware,The value of flag bit FOTA_FLAG is set to identify this state,Such as after backup firmware is successfully updated formation backup updating firmware,The value of flag bit FOTA_FLAG is set to identify this state,Again when the original firmware that the need that backup updating firmware is successfully written correspondence update,Arrange the value of flag bit FOTA_FLAG to return to original state and identified renewal success,The value being arranged flag bit FOTA_FLAG by each link at no point in the update process is recorded,Renewal process is broken down and when terminal is again started up,Fota can pass through to read the value of flag bit FOTA_FLAG,Understand and update state in which at present,Thus the state before quickly navigating to corresponding firmware and breaking down accordingly,Realize the renewal to firmware,Also repeat no more herein.
Separately it should be noted that, in monokaryon chip (the monokaryon chip that such as Samsung dispatches from the factory), or in multinuclear (such as existing four nuclear core sheets), adopt Fota disclosed in this invention, all can realize prior art cannot realize, either directly through communication terminal self, carry out the renewal of firmware except ANDROID, repeat no more herein.
The above is only the preferred embodiment of the present invention; it should be pointed out that, for those skilled in the art, under the premise without departing from the principles of the invention; can also making some improvements and modifications, these improvements and modifications also should be regarded as protection scope of the present invention.

Claims (28)

1. the method that a firmware updates, it is adaptable to communication terminal, it is characterised in that described method includes:
Described communication terminal knows that the second firmware needs to update;
Described communication terminal is downloaded described second firmware and is updated the more new data needed;
Predetermined flag position is set to the second value by described communication terminal;
When described communication terminal is again started up, first firmware knows that described predetermined flag position is after the second value, more new data writing position in described second firmware described in determining, and described second firmware is updated the more new data write said write position needed, realize the renewal of described second firmware, wherein, described first firmware is firmware more new module, it is positioned on the LINUX of ARM11 end, for firmware is updated, when communication terminal starts by the loading of APPSBL, described second firmware includes operating system nucleus, the file system elements that firmware more new module is operated by system firmware detects that server end has firmware to need to update, the more new data that described file system elements then down loading updating needs, and be deposited in the presumptive area of communication terminal;
After described second firmware is updated successfully, described predetermined flag position is set to the first value by described first firmware.
2. the method that firmware as claimed in claim 1 updates, it is characterized in that, described communication terminal download described second firmware update need more new data packets draw together: described communication terminal to described second firmware update need more new data be verified, and by pass through checking described in more new data be stored in precalculated position;
The described more new data write said write position needed that updated by described second firmware includes: obtains described second firmware from described precalculated position and updates the more new data of needs, and described second firmware updates the more new data write said write position needed.
3. the method that firmware as claimed in claim 1 updates, it is characterised in that the more new data packets that described communication terminal is downloaded described second firmware renewal and needed is drawn together: described communication terminal is downloaded described second firmware and updated the difference bag needed;
Described second firmware is updated the more new data write said write position needed and includes by described first firmware: described first firmware uses pre-defined algorithm that described difference bag is write said write position.
4. the method that firmware as claimed in claim 1 updates, it is characterised in that when described communication terminal is again started up, the first firmware knows that described predetermined flag position is that the second value includes:
When described communication terminal is again started up, the 3rd firmware after knowing that predetermined flag position is set to the second value, loading described first firmware, described predetermined flag position is the second value to make described first firmware know;
Wherein, described 3rd firmware is, in described communication terminal start-up course, is loaded directly into the firmware of described first firmware.
5. the method that the firmware as according to any one of Claims 1 to 4 updates, it is characterized in that, described communication terminal includes processor, and described processor includes the first core and the second core, described first firmware is positioned at described second core, and described operating system nucleus is positioned at described second core;
Described second firmware farther includes: be positioned at the firmware that need not load in advance before the first firmware loads of described first core.
6. the method that firmware as claimed in claim 5 updates, it is characterised in that described second value, for indicating the state of any one firmware in described second firmware to update for needs.
7. the method that firmware as claimed in claim 1 updates, it is characterised in that after described second firmware is updated successfully, described predetermined flag position is set to the first value and specifically includes by described first firmware:
After described second firmware is updated successfully, described predetermined flag position is set to the 3rd value;
Described operating system nucleus judges that operating system that operating system nucleus is corresponding is the need of renewal;
If needing to update, described operating system is updated by described operating system nucleus, after being updated successfully, notifies described first firmware;
Described predetermined flag position is set to the first value by described first firmware.
8. the method that firmware as claimed in claim 7 updates, it is characterised in that described described predetermined flag position is set to the 3rd value after, before described predetermined flag position is set to the first value by described first firmware, described method farther includes:
If described communication terminal is again started up, described second firmware knows that described predetermined flag position is the 3rd value, returns the described step that described operating system is updated.
9. the method that a firmware updates, it is adaptable to communication terminal, it is characterised in that described method includes:
Described communication terminal knows that the 5th firmware needs to update;
Described communication terminal is downloaded described 5th firmware and is updated the more new data needed;
Predetermined flag position is set to the 4th value by described communication terminal;
When described communication terminal is again started up, 4th firmware knows that described predetermined flag position is after the 4th value, form the backup firmware of described 5th firmware, determine that described 5th firmware updates the more new data needed the first writing position in the backup firmware of described 5th firmware, and described 5th firmware is updated more new data described first writing position of write needed, form the backup updating firmware of described 5th firmware;Wherein, described 4th firmware is firmware more new module, it is positioned on the LINUX of ARM11 end, for firmware is updated, when communication terminal starts by the loading of APPSBL, described 5th firmware is described 4th firmware, and/or in described communication terminal start-up course, need leading loading just can make the firmware of the 4th firmware loads, the file system elements that firmware more new module is operated by system firmware detects that server end has firmware to need to update, the more new data that file system elements then down loading updating needs, and be deposited in the presumptive area of communication terminal;
The second writing position in described 5th firmware determined by described 4th firmware, by the data in the backup updating firmware of described 5th firmware, writes described second writing position, it is achieved the renewal of described 5th firmware;
After described 5th firmware is updated successfully, described predetermined flag position is set to the 5th value by described 4th firmware.
10. the method that firmware as claimed in claim 9 updates, it is characterized in that, the more new data that described communication terminal is downloaded described 5th firmware renewal and needed is specially, described 5th firmware is updated the more new data needed and is verified by described communication terminal, and the more new data that described 5th firmware by verifying updates needs is stored in precalculated position;
More new data described first writing position of write that being updated by described 5th firmware needs includes: obtains described 5th firmware from described precalculated position and updates the more new data of needs, and the more new data that described 5th firmware renewal needs is write described first writing position.
11. the method that firmware as claimed in claim 9 updates, it is characterised in that it is that described 5th firmware updates the difference bag needed that described 5th firmware updates the more new data needed;
Described 5th firmware is updated more new data described first writing position of write needed and includes by described 4th firmware: described 4th firmware uses pre-defined algorithm that the difference bag that described 5th firmware updates needs is write described first writing position.
12. the method that firmware as claimed in claim 9 updates, it is characterised in that after described 4th firmware forms the backup firmware of described 5th firmware, described method farther includes: described predetermined flag position is set to the 6th value by described 4th firmware;
Before described 5th firmware is updated successfully, described method farther includes:
If described communication terminal is again started up, described 4th firmware knows that described predetermined flag position is the 6th value, returns the described step determining that described 5th firmware updates the more new data needed the first writing position in the backup firmware of described 5th firmware.
13. the method that firmware as claimed in claim 9 updates, it is characterised in that after described 4th firmware forms the backup updating firmware of described 5th firmware, described method farther includes: described predetermined flag position is set to the 7th value by described 4th firmware;
Before described 5th firmware is updated successfully, described method farther includes:
If described communication terminal is again started up, described 4th firmware knows that described predetermined flag position is the 7th value, then return the step of described the second writing position determined in described 5th firmware.
14. the method that firmware as claimed in claim 13 updates, it is characterised in that when described communication terminal is again started up, know that described predetermined flag position farther includes before being the 7th value at described 4th firmware:
6th firmware knows that described predetermined flag position is after the 7th value, the loading of described 5th firmware will replace with the loading of the backup updating firmware to described 5th firmware.
15. the method that firmware as claimed in claim 9 updates, it is characterised in that described method farther includes:
Described communication terminal knows that the 7th firmware needs to update;
Described communication terminal is downloaded described 7th firmware and is updated the more new data needed;
Predetermined flag position is set to the 8th value by described communication terminal;
When described communication terminal is again started up, 4th firmware knows that described predetermined flag position is after the 8th value, determine that described 7th firmware updates the more new data needed writing position in described 7th firmware, and described 7th firmware is updated the more new data write said write position needed, it is achieved the renewal of described 7th firmware;
After described 7th firmware is updated successfully, described predetermined flag position is set to the 5th value by described 4th firmware;
Wherein, described 7th firmware includes: operating system nucleus.
16. the method that firmware as claimed in claim 15 updates, it is characterized in that, described communication terminal includes processor, described processor includes the 3rd core and the 4th core, described 4th firmware is positioned at described 4th core, described operating system nucleus is positioned at described 4th core, and described 7th firmware farther includes: be positioned at the firmware that need not load in advance before the 4th firmware loads of described 3rd core.
17. the method that firmware as claimed in claim 15 updates, it is characterised in that after described 7th firmware is updated successfully, described predetermined flag position is set to the 5th value and specifically includes by described 4th firmware:
After described 7th firmware is updated successfully, described predetermined flag position is set to the 9th value;
Described operating system nucleus judges that operating system that operating system nucleus is corresponding is the need of renewal;
If needing to update, described operating system is updated by described operating system nucleus, after being updated successfully, notifies described 4th firmware;
Described predetermined flag position is set to the 5th value by described 4th firmware.
18. the method that firmware as claimed in claim 17 updates, it is characterized in that, described described predetermined flag position is set to the 9th value after, before described predetermined flag position is set to the 5th value by described 4th firmware, described method farther includes: if described communication terminal is again started up, described operating system nucleus knows that described predetermined flag position is the 9th value, returns the described step that described operating system is updated.
19. a chip, it is applied in communication terminal, it is characterised in that described chip comprises the first firmware and the second firmware, and described first firmware comprises:
Predetermined flag position read module, after knowing that the predetermined flag position on communication terminal is the second value, knows that the second firmware needs to update;
Writing position determines module, after knowing that described second firmware needs renewal for described predetermined flag position read module, it is determined that described second firmware updates the more new data needed writing position in described second firmware;
Update writing module, after determining that described second firmware updates the more new data needed writing position in described second firmware for said write position determination module, described second firmware is updated the more new data needed and writes the writing position in described second firmware;Wherein, described first firmware is firmware more new module, it is positioned on the LINUX of ARM11 end, for firmware is updated, when communication terminal starts by the loading of APPSBL, described second firmware includes operating system nucleus, and the file system elements that firmware more new module is operated by system firmware detects that server end has firmware to need to update, the more new data that file system elements then down loading updating needs, and be deposited in the presumptive area of communication terminal;
Predetermined flag position arranges module, for, after described second firmware is updated successfully, described predetermined flag position being set to the first value.
20. chip according to claim 19, it is characterised in that described chip includes the first core and the second core, and described first firmware and described operating system nucleus are positioned at described second core;
Described second firmware farther includes: be positioned at the firmware that need not load in advance before the first firmware loads of described first core.
21. the chip according to claim 19 or 20, it is characterised in that described predetermined flag position arranges module and is further used for, after described second firmware is updated successfully, described predetermined flag position is set to the 3rd value, and notifies described operating system nucleus;And receive described operating system nucleus be updated successfully notice after, described predetermined flag position is set to the first value;
Described operating system nucleus is further used for, it is judged that described operating system, the need of renewal, if needing to update, is then updated by the operating system of self correspondence, and is updated successfully notice to described in described first firmware transmission after being updated successfully.
22. a chip, it is applied in communication terminal, it is characterised in that described chip comprises the 4th firmware and the 5th firmware, and described 4th firmware comprises:
Predetermined flag position read module, after knowing that the predetermined flag position on communication terminal is the 4th value, knows that the 5th firmware needs to update;
Firmware backup module, is used for knowing that described predetermined flag position is after the 4th value, forms the backup firmware of described 5th firmware;
First writing position determines module, after forming the backup firmware of described 5th firmware, it is determined that described 5th firmware updates the more new data needed the first writing position in the backup firmware of described 5th firmware;
Backup firmware is new module more, writes described first writing position for described 5th firmware is updated the more new data needed, forms the backup updating firmware of described 5th firmware;
Second writing position determines module, form the backup updating firmware of described 5th firmware for backup firmware more new module after, it is determined that the second writing position in described 5th firmware;
Backup updating firmware writing module, after determining for described second writing position, by the data in the backup updating firmware of described 5th firmware, writes described second writing position, it is achieved the renewal of described 5th firmware;Wherein, described 4th firmware is firmware more new module, it is positioned on the LINUX of ARM11 end, for firmware is updated, when communication terminal starts by the loading of APPSBL, described 5th firmware is described 4th firmware, and/or in described communication terminal start-up course, need leading loading just can make the firmware of the 4th firmware loads, the file system elements that firmware more new module is operated by system firmware detects that server end has firmware to need to update, the more new data that file system elements then down loading updating needs, and be deposited in the presumptive area of communication terminal;
Predetermined flag position arranges module, for, after described 5th firmware is updated successfully, described predetermined flag position being set to the 5th value.
23. chip according to claim 22, it is characterised in that described predetermined flag position arranges module and is further used for, after described firmware backup module forms the backup firmware of described 5th firmware, described predetermined flag position is set to the 6th value;
Described predetermined flag position read module is further used for, and when described communication terminal is again started up, after the predetermined flag position known on communication terminal is the 6th value, notifies that described backup firmware more new module forms the backup updating firmware of described 5th firmware.
24. chip according to claim 22, it is characterised in that described predetermined flag position arranges module and is further used for, after described backup firmware more new module forms the backup updating firmware of described 5th firmware, described predetermined flag position is set to the 7th value;
Described predetermined flag position read module is further used for, and when described communication terminal is again started up, after the predetermined flag position known on communication terminal is the 7th value, notifies that described backup updating firmware writing module realizes the renewal of described 5th firmware.
25. chip according to claim 24, it is characterized in that, described chip comprises the 6th firmware further, for when described communication terminal is again started up, after knowing that described predetermined flag position is the 7th value, the loading of described 5th firmware will be replaced with the loading of the backup updating firmware to described 5th firmware.
26. chip according to claim 22, it is characterised in that described chip comprises the 7th firmware further;Described predetermined flag position read module is further used for, and when described predetermined flag position is set to eight values, knows that described 7th firmware needs to update;
Described 4th firmware comprises further:
Writing position determines module, after knowing that described 7th firmware needs renewal for described predetermined flag position read module, it is determined that described 7th firmware updates the more new data needed writing position in described 7th firmware;And
Update writing module, after determining that described 7th firmware updates the more new data needed writing position in described 7th firmware for said write position determination module, described 7th firmware is updated the more new data needed and writes the writing position in described 7th firmware, it is achieved the renewal of described 7th firmware;
Described predetermined flag position arranges module and is further used for, and after described 7th firmware is updated successfully, described predetermined flag position is set to the 5th value;
Described 7th firmware includes: operating system nucleus.
27. a communication terminal, it is characterised in that comprising the first firmware and the second firmware, described communication terminal comprises further:
More new state knows module, is used for knowing that described second firmware needs to update;
Download module, updates, for downloading described second firmware, the more new data needed;And
Flag bit arranges module, after knowing that module knows that described second firmware needs renewal for described more new state, predetermined flag position is set to the second value;
Described first firmware is used for, when described communication terminal is again started up, after knowing that described predetermined flag position is the second value, more new data writing position in described second firmware described in determining, and described second firmware is updated the more new data write said write position needed, it is achieved the renewal of described second firmware;And after described second firmware is updated successfully, described predetermined flag position is set to the first value;Wherein, described first firmware is firmware more new module, it is positioned on the LINUX of ARM11 end, for firmware is updated, when communication terminal starts by the loading of APPSBL, described second firmware includes operating system nucleus, and the file system elements that firmware more new module is operated by system firmware detects that server end has firmware to need to update, the more new data that file system elements then down loading updating needs, and be deposited in the presumptive area of communication terminal.
28. a communication terminal, it is characterised in that comprising the 4th firmware and the 5th firmware, described communication terminal comprises further:
More new state knows module, is used for knowing that described 5th firmware needs to update;
Download module, updates, for downloading described 5th firmware, the more new data needed;And
Flag bit arranges module, after knowing that module knows that described 5th firmware needs renewal for described more new state, predetermined flag position is set to the 4th value;
Described 4th firmware is used for, when described communication terminal is again started up, after knowing that described predetermined flag position is the 4th value, form the backup firmware of described 5th firmware, determine that described 5th firmware updates the more new data needed the first writing position in the backup firmware of described 5th firmware, and described 5th firmware is updated more new data described first writing position of write needed, form the backup updating firmware of described 5th firmware;It is then determined that the second writing position in described 5th firmware, by the data in described backup updating firmware, write described second writing position, it is achieved the renewal of described 5th firmware;After described 5th firmware is updated successfully, described predetermined flag position is set to the 5th value;Wherein, described 4th firmware is firmware more new module, it is positioned on the LINUX of ARM11 end, for firmware is updated, when communication terminal starts by the loading of APPSBL, described 5th firmware is described 4th firmware, and/or in described communication terminal start-up course, need leading loading just can make the firmware of the 4th firmware loads, the file system elements that firmware more new module is operated by system firmware detects that server end has firmware to need to update, the more new data that file system elements then down loading updating needs, and be deposited in the presumptive area of communication terminal.
CN201110159548.7A 2011-06-14 2011-06-14 Method, chip and the communication terminal that firmware updates Active CN102830984B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110159548.7A CN102830984B (en) 2011-06-14 2011-06-14 Method, chip and the communication terminal that firmware updates

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110159548.7A CN102830984B (en) 2011-06-14 2011-06-14 Method, chip and the communication terminal that firmware updates

Publications (2)

Publication Number Publication Date
CN102830984A CN102830984A (en) 2012-12-19
CN102830984B true CN102830984B (en) 2016-07-06

Family

ID=47334134

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110159548.7A Active CN102830984B (en) 2011-06-14 2011-06-14 Method, chip and the communication terminal that firmware updates

Country Status (1)

Country Link
CN (1) CN102830984B (en)

Families Citing this family (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104636153A (en) * 2013-11-07 2015-05-20 中兴通讯股份有限公司 Android terminal and method for upgrading Android terminal
CN104536848B (en) 2014-12-22 2018-05-08 小米科技有限责任公司 Firmware restoration method, apparatus and terminal
CN104484211B (en) * 2014-12-29 2017-07-28 广东欧珀移动通信有限公司 The method and device of shared image file
CN105808283A (en) * 2014-12-31 2016-07-27 海洋王照明科技股份有限公司 Program updating method and device applicable to intelligent illumination equipment
CN104461666B (en) * 2014-12-31 2018-05-08 小米科技有限责任公司 The firmware upgrade method and device of equipment primary processor
CN104955034A (en) * 2015-05-28 2015-09-30 盛耀无线通讯科技(北京)有限公司 Communication conversation method
CN104955033A (en) * 2015-05-28 2015-09-30 盛耀无线通讯科技(北京)有限公司 Voice encryption communication method
US9965270B2 (en) * 2015-07-01 2018-05-08 Quanta Computer Inc. Updating computer firmware
CN107341024B (en) * 2016-04-28 2020-02-14 华为技术有限公司 System upgrading method and system upgrading device
CN106648759A (en) * 2016-11-30 2017-05-10 苏州华芯微电子股份有限公司 Common programming device firmware updating method
CN107294768A (en) * 2017-05-05 2017-10-24 惠州Tcl移动通信有限公司 EMMC firmware upgrade methods, equipment and storage device
CN108710495A (en) * 2018-03-29 2018-10-26 北京聚利科技股份有限公司 Electronic tag method for updating program, electronic tag and storage medium
CN108874439B (en) * 2018-07-02 2023-04-11 京东方科技集团股份有限公司 Method and device for acquiring customized difference packet, and upgrading method and device
CN109408097A (en) * 2018-12-11 2019-03-01 深圳市英威腾电气股份有限公司 A kind of firmware upgrade method, device, system and a kind of electronic equipment
CN109766140A (en) * 2018-12-19 2019-05-17 青岛海信宽带多媒体技术有限公司 A kind of localization method and device that set-top box starting is abnormal
CN110209415A (en) * 2019-05-29 2019-09-06 惠州Tcl移动通信有限公司 Firmware method for refreshing, device and storage medium
CN110750287B (en) * 2019-10-21 2023-10-13 上海庆科信息技术有限公司 Firmware upgrading method and device of intelligent robot and intelligent robot
US11080039B2 (en) 2019-11-25 2021-08-03 Micron Technology, Inc. Resilient software updates in secure storage devices
CN110874239A (en) * 2020-01-20 2020-03-10 翱捷科技(上海)有限公司 Air firmware differential upgrading method and device for electronic equipment
CN115037496A (en) * 2021-03-03 2022-09-09 美光科技公司 Endpoint customization via online firmware stores
CN113626059B (en) * 2021-10-13 2022-02-08 北京创米智汇物联科技有限公司 System upgrade method, camera and computer readable storage medium
CN114064086B (en) * 2021-11-29 2023-06-23 四川虹美智能科技有限公司 Multi-stage processor system and upgrading method thereof
CN114780114A (en) * 2022-04-11 2022-07-22 广州小鹏汽车科技有限公司 Firmware upgrading method, system, vehicle and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1581101A (en) * 2003-08-12 2005-02-16 联想(北京)有限公司 Embedded system upgrading method
CN101271396A (en) * 2008-04-15 2008-09-24 威盛电子股份有限公司 Electronic device and method for on-line updating firmware
CN101383847A (en) * 2008-08-25 2009-03-11 中兴通讯股份有限公司 Firmware upgrading method and device for wireless data terminal
TW201102924A (en) * 2009-07-03 2011-01-16 Inventec Appliances Corp Embedded electronic device and method for updating firmware thereof

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4944686B2 (en) * 2007-06-28 2012-06-06 ソニーモバイルコミュニケーションズ株式会社 Software update method and portable terminal device
CN102065118A (en) * 2010-09-16 2011-05-18 深圳市九洲电器有限公司 Method for updating network equipment and device for implementing method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1581101A (en) * 2003-08-12 2005-02-16 联想(北京)有限公司 Embedded system upgrading method
CN101271396A (en) * 2008-04-15 2008-09-24 威盛电子股份有限公司 Electronic device and method for on-line updating firmware
CN101383847A (en) * 2008-08-25 2009-03-11 中兴通讯股份有限公司 Firmware upgrading method and device for wireless data terminal
TW201102924A (en) * 2009-07-03 2011-01-16 Inventec Appliances Corp Embedded electronic device and method for updating firmware thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《基于OMA标准的FPTA技术研究》;王舜 等;《电信科学》;20060831(第8期);第56-59页 *

Also Published As

Publication number Publication date
CN102830984A (en) 2012-12-19

Similar Documents

Publication Publication Date Title
CN102830984B (en) Method, chip and the communication terminal that firmware updates
US7991988B2 (en) Communication device and firmware update method thereof
US20110283274A1 (en) Firmware image update and management
WO2019062703A1 (en) Update method, and embedded system
CN105760200A (en) Terminal device and system updating method thereof
CN108804118B (en) Firmware upgrading method, device and storage medium
CN106502646A (en) The page info processing method and processing device of application
CN102646043A (en) Method and device for upgrading mobile terminal software and mobile terminal
CN115328563B (en) System starting method and electronic equipment
US20170068585A1 (en) Method and Apparatus for Recovering System Software of Intelligent Terminal
JP2984649B1 (en) Memory read control method and program read control method
CN112416411B (en) Upgrading method and device, equipment end, server and computer readable medium
CN108121560A (en) Difference bag upgrade method, device, terminal and computer readable storage medium
CN105045671A (en) Method and device for upgrading systems of intelligent terminals
CN105468420B (en) Operating system update method and apparatus
CN104991805B (en) Smart machine and its system calamity are for control method
CN117056115B (en) Application program repairing method and device, storage medium and electronic equipment
CN113032183A (en) System management method, device, computer equipment and storage medium
WO2013004175A1 (en) Software upgrading method and apparatus for electronic devices
CN110659052B (en) Method and system for updating system software in network equipment and readable storage medium
CN111176693B (en) Upgrading method of digital television system
CN106104474B (en) Method for updating firmware on low memory devices
CN109254797B (en) Mobile terminal, starting control method thereof and storage medium
KR100762618B1 (en) The method and system of upgrading firmware upgrade engine of mobile terminal
KR100588199B1 (en) Method for recovering download mode in program download fail state of portable terminal, and portable terminal employing it

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