CN102012830A - Automatic upgrading method for equipment and equipment - Google Patents

Automatic upgrading method for equipment and equipment Download PDF

Info

Publication number
CN102012830A
CN102012830A CN2010105734592A CN201010573459A CN102012830A CN 102012830 A CN102012830 A CN 102012830A CN 2010105734592 A CN2010105734592 A CN 2010105734592A CN 201010573459 A CN201010573459 A CN 201010573459A CN 102012830 A CN102012830 A CN 102012830A
Authority
CN
China
Prior art keywords
upgrade file
equipment
buffer
upgrading
read
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2010105734592A
Other languages
Chinese (zh)
Inventor
刘均
鲍海森
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Launch Software Co Ltd
Original Assignee
Shenzhen Launch Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Launch Software Co Ltd filed Critical Shenzhen Launch Software Co Ltd
Priority to CN2010105734592A priority Critical patent/CN102012830A/en
Publication of CN102012830A publication Critical patent/CN102012830A/en
Pending legal-status Critical Current

Links

Images

Abstract

The embodiment of the invention discloses an automatic upgrading method for equipment, which comprises the following steps of: traversing an expansion card if the insertion of the expansion card is detected; judging whether the expansion card comprises an upgrade file or not; if the expansion card is judged to comprise the upgrade file, decoding the upgrade file and reading the decoded upgrade file; and automatically upgrading the equipment according to the read upgrade file. The embodiment of the invention also discloses the equipment. In the method and the equipment, the equipment can finish upgrading own firmware; and the method the equipment are simple in operation and practical.

Description

