CN103853587A - Method for writing flash based on cramfs and JFFS2 - Google Patents

Method for writing flash based on cramfs and JFFS2 Download PDF

Info

Publication number
CN103853587A
CN103853587A CN201410099798.XA CN201410099798A CN103853587A CN 103853587 A CN103853587 A CN 103853587A CN 201410099798 A CN201410099798 A CN 201410099798A CN 103853587 A CN103853587 A CN 103853587A
Authority
CN
China
Prior art keywords
jffs2
cramfs
file
file system
programming
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
CN201410099798.XA
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.)
Inspur Group Co Ltd
Original Assignee
Inspur Group 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 Inspur Group Co Ltd filed Critical Inspur Group Co Ltd
Priority to CN201410099798.XA priority Critical patent/CN103853587A/en
Publication of CN103853587A publication Critical patent/CN103853587A/en
Pending legal-status Critical Current

Links

Abstract

The invention provides a method for writing a flash based on cramfs and JFFS2. The method specifically comprises the steps of firstly creating a file system with a format of cramfs, then creating a file with a format of JFFS2, respectively writing the two mirror image files into different partitions of the flash, setting starting parameters, and mounting partition files into a starting script of the file system which is created previously so as to realize automatic mounting of the files with different formats into the system after starting up is executed. Compared with the prior art, the method for writing the flash based on the cramfs and the JFFS2 has the advantages that application or a file folder to be used is made into a mirror image with the format of JFFS2 so as to be mounted into a relevant catalog in the file system with the format of cramfs, so that the file can be read and written in a read only file system; the method is high in practicability, wide in application range and easy to popularize.

Description

The method of programming flash based on cramfs and jffs2 a kind of
Technical field
The present invention relates to field of computer technology, specifically the method for programming flash based on the use of mkfs instrument and linux script edit, cramfs and jffs2 a kind of.
Background technology
Different file system types has different features, and jffs2 is read-write supported data log type file system compression, based on Hash table, and collapse/power down safeguard protection is provided, and " writing balance " support etc. is provided.Shortcoming is mainly in the time that file system is full or approach completely, because of the relation of refuse collection, the travelling speed of jffs2 is slowed down greatly; Cramfs compressibility is high, speed is fast, but its read only attribute is again a large defect, and user cannot be expanded its content.If above two kinds of files are combined and can realize the advantage that had both met high compression, high-speed cruising, can meet again read-write advantage.
Summary of the invention
Technical assignment of the present invention is to solve the deficiencies in the prior art, and the method for programming flash based on cramfs and jffs2 a kind of is provided.
Technical scheme of the present invention realizes in the following manner, the method of this kind of programming flash based on cramfs and jffs2, its specific implementation process is: the file system of first making cramfs form, and then making jffs2 formatted file, respectively by these two kinds of image file programmings in the different subregions of flash, set start-up parameter and increase by this partitioned file of step carry in the file system booting script of previously making, can realize on the rear automatic carry of system of start the file of different-format.
The detailed process of described programming method is:
Revise booting script, the image file of the jffs2 form of carry is added in starting up's script, after system boot, get final product like this data of carry jffs2 in the catalogue of cramfs file system;
Make cramfs root file system: the image file that by mkfs.cramfs instrument, root file system is made into cramfs form in linux main frame;
New folder in linux main frame, and the module that will use or executable program directly copy in this file, is made into jffs2 form image file by mkfs.jffs2 system tool;
Modification kernel code resets flash partition table and is used for depositing root file system and jffs2 formatted data image file;
In bootloader by programming order by file system with the programming of jffs2 packet in the different subregions of flash;
In bootloader, set the root file system that starts the cramfs form that path is programming, start powers on and can enter into cramfs root file system, also can realize the image file of jffs2 form is mounted in local folders, the catalogue on hanging over is carried out to load-on module or read-write operation simultaneously.
The beneficial effect that the present invention compared with prior art produced is:
The method of a kind of programming flash based on cramfs and jffs2 of the present invention is exclusively used in the file system of embedded system, the advantage of cramfs and these two kinds of different file of jffs2 is integrated and makes a kind of HPFS (High-Performance File System), can realize the advantage of cramfs file system high compression rate, can realize again the read-write characteristic of jffs2 file system, in readable documents system, realize the read-write operation to file by the read-write subregion of carry, practical, applied widely, be easy to promote.
Embodiment
Below the method for a kind of programming flash based on cramfs and jffs2 of the present invention is described in detail below.
The method of programming flash based on cramfs and jffs2 a kind of, adopt file system and important data or application program are made into different-format image file respectively programming to the method in the different subregions of flash equipment, realize the file that has two kinds of forms in a cover system, realize the read-write function to file in read-only file system.Its specific implementation process is: the file system of first making cramfs form, and then making jffs2 formatted file, respectively by these two kinds of image file programmings in the different subregions of flash, set start-up parameter and increase by this partitioned file of step carry in the file system booting script of previously making, can realize on the rear automatic carry of system of start the file of different-format.
The detailed process of described programming method is:
Revise booting script, the image file of the jffs2 form of carry is added in starting up's script, after system boot, get final product like this data of carry jffs2 in the catalogue of cramfs file system;
Make cramfs root file system: the image file that by mkfs.cramfs instrument, root file system is made into cramfs form in linux main frame;
New folder in linux main frame, and the module that will use or executable program directly copy in this file, is made into jffs2 form image file by mkfs.jffs2 system tool;
Modification kernel code resets flash partition table and is used for depositing root file system and jffs2 formatted data image file;
In bootloader by programming order by file system with the programming of jffs2 packet in the different subregions of flash;
In bootloader, set the root file system that starts the cramfs form that path is programming, start powers on and can enter into cramfs root file system, also can realize the image file of jffs2 form is mounted in local folders, the catalogue on hanging over is carried out to load-on module or read-write operation simultaneously.
The foregoing is only embodiments of the invention, within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.

