This application claims the priority benefit of Taiwan application serial no. 94131046, filed on Sep. 9, 2005. All disclosure of the Taiwan application is incorporated herein by reference.
1. Field of Invention
The present invention relates to a file system builder and a method for building up a file system. More particularly, the present invention relates to a file system builder for multi platforms and an operating method for the same.
2. Description of Related Art
Currently, the sale volume of the semiconductor chips applied to the consumer electronic product is getting beyond that applied to the enterprise application product. This tendency shows that the consumer electronic product becomes the driving force to advance the total profits of the semiconductor industry. Meanwhile, because of the variety of the appearance and multi function of the digital consumer products such as digital camera, MP3 player, digital video disc player (DVD player), the digital consumer products become the most popular product. Therefore, the development of the digital consumer products becomes the lead of the consumer electronic product research.
However, under the consumers' rapid consuming behaviors, the digital consumer products should be continuously renovated and the life time of the digital consumer products is relatively short. Moreover, with the increasing of the variety of digital consumer products' functionality, the demand for larger storage space for storing digital pictures and digital video files is high.
Therefore, as a new digital product is developed, it is better to create a file system for the digital product utilizing relatively small storage space. Preferably, storage space occupied by the file system in the digital product should be as small as possible. That is, the file system is exclusively built according to the functionality of the digital products and provides only the necessary files for maintaining the normal operations of the digital product. Moreover, when the development environment for the new digital product is built, the research team usually re-establishes a file system. Nevertheless, re-establishing a file system consumes a lot of time and labor. Besides, the research team needs to solve the integration problems during the establishment of the file system. Furthermore, since the life time of the digital consumer products is short, re-establishing a file system cannot keep pace with the variation of the market.
Accordingly, at least one objective of the present invention is to provide a file system builder. By using the file system builder, a customized file system for a target machine can be built from a source package system of a source machine. Hence, the time used to build up a development environment can be saved.
At least another objective of the present invention is to provide a method for building up a file system. According to the required functionality, a small and exclusive file system can be rapidly built from a source development environment.
To achieve these and other advantages and in accordance with the purpose of the invention, as embodied and broadly described herein, the invention provides a file system builder for building a file system from a source package database of a source machine with a first platform according to a keyword, wherein the file system can be installed into a target machine with a second platform. The system builder comprises a file system, a generator and a fine tuner. The file system builder engine is used for performing a first query-response communication with the source machine according to the keyword to obtain a package list from the source package database and building up a package table according to the package list, wherein the package list comprises at least one package name. The generator is used for generating a target package set according to the package table and the second platform, wherein the target package set comprises at least one package. The fine tuner is used for adjusting the target package set to be a file system.
According to the file system builder described in the embodiment of the present invention, for each package name in the package table, a dependency package list and a supply-able file list are correspondingly stored.
According to the file system builder described in the embodiment of the present invention, the file system builder engine performs a second query-response communication with the source package database according to each package name in the package table to obtain the corresponding dependency package list and the supply-able file list.
According to the file system builder described in the embodiment of the present invention, the file system builder further comprises an input interface module for receiving the input keyword and transferring the input keyword to the file system builder engine.
According to the file system builder described in the embodiment of the present invention, the file system builder further comprises a history record for correspondingly recording a plurality of history fine tuning rules of each package.
According to the file system builder described in the embodiment of the present invention, the fine tuner performs a third query-response communication with source machine to adjust the target package set to be the file system.
According to the file system builder described in the embodiment of the present invention, the first platform is different from the second platform.
According to the file system builder described in the embodiment of the present invention, the first platform is as same as the second platform.
According to the file system builder described in the embodiment of the present invention, each of the packages complies with a file standard of RedHat Package Management (RPM).
According to the file system builder described in the embodiment of the present invention, the source package database includes an RPM database.
The present invention also provides a method for building up a file system from a source package database of a source machine with a first platform according to a keyword, wherein the file system can be installed into a target machine with a second platform. The method comprises steps of performing a first query-response communication, according to the keyword, to obtain a package list from the source package database, wherein the package list comprises at least one package name. S package table is built up according to the package list. A target package set is generated according to the package table and the second platform, wherein the target package set comprises at least one package. The target package set is fine tuned to be a target file system.
According to the method described in the embodiment of the present invention, the method for building up the package table comprises steps of performing a second query-response communication with the source package database according to each package name in the package list to correspondingly obtain a dependency package list and a supply-able file list.
According to the method described in the embodiment of the present invention, the dependency package list has at least one dependency package name, the dependency package names which have not shown in the package list are added into the package list.
According to the method described in the embodiment of the present invention, the method for generating the target package set comprises a step of collecting the packages, which are compatible with the second platform, from the source package database to form the target package set according to the package list of the package table.
According to the f method described in the embodiment of the present invention, the method of fine tuning the target package set comprises a step of performing a third query-response communication with the source machine to fine tune the target package set to be the target file system according to a history record.
According to the method described in the embodiment of the present invention, in the third query-response communication, it further comprises a step of obtaining at least one file from a source file system of the source machine into the target package set.
According to the method described in the embodiment of the present invention, the file includes a system registration file and a user name file.
According to the method described in the embodiment of the present invention, the first platform is different from the second platform.
According to the method described in the embodiment of the present invention, the first platform is as same as the second platform.
According to the method described in the embodiment of the present invention, each of the packages complies with a file standard of RedHat Package Management (RPM).
According to the method described in the embodiment of the present invention, the source package database includes an RPM database.
In the present invention, the file system builder engine of the file system builder performs a query-response communication, according to the input keyword, with a source package database of a source machine to build up a package table with respect to the input keyword. The generator generates a target package set, which can be installed onto a target machine, from the package table. The fine tuner adjusts the target set to be a target file system compatible for the target machine. That is, the customized development environment is built up according to the keyword. Since the development environment is built up based on the keyword (the required functionality), the file system can provide the necessary functionality without occupying a lot of storage space. Moreover, by using the file system builder, the new development environment can be rapidly established from the source development environment so that the time for re-building a development environment can be saved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary, and are intended to provide further explanation of the invention as claimed.
The accompanying drawings are included to provide a further understanding of the invention, and are incorporated in and constitute a part of this specification. The drawings illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.
Moreover, a file system builder 106 comprises an input interface module 112, a file system builder engine 114, a generator 120 and a fine tuner 122. Further, a target machine 108 is a machine with a second platform. The target machine 108 can be, for example but not limited to, a multimedia box or a digital functional product possessing a playback function for playing a DVD. The second platform can be, for example but not limited to, an x86 platform or an Alpha platform.
Taking a multimedia box having the playback function for playing a DVD as an example, when the system (the multimedia box) is designed to have Gnome CD Player as the playback software, the keyword “gnome-cd” is input into the input interface module 112. Then, according to the keyword, the file system builder engine 114 queries the source package database 102 of the source machine 100 and receives a response including a package list with respect to the keyword, “gnome-cd”, from the source package database 102 (first query-response communication, step S201). That is, the package list comprises the names of all the packages necessary for executing a function about “gnome-cd”. As shown in
The step that file system builder engine 114 builds up the package table according to the package list 115 further comprises a step of performing a second query-response communication (step S205). That is, the file system builder engine 114 queries the source package database 102 according to each package name in the package list 115 and receives a response including a dependency package list 116a and a supply-able file list 116b respectively corresponding to each package name in the package list 115 (step S207). Taking A.rpm in the package list 115 as an example, file system builder engine 114 performs a second query-response communication with the source package database 102 according to A.rpm to obtain the dependency package list 116a with respect to A.rpm and the supply-able file list 116b with respect to A.rpm. It should be noticed that the dependency package list 116a includes dependency package names such as B.rpm and C.rpm and the dependency packages listed in the dependency package list have dependency correlations with the package A.rpm. Furthermore, the supply-able file list 116b includes file names such as a and e and the files referred by file names in the file list 116b are that the package A.rpm can provide.
Once the second query-response communication is performed to obtain a dependency package list 116a and a supply-able file list 116b corresponding to a package in the package list 115, when the dependency package list 116a possesses at least one dependency package name, the dependency package names which have not shown in the package list 115 are added into the package list 115. That is, as shown in
If the checking result shows that all the package names in the package list 115 have been queried, the package table 116 is completely formed (step S211). As shown in
Thereafter, the fine tuner 122 fine tune the target package set to be a target file system (step S215), wherein the target file system can be installed into the target machine 108 with the second platform to be a target file system 110. It should be noticed that the method for fine tuning the target package set comprises that the fine tuner 122 performs a third query-response communication with the source machine 100 according to a history record to adjust the target package set to be a target file system. Preferably, the fine tuner 122 queries the source machine 100 about the necessary files according to the history record 124 and receives the corresponding response to obtain the files. The aforementioned history record 124 is used to record the history tuning rules corresponding to each package. Moreover, the method for obtaining the history tuning rules comprises step of installing the target file system onto the target machine 108 and then performing a serial test runs to obtain the necessary fine tuning information. Finally, the fine tuning information is collected to be the history tuning rules. Further, the aforementioned files necessary for the fine tuning process (step S215) and collected from the source file system 104 can be, for example but not limited to, a system registration file or a user name file.
In the present invention, according to the input keyword, the file system builder engine of the file system builder obtains a package list from the source package database of the source machine. By referring to the package list, a package table with respect to the input keyword is built. Then, basing on the platform information of the target machine and the package table, the generator generates the target package set for the target machine from the source package database. Thereafter, the fine tuner adjusts the target package set to be a target file system compatible with the target machine. That is, a customized file system for the target machine according to the keyword is built.
Since the target file system is built according to the keyword, the target file system can provide the desired functions without occupying storage space. Furthermore, by using the file system builder, the customized file system can be rapidly built from the source package database so that the time for re-building up a new development environment can be saved. Therefore, the target file system can be built up in a short time to keep pace with the short life time of the digital consumer product. Since the target file system is built based on the source package database of the source machine, the problem of the system integration can be overcome. Furthermore, the target file system is built according to the platform of the target machine so that the target file system built from the source machine can compatible with the target machine.
It will be apparent to those skilled in the art that various modifications and variations can be made to the structure of the present invention without departing from the scope or spirit of the invention. In view of the foregoing descriptions, it is intended that the present invention covers modifications and variations of this invention if they fall within the scope of the following claims and their equivalents.
| Number | Date | Country | Kind |
|---|---|---|---|
| 94131046 | Sep 2005 | TW | national |