A kind of equipment automatically updating method and equipment
Technical field
The present invention relates to electronic technology field, relate in particular to a kind of equipment automatically updating method and equipment.
Background technology
Along with development of electronic technology, the equipment of electrical type becomes people's necessary tool of living gradually.Wherein, the equipment of electrical type comprises: mobile phone, PDA (Personal Digital Assistant, the personal digital assistant), car-mounted terminal, MP3 (Moving Picture Experts Group Audio Layer III, dynamic image expert compression standard audio frequency aspect 3), terminal device such as MP4, other equipment that also comprise the applying electronic product are as embedded device etc.
At present, along with the renewal speed more and more higher requirement of people to equipment (equipment of electrical type), the equipment after dispatching from the factory also needs to carry out the upgrading of firmware, could satisfy user's user demand.About the firmware upgrade of the equipment after dispatching from the factory, mainly contain two kinds of schemes now, one is: the equipment after will dispatching from the factory is recalled factory, carries out corresponding firmware upgrade; But because equipment has arrived in consumer's hand, equipment is recalled upgrading must cause the discontented of user, reduce user's experience property; It two is: send the burning personnel of specialty, use the burning equipment of specialty, the equipment after dispatching from the factory is carried out firmware upgrade; This scheme is had relatively high expectations to operator's specialty, and need expend great amount of manpower and material resources, and practicality is lower.Therefore, how to develop a kind of simple to operate and can realize that the scheme of equipment auto-update becomes a problem demanding prompt solution.
Summary of the invention
Embodiment of the invention technical matters to be solved is, a kind of equipment automatically updating method and equipment are provided, and can be finished the upgrading of self firmware by equipment, and simple to operate, practical.
In order to solve the problems of the technologies described above, the embodiment of the invention provides a kind of equipment automatically updating method, comprising:
When having detected the expansion card insertion, travel through described expansion card;
Judge and whether comprise upgrade file in the described expansion card;
If judged result is for being, the described upgrade file of then decoding, and read decoded upgrade file;
Carry out the auto-update of equipment according to the described upgrade file that reads.
Wherein, describedly read decoded upgrade file, comprising: described decoded upgrade file is carried out read operation; According to described read operation, described upgrade file is write buffer.
Wherein, the described upgrade file that described basis reads carries out the auto-update of equipment, comprising:
Upgrade file in the buffer is carried out read operation;
According to described read operation, described upgrade file is write specific memory section;
For the upgrade file in the described specific memory section is provided with the upgrading sign, and revise vector pointer, make described vector pointer point to the first address of described specific memory section;
Restart described equipment, read described upgrade file from the position that described vector pointer points to;
The described upgrade file that operation is read.
Wherein, described upgrade file in the buffer is carried out also comprising before the read operation:
Obtain the length of the upgrade file in the described buffer;
According to the described length of obtaining, the storage area size that calculating need take;
According to the described storage area size that calculates, for the upgrade file in the described buffer distributes specific memory section.
Wherein, described according to read operation, described upgrade file is write after the specific memory section, also comprise: be the sign of having upgraded of the upgrade file setting in the described buffer.
Wherein, after the described upgrade file that described operation is read, also comprise:
Calculate the upgrade file in the described specific memory section verification and;
The more described verification that calculates and with described buffer in the described upgrade file stored verification and whether equate;
If comparative result, is then removed the upgrading sign of the interior upgrade file of described specific memory section for being;
If comparative result is then removed the sign of upgrading of the upgrade file in the described buffer for not, again the upgrade file in the described buffer is carried out read operation.
Correspondingly, the embodiment of the invention also provides a kind of equipment, comprising:
Spider module is used for traveling through described expansion card when having detected the expansion card insertion;
Judge module is used for the traversing result according to described spider module, judges whether comprise upgrade file in the described expansion card;
Decoder module, be used for when described judge module judged result when being, the described upgrade file of decoding;
Read module is used to read the decoded upgrade file of described decoder module;
The auto-update module is used for carrying out according to the described upgrade file that described read module reads the auto-update of this equipment.
Wherein, described read module comprises:
Read the unit, be used for the decoded upgrade file of described decoder module is carried out read operation;
R/w cell is used for the read operation of reading the unit according to described, and described upgrade file is write buffer.
Wherein, described auto-update module comprises:
Read the unit, be used for the upgrade file of described buffer is carried out read operation;
R/w cell is used for the read operation of reading the unit according to described, and described upgrade file is write specific memory section;
The upgrading mark setting unit is used to the upgrade file in the described specific memory section that the upgrading sign is set;
The pointer modified unit is used to revise vector pointer, makes described vector pointer point to the first address of described specific memory section;
The upgrading reading unit is used to restart described equipment, and described upgrade file is read in the position that amended described vector pointer points to from described pointer modified unit;
The upgrading unit is used to move the upgrade file that described upgrading reading unit reads.
Wherein, described auto-update module also comprises:
The length acquiring unit is used for obtaining the length of the upgrade file of described buffer;
The storage area computing unit is used for the length obtained according to described length acquiring unit, the storage area size that calculating need take;
Allocation units are used for the storage area size that calculates according to described storage area computing unit, are that the upgrade file in the described buffer distributes specific memory section.
Wherein, described equipment also comprises: the sign of having upgraded is provided with module, is used to upgrade file setting in the described buffer sign of having upgraded.
Wherein, described auto-update module also comprises:
Verification and computing unit, be used to calculate the upgrade file in the described specific memory section verification and;
Comparing unit is used for verification that more described verification and computing unit calculate and the verification of the described upgrade file stored with described buffer and whether equating;
The sign clearing cell, be used for when described comparing unit comparative result when being, remove the upgrading sign of the interior upgrade file of described specific memory section; Or be used for when described comparing unit comparative result for not the time, remove the sign of upgrading of the upgrade file in the described buffer, and notify the unit of reading of described auto-update module again the upgrade file in the described buffer to be carried out read operation.
Implement the embodiment of the invention, have following beneficial effect:
The embodiment of the invention is in having detected expansion card insertion equipment the time, judge and whether comprise upgrade file in the described expansion card, when in judging described expansion card, comprising upgrade file, upgrade file is decoded, and read the auto-update that this upgrade file carries out equipment; Employing can avoid large-scale equipment to recall based on the equipment auto-update scheme of expansion card, has saved cost; In addition, employing is based on the equipment auto-update scheme of expansion card, avoided professional requirement to the personnel of on-the-spot burning, can directly insert the expansion card that comprises upgrade file by the user, can finish firmware upgrade automatically by equipment, it is simple to operate, upgrading is efficient, has both reduced cost, satisfied the demand of user again, made the user more convenient the use of equipment to device upgrade.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, to do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art below, apparently, accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the structural representation of first embodiment of equipment of the present invention;
Fig. 2 is the structural representation of second embodiment of equipment of the present invention;
Fig. 3 is the structural representation of embodiment of the read module of equipment of the present invention;
Fig. 4 is the structural representation of first embodiment of the auto-update module of equipment of the present invention;
Fig. 5 is the structural representation of second embodiment of the auto-update module of equipment of the present invention;
Fig. 6 is the process flow diagram of first embodiment of equipment automatically updating method of the present invention;
Fig. 7 is the process flow diagram of second embodiment of equipment automatically updating method of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that is obtained under the creative work prerequisite.
See also Fig. 1, be the structural representation of first embodiment of equipment of the present invention; Described equipment comprises: spider module 10, judge module 20, decoder module 30, read module 40 and auto-update module 50.Described spider module 10 is used for traveling through described expansion card when having detected the expansion card insertion.Described judge module 20 is used for the traversing result according to described spider module 10, judges whether comprise upgrade file in the described expansion card.Described decoder module 30, be used for when described judge module 20 judged results when being, the described upgrade file of decoding.Described read module 40 is used to read described decoder module 30 decoded upgrade files.Described auto-update module 50 is used for carrying out according to the described upgrade file that described read module 40 reads the auto-update of equipment.
Expansion card includes but not limited to: SD card (Secure Digital Memory Card, a kind of memory device of new generation of based semiconductor fast-flash memory device), CF card (Compact Flash, a kind of expansion card), SM card (Smart Media, a kind of storage card), mmc card various types of expansion cards such as (Multi Media Card, a kind of memory devices similar) to the SD card.The equipment of the embodiment of the invention provides the expansion card interface, supports the expansion card function.When expansion card inserts the expansion card interface of equipment, described equipment can detect the insertion of expansion card, at this moment, and 10 described expansion cards of traversal of described spider module, particularly, the ergodic process of described spider module 10 promptly is the included full content of the described expansion card of scanning.Need to prove that the equipment of the embodiment of the invention also can provide USB the expansion interface of mobile devices such as (Universal Serial BUS, USB (universal serial bus)), support mobile devices such as USB, when mobile devices such as insertion USB, described equipment can similarly be handled, and does not give unnecessary details at this.
Described judge module 20 is worked simultaneously with described spider module 10, described spider module 10 whenever scans the content that a described expansion card comprises, described judge module 20 judges promptly whether this content is upgrade file, particularly, described judge module 20 can carry out the judgement of upgrade file according to file type, the corresponding unique a kind of file layout of various types of files, such as: the form of text is: txt; The form of executable file is: exe; The form of ASCII (American Standard Code for Information Interchange, American Standard Code for Information Interchange (ASCII)) text is: hex; Or the like, usually, the upgrade file of equipment firmware all has comparatively set form (hex form), and 20 of described judge modules judge according to file layout whether the expansion card content that described spider module 10 scans is upgrade file.Need to prove,, then this upgrade file is transferred to subsequent module and carry out respective handling if described judge module 20 judges that certain file is a upgrade file; If described judge module 20 judges that certain file is non-upgrade file, then ignore this document, continue to judge next file according to the traversal of spider module 10; After if described spider module 10 has traveled through described expansion card, do not comprise upgrade file in the described expansion card of described judge module 20 judgements, then export negative decision, at this moment, described equipment is normally carried out the expansion card function.Be understandable that, described judge module 20 carries out the judgement of upgrade file only for giving an example according to file type, it can also adopt other modes, such as: sign can be set on upgrade file in advance, then can judge whether described expansion card content is upgrade file according to sign, or the like, but similar analysis under other situations is not given unnecessary details at this.
Need to prove that in the embodiment of the invention, described upgrade file mainly is some upgrade files that are used for the firmware upgrade of equipment, includes but not limited to: upgrade file of the upgrade file of the error correction firmware of equipment, the audio frequency of equipment control firmware or the like.
Described decoder module 30 is judged when comprising upgrade file in the described expansion card when described judge module 20, described upgrade file is decoded, and usually, upgrade file all has respective coding, described decoder module 30 is carried out the inverse process of described coding, and described upgrade file is decoded.Be understandable that if the upgrade file of described upgrade file for encrypting, described decoder module 30 also is used for described upgrade file is decrypted, this decrypting process is a corresponding process with the ciphering process of described upgrade file.The concrete decode procedure and the prior art of described decoder module 30 are similar, do not give unnecessary details at this.
In the specific implementation, described equipment comprises buffer, and described read module 40 is used for the decoded upgrade file of expansion card is read in the buffer of equipment.Because the upgrade file in the expansion card is used to the firmware upgrade of described equipment, needs the described upgrade file of complete application in the escalation process; Because the type of expansion card has a lot, different expansion cards may be different with the fitness of the expansion card interface of equipment, in the device upgrade process, expansion card may become flexible, cooperate with interface situations such as not tight, thereby cause device upgrade to be interrupted, influence upgrading effect, therefore, upgrade file in the expansion card need be moved and deposit to a relatively stable memory device, upgrade to offer described equipment.Buffer is packaged in the described equipment, and its structure is relatively stable, and described read module 40 reads described upgrade file the buffer from expansion card, can effectively guarantee the normal operation of escalation process.Particularly, described buffer can be existing various buffers (as: 24LC512 buffer etc.), and it provides caching function, does not give unnecessary details at this.
After described read module 40 had read the upgrade file in the described expansion card in the internal buffer, 50 of described auto-update modules were according to the upgrade file in the described internal buffer, carried out the upgrading of self firmware.
The embodiment of the invention is in having detected expansion card insertion equipment the time, judge and whether comprise upgrade file in the described expansion card, when in judging described expansion card, comprising upgrade file, upgrade file is decoded, and read the auto-update that this upgrade file carries out equipment; Employing can avoid large-scale equipment to recall based on the equipment auto-update scheme of expansion card, has saved cost.
See also Fig. 2, be the structural representation of second embodiment of equipment of the present invention; Described equipment comprises: spider module 10, judge module 20, decoder module 30, read module 40 and auto-update module 50.In the present embodiment, described equipment also comprises: the sign of having upgraded is provided with module 60.The described sign of having upgraded is provided with module 60, is used to upgrade file setting in the described buffer sign of having upgraded.
After described auto-update module 50 reads upgrade file in the buffer, the described sign of having upgraded is provided with module 60 and is the sign of having upgraded of the upgrade file setting in the described buffer, wherein, the described sign of having upgraded shows that this upgrade file upgrades, during this upgrade file in described equipment reads described buffer once more, then skip this upgrade file, need not to repeat again to read and upgrade.In the specific implementation, the described sign of having upgraded is provided with module 60 the upgrading zone bit of described upgrade file is made as " 0 ", has then finished the setting to the sign of upgrading of described upgrade file.When described equipment read this upgrade file of buffer, the upgrading zone bit of reading this upgrade file was " 0 ", judged that this upgrade file upgraded, then ignored this upgrade file, no longer repeated to read.Be understandable that, when described equipment reads the upgrade file of buffer, the upgrading zone bit of reading this upgrade file is non-" 0 " (as: the upgrading zone bit is " 1 "), judges that this upgrade file needs upgrading, then reads this upgrade file of buffer and upgrades.
The embodiment of the invention adopts the equipment auto-update scheme based on expansion card, avoided professional requirement to the personnel of on-the-spot burning, can directly insert the expansion card that comprises upgrade file by the user, can finish firmware upgrade automatically by equipment, it is simple to operate, upgrading is efficient, both reduced cost, satisfied the demand of user again, and made the user more convenient the use of equipment to device upgrade.
Need to prove that the disclosed equipment of the embodiment of the invention comprises: terminal devices such as mobile phone, PDA, car-mounted terminal, MP3, MP4 also comprise other equipment of applying electronic product, as embedded device etc.Preferably, the equipment of the embodiment of the invention is master cpu (Central ProcessingUnit with the LPC2368 chip, central processing unit), at master cpu outer setting expansion card interface, and adopt the system software code form of FAT16 file layout as master cpu.
For clearer explanation the present invention, will the read module 40 of equipment of the present invention be described in detail below.
See also Fig. 3, be the structural representation of the embodiment of the read module of equipment of the present invention; Described read module 40 comprises: read unit 401 and r/w cell 402.The described unit 401 of reading is used for described decoder module 30 decoded upgrade files are carried out read operation; Described r/w cell 402 is used for the read operation of reading unit 401 according to described, and described upgrade file is write buffer.
In the specific implementation, the described read-write operation process of reading unit 401 and described r/w cell 402 promptly is the process that the upgrade file in the expansion card is read buffer.
The embodiment of the invention reads described upgrade file the buffer from expansion card, can effectively guarantee the normal operation of escalation process.
For clearer explanation the present invention, will the auto-update module 50 of equipment of the present invention be described in detail below.
See also Fig. 4, be the structural representation of first embodiment of the auto-update module of equipment of the present invention; Described auto-update module 50 comprises: read unit 501, r/w cell 502, upgrading mark setting unit 503, pointer modified unit 504, upgrading reading unit 505 and upgrading unit 506.The described unit 501 of reading is used for the upgrade file of described buffer is carried out read operation.Described r/w cell 502 is used for the read operation of reading unit 501 according to described, and described upgrade file is write specific memory section.Described upgrading mark setting unit 503 is used to the upgrade file in the described specific memory section that the upgrading sign is set.Described pointer modified unit 504 is used to revise vector pointer, makes described vector pointer point to the first address of described specific memory section.Described upgrading reading unit 505 is used to restart described equipment, and described upgrade file is read in the position that 504 amended described vector pointers point to from described pointer modified unit.Described upgrading unit 506 is used to move the upgrade file that described upgrading reading unit 505 reads.
In the specific implementation, the described read-write operation process of reading unit 501 and described r/w cell 502 promptly is the process that the upgrade file in the buffer is read specific memory section.Wherein, described specific memory section be described equipment in the storage area of its master cpu, be a part of storage area of described upgrade file specific assigned.
After described r/w cell 502 was written to specific memory section with the upgrade file in the buffer, described upgrading mark setting unit 503 was provided with the upgrading sign for the upgrade file in the described specific memory section, and wherein, described upgrading sign shows that this upgrade file needs upgrading.During equipment operation, when master cpu reads the upgrade file that carries the upgrading sign, then make equipment enter escalation process, described equipment is upgraded according to this upgrade file; When master cpu reads the upgrade file that does not carry the upgrading sign, then ignore this upgrade file, normally move original program.In the specific implementation, described upgrading mark setting unit 503 is made as " 1 " (or other numerals of non-" 0 ") with the upgrading zone bit of the upgrade file of described specific memory section, has then finished the setting to the upgrading sign of described upgrade file.When described equipment read this upgrade file of specific memory section, the upgrading zone bit of reading this upgrade file was " 1 ", judged that this upgrade file needs upgrading, then access arrangement escalation process.Be understandable that when described equipment read the upgrade file of specific memory section, the upgrading zone bit of reading this upgrade file was " 0 ", judge that this upgrade file upgraded, then ignore this upgrade file, no longer repeat to read.
When described equipment enters into escalation process according to the upgrading sign of the upgrade file of specific memory section, described pointer modified unit 504 needs to revise vector pointer, make described vector pointer point to the first address of described specific memory section, then when described equipment is restarted upgrading, described upgrading reading unit 505 begins to read file from the first address of described specific memory section, promptly may be read into the upgrade file of described specific memory section stored.
The upgrade file that the described upgrading unit 506 described upgrading reading unit 505 of operation reads has promptly been finished the firmware upgrade of equipment, and afterwards, described equipment then can move application program after the upgrading, new edition.
The embodiment of the invention can be finished the upgrading of self firmware by equipment, and simple to operate, practical.
See also Fig. 5, be the structural representation of second embodiment of the auto-update module of equipment of the present invention; Described auto-update module 50 comprises: read unit 501, r/w cell 502, upgrading mark setting unit 503, pointer modified unit 504, upgrading reading unit 505 and upgrading unit 506.In the present embodiment, alternatively, described auto-update module 50 also comprises: length acquiring unit 507, storage area computing unit 508, allocation units 509, verification and computing unit 510, comparing unit 511 and sign clearing cell 512.
Described length acquiring unit 507 is used for obtaining the length of the upgrade file of described buffer.Described storage area computing unit 508 is used for the length obtained according to described length acquiring unit 507, the storage area size that calculating need take.Described allocation units 509 are used for the storage area size that calculates according to described storage area computing unit 508, are that the upgrade file in the described buffer distributes specific memory section.Described verification and computing unit 510, be used to calculate the upgrade file in the described specific memory section verification and.Described comparing unit 511 is used for verification that more described verification and computing unit 510 calculate and the verification of the described upgrade file stored with described buffer and whether equating.Described sign clearing cell 512, be used for when described comparing unit 511 comparative results when being, remove the upgrading sign of the upgrade file in the described specific memory section; Or be used for when described comparing unit 511 comparative results for not the time, remove the sign of upgrading of the upgrade file in the described buffer, and notify the unit 501 of reading of described auto-update module 50 again the upgrade file in the described buffer to be carried out read operation.
The total length of the upgrade file that described storage area computing unit 508 obtains according to described length acquiring unit 507, calculate the storage area size of the described equipment that this upgrade file need take, promptly calculate the FLASH sector sum of the master cpu of the described equipment that this upgrade file need take.
If the master cpu of described equipment has sufficient idle FLASH sector in order to store described upgrade file, 509 of described allocation units directly mark off the total FLASH sector that equates, the FLASH sector that calculates with described storage area computing unit 508 from this idle FLASH sector, in order to store described upgrade file; If the master cpu of described equipment does not have sufficient idle FLASH sector, the FLASH sector sum that then described allocation units 509 calculate according to described storage area computing unit 508, wipe the data on the FLASH sector of storing data, look into sky FLASH space, mark off the sufficient described upgrade file of FLASH sector storage.
Verification and (checksum) be used for the verification purpose one group of data item and, in data processing and the data communication field, general by verification with check the data of processing whether correct.Usually, verification with do not transmit or communicate by letter, in the embodiment of the invention, when the upgrade file of buffer is read described specific memory section, the verification of the upgrade file in the buffer and can't be read described specific memory section simultaneously, it also is stored in the described buffer, therefore, the verification of the upgrade file in the described specific memory section and, calculate again with regard to described verification of needs and computing unit 510.Particularly, the verification of the upgrade file in 510 pairs of described specific memory section of described verification and computing unit and calculating and prior art similar, do not give unnecessary details at this.
Because the verification of the upgrade file in the buffer and still being stored in the buffer, described comparing unit 511, the verification of the described upgrade file of storing in the then more described buffer and the verification that calculates with described verification and computing unit 510 and whether equate.If described comparing unit 511 comparative results are for being, be the verification of the described upgrade file stored in the described buffer and the verification that calculates with described verification and computing unit 510 and equate, show that then the employed upgrade file of described escalation process is correct, upgrade successfully, at this moment, described sign clearing cell 512 is removed the upgrading sign of the upgrade file in the described specific memory section, read the upgrade file in the described specific memory section during operation next time of described equipment once more, then no longer repeat upgrading; If described comparing unit 511 comparative results are for denying, be the verification of the described upgrade file stored in the described buffer and the verification that calculates with described verification and computing unit 510 and do not wait, then show the employed upgrade file mistake of described escalation process, need upgrade again, at this moment, described sign clearing cell 512 is removed the sign of upgrading of the upgrade file in the described buffer, during operation next time of then described equipment, when reading the upgrade file in the described buffer once more, need again it to be read in the specific memory section to upgrade.Corresponding to the setting up procedure of the aforementioned upgrading sign and the sign of having upgraded, described sign clearing cell 512 is revised as " 0 " with the upgrading zone bit of the upgrade file in the described specific memory section, has then removed the upgrading sign in the described specific memory section; Described sign clearing cell 512 is revised as " 1 " with the upgrading zone bit of the upgrade file in the described buffer, has then removed the sign of upgrading in the described buffer.Be understandable that, described sign clearing cell 512 can with described upgraded the sign module 60 is set, described upgrading mark setting unit 503 is merged into same functional unit, the functional unit of this merging can be carried out setting and the modification to the upgrading zone bit, but similar analysis under this situation is not given unnecessary details at this.
The embodiment of the invention can be finished the upgrading of self firmware by equipment, and simple to operate, practical.
For clearer explanation the present invention, below will be to describing in detail by the performed equipment automatically updating method of described equipment of the present invention.
See also Fig. 6, be the process flow diagram of first embodiment of equipment automatically updating method of the present invention; Described method comprises: step S101 when having detected the expansion card insertion, travels through described expansion card.Step S102 judges whether comprise upgrade file in the described expansion card; If judged result is for being then to change step S103 over to; Otherwise, finish.Step S103, the described upgrade file of decoding.Step S104 reads described decoded upgrade file.Step S105 carries out the auto-update of equipment according to the described upgrade file that reads.
Expansion card includes but not limited to: various types of expansion cards such as SD card, CF card, SM card, mmc card.The equipment of the embodiment of the invention provides the expansion card interface, supports the expansion card function.When expansion card inserted the expansion card interface of equipment, described equipment can detect the insertion of expansion card, at this moment, described equipment execution in step S101, travel through described expansion card, particularly, the ergodic process of step S101 promptly is the included full content of the described expansion card of scanning.
Described equipment execution in step S102 is identical with the sequential of step S101, promptly when described equipment during at execution in step S101, whenever scan the content that a described expansion card comprises, it is while execution in step S102 also, judge whether this content is upgrade file, particularly, in step S102, described equipment can carry out the judgement of upgrade file according to file type, usually, the upgrade file of equipment firmware all has comparatively set form (hex form), and whether described equipment is upgrade file according to the expansion card content that file layout determining step S101 scans.Need to prove that in the embodiment of the invention, described upgrade file mainly is some upgrade files that are used for the firmware upgrade of equipment, includes but not limited to: upgrade file of the upgrade file of the error correction firmware of equipment, the audio frequency of equipment control firmware or the like.
When step S102 judges when comprising upgrade file in the described expansion card, described equipment is execution in step S103 then, described upgrade file is decoded, usually, upgrade file all has respective coding, the process of the cataloged procedure contrary of step S103 employing and described upgrade file is decoded to described upgrade file.Be understandable that if the upgrade file of described upgrade file for encrypting, step S103 also needs described upgrade file is decrypted, this decrypting process is a corresponding process with the ciphering process of described upgrade file.Concrete decode procedure and the prior art of step S103 are similar, do not give unnecessary details at this.
In the specific implementation, described equipment comprises buffer, and described equipment can pass through execution in step S104, and decoded upgrade file in the expansion card is read in the buffer of equipment.Because the upgrade file in the expansion card is used to the firmware upgrade of described equipment, needs the described upgrade file of complete application in the escalation process; Because the type of expansion card has a lot, different expansion cards may be different with the fitness of the expansion card interface of equipment, in the device upgrade process, expansion card may become flexible, cooperate with interface situations such as not tight, thereby cause device upgrade to be interrupted, influence upgrading effect, therefore, upgrade file in the expansion card need be moved and deposit to a relatively stable memory device, upgrade to offer described equipment.Buffer is packaged in the described equipment, and its structure is relatively stable, by step S104 described upgrade file is read the buffer from expansion card, can effectively guarantee the normal operation of device upgrade process.
After step S104 had read the upgrade file in the described expansion card in the internal buffer, described equipment then in step S105, according to the upgrade file in the described internal buffer, carried out the auto-update of equipment self firmware.
The embodiment of the invention is in having detected expansion card insertion equipment the time, judge and whether comprise upgrade file in the described expansion card, when in judging described expansion card, comprising upgrade file, upgrade file is decoded, and read the auto-update that this upgrade file carries out equipment; Employing can avoid large-scale equipment to recall based on the equipment auto-update scheme of expansion card, has saved cost.
See also Fig. 7, be the process flow diagram of second embodiment of equipment automatically updating method of the present invention; Described method comprises: step S201 when having detected the expansion card insertion, travels through described expansion card.Step S202 judges whether comprise upgrade file in the described expansion card; If judged result is for being then to change step S103 over to; Otherwise, finish.Step S203, the described upgrade file of decoding.Step S204 carries out read operation to described decoded upgrade file.Step S205 according to described read operation, writes buffer with described upgrade file.Step S206 obtains the length of the upgrade file in the described buffer.Step S207, according to the described length of obtaining, the storage area size that calculating need take.Step S208 is according to the described storage area size that calculates, for the upgrade file in the described buffer distributes specific memory section.Step S209 carries out read operation to the upgrade file in the described buffer.Step S210 according to described read operation, writes specific memory section with described upgrade file.Step S211 is the sign of having upgraded of the upgrade file setting in the described buffer.Step S212 is for the upgrade file in the described specific memory section is provided with the upgrading sign.Step S213 revises vector pointer, makes described vector pointer point to the first address of described specific memory section.Step S214 is restarted described equipment, reads described upgrade file from the position that described vector pointer points to.Step S215 moves the described upgrade file that reads.Step S216, calculate the upgrade file in the described specific memory section verification and; Step S217, the more described verification that calculates and with described buffer in the described upgrade file stored verification and whether equate; If comparative result is for being then to change step S218 over to; Otherwise, change step S219 over to.Step S218 removes the upgrading sign of the upgrade file in the described specific memory section.Step S219 if comparative result is then removed the sign of upgrading of the upgrade file in the described buffer for not, returns step S206.
In the present embodiment, step S201-S203 is identical with the S101-S103 step of a last embodiment, does not give unnecessary details at this.In addition, step S204-S205 is the concrete refinement step of the S104 of a last embodiment, and step S206-S219 is the concrete refinement step of the S105 of a last embodiment.
After described equipment execution in step S206 gets access to the total length of the upgrade file in the buffer, be execution in step S207, calculate the storage area size of the described equipment that this upgrade file need take, promptly need the FLASH sector sum of the master cpu of the described equipment that takies.
If master cpu has sufficient idle FLASH sector in order to store described upgrade file, described equipment then can directly mark off the FLASH sector that equates with the FLASH sector sum that calculates among the step S207 by step S208 from this idle FLASH sector, in order to store described upgrade file; If master cpu does not have sufficient idle FLASH sector, during described equipment execution in step S208, at first according to the FLASH sector sum that calculates among the step S207, wipe the data on the FLASH sector of storing data, look into sky FLASH space, and then divide the sufficient described upgrade file of FLASH sector storage.
The read-write operation process of step S209 and step S210 promptly is the process that described equipment reads the upgrade file in the buffer specific memory section.Wherein, described specific memory section be described equipment in the storage area of its master cpu, be a part of storage area of described upgrade file specific assigned.
After step S210 reads upgrade file in the buffer, in step S211, described equipment is the sign of having upgraded of the upgrade file setting in the described buffer, wherein, the described sign of having upgraded shows that this upgrade file upgrades, during this upgrade file in described equipment reads described buffer once more, then skip this upgrade file, need not to repeat again to read and upgrade.In the specific implementation, among the step S211, described equipment is made as " 0 " with the upgrading zone bit of described upgrade file, has then finished the setting to the sign of upgrading of described upgrade file.When described equipment read this upgrade file of buffer, the upgrading zone bit of reading this upgrade file was " 0 ", judged that this upgrade file upgraded, then ignored this upgrade file, no longer repeated to read.Be understandable that, when described equipment reads the upgrade file of buffer, the upgrading zone bit of reading this upgrade file is non-" 0 " (as: the upgrading zone bit is " 1 "), judges that this upgrade file needs upgrading, then reads this upgrade file of buffer and upgrades.
After the upgrade file in the buffer is written to specific memory section, described equipment execution in step S212, for the upgrade file in the described specific memory section is provided with the upgrading sign, wherein, described upgrading sign shows that this upgrade file needs upgrading.During equipment operation, when master cpu reads the upgrade file that carries the upgrading sign, then make equipment enter escalation process, described equipment is upgraded according to this upgrade file; When master cpu reads the upgrade file that does not carry the upgrading sign, ignore this upgrade file, normally move original program.Particularly, step S212, described equipment is made as " 1 " (or other numerals of non-" 0 ") with the upgrading zone bit of the upgrade file of described specific memory section, has then finished the setting to the upgrading sign of described upgrade file.When described equipment read this upgrade file of specific memory section, the upgrading zone bit of reading this upgrade file was " 1 ", judged that this upgrade file needs upgrading, then access arrangement escalation process.Be understandable that when described equipment read the upgrade file of specific memory section, the upgrading zone bit of reading this upgrade file was " 0 ", judge that this upgrade file upgraded, then ignore this upgrade file, no longer repeat to read.
When described equipment enters into escalation process according to the upgrading sign of the upgrade file of specific memory section, described equipment then needs execution in step S213, revise vector pointer, make described vector pointer point to the first address of described specific memory section, then in follow-up step S214, when described equipment is restarted when upgrading, begin to read file from the first address of described specific memory section, promptly may be read into the upgrade file of described specific memory section stored.Described then equipment execution in step S215 moves the described upgrade file that reads, and has promptly finished the firmware upgrade of equipment, and afterwards, described equipment then can move application program after the upgrading, new edition.
Verification and (checksum) be used for the verification purpose one group of data item and, in data processing and the data communication field, general by verification with check the data of processing whether correct.Usually, verification with do not transmit or communicate by letter, in the embodiment of the invention, when the upgrade file of buffer is read described specific memory section, the verification of the upgrade file of buffer and can't be read described specific memory section simultaneously, it also is stored in the described buffer, therefore, the verification of the upgrade file in the described specific memory section and, then need in step S216, recomputate.Particularly, among the step S216, described equipment to the verification of the upgrade file in the described specific memory section and calculating and prior art similar, do not give unnecessary details at this.
Because the verification of the upgrade file in the buffer and still being stored in the buffer, the then verification of the described upgrade file of storing in the more described buffer of step S217 and the verification that calculates with step S216 and whether equate; If comparative result is for being, show that then the employed upgrade file of described escalation process is correct, upgrade successfully, at this moment, enter step S218, remove the upgrading sign of the upgrade file in the described specific memory section, read the upgrade file in the described specific memory section during then described equipment operation next time once more, then no longer repeat upgrading.Corresponding to the setting up procedure of aforementioned upgrading sign, step S218 is revised as " 0 " with the upgrading zone bit of the upgrade file in the described specific memory section, has then removed the upgrading sign in the described specific memory section.If comparative result is for denying, then show the employed upgrade file mistake of described escalation process, need upgrade again, at this moment, enter step S219, remove the sign of upgrading of the upgrade file in the described buffer, read the upgrade file in the described buffer during operation next time of then described equipment once more, return step S206, obtain length again, calculate the storage area size that need take, distribute specific memory section, again it is read in the specific memory section then and upgrades.Corresponding to the setting up procedure of the aforementioned sign of having upgraded, step S219 is revised as " 1 " with the upgrading zone bit of the upgrade file in the described buffer, has then removed the sign of upgrading in the described buffer.
Need to prove that in the present embodiment, step S206-S208, step S216-S219 are the optional step of equipment automatically updating method, can also can carry out multistep simultaneously according to the arbitrary step in the execution of the actual conditions in the device upgrade process above-mentioned steps.
The embodiment of the invention can be finished the upgrading of self firmware by equipment, and simple to operate, practical, has promoted user experience.
Description by the foregoing description, the embodiment of the invention is in having detected expansion card insertion equipment the time, judge and whether comprise upgrade file in the described expansion card, when in judging described expansion card, comprising upgrade file, upgrade file is decoded, and read the auto-update that this upgrade file carries out equipment; Employing can avoid large-scale equipment to recall based on the equipment auto-update scheme of expansion card, has saved cost, has promoted user experience; In addition, employing is based on the equipment auto-update scheme of expansion card, avoided professional requirement to the personnel of on-the-spot burning, can directly insert the expansion card that comprises upgrade file by the user, can finish firmware upgrade automatically by equipment, it is simple to operate, upgrading is efficient, has both reduced cost, satisfied the demand of user again, made the user more convenient the use of equipment to device upgrade.
One of ordinary skill in the art will appreciate that all or part of flow process that realizes in the foregoing description method, be to instruct relevant hardware to finish by computer program, described program can be stored in the computer read/write memory medium, this program can comprise the flow process as the embodiment of above-mentioned each side method when carrying out.Wherein, described storage medium can be magnetic disc, CD, read-only storage memory body (Read-Only Memory, ROM) or at random store memory body (Random Access Memory, RAM) etc.
Above disclosed only is preferred embodiment of the present invention, certainly can not limit the present invention's interest field with this, one of ordinary skill in the art will appreciate that all or part of flow process that realizes the foregoing description, and, still belong to the scope that invention is contained according to the equivalent variations that claim of the present invention is done.