Claims (2)

1. the method for the programming flash based on cramfs and jffs2, it is characterized in that its specific implementation process is: the file system of first making cramfs form, and then making jffs2 formatted file, respectively by these two kinds of image file programmings in the different subregions of flash, set start-up parameter and increase by this partitioned file of step carry in the file system booting script of previously making, can realize on the rear automatic carry of system of start the file of different-format.
2. the method for a kind of programming flash based on cramfs and jffs2 according to claim 1, is characterized in that the detailed process of described programming method is:
Revise booting script, the image file of the jffs2 form of carry is added in starting up's script, after system boot, get final product like this data of carry jffs2 in the catalogue of cramfs file system;
Make cramfs root file system: the image file that by mkfs.cramfs instrument, root file system is made into cramfs form in linux main frame;
New folder in linux main frame, and the module that will use or executable program directly copy in this file, is made into jffs2 form image file by mkfs.jffs2 system tool;
Modification kernel code resets flash partition table and is used for depositing root file system and jffs2 formatted data image file;
In bootloader by programming order by file system with the programming of jffs2 packet in the different subregions of flash;
In bootloader, set the root file system that starts the cramfs form that path is programming, start powers on and can enter into cramfs root file system, also can realize the image file of jffs2 form is mounted in local folders, the catalogue on hanging over is carried out to load-on module or read-write operation simultaneously.
CN201410099798.XA 2014-03-18 2014-03-18 Method for writing flash based on cramfs and JFFS2 Pending CN103853587A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410099798.XA CN103853587A (en) 2014-03-18 2014-03-18 Method for writing flash based on cramfs and JFFS2

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410099798.XA CN103853587A (en) 2014-03-18 2014-03-18 Method for writing flash based on cramfs and JFFS2

Publications (1)

Publication Number Publication Date
CN103853587A true CN103853587A (en) 2014-06-11

Family

ID=50861279

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410099798.XA Pending CN103853587A (en) 2014-03-18 2014-03-18 Method for writing flash based on cramfs and JFFS2

Country Status (1)

