Method, device and equipment for constructing file system and computer storage medium
1. A method of constructing a file system, the method comprising:
acquiring demand data of a target file system;
constructing a general file system on an embedded program development system based on the required data of the target file system;
and constructing a target file system based on the general file system and in combination with the type of the target file system.
2. The method of constructing a file system according to claim 1, wherein constructing a common file system on an embedded program development system based on the requirement data of the target file system comprises:
analyzing the demand data of the target file system to obtain a target architecture and a target cross compiling tool;
and constructing a universal file system on an embedded program development system based on the target architecture and the target cross compiling tool.
3. The method of constructing a file system according to claim 1, wherein said constructing a generic file system on an embedded program development system based on said target architecture and said target cross-compilation tool comprises:
configuring a cross-compilation environment based on a target architecture and the target cross-compilation tool;
acquiring a root file system configuration file, compiling the root file system configuration file and generating a compiling result;
creating a plurality of subdirectories, and correspondingly placing the compiling result into a first target subdirectory;
creating a device file and putting the device file into a second target subdirectory;
creating a configuration file required by the target file system and putting the configuration file into a third target subdirectory;
and putting the library file required by the operation of the target architecture into a fourth target subdirectory.
4. The method for constructing a file system according to claim 3, wherein the obtaining a root file system configuration file and compiling to generate a compilation result comprises:
acquiring basic commands and tools required by the target file system in configuration software;
generating the root file system configuration file by utilizing the configuration software based on basic commands and tools required by the target file system;
compiling the root file system configuration file to generate a compiling result; wherein the compiling result is a binary file.
5. The method of constructing a file system as claimed in claim 3, wherein the step of constructing a common file system based on the requirement data of the target file system is followed by:
analyzing the required data of the target file system to obtain a target service program;
and deploying the target service program.
6. The method of constructing a file system of claim 5, wherein said deploying the target service comprises:
and respectively placing the executable file corresponding to the target service program and the dependent library file into a fifth target subdirectory and a fourth target subdirectory.
7. The method of constructing a file system according to claim 1, wherein said constructing a target file system based on said common file system in combination with a type of said target file system comprises:
acquiring the type of the target file system;
and constructing a target file system by utilizing a target file system manufacturing tool corresponding to the type of the target file system based on the general file system.
8. An apparatus for constructing a file system, the apparatus comprising the foregoing apparatus.
The data acquisition module is used for acquiring the required data of the target file system;
the universal file system building module is used for building a universal file system on the embedded program development system based on the required data of the target file system;
and the target file system construction module is used for constructing a target file system based on the general file system and in combination with the type of the target file system.
9. A computer storage medium, characterized in that the computer storage medium has stored thereon a method program of constructing a file system, which when executed by a processor implements the method steps of constructing a file system according to any one of claims 1 to 7.
10. An apparatus for constructing a file system, comprising a memory, a processor and a method program for constructing a file system, stored in the memory and executable on the processor, wherein the processor implements the method steps of constructing a file system according to any one of claims 1 to 7 when executing the method program for constructing a file system.
Background
In the prior art, an embedded program development system and a built file system are developed on different platforms respectively, so that a service program cannot be deployed friendly; and different types of file systems cannot be manufactured, reusability is poor, expandability is poor, the automation degree is low, the working efficiency of embedded system developers is greatly influenced, and the development period is prolonged.
Disclosure of Invention
In view of this, embodiments of the present application provide a method, an apparatus, a device, and a computer storage medium for constructing a file system, so as to solve the problem of constructing different types of target file systems in an integrated platform.
The embodiment of the application provides a method for constructing a file system, which comprises the following steps:
acquiring demand data of a target file system;
constructing a general file system on an embedded program development system based on the required data of the target file system;
and constructing a target file system based on the general file system and in combination with the type of the target file system.
In an embodiment, the building a common file system on the embedded program development system based on the requirement data of the target file system includes:
analyzing the demand data of the target file system to obtain a target architecture and a target cross compiling tool;
and constructing a universal file system on an embedded program development system based on the target architecture and the target cross compiling tool.
In one embodiment, the building a common file system on an embedded program development system based on the target architecture and the target cross-compilation tool includes:
configuring a cross-compilation environment based on a target architecture and the target cross-compilation tool;
acquiring a root file system configuration file, compiling the root file system configuration file and generating a compiling result;
creating a plurality of subdirectories, and correspondingly placing the compiling result into a first target subdirectory;
creating a device file and putting the device file into a second target subdirectory;
creating a configuration file required by the target file system and putting the configuration file into a third target subdirectory;
and putting the library file required by the operation of the target architecture into a fourth target subdirectory.
In an embodiment, the obtaining and compiling the root file system configuration file to generate a compilation result includes:
acquiring basic commands and tools required by the target file system in configuration software;
generating the root file system configuration file by utilizing the configuration software based on basic commands and tools required by the target file system;
compiling the root file system configuration file to generate a compiling result; wherein the compiling result is a binary file.
In an embodiment, after the step of constructing the universal file system based on the requirement data of the target file system, the method includes:
analyzing the required data of the target file system to obtain a target service program;
and deploying the target service program.
In an embodiment, the deploying the target service program includes:
and respectively placing the executable file corresponding to the target service program and the dependent library file into a fifth target subdirectory and a fourth target subdirectory.
In an embodiment, the constructing a target file system based on the generic file system and in combination with the type of the target file system includes:
acquiring the type of the target file system;
and constructing a target file system by utilizing a target file system manufacturing tool corresponding to the type of the target file system based on the general file system.
In order to achieve the above object, there is also provided an apparatus for constructing a file system.
The data acquisition module is used for acquiring the required data of the target file system;
the universal file system building module is used for building a universal file system based on the required data of the target file system;
and the target file system construction module is used for constructing a target file system based on the general file system and in combination with the type of the target file system.
To achieve the above object, there is also provided a computer storage medium having stored thereon a method program for constructing a file system, the method program for constructing a file system being executed by a processor to implement any of the above method steps for constructing a file system.
In order to achieve the above object, there is also provided an apparatus for constructing a file system, including a memory, a processor, and a method program for constructing a file system, stored in the memory and executable on the processor, where the processor implements any of the above method steps for constructing a file system when executing the method program for constructing a file system.
One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: acquiring demand data of a target file system; the configuration parameters required by the target file system are obtained by obtaining and analyzing the required data in the target file system, so that correct data support is provided for constructing a general file system, and the construction correctness of the target file system is ensured.
Constructing a general file system on an embedded program development system based on the required data of the target file system; and constructing a universal file system on the embedded program development system through the configuration parameters required by the target file system, so that the embedded program development platform and the platform for constructing the file system are integrated together, and the service program can be rapidly developed and deployed.
And constructing a target file system based on the general file system and in combination with the type of the target file system. And different types of target file systems are constructed by combining the general file system with the types of the target file systems.
The invention solves the problem of constructing different types of target file systems in an integrated platform, realizes the integration of an embedded program development platform and a constructed file system platform, accelerates the development and deployment of service programs, simultaneously completes the manufacture of different types of target file systems, and improves the expandability and reusability of the file systems, thereby improving the working efficiency of embedded system developers and shortening the program development period.
Drawings
FIG. 1 is a schematic flow chart diagram illustrating a first embodiment of a method for constructing a file system according to the present application;
FIG. 2 is a flowchart illustrating a step S120 of a first embodiment of a method for constructing a file system according to the present application;
FIG. 3 is a flowchart illustrating a method step S122 of constructing a file system according to the present application;
FIG. 4 is a flowchart illustrating a method step S1222 of the present application for constructing a file system;
FIG. 5 is a schematic flow chart diagram illustrating a second embodiment of a method for constructing a file system according to the present application;
FIG. 6 is a flowchart illustrating a step S240 of a second embodiment of a method for constructing a file system according to the present application;
FIG. 7 is a flowchart illustrating a step S130 of the first embodiment of the file system constructing method according to the present application;
FIG. 8 is a schematic diagram of an apparatus for constructing a file system according to the present application;
fig. 9 is a hardware architecture diagram of an apparatus for constructing a file system according to an embodiment of the present application.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The main solution of the embodiment of the invention is as follows: acquiring demand data of a target file system; constructing a general file system on the embedded program development system based on the required data of the target file system; based on the general file system, combining the type of the target file system to construct a target file system; the invention solves the problem of constructing different types of target file systems in an integrated platform, realizes the integration of an embedded program development platform and a constructed file system platform, accelerates the development and deployment of service programs, completes the manufacture of different types of target file systems, improves the expandability and reusability of the file systems, improves the working efficiency of embedded system developers and shortens the program development period.
In order to better understand the technical solution, the technical solution will be described in detail with reference to the drawings and the specific embodiments.
Referring to fig. 1, fig. 1 is a first embodiment of a method for constructing a file system according to the present application, the method including:
step S110: and acquiring the requirement data of the target file system.
In particular, a file system (file system) is a system of logical storage and recovery that names files and places files; i.e. a method of organizing files on a storage device. Also known as a file management system, the software mechanism in the operating system that is responsible for managing and storing file information is referred to as a file system. The file system consists of three parts: file system interface, software assembly for manipulating and managing objects, objects and properties. From a system perspective, a file system is a system that organizes and allocates space of a file storage device, is responsible for file storage, and protects and retrieves stored files. In particular, it is responsible for creating files for the user, storing, reading, modifying, dumping files, controlling access to files, revoking files when the user is no longer in use, etc.
Further, the target file system can be a file system identified by an embedded system manufactured according to the required data; the requirement data may be configuration parameters required by the target file system to construct, such as, but not limited to, a target architecture, a target cross-compilation tool, a target service, and a type of the target file system.
Step S120: and constructing a general file system on the embedded program development system based on the requirement data of the target file system.
Specifically, the common file system may be all directories and files required for constructing the target file system on the development system, and the target file system is constructed based on the common file system.
It should be further noted that the universal file system is built on the embedded program development system, so that the embedded program development platform and the built file system platform are integrated together, and the service program can be rapidly developed and deployed; among them, the commonly used embedded development host is UNIX system host.
The embedded program development system can be an embedded Linux system and is generally divided into three parts: boot loader (Bootloader), kernel, and file system. The starting process of the system is that a boot loader (Bootloader) guides a kernel to start, after the kernel finishes starting, the file system is mounted, and an initialization program set by the file system is executed. The file system provides an embedded program execution environment, which comprises a plurality of primary directories, such as bin, dev, etc., lib, root, proc, mnt, tmp, sys, etc., wherein each primary directory comprises a plurality of directories or files, such as Linux commands and tools in common use in the system under the bin directory, different device files under the dev directory, various configuration scripts under the etc directory, software dynamic link library under the lib directory, service programs under the root directory, etc.
Step S130: and constructing a target file system based on the general file system and in combination with the type of the target file system.
Specifically, different file system types have different characteristics, and a target file system corresponding to the embedded system identification is constructed based on the general file system and in combination with the type of the target file system; the extensibility and reusability of the method for constructing the file system are improved.
In the above embodiment, there are advantageous effects of: acquiring demand data of a target file system; the configuration parameters required by the target file system are obtained by obtaining and analyzing the required data in the target file system, so that correct data support is provided for constructing a general file system, and the construction correctness of the target file system is ensured.
Constructing a general file system on an embedded program development system based on the required data of the target file system; and constructing a universal file system on the embedded program development system through the configuration parameters required by the target file system, so that the embedded program development platform and the platform for constructing the file system are integrated together, and the service program can be rapidly developed and deployed.
And constructing a target file system based on the general file system and in combination with the type of the target file system. And different types of target file systems are constructed by combining the general file system with the types of the target file systems.
The invention solves the problem of constructing different types of target file systems in an integrated platform, realizes the integration of an embedded program development platform and a constructed file system platform, accelerates the development and deployment of service programs, completes the manufacture of different types of target file systems, improves the expandability and reusability of the file systems, improves the working efficiency of embedded system developers and shortens the program development period.
Referring to fig. 2, fig. 2 is a specific implementation step of step S120 in a first embodiment of the method for constructing a file system according to the present application, where the step of constructing a general file system on an embedded program development system based on requirement data of a target file system includes:
step S121: and analyzing the requirement data of the target file system to obtain a target architecture and a target cross compiling tool.
Specifically, the target architecture may be an architecture of a target file system, that is, an embedded architecture, and specifically includes at least: RISC-V, ARM, SPARC, PPC, etc. are set by setting ARCH parameters.
Specifically, the cross-compiling tool can be a compiler program running in one computer environment and can compile codes running in another environment; the target cross-compilation tool may be a cross-compilation tool selected by the target file system based on the code type.
Step S122: and constructing a universal file system on an embedded program development system based on the target architecture and the target cross compiling tool.
Specifically, the target architecture ARCH of the present embodiment is represented by RISC-V, and the target CROSS compiler tool CROSS compiler uses riscv 64-unknown-linux-gnu-.
In this embodiment, there are beneficial effects of: correctly constructing a general file system according to the required data of the target file system; on the basis of ensuring the correctness of the general file system, the correctness of the construction of the target file system is ensured.
Referring to fig. 3, fig. 3 is a specific implementation step of step S122 of the method for constructing a file system according to the present application, where the constructing a general file system on an embedded program development system based on the target architecture and the target cross compiling tool includes:
step S1221: configuring a cross-compilation environment based on an object architecture and the object cross-compilation tool.
Specifically, the configuration CROSS-compilation environment may open the top-level Makefile of the busy, add values for ARCH (target architecture) and CROSS _ COMPILE (target CROSS-compilation tool).
Step S1222: and acquiring a root file system configuration file, compiling and generating a compiling result.
Specifically, the root file system configuration file may be configured by the busybox to generate the busybox configuration file. Among other things, the busy box provides a friendly interactive configuration interface. And inputting the make menuconfig by the terminal, and entering a busy configuration interface for relevant configuration. The busybox provides more than one hundred of the most common Linux commands and tools, and developers can cut the commands and tools according to requirements, reserve basic commands and tools required by the embedded system and construct a minimum file system (root file system). After the configuration is completed, the busy box configuration file is generated. This step can be skipped directly next time if no configuration modification is required.
Step S1223: and creating a plurality of subdirectories, and correspondingly placing the compiling result into a first target subdirectory.
Specifically, directories of bin, dev, etc., lib, root, proc, mnt, tmp, sys, etc. are created. The first target subdirectory may be a bin directory. In this embodiment, the number of subdirectories and the names of subdirectories are not limited, and the extension may be performed according to business requirements.
Step S1224: a device file is created and placed under a second target subdirectory.
Specifically, the second target subdirectory may be a dev directory, and a required device file, such as a console, a null file, or the like, is created under the dev directory.
Step S1225: the configuration files needed by the target file system are created and placed under a third target subdirectory.
Specifically, the third target subdirectory may be an etc directory, and then an inittab, init.d, profile, network configuration file, etc. is created under the etc directory. The inittab file is an initialization table of the system, and the system starts a relevant process or script according to the inittab content, such as mounting proc, sysfs, tmps, and the like. Init.d is responsible for storing management scripts of system services, such as service start, stop, etc. The Profile file is responsible for the user to modify the system environment variables by himself, and can be default. The network configuration file is responsible for configuring the network environment of the system, such as setting up IP, gateways, etc.
Step S1226: and putting the library file required by the operation of the target architecture into a fourth target subdirectory.
Specifically, the fourth target subdirectory may be a lib directory, and then library files required by the target architecture operating environment, such as common libc.
In the above embodiment, there are advantageous effects of: the universal file system is built on the embedded program development system, so that the embedded development platform and the file building system are integrated on the same platform, development and deployment of service programs are accelerated, and development efficiency of embedded developers is improved.
Referring to fig. 4, fig. 4 is a specific implementation step of step S1222 of the method for constructing a file system according to the present application, where the obtaining a root file system configuration file and compiling the root file system configuration file to generate a compilation result includes:
step S1222-1: and acquiring basic commands and tools required by the target file system in the configuration software.
Specifically, the configuration software may be a busy box; the busy box is a piece of software that integrates over a hundred of the most common Linux commands and tools. The busy box contains simple tools such as ls, cat, and echo, etc., and larger, more complex tools such as grep, find, mount, and telnet.
Step S1222-2: and generating the root file system configuration file by utilizing the configuration software based on basic commands and tools required by the target file system.
Specifically, the method cuts according to requirements, retains basic commands and tools required by the embedded system, and constructs a minimum file system.
Step S1222-3: compiling the root file system configuration file to generate a compiling result; wherein the compiling result is a binary file.
In the above embodiment, there are advantageous effects: the first target subdirectory is correctly established by compiling the generated result of the configuration software, so that the correctness of the establishment of the universal file system is ensured.
Referring to fig. 5, fig. 5 is a second embodiment of the method for constructing a file system according to the present application, and after the step of constructing a general file system based on the requirement data of the target file system, the method includes:
step S210: and acquiring the requirement data of the target file system.
Step S220: and constructing a general file system on the embedded program development system based on the requirement data of the target file system.
Step S230: analyzing the required data of the target file system to obtain a target service program;
specifically, a target service program of the target file system is obtained according to a requirement of the target file system, wherein common service programs include SSH (Secure Shell, Secure Shell protocol), redis (database), zlib (compression), and the like.
Step S240: and deploying the target service program.
Specifically, after the embedded system environment is built, the required target service program is deployed on the embedded system environment. The number of the target service programs is not limited, and the target service programs can be expanded.
Step S250: and constructing a target file system based on the general file system and in combination with the type of the target file system.
Compared with the first embodiment, the second embodiment includes step S230 and step S240, and other steps have already been described in the first embodiment, and are not repeated herein.
In the above embodiment, there are beneficial effects of: according to the development requirement of the embedded system, a special service program is deployed, the development function of the embedded system is completed, and the user experience is improved.
Referring to fig. 6, fig. 6 is a specific implementation step of step S240 in a second embodiment of the method for constructing a file system according to the present application, where the deploying the target service program includes:
step S241: and respectively placing the executable file corresponding to the target service program and the dependent library file into a fifth target subdirectory and a fourth target subdirectory.
Specifically, an executable file refers to a file that can be loaded for execution by an operating system. In different operating system environments, executable programs are presented differently. Wherein the fifth target subdirectory can be a root subdirectory; the fourth target subdirectory may be a lib subdirectory.
Referring to fig. 7, fig. 7 is a detailed implementation step of step S130 in a first embodiment of the method for constructing a file system according to the present application, where the constructing a target file system based on the general file system and in combination with the type of the target file system includes:
step S131: and acquiring the type of the target file system.
Specifically, in embedded Linux development, commonly used File systems are jffs2(journal Flash File System Version 2, Flash journaling File System Version 2), yaffs2(Yet other Flash File System), ubifs (unordered Block Image File System, unordered Block mirror File System), cramf, initramfs (initram File System), ramdisk (Random Access Memory disk, virtual disk), ramfs/tmps (temporal File System, temporary File System), nfs (Network File System ), and the like. The types of file systems can be classified into RAM-based file systems and FLASH-based file systems from a large aspect. Different file system types have different characteristics and are selected according to hardware characteristics of the storage device, system requirements and the like.
Further, FLASH-based file systems are mainly jffs2, yaffs2, ubifs, cramfs, and the like. The jffs2 file system is a log-type file system based on a hash table, is mainly used for NOR flash memories, and is characterized by being readable and writable, supporting data compression, providing crash/power failure safety protection, write balancing and the like; the disadvantage is that the operation speed of jffs2 file system is greatly reduced when the file system is full or nearly full. yaffs/yaffs2(Yet antenna Flash File System) File System is a log-type File System designed for embedded systems using NAND-type Flash memory, with its own driver of NAND chip and provides API for direct access to the File System, through which users can directly operate the File System. The ubifs file system is used in a solid state disk storage device, and is more suitable for MLC NAND FLASH in design and performance than yaffs/yaffs2 and jffs2 file systems. The Cramfs file system is a read-only compressed file system, the compression ratio of the Cramfs file system is as high as 2:1, and the Cramfs file system can use FLASH equipment with lower capacity to store the same file, so that the cost of an embedded system is reduced.
The file system based on RAM includes initramfs, ramdisk, ramfs/tmps, nfs, etc. The initramfs file system uses the cpio package format, which can be compiled and linked into the system for direct use without additional hooking of the file system. The ramdisk file system is a memory-based virtual file system that uses a portion of fixed-size memory in memory as a partition of a hard disk. The Ramfs/tmpfs file system stores all files in a memory, and can use the Ramfs/tmpfs to store some temporary or frequently-modified data, thereby avoiding the read-write loss of a Flash memory and improving the read-write speed of the data. The NFS network file system is used for sharing files among different machines and different operating systems through a network, and a root file system based on the NFS can be established on a host and mounted on embedded equipment in the development and debugging stage of the embedded Linux system, so that the content of the root file system can be modified conveniently.
Step S132: and constructing a target file system by utilizing a target file system manufacturing tool corresponding to the type of the target file system based on the general file system.
Wherein, different target file system manufacturing tools are needed for manufacturing different target file systems; in this embodiment, the target file system creation tool is not limited, and may be extended according to the type of the target file system. For example, jffs2 is made by using mkjffs2fs, cramfs is made by using mkcramfs, initramfs is made by using mkramfs, initramfs.txt is directly edited, and simple scripts are required to be written for making ramdisk;
the method for making the ramdisk compiling script comprises the following steps:
establishing a temporary mounting point of the loop equipment, and executing mkdir/mnt/loop;
creating a file system image, such as creating a file of 4096k in size, initializing to 0, and performing dd if/dev/zero of/tmp/ramdisk bs 1k count 4096;
formatting/tmp/ramdisk into an ext2 file system, and executing mke2 fs-F-v-m 0/tmp/ramdisk;
mounting a mapping file, and executing mount-o loop/tmp/ramdisk/mnt/loop;
the required files and the like are copied to the directory. Executing the cp operation;
unloading the mapping file, and executing umount/mnt/loop;
compressing the image file, and executing gzip-v 9/tmp/ramdisk;
in an embodiment, a target service program is extended and a target file system manufacturing tool is extended, so that the extensibility and reusability of the file system construction method are improved, and the specific embodiment is as follows:
based on Makefile engineering, the engineering includes three primary catalogs: apps, fs, tools.
Specifically, the first, apps directory introduces:
under the apps directory is an embedded development service program directory. Each development service is a subdirectory. The newly developed service program can directly create a new subdirectory. When a file system is built, the platform can specify a program to be deployed through parameters.
The current subdirectories include the following, which developers can extend themselves.
List of Busybox: a file system common tool busybox is made. The configuration of the cross-compilation environment and the configuration of the busy box are completed.
Each test service directory. Including hello test program directory, restart test program directory, sort test program directory, md5 test program directory, fork test program directory, etc. The simple test programs can help developers to check software and hardware problems at the initial development stage of the embedded system, and the software development progress is accelerated.
Wherein, Stream directory: and testing the memory bandwidth.
The Strace directory: a performance testing tool.
The Zlib directory: data compression special tool.
SSH catalog: a remote management tool.
Redis catalog: a hot database software.
Expanding the service program:
step 1: subdirectories are created under apps. Such as hello directories;
step 2: the service program source code is written under a subdirectory. Such as hello.c;
and step 3: the makefile file is created under the subdirectory. Specifying program names, source files, cross-compilation tools, and dependent makefile common files.
And 4, step 4: and adding an automatic deployment script of the service program under the fs directory.
Second, fs directory introduction:
the catalog mainly automates the following steps:
a subdirectory is created. Directories of bin, dev, etc., lib, root, proc, mnt, tmp, sys, etc. are created. The subdirectory created by the script may be modified.
The busy binary file is copied. The binary file generated by the apps/busy is put under the bin directory.
A device file is created. And creating a required dev file such as a console, a null file and the like under the dev directory. Can modify the dev file required by script creation
A configuration file is created. Inittab, init.d, profile, network configuration file, etc. are created under the etc directory. The Inittab file is an initialization table of the system, and the system starts related processes or scripts according to the content of the Inittab, such as mounting proc, sysfs, tmps and the like. Init.d is responsible for storing management scripts of system services, such as service start, stop, etc. The Profile file is responsible for the user to modify the system environment variables by himself, and can be default. The network configuration file is responsible for configuring the network environment of the system, such as setting up IP, gateways, etc. The configuration function required for development can be increased.
The library file is copied. And (4) placing library files required by the target architecture operating environment in the lib directory, such as common libc. And the automatic script simultaneously puts the library files associated with the service programs under the/apps into the specified directory.
And deploying the service program. The service program to be deployed is transmitted through the command line parameters, and the script analyzes the command line parameters to complete the automatic deployment of the service program.
Third, the Tools catalog introduction:
the Tools or scripts for different types of file systems are mainly included in the Tools directory. The file system tool used is specified by the command line parameters.
The directory includes the following subdirectories jffs2, yaffs2, ubifs, cramfs, initramfs, ramdisk, ramfs, tmpfs, nfs. Developers can flexibly extend the target file system production tool.
The application also provides a device for constructing the file system.
The data acquisition module is used for acquiring the required data of the target file system;
the universal file system building module is used for building a universal file system on the embedded program development system based on the required data of the target file system;
and the target file system construction module is used for constructing a target file system based on the general file system and in combination with the type of the target file system.
The apparatus 02 for constructing a file system shown in fig. 8 includes a data obtaining module 21, a general file system constructing module 22, and a target file system constructing module 23, and the apparatus can perform the method of the embodiment shown in fig. 1 to 7, and reference may be made to the related description of the embodiment shown in fig. 1 to 7 for a part not described in detail in this embodiment. The implementation process and technical effect of the technical solution refer to the descriptions in the embodiments shown in fig. 1 to fig. 7, and are not described herein again.
The present application further provides a computer storage medium having stored thereon a method program for constructing a file system, which when executed by a processor, performs any of the above-described method steps for constructing a file system.
The present application further provides a device 010 for constructing a file system, including a memory 011, a processor 012 and a program for a method of constructing a file system stored in the memory and running on the processor, where the processor implements any of the above-mentioned method steps of constructing a file system when executing the program for the method of constructing a file system.
The present application relates to an apparatus 010 for constructing a file system, including as shown in fig. 9: at least one processor 012, memory 011.
The processor 012 may be an integrated circuit chip having signal processing capability. In implementation, the steps of the method may be performed by hardware integrated logic circuits or instructions in the form of software in the processor 012. The processor 012 may be a general-purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, or discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 011, and the processor 012 reads the information in the memory 011 and completes the steps of the method in combination with the hardware.
It is to be understood that the memory 011 in embodiments of the present invention can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. The non-volatile Memory may be a Read Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and not limitation, many forms of RAM are available, such as Static random access memory (Static RAM, SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic random access memory (Synchronous DRAM, SDRAM), Double data rate Synchronous Dynamic random access memory (ddr DRAM), Enhanced Synchronous SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 011 of the systems and methods described in connection with the embodiments of the invention is intended to comprise, without being limited to, these and any other suitable types of memory.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.