Claims (12)

1. an equipment automatically updating method is characterized in that, comprising:
When having detected the expansion card insertion, travel through described expansion card;
Judge and whether comprise upgrade file in the described expansion card;
If judged result is for being, the described upgrade file of then decoding, and read decoded upgrade file;
Carry out the auto-update of equipment according to the described upgrade file that reads.
2. the method for claim 1 is characterized in that, describedly reads decoded upgrade file, comprising:
Decoded upgrade file is carried out read operation;
According to described read operation, described upgrade file is write buffer.
3. method as claimed in claim 2 is characterized in that, the described upgrade file that described basis reads carries out the auto-update of equipment, comprising:
Upgrade file in the buffer is carried out read operation;
According to described read operation, described upgrade file is write specific memory section;
For the upgrade file in the described specific memory section is provided with the upgrading sign, and revise vector pointer, make described vector pointer point to the first address of described specific memory section;
Restart described equipment, read described upgrade file from the position that described vector pointer points to;
The described upgrade file that operation is read.
4. as right 3 described methods, it is characterized in that, described upgrade file in the buffer carried out also comprising before the read operation:
Obtain the length of the upgrade file in the described buffer;
According to the described length of obtaining, the storage area size that calculating need take;
According to the described storage area size that calculates, for the upgrade file in the described buffer distributes specific memory section.
5. method as claimed in claim 3 is characterized in that, and is described according to read operation, and described upgrade file is write after the specific memory section, also comprises:
Be the sign of having upgraded of the upgrade file setting in the described buffer.
6. method as claimed in claim 5 is characterized in that, after the described upgrade file that described operation is read, also comprises:
Calculate the upgrade file in the described specific memory section verification and;
The more described verification that calculates and with described buffer in the described upgrade file stored verification and whether equate;
If comparative result, is then removed the upgrading sign of the interior upgrade file of described specific memory section for being;
If comparative result is then removed the sign of upgrading of the upgrade file in the described buffer for not, again the upgrade file in the described buffer is carried out read operation.
7. an equipment is characterized in that, comprising:
Spider module is used for traveling through described expansion card when having detected the expansion card insertion;
Judge module is used for the traversing result according to described spider module, judges whether comprise upgrade file in the described expansion card;
Decoder module, be used for when described judge module judged result when being, the described upgrade file of decoding;
Read module is used to read the decoded upgrade file of described decoder module;
The auto-update module is used for carrying out according to the described upgrade file that described read module reads the auto-update of this equipment.
8. equipment as claimed in claim 7 is characterized in that, described read module comprises:
Read the unit, be used for the decoded upgrade file of described decoder module is carried out read operation;
R/w cell is used for the read operation of reading the unit according to described, and described upgrade file is write buffer.
9. equipment as claimed in claim 8 is characterized in that, described auto-update module comprises:
Read the unit, be used for the upgrade file of described buffer is carried out read operation;
R/w cell is used for the read operation of reading the unit according to described, and described upgrade file is write specific memory section;
The upgrading mark setting unit is used to the upgrade file in the described specific memory section that the upgrading sign is set;
The pointer modified unit is used to revise vector pointer, makes described vector pointer point to the first address of described specific memory section;
The upgrading reading unit is used to restart described equipment, and described upgrade file is read in the position that amended described vector pointer points to from described pointer modified unit;
The upgrading unit is used to move the upgrade file that described upgrading reading unit reads.
10. equipment as claimed in claim 9 is characterized in that, described auto-update module also comprises:
The length acquiring unit is used for obtaining the length of the upgrade file of described buffer;
The storage area computing unit is used for the length obtained according to described length acquiring unit, the storage area size that calculating need take;
Allocation units are used for the storage area size that calculates according to described storage area computing unit, are that the upgrade file in the described buffer distributes specific memory section.
11. equipment as claimed in claim 9 is characterized in that, also comprises:
The sign of having upgraded is provided with module, is used to upgrade file setting in the described buffer sign of having upgraded.
12. equipment as claimed in claim 11 is characterized in that, described auto-update module also comprises:
Verification and computing unit, be used to calculate the upgrade file in the described specific memory section verification and;
Comparing unit is used for verification that more described verification and computing unit calculate and the verification of the described upgrade file stored with described buffer and whether equating;
The sign clearing cell, be used for when described comparing unit comparative result when being, remove the upgrading sign of the interior upgrade file of described specific memory section; Or be used for when described comparing unit comparative result for not the time, remove the sign of upgrading of the upgrade file in the described buffer, and notify the unit of reading of described auto-update module again the upgrade file in the described buffer to be carried out read operation.
CN2010105734592A 2010-12-03 2010-12-03 Automatic upgrading method for equipment and equipment Pending CN102012830A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010105734592A CN102012830A (en) 2010-12-03 2010-12-03 Automatic upgrading method for equipment and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010105734592A CN102012830A (en) 2010-12-03 2010-12-03 Automatic upgrading method for equipment and equipment