Country Link
CN (1) CN103853587A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104392189A (en) * 2014-12-12 2015-03-04 北京元心科技有限公司 Method and device for realizing safety operation of file system
CN106325905A (en) * 2015-06-30 2017-01-11 深圳市中兴微电子技术有限公司 A Flash burning method, single board, upper computer and system
CN107291484A (en) * 2016-04-11 2017-10-24 龙芯中科技术有限公司 The method and device of programming bare board
CN107562483A (en) * 2017-07-26 2018-01-09 博为科技有限公司 A kind of method and device of carry guiding file system
CN110032542A (en) * 2019-04-19 2019-07-19 宁波三星医疗电气股份有限公司 A kind of cramfs file system management method, device and electronic equipment
CN112579545A (en) * 2020-12-28 2021-03-30 惠州华阳通用电子有限公司 Linux file system mounting method and storage medium
CN112631993A (en) * 2020-12-28 2021-04-09 厦门市美亚柏科信息股份有限公司 File addition and deletion trace analysis method and system based on JFFS2 file system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101384997A (en) * 2006-03-01 2009-03-11 安讯士有限公司 Method and system for upgrading a plurality of devices
CN103577210A (en) * 2012-08-06 2014-02-12 广州三星通信技术研究有限公司 System and method for mounting between mobile terminals

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101384997A (en) * 2006-03-01 2009-03-11 安讯士有限公司 Method and system for upgrading a plurality of devices
CN103577210A (en) * 2012-08-06 2014-02-12 广州三星通信技术研究有限公司 System and method for mounting between mobile terminals

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
周清杰等: "《混合文件系统在嵌入式智能车辆控制器中的应用》", 《机械管理开发》 *
李伟等: "《嵌入式车载音像信号处理技术的研究》", 《理论与方法》 *
赵小林: "《嵌入式Linux系统研究与网络设备驱动程序开发》", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104392189A (en) * 2014-12-12 2015-03-04 北京元心科技有限公司 Method and device for realizing safety operation of file system
CN104392189B (en) * 2014-12-12 2017-10-10 北京元心科技有限公司 The method and apparatus for realizing file system safe operation
CN106325905A (en) * 2015-06-30 2017-01-11 深圳市中兴微电子技术有限公司 A Flash burning method, single board, upper computer and system
CN107291484A (en) * 2016-04-11 2017-10-24 龙芯中科技术有限公司 The method and device of programming bare board
CN107291484B (en) * 2016-04-11 2021-05-25 龙芯中科技术股份有限公司 Method and device for programming bare board
CN107562483A (en) * 2017-07-26 2018-01-09 博为科技有限公司 A kind of method and device of carry guiding file system
CN110032542A (en) * 2019-04-19 2019-07-19 宁波三星医疗电气股份有限公司 A kind of cramfs file system management method, device and electronic equipment
CN110032542B (en) * 2019-04-19 2021-04-27 宁波三星医疗电气股份有限公司 Cramfs file system management method and device and electronic equipment
CN112579545A (en) * 2020-12-28 2021-03-30 惠州华阳通用电子有限公司 Linux file system mounting method and storage medium
CN112631993A (en) * 2020-12-28 2021-04-09 厦门市美亚柏科信息股份有限公司 File addition and deletion trace analysis method and system based on JFFS2 file system
CN112579545B (en) * 2020-12-28 2024-03-29 惠州华阳通用电子有限公司 Linux file system mounting method and storage medium

Similar Documents

Publication Publication Date Title
CN103853587A (en) Method for writing flash based on cramfs and JFFS2
CN103970585B (en) Create the method and device of virtual machine
EP2863310B1 (en) Data processing method and apparatus, and shared storage device
US20140258236A1 (en) Single index to query multiple backup formats
CN102331957B (en) File backup method and device
WO2010064116A1 (en) Method, apparatus and computer program product for sub-file level synchronization
US10069909B1 (en) Dynamic parallel save streams for block level backups
WO2014000249A1 (en) Snapshot data processing method and system, storage system and snapshot agency
WO2014110940A1 (en) A method, apparatus and system for storing, reading the directory index
TW201419005A (en) System, method and computer readable storage medium thereof for accessing file in cloud server
CN103678036A (en) Backup method based on virtual machine operation information data finding
US10678652B1 (en) Identifying changed files in incremental block-based backups to backup indexes
CN104407890A (en) Method for starting Android system from OTG (On-The-Go) equipment
CN103226603A (en) File synchronization update method and system based on portable storage device
US20150106334A1 (en) Systems and methods for backing up a live virtual machine
CN102929488A (en) Automatic noting system and achieving method of electronic documents
CN103389905A (en) Plug-in loading method and plug-in loading system
US20140123122A1 (en) System and method for virtual machine offline patching without mount the virtual disk
US10423495B1 (en) Deduplication grouping
CN103327112B (en) Desktop synchronization based on cloud storage and realize the synchronous device of desktop
CN105607869B (en) A kind of quick formatting and the method using magnetic disk of virtual machine
US20170293531A1 (en) Snapshot backup
CN106250267A (en) The data back up method of a kind of virtual machine and device
CN102760212B (en) Virtual desktop malicious code detecting method based on storage mirroring cloning mechanism
CN103177019A (en) Universal serial bus (USB) storage device and driving method thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20140611

WD01 Invention patent application deemed withdrawn after publication