CN101727361B - Method for storing edition of terminal product and system - Google Patents

Method for storing edition of terminal product and system Download PDF

Info

Publication number
CN101727361B
CN101727361B CN2009101885073A CN200910188507A CN101727361B CN 101727361 B CN101727361 B CN 101727361B CN 2009101885073 A CN2009101885073 A CN 2009101885073A CN 200910188507 A CN200910188507 A CN 200910188507A CN 101727361 B CN101727361 B CN 101727361B
Authority
CN
China
Prior art keywords
programming
version
nandflash
program
ecc
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
CN2009101885073A
Other languages
Chinese (zh)
Other versions
CN101727361A (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN2009101885073A priority Critical patent/CN101727361B/en
Publication of CN101727361A publication Critical patent/CN101727361A/en
Application granted granted Critical
Publication of CN101727361B publication Critical patent/CN101727361B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses a method for storing the edition of a product, belonging to the field of a communication technology product. The method comprises the steps of: taking the assembly of the nandflash and the other nonvolatile memory medium as a memory medium of the product, and deciding the memory positions of the boot and the edition according to the special condition of the product; and defining the memory position of the file according to the type of an updated file when updating the edition of system software. The invention uses the nandflash, so that the cost of a unit bit is lower than that of the unit bit of the other flash which is currently and morally used, thereby reducing the cost of the product. As for the usability of the product, the product uses two memory mediums to respectively memorize the boot and the edition, so that the nonvolatile memory medium can be supported to be directly started to memorize the boot, and the nandflash can be started to memorize the edition. Furthermore, the faster writing and the wiping speed of the nandflash can improve the updating speed of the edition.

Description

A kind of method and system of edition of terminal product storage
Technical field
The present invention relates to the communication technology products field, relate in particular to the storage of product version.
Background technology
Present various embedded device, its software version of communication facilities are generally held among the non-volatile flash memory storer Flash, generally all are that employing or non-flash memory Norflash perhaps are used as its storage medium with non-flash memory Nandflash.But Norflash and Nandflash are technical respectively to have superiority:
On readwrite performance, the read rate of Norflash is faster than Nandflash, and the write/erase speed of Nandflash is then fast than Norflash;
On the capacity cost, the unit size of Nandflash almost is the half the of Norflash, and promptly Nandflash has higher capacity and lower cost than Norflash;
On interface, the addressing of Norflash is simpler, can be implemented in the chip to carry out;
Aspect reliability, Norflash not bad piece handles problems, and the bad piece of Nandflash is a stochastic distribution, need handle it;
On software is supported, the Norflash device without any need for the software support, the Nandflash device then needs driver usually.
Along with the consumer is increasingly high for the functional requirement of end product, demand is more and more, and the version of end product is constantly increasing, and certainly will need to enlarge the memory capacity of storage of versions medium like this, thereby improves the cost of product.And the best object that Nandflash reduces cost beyond doubt, but its bad piece that must handle becomes a big bottleneck, and be not that all CPU have the Nandflash controller.
Summary of the invention
The objective of the invention is to propose a kind of method and system of edition of terminal product storage.
The present invention has adopted following technical scheme:
A kind of method of edition of terminal product storage comprises:
Steps A, product version is set is Boot program and version program, and said Boot program is used for the bootstrap version program;
Step B, the non-volatile memory medium of selecting products C PU support to start utilize fever writes that said Boot program burn writing is arrived this storage medium;
Step C, the said version program of programming to non flash memory device Nandflash in.
In one embodiment, this method also comprises the upgrading processing process to product version: the ROMPaq programming of said Boot program is arrived Nandflash to said storage medium and/or with the ROMPaq programming of said version program.
Said method also comprises:
Step D, when products C PU powers on, the Boot program start from programming to said storage medium removes to guide the version program among the said Nandflash by this Boot program.
Said step D specifically comprises:
After step D1, the startup, by the version program on the Boot program search Nandflash;
Step D2, by the version program on the Boot program designation Nandflash.
Among a kind of embodiment, said step C is that block-by-block carries out and walks around bad piece during to Nandflash at the said version program of programming.
Among a kind of embodiment, said step C also comprises: utilize error correction algorithm ECC that programming is carried out the ECC verification to the version program of Nandflash, deposit check results to Nandflash.
Among a kind of embodiment; Said step D1 also comprises: utilize said ECC checking algorithm that the version program that searches is carried out the ECC verification; The check results that its check results and Nandflash are had compares, through judging whether the bit reversal phenomenon has taken place checks whether said ECC verification is passed through:
If the ECC verification is passed through, then continue step D2;
If the ECC verification is not passed through, then utilize said ECC checking algorithm that the version program that searches is carried out the position and correct, continue step D2 then.
The present invention also provides a kind of system of edition of terminal product storage, comprising: the programming unit, and the Boot program that is used for the programming product is to non-volatile memory medium, and the programming version program is to Nandflash.
Among a kind of embodiment, said programming unit also comprises upgrading programming unit, is used for the ROMPaq of programming Boot program and/or the ROMPaq of version program; If the Boot program has ROMPaq, then its ROMPaq of programming is to said storage medium; If version program has ROMPaq, then its ROMPaq of programming is to said Nandflash.
Said system also comprises: the start-up loading unit, the CPU that is used for product starts programming guides Nandflash to the Boot program of storage medium version program when powering up.
Among a kind of embodiment, said programming unit also comprises: the original checksums unit is used for carrying out the ECC verification to the version program block-by-block and when walking around bad piece programming, and check results is stored in Nandflash
In one embodiment, said start-up loading unit comprises that also version verification unit and contrast correct the unit; The version verification unit is used for the programming that searches after starting is carried out the ECC verification to the version program of Nandflash; The unit is corrected in contrast, is used for the check results of original checksums unit and the check results of version verification unit are carried out ECC relatively, if ECC does not more pass through, then utilizes said ECC checking algorithm to carry out the position and corrects.
Beneficial effect of the present invention is: the present invention supports CPU not have the product of Nandflash controller, does not limit the type selecting of CPU; Use the storage medium that is fit to the Boot program start to store the Boot program, and use the Nandflash storage medium to come storage version, can in the normal use that does not influence the user, reduce cost of products; In addition, the present invention also handles the bad piece of Nandflash through the ECC algorithm, has guaranteed reliability of system operation.
Description of drawings
Fig. 1 is the schematic flow sheet of first kind of embodiment of the inventive method;
Fig. 2 is the schematic flow sheet of second kind of embodiment of the inventive method;
Fig. 3 is the concrete operations process flow diagram of the third embodiment of the inventive method;
Fig. 4 is the logical organization synoptic diagram of system embodiment of the present invention.
Embodiment
Combine accompanying drawing that the present invention is done further explain through embodiment below.
Method flow diagram of the present invention is as shown in Figure 1, comprises step:
A1: difference programming Boot program and version program.
Before the programming Boot program, need select for use the CPU of product when powering on, can support the direct storage medium that is used as the Boot program from the non-volatile memory medium of its startup according to the size of Boot.In the clean non-volatile memory medium of then the Boot program burn writing having been chosen to this; Version then is that programming is in Nandflash.Said non-volatile memory medium can be Nandflash, also can be the storage medium of other type.
The upgrading of product support Boot program and version program.In the programming process, if the Boot program has ROMPaq, then with its ROMPaq still programming in above-mentioned non-volatile memory medium; If version program has ROMPaq, then version program is begun programming from the Nandflash assigned address.
A2: system is from Boot program start and load application version program.
After programming finished, system restarted, and the CPU of product is the Boot program start from be in non-volatile memory medium directly, then by the version program on the Boot program search Nandflash.After searching version program, can directly come the kernel in the bootstrap version program by the Boot program, if kernel through overcompression, then need decompress to kernel in internal memory, and the file system in the load application version program.
Method flow diagram by the invention described above can find out that the present invention still can use the storage medium of Nandflash as version when the CPU of product does not have the Nandflash controller, does not limit the type selecting of CPU like this, can reduce cost of products simultaneously.In addition, end product can be according to the needs of oneself, and the extra information of storage on Nandflash is like journal file.
In order to guarantee the product systems reliability of operation, the invention allows for another kind of specific embodiment, through the ECC algorithm the bad piece of Nandflash is handled, its method flow synoptic diagram, as shown in Figure 2.
B1, programming Boot program are to storage medium.
The same with A1, before programming, need select the non-volatile memory medium of suitable Boot program for use, and products C PU supports to start from this storage medium.
B2, programming version program carry out the ECC verification of error correction algorithm to version program during to Nandflash and check results are deposited into Nandflash.
The programming version program is that block-by-block carries out to Nandflash.Nandflash just has the existence of bad piece when dispatching from the factory, and the mark of bad piece is all arranged, and therefore, in the programming process, the marker bit of bad piece is checked, to judge whether being bad piece.If it is bad piece that inspection is found, then this piece is not carried out write operation, because bit reversal may take place Nandflash; In the programming version program; Utilize error correction algorithm (ECC) algorithm, version program is carried out the ECC verification, and check results is deposited into Nandflash.
B3, the system Boot program start from storage medium, the version on the Boot program search Nandflash.
After edition programming finished, system restarted, and CPU is the Boot program start from the programming to the storage medium directly, then by the version program on the Boot program removal search Nandflash.
B4, the version program that searches is carried out ECC verification and relatively, if through then version being carried out position correction.
To the version program that searches, same ECC checking algorithm when utilizing with the programming version program carries out the ECC verification to version program, and the ECC check results that is produced during with this result and programming version program compares, and judges whether to have taken place the bit reversal phenomenon.If the ECC verification is correct, direct execution in step B5 so just; If the bit reversal phenomenon has taken place, then just need utilize the ECC checking algorithm to carry out the position and correct, and then execution in step B5.
B5, startup kernel loads file system.
Come the kernel in the bootstrap version program by Boot, if kernel through overcompression, then need decompress to kernel at internal memory, and the file system in the load application version program.
Fig. 3 is the operational flowchart of the third specific embodiment of the inventive method; It is with based on linux operating system; The CPU of product does not support directly to start but support directly to start from Norflash from Nandflash to be example, has specified the operating process of this product version program upgrade and startup method.This flow process comprises the steps:
1.CPU support directly to start, utilize the fever writes of supporting this Norflash toward a complete clean Norflash programming Boot program from non-volatile memory medium Norflash;
2. the upgrading of product support Boot program and version program.If the Boot program has ROMPaq, then with its ROMPaq still programming on Norflash; If version program has ROMPaq, then its ROMPaq is begun programming from the Nandflash assigned address; In the programming version program, utilize error correction algorithm (ECC) algorithm, version is carried out the ECC verification, and check results is deposited into Nandflash.
3. the version program programming finishes, and system restarts, and CPU directly starts from Norflash;
4. by the version program on the Boot program removal search Nandflash on the Norflash;
5. search after the version program; Same ECC checking algorithm when utilizing with the programming version program; Version program is carried out the ECC verification, and the ECC check results that is produced during with this result and programming version program compares, judge whether to have taken place the bit reversal phenomenon.
6., then just need utilize the ECC checking algorithm to carry out the position and correct if the bit reversal phenomenon has taken place.
7. if after the correct perhaps version of ECC verification is corrected through the position, directly come the kernel in the bootstrap version program by Boot, if kernel through overcompression, then need decompress to kernel at internal memory, and the file system in the load application version program.Directly guide kernel by Boot then, go to the load document system by kernel again.
The present invention also provides a kind of system of edition of terminal product storage except said method is provided, its system logic structure synoptic diagram is as shown in Figure 4.System comprises programming unit, start-up loading unit:
In the programming unit, the non-volatile memory medium that the guiding Boot programming of product is supported to suitable Boot size and CPU is designated as to the Boot of said storage medium programming and stores Boot, with edition programming in Nandflash;
After programming Boot and version finished, the start-up loading unit started from storage Boot, and by the version on the storage Boot search Nandflash.
In system embodiment of the present invention, the programming unit comprises upgrading programming unit and original checksums unit, and the start-up loading unit comprises version verification unit and contrast correction unit.
Upgrading programming unit is used for the ROMPaq of programming Boot program and/or the ROMPaq of version program; If the Boot program has ROMPaq, then its ROMPaq of programming is to said storage medium; If version program has ROMPaq, then its ROMPaq of programming is to said Nandflash.
The original checksums unit utilizes error correction algorithm ECC that version is carried out the ECC verification, and check results is stored among the Nandflash the version of programming to Nandflash, and said check results is designated as the original checksums result;
To the version on the Nandflash that searches, the version verification unit is carried out same ECC verification to this version, and writing down this check results is actual check results; Contrast is corrected the unit original checksums result and actual check results is carried out ECC relatively, if ECC does not more pass through, then utilizes the ECC algorithm that version is carried out the position and corrects.
After correction back, version position or version ECC relatively pass through, by the version on the storage Boot guiding Nandflash.
Above content is to combine concrete embodiment to the further explain that the present invention did, and can not assert that practical implementation of the present invention is confined to these explanations.For the those of ordinary skill of technical field according to the invention, under the prerequisite that does not break away from the present invention's design, can also make some simple deduction or replace, all should be regarded as belonging to protection scope of the present invention.

Claims (11)

1. the method for an edition of terminal product storage is characterized in that, comprising:
Steps A, product version is set is Boot program and version program, and said Boot program is used for the bootstrap version program;
Step B, the non-volatile memory medium of selecting products C PU support to start utilize fever writes that said Boot program burn writing is arrived this storage medium;
Step C, the said version program of programming to non flash memory device Nandflash in, the said version program of programming is that block-by-block carries out and walks around bad piece during to said Nandflash, and is specific as follows: when the block-by-block programming; Whenever write before the piece; Earlier judge whether this piece has bad piece mark, if any, then do not write at this piece; Continue to judge by above-mentioned deterministic process whether piece is bad piece, and when judging that corresponding piece is not bad piece, it is write.
2. the method for claim 1 is characterized in that, also comprises the upgrading processing process to product version: the ROMPaq programming of said Boot program is arrived Nandflash to said storage medium and/or with the ROMPaq programming of said version program.
3. according to claim 1 or claim 2 method is characterized in that, also comprises:
Step D, when products C PU powers on, the Boot program start from programming to said storage medium removes to guide the version program among the said Nandflash by this Boot program.
4. method as claimed in claim 3 is characterized in that, said step D specifically comprises:
After step D1, the startup, by the version program on the said Nandflash of Boot program search;
Step D2, by the version program on the said Nandflash of Boot program designation.
5. method as claimed in claim 4 is characterized in that, said step C also comprises:
Utilize error correction algorithm ECC that programming is carried out the ECC verification to the version program of said Nandflash, deposit check results to said Nandflash.
6. method as claimed in claim 5 is characterized in that, said step D1 also comprises:
Utilize said ECC checking algorithm that the version program that searches is carried out the ECC verification, the check results that its check results and said Nandflash are had compares, through judging whether that the bit reversal phenomenon has taken place checks whether said ECC verification is passed through;
If the ECC verification is passed through, then continue step D2;
If the ECC verification is not passed through, then utilize said ECC checking algorithm that the version program that searches is carried out the position and correct, continue step D2 then.
7. the system of an edition of terminal product storage is characterized in that, comprising:
The unit is set: being used to be provided with product version is Boot program and version program, and said Boot program is used for the bootstrap version program;
Select processing unit: be used to select products C PU to support the non-volatile memory medium that starts, utilize fever writes that said Boot program burn writing is arrived this storage medium;
The programming unit, the Boot program that is used for the programming product is to non-volatile memory medium, and the programming version program is to Nandflash; The programming version program is that block-by-block carries out and walks around bad piece during to Nandflash, and is specific as follows: as when the block-by-block programming, whenever to write before the piece; Earlier judge whether this piece has bad piece mark, if any, then do not write at this piece; Continue to judge by above-mentioned deterministic process whether piece is bad piece, and when judging that corresponding piece is not bad piece, it is write.
8. system as claimed in claim 7 is characterized in that, said programming unit also comprises upgrading programming unit, is used for the ROMPaq of programming Boot program and/or the ROMPaq of version program; If the Boot program has ROMPaq, then its ROMPaq of programming is to said storage medium; If version program has ROMPaq, then its ROMPaq of programming is to said Nandflash.
9. like claim 7 or 8 described systems, it is characterized in that, also comprise:
The start-up loading unit, the CPU that is used for product starts programming guides Nandflash to the Boot program of storage medium version program when powering up.
10. system as claimed in claim 9 is characterized in that, said programming unit also comprises:
The original checksums unit is used for carrying out the ECC verification to the version program block-by-block and when walking around bad piece programming, and check results is stored in Nandflash.
11. system as claimed in claim 10 is characterized in that, also comprises:
Said start-up loading unit comprises that also version verification unit and contrast correct the unit, and the version verification unit is used for the programming that searches after the starting version program to Nandflash is carried out the ECC verification and obtains check results;
The unit is corrected in contrast, is used for the check results of original checksums unit and the check results of version verification unit are carried out ECC relatively, if ECC does not more pass through, then utilizes said ECC checking algorithm to carry out the position and corrects.
CN2009101885073A 2009-11-30 2009-11-30 Method for storing edition of terminal product and system Active CN101727361B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009101885073A CN101727361B (en) 2009-11-30 2009-11-30 Method for storing edition of terminal product and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009101885073A CN101727361B (en) 2009-11-30 2009-11-30 Method for storing edition of terminal product and system

Publications (2)

Publication Number Publication Date
CN101727361A CN101727361A (en) 2010-06-09
CN101727361B true CN101727361B (en) 2012-07-04

Family

ID=42448286

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009101885073A Active CN101727361B (en) 2009-11-30 2009-11-30 Method for storing edition of terminal product and system

Country Status (1)

Country Link
CN (1) CN101727361B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101916216B (en) * 2010-09-08 2012-11-07 神州数码网络(北京)有限公司 Device and control method for automatically repairing BOOTROM in embedded operating system
CN102184109B (en) * 2011-04-12 2014-07-09 杭州华三通信技术有限公司 Boot software automatic updating control method and device
CN103873818A (en) * 2012-12-13 2014-06-18 北京计算机技术及应用研究所 General subsystem of intelligent monitor camera and intelligent processing method thereof
CN103150184B (en) * 2013-03-12 2016-11-09 青岛中星微电子有限公司 A kind of method and system chip that flash memory is operated
CN103473098A (en) * 2013-09-10 2013-12-25 华为技术有限公司 Starting method of boot program and relevant device
CN105320901B (en) * 2015-03-25 2018-05-18 北京国睿中数科技股份有限公司 Support the execution method of the startup firmware of a variety of flash memory encryption storages

Also Published As

Publication number Publication date
CN101727361A (en) 2010-06-09

Similar Documents

Publication Publication Date Title
KR101110490B1 (en) Information processing device, processor and memory management method
CN101727361B (en) Method for storing edition of terminal product and system
US8589730B2 (en) Handling errors during device bootup from a non-volatile memory
JP5996838B2 (en) Nonvolatile memory for storing memory remapping information
TWI470426B (en) Memory management device and memory management method
JP5702348B2 (en) Handling abnormal shutdown of systems with non-volatile memory
CN103164342B (en) Coordinate during the carry of availability of data
CN101551780B (en) Television and data storage method and device thereof
US20130219106A1 (en) Trim token journaling
CN102460384A (en) Program, control method, and control device
US20110231595A1 (en) Systems and methods for handling hibernation data
CN108108261B (en) Data storage device and operation method thereof
US7925821B2 (en) Nonvolatile semiconductor storage device and method of managing the same
CN103164346A (en) Lba bitmap usage
CN102855193A (en) Mount-time unmapping of unused logical addresses in non-volatile memory systems
JP2005215824A (en) Semiconductor device and its start processing method
US20040193864A1 (en) System and method for actively booting a computer system
KR20100133710A (en) Memory system and code data loading method therof
US20220066527A1 (en) Storage device and method for sudden power off recovery thereof
CN102184117A (en) Method and device for starting system on different Nandflash
CN102799497A (en) Data recovery system and method for non-volatile random access memory (NVRAM)
CN102637461A (en) Start method supporting bad block flash memory scanning
JP2011242833A (en) Memory controller, flash memory system provided with memory controller and control method of flash memory
JP5166211B2 (en) Device using non-volatile memory as main memory
JP2008117299A (en) Storage medium control apparatus

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