Publications (1)

Publication Number Publication Date
CN102012830A true CN102012830A (en) 2011-04-13

Family

ID=43843006

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010105734592A Pending CN102012830A (en) 2010-12-03 2010-12-03 Automatic upgrading method for equipment and equipment

Country Status (1)

Country Link
CN (1) CN102012830A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103995723A (en) * 2014-05-26 2014-08-20 惠州华阳通用电子有限公司 IVI system firmware updating method and device based on mobile storage equipment
CN104881300A (en) * 2014-02-28 2015-09-02 北京谊安医疗系统股份有限公司 Upgrading method of control module of respirator
CN105632557A (en) * 2016-02-24 2016-06-01 惠州市蓝微电子有限公司 Electricity amount management IC burn upgrading method, device and system
CN107153555A (en) * 2017-03-23 2017-09-12 重庆蓝岸通讯技术有限公司 BIOS upgrade methods
CN109408097A (en) * 2018-12-11 2019-03-01 深圳市英威腾电气股份有限公司 A kind of firmware upgrade method, device, system and a kind of electronic equipment
CN110333891A (en) * 2019-07-08 2019-10-15 四川爱联科技有限公司 The method of enhanced OTA upgrading based on Internet of Things

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040019752A1 (en) * 2002-07-29 2004-01-29 Burton David Alan Method and system for upgrading drive firmware in a non-disruptive manner
CN1694070A (en) * 2005-06-29 2005-11-09 肖珂 Staging method of POS terminal equipment
CN1932779A (en) * 2006-09-20 2007-03-21 华为技术有限公司 Method and apparatus for updating data
CN101183312A (en) * 2007-12-12 2008-05-21 中兴通讯股份有限公司 Method for realizing version upgrade and backup of terminal by switch-in USB memory apparatus
CN101521730A (en) * 2009-03-30 2009-09-02 四川长虹电器股份有限公司 Method, system and television for automatically upgrading television
CN101901154A (en) * 2010-07-16 2010-12-01 天津七一二通信广播有限公司 Method for realizing upgrade and maintenance of equipment programs based on USB Host and U disc

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040019752A1 (en) * 2002-07-29 2004-01-29 Burton David Alan Method and system for upgrading drive firmware in a non-disruptive manner
CN1694070A (en) * 2005-06-29 2005-11-09 肖珂 Staging method of POS terminal equipment
CN1932779A (en) * 2006-09-20 2007-03-21 华为技术有限公司 Method and apparatus for updating data
CN101183312A (en) * 2007-12-12 2008-05-21 中兴通讯股份有限公司 Method for realizing version upgrade and backup of terminal by switch-in USB memory apparatus
CN101521730A (en) * 2009-03-30 2009-09-02 四川长虹电器股份有限公司 Method, system and television for automatically upgrading television
CN101901154A (en) * 2010-07-16 2010-12-01 天津七一二通信广播有限公司 Method for realizing upgrade and maintenance of equipment programs based on USB Host and U disc

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104881300A (en) * 2014-02-28 2015-09-02 北京谊安医疗系统股份有限公司 Upgrading method of control module of respirator
CN103995723A (en) * 2014-05-26 2014-08-20 惠州华阳通用电子有限公司 IVI system firmware updating method and device based on mobile storage equipment
CN103995723B (en) * 2014-05-26 2018-08-03 惠州华阳通用电子有限公司 A kind of method and apparatus upgrading IVI system firmwares based on movable storage device
CN105632557A (en) * 2016-02-24 2016-06-01 惠州市蓝微电子有限公司 Electricity amount management IC burn upgrading method, device and system
CN105632557B (en) * 2016-02-24 2020-03-17 惠州市蓝微电子有限公司 Burning upgrading method, device and system for electric quantity management IC
CN107153555A (en) * 2017-03-23 2017-09-12 重庆蓝岸通讯技术有限公司 BIOS upgrade methods
CN109408097A (en) * 2018-12-11 2019-03-01 深圳市英威腾电气股份有限公司 A kind of firmware upgrade method, device, system and a kind of electronic equipment
CN110333891A (en) * 2019-07-08 2019-10-15 四川爱联科技有限公司 The method of enhanced OTA upgrading based on Internet of Things

