CN103412779A - Patch file system implementation method of embedded real-time operating system - Google Patents
Patch file system implementation method of embedded real-time operating system Download PDFInfo
- Publication number
- CN103412779A CN103412779A CN201310351780XA CN201310351780A CN103412779A CN 103412779 A CN103412779 A CN 103412779A CN 201310351780X A CN201310351780X A CN 201310351780XA CN 201310351780 A CN201310351780 A CN 201310351780A CN 103412779 A CN103412779 A CN 103412779A
- Authority
- CN
- China
- Prior art keywords
- patch
- patch file
- space
- file
- time operating
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Abstract
The invention discloses a patch file system implementation method of an embedded real-time operating system. The method comprises the following steps of S10, creating a patch system table, a patch set table and a patch information table; S11, selecting base address for storing a patch file; S12, distributing a page space number according to the size of the patch file; S13, checking the position information of the page space after page space number distribution is finished; S14, writing the patch file in a distributed space; S15, updating the patch set table of a module corresponding to the patch after the patch file is written in the distributed space. According to the patch file system implementation method of the embedded real-time operating system, the storage and reading of the a patch file can be competed rapidly through the patch file system of the embedded real-time operating system, wherein the space is distributed to the patch file according to the size of the page, and waste of storage space can be reduced substantially; block erase is performed as needed, the erase number of times of a NandFlash memory can be reduced to the maximum, and the service life can be prolonged.
Description
Technical field
The invention belongs to and relate to field of embedded technology, relate to a kind of patch file network system realization of embedded real-time operating system.
Background technology
In embedded real-time operating system, if need, realize dynamically updating function, will relate to the Design and implementation of patch file system.Present embedded board exterior storage major part is to adopt Nand Flash.Nand Flash has so characteristics, and the least unit of writing data is page (page, 2KB), and the least unit of obliterated data is piece (piece generally is comprised of 64 pages for block, 128KB).
Traditional patch file system, in order before writing the patch data, conveniently to realize emptying of storage space, is deposited single patch file with a piece, and this has caused the waste of Flash storage space greatly.
Secondly, Nand Flash piece erasing times is restricted, and surpassing maximum erasing times will scrap, and traditional patch file system relates to erase block frequently, and this will bring serious loss to system.
In addition, all patch files, according to writing the storage of Nand Flash time sequencing, when needs are used a certain patch, need the whole patch system table of traversal, cause time complexity high.
Defect for above-mentioned prior art exists, be necessary to develop research in fact, so that a kind of scheme to be provided, overcomes the shortcoming that traditional patch file system space expense is large, system loss is large and time complexity is high.
Summary of the invention
For addressing the above problem, the object of the present invention is to provide a kind of patch file network system realization of embedded real-time operating system, can complete fast depositing and read operation of patch file, significantly reduced the waste of storage space, and maximize the erasing times that reduces Nand Flash, increase the service life.
For achieving the above object, technical scheme of the present invention is:
A kind of patch file network system realization of embedded real-time operating system, comprise the steps:
S10: set up the patch system table according to the refreshable module number, and set up patch set table according to the maximum patch release numbers of each module, set up the patch information table;
S11: choose patch file and deposit base address;
S12: divide the Spatial of gathering leaves of a book according to the size of patch file;
S13: after the Spatial of minute gathering leaves of a book completes, check the positional information in page space;
S14: write patch file in the space of distributing;
S15: after writing patch file, upgrade the patch set table of this patch respective modules.
Further, in step S11, described patch file is deposited the start address that base address is a piece of Nand Flash.
Further, in step S12, described page Spatial is for depositing the minimum number of pages of patch file.
Further, in step S13, if newly assigned page space does not now need to wipe next piece all at current block; If newly assigned page space has in the space, front and back, now need to wipe next piece; If newly assigned page space, all at next piece, now needs to wipe next piece.
Further, when needs are used certain version patch, at first by the patch system table, navigate to fast the patch set table of this patch respective modules, then according to patch set table, navigate to fast the patch information table of this version patch, then by the patch information table, get this version patch and deposit first address in Nand Flash, finally call read operation and read this patch file
Compared to prior art, the patch file network system realization of a kind of embedded real-time operating system of the present invention can complete depositing and read operation of patch file fast by above-mentioned embedded real-time operating system patch file system; Wherein, patch file, by the big or small allocation space of page, has significantly reduced the waste of storage space; And carry out as required piece and wipe, maximize the erasing times that reduces Nand Flash, increase the service life.
The accompanying drawing explanation
Fig. 1 is flow process diagram of the present invention.
Fig. 2 is that the page space of distribution of the present invention is all at the schematic diagram of current block.
Fig. 3 is the schematic diagram that former and later two pieces of page space of distribution of the present invention have.
Fig. 4 is that the page space of distribution of the present invention is all at the schematic diagram of a rear piece.
Embodiment
In order to make purpose of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
As shown in Figure 1, the patch file network system realization of a kind of embedded real-time operating system of the present invention, comprise the steps:
S10: set up the patch system table according to the refreshable module number, and set up patch set table according to the maximum patch release numbers of each module, set up the patch information table;
S11: choose patch file and deposit base address, wherein, this address is the start address of a piece of Nand Flash;
S12: according to the size of patch file, distribute the page Spatial of Nand Flash, this page Spatial is for depositing the minimum number of pages of patch file;
S13: after the Spatial of minute gathering leaves of a book completes, check the positional information in page space; Wherein, when newly assigned page space, all at current block, now do not need to wipe next piece; If newly assigned page space has in the space, front and back, now need to wipe next piece; If newly assigned page space, all at next piece, now needs to wipe next piece;
S14: write patch file in the Nand Flash space of distributing;
S15: after writing patch file, upgrade the patch set table of this patch respective modules.
When needs are used certain version patch, at first by the patch system table, navigate to fast the patch set table of this patch respective modules, then according to patch set table, navigate to fast the patch information table of this version patch, then by the patch information table, get this version patch and deposit first address in Nand Flash, finally call read operation and read this patch file.
As one embodiment of the invention, as shown in table 1, according to the refreshable module number, set up the patch system table, include refreshable module numbering and this module patch set table.
As shown in table 2, according to the maximum patch release numbers of each module, set up patch set table, include patch release number and this version patch information.
As shown in table 3, set up the patch information table, comprise the implication of field and this field.
Choose patch file and deposit the start address that ,Gai address, base address is necessary for a piece.When needs are deposited patch file, according to the size of patch file, distribute the page Spatial of Nand Flash, this page Spatial is for depositing the minimum number of pages of patch file.Such as when patch file is 3.5KB, just need to distribute 2 page spaces.After having assigned, check the positional information in page space, wherein, minute following three kinds of situations: as shown in Figure 2, newly assigned page space, all at current block, does not now need to wipe next piece; As shown in Figure 3, newly assigned page space has in the space, front and back, now needs to wipe next piece; As shown in Figure 4, newly assigned page space, all at next piece, now needs to wipe next piece.
In the Nand Flash space of distributing, write patch file, after writing the patch file data, need to upgrade the patch set table of this patch respective modules.If need, use certain version patch, at first the patch system table navigates to the patch set table of this patch respective modules fast, then according to patch set table, navigate to fast the patch information table of this version patch, then by the patch information table, get this version patch and deposit first address in Nand Flash, finally call read operation and read this patch file.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, all any modifications of doing within the spirit and principles in the present invention, be equal to and replace and improvement etc., within all should being included in protection scope of the present invention.
Claims (5)
1. the patch file network system realization of an embedded real-time operating system, is characterized in that, comprises the steps:
S10: set up the patch system table according to the refreshable module number, and set up patch set table according to the maximum patch release numbers of each module, set up the patch information table;
S11: choose patch file and deposit base address;
S12: divide the Spatial of gathering leaves of a book according to the size of patch file;
S13: after the Spatial of minute gathering leaves of a book completes, check the positional information in page space;
S14: write patch file in the space of distributing;
S15: after writing patch file, upgrade the patch set table of this patch respective modules.
2. the patch file network system realization of embedded real-time operating system as claimed in claim 1, it is characterized in that: in step S11, described patch file is deposited the start address that base address is a piece of Nand Flash.
3. the patch file network system realization of embedded real-time operating system as claimed in claim 2, it is characterized in that: in step S12, described page Spatial is for depositing the minimum number of pages of patch file.
4. the patch file network system realization of embedded real-time operating system as claimed in claim 3, is characterized in that: in step S13, if newly assigned page space does not now need to wipe next piece all at current block; If newly assigned page space has in the space, front and back, now need to wipe next piece; If newly assigned page space, all at next piece, now needs to wipe next piece.
5. the patch file network system realization of embedded real-time operating system as claimed in claim 4, it is characterized in that: when needs are used certain version patch, at first by the patch system table, navigate to fast the patch set table of this patch respective modules, then according to patch set table, navigate to fast the patch information table of this version patch, then by the patch information table, get this version patch and deposit first address in Nand Flash, finally call read operation and read this patch file.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310351780.XA CN103412779B (en) | 2013-08-14 | 2013-08-14 | A kind of patch file network system realization of embedded real-time operating system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310351780.XA CN103412779B (en) | 2013-08-14 | 2013-08-14 | A kind of patch file network system realization of embedded real-time operating system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103412779A true CN103412779A (en) | 2013-11-27 |
CN103412779B CN103412779B (en) | 2016-12-28 |
Family
ID=49605792
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310351780.XA Active CN103412779B (en) | 2013-08-14 | 2013-08-14 | A kind of patch file network system realization of embedded real-time operating system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103412779B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103645917A (en) * | 2013-12-03 | 2014-03-19 | 北京中电华大电子设计有限责任公司 | Java code patching method of Java card |
CN110333885A (en) * | 2019-06-28 | 2019-10-15 | 兆讯恒达微电子技术(北京)有限公司 | A kind of embedded OS patch setting method |
CN110888654A (en) * | 2019-11-13 | 2020-03-17 | 重庆秦嵩科技有限公司 | Method for upgrading embedded operating system |
CN110928570A (en) * | 2019-11-27 | 2020-03-27 | 北京知道创宇信息技术股份有限公司 | Firmware upgrading method and device and readable storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101140586A (en) * | 2007-09-30 | 2008-03-12 | 浙江大学 | Method for building file systems on NAND flash memory in embedded system |
CN102841851A (en) * | 2012-07-19 | 2012-12-26 | 深圳市江波龙电子有限公司 | Flash memory management method and flash memory device |
CN102955741A (en) * | 2011-08-30 | 2013-03-06 | 联咏科技股份有限公司 | Memorizer device and writing method thereof |
-
2013
- 2013-08-14 CN CN201310351780.XA patent/CN103412779B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101140586A (en) * | 2007-09-30 | 2008-03-12 | 浙江大学 | Method for building file systems on NAND flash memory in embedded system |
CN102955741A (en) * | 2011-08-30 | 2013-03-06 | 联咏科技股份有限公司 | Memorizer device and writing method thereof |
CN102841851A (en) * | 2012-07-19 | 2012-12-26 | 深圳市江波龙电子有限公司 | Flash memory management method and flash memory device |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103645917A (en) * | 2013-12-03 | 2014-03-19 | 北京中电华大电子设计有限责任公司 | Java code patching method of Java card |
CN103645917B (en) * | 2013-12-03 | 2016-09-14 | 北京中电华大电子设计有限责任公司 | The Java code patch method of Java card |
CN110333885A (en) * | 2019-06-28 | 2019-10-15 | 兆讯恒达微电子技术(北京)有限公司 | A kind of embedded OS patch setting method |
CN110888654A (en) * | 2019-11-13 | 2020-03-17 | 重庆秦嵩科技有限公司 | Method for upgrading embedded operating system |
CN110928570A (en) * | 2019-11-27 | 2020-03-27 | 北京知道创宇信息技术股份有限公司 | Firmware upgrading method and device and readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN103412779B (en) | 2016-12-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101923448B (en) | Method for reading and writing conversion layer of NAND flash memory | |
CN102841851B (en) | Flash memory management method and flash memory device | |
US9396107B2 (en) | Memory system having memory controller with cache memory and NVRAM and method of operating same | |
TWI544334B (en) | Data storage device and operating method thereof | |
CN101288054B (en) | Virtual-to-physical address translation in a flash file system | |
CN101556555B (en) | Block managing method for flash memory as well as controller and storage system thereof | |
CN104077235A (en) | Method of partitioning physical block and memory system thereof | |
CN101582092B (en) | Method and device for realizing the store of date in memory | |
JP2011022657A (en) | Memory system and information processor | |
CN103412779A (en) | Patch file system implementation method of embedded real-time operating system | |
CN101625897B (en) | Data write-in method, storage system and controller used for quick flash memory | |
TW200941499A (en) | Hybrid flash memory storage device and method of controlling the same | |
CN103729303A (en) | Data writing and data reading methods of Flash | |
CN104407935A (en) | Snapshot rollback method and storage equipment | |
CN103412822A (en) | Operation method of non-volatile RAM, data operation method and relevant device | |
CN102831072A (en) | Flash memory device, and management method, data read-write method and data read-write device thereof | |
CN103365786A (en) | Data storage method, device and system | |
CN101714065A (en) | Method for managing mapping information of flash controller | |
CN103136108A (en) | Quick flashing memory device and data reading method thereof | |
CN103713941A (en) | Method and system for cloning virtual machine mirror images based on qcow2 format | |
CN104679440A (en) | Flash memory array management method and device | |
CN102306124A (en) | Method for implementing hardware driver layer of Nand Flash chip | |
CN103034586B (en) | By method and the system thereof of flash translation layer (FTL) identification upper layer application | |
CN101661431B (en) | Block management method for flash memory, flash storage system and controller | |
CN103488572A (en) | Data storage device and data clearing method |
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 |