Similar Documents

Publication Publication Date Title
CN102096639B (en) Method for trimming data on non-volatile flash media
CN102012830A (en) Automatic upgrading method for equipment and equipment
CN103473067B (en) Built-in Linux subregion and data restoration method, system and system development method
US20080195833A1 (en) Systems, methods and computer program products for operating a data processing system in which a file system's unit of memory allocation is coordinated with a storage system's read/write operation unit
US20130117507A1 (en) Memory storage apparatus, memory controller, and method for transmitting and identifying data stream
CN105335181A (en) OTA upgrade realization method and terminal
CN101627373A (en) Memory device performance enhancement through pre-erase mechanism
KR20100126446A (en) Extended utilization area for a memory device
KR101555210B1 (en) Apparatus and method for downloadin contents using movinand in portable terminal
CN105446772A (en) System upgrading method and apparatus
CN109697170B (en) Method for accessing flash memory module, related flash memory controller and electronic device
CN109542495A (en) A kind of method for upgrading software and device
KR20140093505A (en) Method and apparatus for extending memory in terminal
JP2017527877A (en) Method and apparatus for reading / writing data from / to flash memory and user equipment
CN103714105A (en) Method and devices for updating a database of a navigation device
CN105988875B (en) Method and device for running process
US8161228B2 (en) Apparatus and method for optimized NAND flash memory management for devices with limited resources
CN108694052B (en) Firmware upgrading method, firmware upgrading device and firmware upgrading system
CN103229150A (en) Data control method and system
US9996296B2 (en) Electronic control unit and method for rewriting data
CN106933499B (en) Method and device for improving performance of MLC flash memory system
CN103761060A (en) Data processing method and server
CN103389941B (en) Storer formatting method, Memory Controller and memory storage apparatus
CN102760063A (en) File loading method and device
CN110704091A (en) Firmware upgrading method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
AD01 Patent right deemed abandoned

Effective date of abandoning: 20110413

C20 Patent right or utility model deemed to be abandoned or is abandoned