A configuration file generation method and related device

By determining the demand information of the target project, obtaining the target file index and generating configuration files, the problem of low development efficiency in the existing technology is solved, and the development efficiency of rapid iterative Linux products is improved.

CN114968931BActive Publication Date: 2024-11-08SPREADTRUM COMMUNICATION (SHANGHAI) CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202210412340.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-19
Publication Date
2024-11-08
Estimated Expiration
2042-04-19

AI Technical Summary

Technical Problem

When developing embedded projects based on Linux systems, the existing technology needs to be developed separately for different product forms or project requirements, resulting in low development efficiency and is not conducive to the rapid iteration of Linux products.

Method used

By determining the requirements information of the target project, obtaining the target file index matching the requirements information, and generating configuration files based on the target file index and the information to be compiled, the method of quickly generating configuration files is realized.

Benefits of technology

It improves the efficiency of generating configuration files, is suitable for rapidly iterating Linux product development scenarios, reducing development difficulty and maintenance complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114968931B_ABST
    Figure CN114968931B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a configuration file generation method and related devices, the method comprising: determining the requirement information of a target project to be built in a Linux system, the requirement information being used to describe the functions required by the target project; obtaining a target file index matching the requirement information; and generating a configuration file for the target project according to the target file index and the information to be compiled of the target project. The present application can improve the efficiency of generating configuration files, thereby being applicable to the development of fast-iteration Linux products.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a configuration file generation method and related devices. Background Art

[0002] With the development of electronic devices, electronic devices suitable for embedded systems, such as smart phones, smart home appliances, navigation devices, industrial robots, etc., involve all aspects of people's lives and bring great convenience to people's lives. The so-called embedded system refers to a device that can operate independently, mainly used to perform special functions, and consists of software and hardware parts. The embedded system can be based on the Linux system. When developers develop embedded projects based on the Linux system, they usually write the development code of a project in a configuration file (.conf file). Each project corresponds to a configuration file. For a Linux distribution, it usually contains different product forms or project requirements. Developers need to develop separately for different product forms or project requirements. This method is inefficient and not conducive to the rapid iteration of Linux products. Summary of the invention

[0003] The embodiments of the present application provide a configuration file generation method and related devices, which can improve the efficiency of generating configuration files for development projects and can be applicable to development scenarios of fast-iteration Linux products.

[0004] In a first aspect, the present application provides a method for generating a configuration file, the method comprising:

[0005] Determine requirement information of a target project to be built in the Linux system, wherein the requirement information is used to describe functions required by the target project;

[0006] Obtaining a target file index that matches the requirement information;

[0007] A configuration file of the target project is generated according to the target file index and the information to be compiled of the target project.

[0008] In one implementation, the method further includes:

[0009] Receiving a compile instruction for the configuration file;

[0010] The configuration file is compiled according to the compilation instruction to obtain a first image file of the target project.

[0011] In one implementation, compiling the configuration file according to the compilation instruction to obtain the first image file of the target project includes:

[0012] Parsing the configuration file according to the compilation instruction to obtain index information, where the index information is used to indicate the target file index;

[0013] Obtaining a target file corresponding to the target file index;

[0014] Compiling the target file to obtain a first compilation result;

[0015] The configuration file is compiled according to the first compilation result to obtain the first image file.

[0016] In one implementation, the target file is an original file corresponding to the target file index; the method further includes:

[0017] The original file is updated to a reference file, and the reference file is compiled to obtain a second compilation result;

[0018] The configuration file is compiled according to the second compilation result to obtain a second image file.

[0019] In one implementation, the target file index includes a software file index;

[0020] The step of generating a configuration file of the target project according to the target file index and the information to be compiled of the target project comprises:

[0021] Generate a software configuration subfile according to the software file index; the software configuration subfile is used to call the software file index to implement the software function of the target project;

[0022] A configuration file of the target project is generated according to the software configuration sub-file and the information to be compiled of the target project.

[0023] In one implementation, the target file index includes a hardware file index;

[0024] The step of generating a configuration file of the target project according to the target file index and the information to be compiled of the target project comprises:

[0025] Generate a chip configuration subfile according to the hardware file index, wherein the chip configuration subfile is used to call the hardware file index to implement the chip function of the target project;

[0026] A configuration file of the target project is generated according to the chip configuration subfile and the information to be compiled of the target project.

[0027] In one implementation, the target file index includes a hardware file index;

[0028] The step of generating a configuration file of the target project according to the target file index and the information to be compiled of the target project comprises:

[0029] Generate a baseboard configuration subfile according to the hardware file index, wherein the baseboard configuration subfile is used to call the hardware file index to implement the chip function and baseboard function of the target project;

[0030] A configuration file of the target project is generated according to the baseboard configuration sub-file and the information to be compiled of the target project.

[0031] In a second aspect, the present application provides a configuration file generating device, the configuration file generating device comprising:

[0032] A determination unit, used to determine requirement information of a target project to be built in a Linux system, wherein the requirement information is used to describe functions required by the target project;

[0033] An acquisition unit, used to acquire a target file index matching the requirement information;

[0034] A generating unit is used to generate a configuration file of the target project according to the target file index and the information to be compiled of the target project.

[0035] In addition, in this aspect, other optional implementations of the configuration file generating device can refer to the relevant contents of the first aspect above, which will not be described in detail here.

[0036] In a third aspect, the present application provides a chip, which is used to determine requirement information of a target project to be built in a Linux system, wherein the requirement information is used to describe the functions required for the target project; the chip is also used to obtain a target file index that matches the requirement information; the chip is also used to generate a configuration file for the target project based on the target file index and the information to be compiled of the target project.

[0037] In a fourth aspect, the present application provides a module device, which includes a communication module, a power module, a storage module and a chip module, wherein: the communication module is used for internal communication of the module device, or for the module device to communicate with an external device; the power module is used to provide power to the module device; the storage module is used to store data and instructions; the chip module is used to: determine the requirement information of a target project to be built in the Linux system, the requirement information is used to describe the functions required for the target project; obtain a target file index that matches the requirement information; and generate a configuration file for the target project based on the target file index and the information to be compiled of the target project.

[0038] In a fifth aspect, the present application provides a computer-readable storage medium, which stores computer-readable instructions. When the computer-readable instructions are executed on a configuration file generation device, the configuration file generation device executes the method in the above-mentioned first aspect and any possible implementation thereof.

[0039] In a sixth aspect, the present application provides a computer program or a computer program product, comprising codes or instructions, which, when executed on a computer, enable the computer to execute the method in the first aspect and any possible implementation thereof.

[0040] In the embodiment of the present application, since the target file index matching the project requirement information is directly obtained and then the configuration file is generated according to the target file index, the configuration file can be quickly generated according to the target file index of each function of the target project, thereby improving the efficiency of generating the configuration file, thereby improving the efficiency of developing Linux products, and is suitable for development scenarios of rapidly iterating Linux products. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0042] Figure 1 It is a flowchart of a configuration file generation method provided in an embodiment of the present application;

[0043] Figure 2 It is a schematic diagram of the structure of a configuration file provided in an embodiment of the present application;

[0044] Figure 3 It is a schematic diagram of the structure of a configuration file provided in an embodiment of the present application;

[0045] Figure 4 It is a structural schematic diagram of a configuration file generating device provided in an embodiment of the present application;

[0046] Figure 5 is a schematic diagram of the structure of a chip provided in an embodiment of the present application;

[0047] Figure 6 It is a structural schematic diagram of the module device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0048] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0049] The Linux system is a UNIX-like computer operating system. There are also many products developed based on the Linux system. The Linux product can be a Linux distribution. The Linux distribution can be obtained by compiling the configuration file of the project corresponding to the Linux product. It can be understood that the product forms and project requirements of different Linux products are different. At present, for a Linux product, the electronic device can usually first determine the demand information of the Linux product to be developed. The demand information can be the demand information of the project corresponding to the Linux product, and the demand information can be the demand information received from the user. Then the electronic device can obtain the information to be compiled for the demand information, and the information to be compiled can be the development code for the demand information received from the user. Further, a configuration file can be generated according to the information to be compiled, and the configuration file can be compiled by calling a compiler to obtain a compiled image file. When the electronic device receives a burning instruction, the compiled image file can be burned in the terminal device, specifically in the programmable read-only memory of the terminal device, so as to obtain a terminal device capable of performing a specific function (work), that is, to obtain the Linux product corresponding to the project.

[0050] Exemplarily, the electronic device can be a user's development device, such as a personal computer, which can determine the demand information of the project of the Linux product to be developed, and then obtain the information to be compiled for the demand information to obtain the configuration file. After obtaining the configuration file, the electronic device can compile the configuration file by calling the compiler to obtain the compiled image file. Furthermore, the electronic device can receive a burning instruction, which can be used to instruct the electronic device to burn the image file in the terminal device. It should be noted that the terminal device of the object of the image file burning is not the same device as the electronic device. The terminal device is the entity that carries the image file, that is, the hardware entity of the Linux product. The terminal device can be determined according to the specific usage scenario and business needs. The terminal device can be, for example, a vehicle-mounted terminal, a smart home appliance, a navigation device, an industrial device, and the like.

[0051] Among them, in the process of receiving the information to be compiled and generating the configuration file, the electronic device will generate a configuration file including all the information to be compiled, that is, usually a configuration file is generated for a project, and the configuration file includes all the information to be compiled in the demand information of the project, that is, the development code for the project input by the user is received. If the electronic device needs to generate configuration files according to the information to be compiled of multiple projects respectively, and there are some identical demand information in multiple projects, then for the configuration files of each project in the multiple projects, the above-mentioned method of generating a configuration file for one project is adopted, and overlapping and reused parameters will appear between the multiple configuration files generated by the electronic device, and these overlapping and reused parameters are developed in each project respectively, resulting in repeated generation of the same part, and the efficiency of generating the configuration files of multiple projects is low. In addition, if some common configurations need to take effect in each project, the information to be compiled (such as source development code) in the common configuration needs to be modified in the case of modification, after receiving the modification instructions for the configuration files of each project, the configuration files of each project need to be modified separately, resulting in low maintainability. In addition, for users, if all the development codes of the project need to be configured in the configuration file, the difficulty is relatively high, and usually personnel who know more about the original Linux distribution or personnel who are proficient in development can quickly create a new Linux distribution, which is not conducive to the ecological construction of software.

[0052] In view of the above defects, the present application proposes a configuration file generation method, whereby an electronic device can determine the requirement information of a target project to be built in a Linux system, the requirement information being used to describe the functions required by the target project, and obtain a target file index matching the requirement information, and generate a configuration file for the target project based on the target file index and the information to be compiled of the target project. It can be seen that the electronic device can quickly generate a configuration file based on the target file index of each function of the target project, that is, quickly generate a configuration file by using an existing configuration file, thereby improving the efficiency of generating a configuration file, and can be applied to the scenario of fast-iterating Linux products.

[0053] The configuration file generation method in the embodiment of the present application can be applied to electronic devices, which may be mobile phones, tablet computers, computers with wireless transceiver functions, computer equipment, virtual reality (VR) terminal equipment, augmented reality (AR) terminal equipment, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, and embedded devices in the field of Artificial Intelligence & Internet of Things (AIoT). The electronic device can also be a server, for example, it can be an independent physical server, or it can be a server cluster or distributed system composed of multiple physical servers, or it can be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms and other basic cloud computing services, which are not limited in this application. Among them, the electronic device can be an electronic device of a developer. The electronic device can be used to generate a configuration file based on the target file index and the information to be compiled, and can compile the generated configuration file by calling a compiler, thereby obtaining an image file that can be used to burn in a terminal device. The embodiments of the present application do not limit the specific technology and specific device form used by the electronic device.

[0054] Based on the above description, the present application embodiment provides a configuration file generation method, and the configuration file generation method of the present application embodiment can be implemented by the above electronic device. Figure 1 , Figure 1 101-103:

[0055] 101. Determine the requirement information of the target project to be built on the Linux system.

[0056] In the embodiment of the present application, the target project is any project that needs to be built in the Linux system, and the requirement information of the target project is the functions that the Linux product corresponding to the project should have, that is, the development requirements of the project.

[0057] In a possible implementation, when a user creates a new project, the user can input a project creation instruction into the electronic device, and the electronic device creates a target project in response to the creation instruction. The creation instruction can carry development requirements, and the electronic device can determine the requirement information of the target project based on the development requirements. For the user, the user can be a developer, and the developer can first determine the development requirements, that is, determine what functions the product to be developed has, and then send a creation instruction to the electronic device, and the creation instruction is used to instruct the electronic device to create the target project. The creation instruction can carry the development requirements determined by the developer, and the electronic device creates the target project after receiving the creation instruction, and determines the requirement information of the target project based on the development requirements.

[0058] Among them, the demand information may include the software functions and / or hardware functions of the target project. The so-called software function is the function implemented by the software program, and the so-called hardware function is the function implemented by the adapted hardware device. Optionally, the demand information may also include other functions of the target project, such as debugging functions, etc. The demand information can be determined according to the actual business scenario and product requirements, and this application does not limit this. For a Linux distribution of a Linux product, if you want to independently release a software package of software functions, then the demand information may only include software functions. Similarly, if you want to independently release a software package of hardware functions, then the demand information may only include hardware functions.

[0059] 102. Obtain a target file index that matches the above requirement information.

[0060] In the embodiment of the present application, the file index is an index used to indicate one or more files, and the target file index matched with the requirement information may be a software file index matched with the software function in the requirement information, and / or a hardware file index matched with the hardware function in the requirement information. Exemplarily, the requirement information includes function A, and the file index of function A is a, then the file of function A can be indicated according to the file index a. Among them, each function included in the requirement information can match one target file index, and the function included in the requirement information can also match multiple target file indexes.

[0061] In a possible implementation, the embodiment of the present application classifies and componentizes each function in the Linux system. The so-called componentization is equivalent to treating each function as a component or module. The function can correspond to a file of a function. The electronic device receives the information to be compiled input by the user and can refer to the file corresponding to the function included in the demand information, which is equivalent to enabling the function, thereby realizing the separation of different functions and the shelving of functional components. Shelving of functional components can be understood as treating each function as a commodity on a shelf. When building a target project, the electronic device can directly obtain the file of the function that has been configured in the shelf and matches the demand information, that is, complete the "assembly" of the function in the target project, so that the target project can be quickly built, which can lay the foundation for quickly building the Linux distribution of the required Linux product.

[0062] At present, the function of a Linux product can be composed of multiple functions. Since different Linux products have different product forms or project requirements, the requirements for functions are also different. If the above-mentioned method of generating a configuration file for one project is adopted without separating different functions, if different projects use common functions, there is no way to reuse them, which may also lead to a large workload for users during development, and also lead to slow configuration file generation and low development efficiency. By obtaining the target file index that matches the demand information, on the one hand, various functional components can be put on the shelf, which is conducive to the independent release of functional components, and the independent release of pure software functions; on the other hand, it can facilitate non-developer users to customize the required functions, which can reduce the technical difficulty of user development, shorten the product development cycle, reuse common functions, improve development efficiency, and quickly generate configuration files, thereby quickly iterating Linux products.

[0063] 103. Generate a configuration file of the target project according to the target file index and the information to be compiled of the target project.

[0064] In the embodiment of the present application, the information to be compiled of the target project refers to the development code of the target project except the target file index. The configuration file of the target project is a file including all the development codes of the target project, wherein a file for a certain function may also be a configuration file of the function, and the configuration file of the function may include the development code of the function, for example, function A included in the above requirement information, then the electronic device can obtain the configuration file of function A indicated by file index a according to the file index a.

[0065] In a possible implementation, the information to be compiled of the target project may be a development instruction for the target project received by the electronic device and input by the user, and the electronic device may develop the target project in response to the development instruction. The development instruction may carry the information to be compiled of the target project and a target file index, and the electronic device may generate a configuration file for the target project according to the information to be compiled and the target file index.

[0066] In a possible implementation, a project includes a hardware part and a software part. In order to quickly "assemble" the target project, that is, to obtain the configuration file of the target project, the electronic device can divide the hierarchy of the configuration file into the configuration file of the target project, the software configuration subfile, and the hardware configuration subfile. The level of the configuration file of the target project is higher than the software configuration subfile and the hardware configuration subfile, and the level of the software configuration subfile is the same as the level of the hardware configuration subfile. It should be noted that the names of these three files are used for example and do not constitute a limitation on the embodiments of the present application. Among them, the hardware configuration subfile may further include a chip configuration subfile and / or a baseboard configuration subfile, and the levels of the chip configuration subfile and the baseboard configuration subfile are lower than the level of the hardware configuration subfile, the level of the chip configuration subfile may be the same as the level of the baseboard configuration subfile, and the level of the chip configuration subfile may also be lower than the baseboard configuration subfile.

[0067] Specifically, the electronic device can generate a software configuration subfile according to the software file index included in the target file index, and the software configuration subfile can call the software file index to implement the software function of the target project. Similarly, the electronic device can also generate a backplane configuration subfile or a chip configuration subfile included in the hardware configuration subfile according to the hardware file index included in the target file index, and the backplane configuration subfile or the chip configuration subfile included in the hardware configuration subfile can call the hardware file index to implement the hardware function of the target project. Among them, the chip configuration subfile included in the hardware configuration subfile can be used to implement the chip function of the target project, and the backplane configuration file included in the hardware configuration subfile can be used to implement the backplane function of the target project, or the backplane function and the chip function, that is, it can be understood that the chip configuration subfile can be included in the backplane configuration subfile. Among them, the software function can also be described as a software feature (DistroFeature), and the backplane function and the chip function can both be described as a hardware feature (Machine Feature). In this application, the software function and the software feature (Distro Feature) can be interchangeable, and the backplane function and the chip function can both be interchangeable with the hardware feature (Machine Feature).

[0068] Please also read Figure 2 , Figure 2 Schematic diagram of a configuration file provided in an embodiment of the present application. Figure 2 As shown, this structural diagram can represent the file hierarchy of the configuration file of the target project. Figure 2 Taking the example that the chip configuration subfile and the baseboard configuration subfile have lower levels than the hardware configuration subfile, the top configuration file is the configuration file (product.conf) of the target project, which is equivalent to the product configuration file. The configuration file (product.conf) of the target project is used to implement all the functions required by the target project, and the configuration file of the target project includes all the development codes required by the target project. Under the level of the configuration file (product.conf) of the target project, a software configuration subfile (distro.conf) may be included. The software configuration subfile (distro.conf) may be used to implement the software functions of the target project, and the software configuration subfile (distro.conf) may include the development code to implement the software functions of the target project. At the level of the configuration file (product.conf) of the target project, a baseboard configuration subfile (board.conf) may also be included. The baseboard configuration subfile (board.conf) may be used to implement the hardware function of the target project (such as chip function, or chip function and baseboard function), that is, the baseboard configuration subfile (board.conf) may include development code for implementing the baseboard function or the baseboard function and chip function of the target project. The baseboard configuration subfile (board.conf) may include a chip configuration subfile (soc.inc or soc.conf). The chip configuration subfile (soc.inc or soc.conf) may be used to implement the chip function of the target project. The chip configuration subfile (soc.inc or soc.conf) may include development code for implementing the chip function of the target project.

[0069] Optionally, in the process of generating a configuration file, the common configuration can be directly integrated by calling the require() function, that is, the development code carried by the development instruction received by the electronic device may include a statement calling the require() function, through which the common configuration of the target project can be completed. For the configuration sub-file that can be reused in other projects in the target project, it can be directly generated by obtaining the file index (target file index) corresponding to the configuration sub-file.

[0070] In a possible implementation, the hardware functions included in the requirement information of the target project may include requirements for chips. For example, the chip requirement may be chip A. Or the requirements for chips and baseboards. For example, the baseboard requirement may be a requirement with screen display function, Bluetooth function, key function, etc. Then, a chip configuration subfile (soc.conf) may be generated first. If the chip configuration subfile for the chip requirement is already configured, the chip configuration subfile (soc.conf) may be created according to a hardware file index. For example, an existing chip configuration subfile may be referenced by includesoc.conf to generate a chip configuration subfile, wherein soc.conf is a hardware file identifier.

[0071] Furthermore, after generating the chip configuration subfile (soc.conf), a baseboard configuration subfile (board.conf) can be generated according to the requirements of the baseboard. Similarly, if the baseboard configuration subfile for the requirements of the baseboard is already configured, then the configuration subfile of the baseboard (board.conf) can be generated according to the hardware file index. For example, the existing baseboard configuration subfile is referenced by includeboard.conf to generate the baseboard configuration subfile (board.conf). Similarly, the hardware file is identified as board.conf.

[0072] Optionally, since the baseboard configuration subfile (board.conf) can include a chip configuration subfile (soc.conf), if the baseboard configuration subfile for the chip requirements and the baseboard requirements is already configured, the baseboard configuration subfile (board.conf) can be generated directly without first generating a chip configuration subfile based on the chip requirements.

[0073] Furthermore, the electronic device can also create a software configuration sub-file (distro.conf) according to software requirements. The software requirements may include software functions, such as the function of supporting screen display, the function of supporting buttons, the function of supporting animation display, etc. Each software function may also correspond to a software configuration sub-file. If the software function has been configured, it can also be directly generated according to the target file index. For example, the existing software configuration sub-file is referenced by includedistro.conf to generate the software configuration sub-file. The configuration file (product.conf) of the target project can be obtained from the software configuration sub-file (distro.conf) and the backplane configuration sub-file (board.conf) including the chip configuration sub-file (soc.conf).

[0074] It can be seen that in the embodiment of the present application, the software part, the baseboard part and the chip part in a Linux product are separated. The configuration file of the target project corresponding to the Linux product is divided into the dimensions of chip, baseboard and product (project). According to different combinations, by reusing the chip configuration subfile, baseboard configuration subfile and software configuration subfile, only the unique functions need to be configured, that is, only the differential configuration needs to be added. For electronic devices to build Linux distribution versions, the modification amount is small, and the configuration subfile can be customized and added according to the functions in the demand information, which is conducive to controlling the size of the Linux distribution version, quickly developing, and minimizing the modification of development projects.

[0075] Optionally, if the configuration subfile of the requirement information of the target project is not already configured, that is, the function in the requirement information is a function (requirement) unique to the Linux product, the electronic device cannot directly generate the corresponding configuration subfile according to the target file index. The electronic device can receive the development code of the unique function in the development instruction input by the user, that is, the developer can develop for the unique function and carry the development code of the unique function in the development instruction and input it into the electronic device.

[0076] Optionally, the electronic device may generate a configuration file for the specific function in the requirement information, and the configuration file may include a development code for implementing the function. The electronic device may then store the configuration file as a configuration file for configuring the function, and define a corresponding file index for the configuration file, so that the configuration file corresponding to a function developed this time may be reused in the subsequent process of creating a new project and developing it.

[0077] In a possible implementation, after the configuration file is divided into chip, baseboard and software dimensions, the functional components can be divided into categories. Specifically, the concept of feature is defined in the Linux open source community Yocto. The so-called feature is equivalent to a function, or it can be a collection of multiple functions. In the embodiment of the present application, in order to better componentize each function, the features in the Linux distribution can be divided into software features (DistroFeature), hardware features (Machine Feature) and non-functional features (Image Feature). Among them, the so-called software feature (Distro Feature) can be a collection of software function requirements, independent of hardware features. The so-called hardware feature (Machine Feature) can be a collection of hardware function requirements including chips (Soc), baseboards (Board), peripherals, components (hardware), etc. Different hardware features are adapted to different hardware. The so-called non-functional feature (Image Feature), that is, the features that are not the above-mentioned software functions and hardware functions, for example, can be debugging functions, such as integrated debug tools.

[0078] It should be noted that the above-mentioned software features (Distro Feature), hardware features (Machine Feature) and non-functional features (Image Feature) are only concepts proposed for function classification. The actual functions are realized by generating configuration files by electronic devices, that is, each feature may correspond to one or more configuration files, and the configuration file corresponding to each feature may have a corresponding file index, which indicates the configuration file of a certain feature through the file index. The configuration file of a certain feature may include the development code for implementing the feature.

[0079] Please also read Figure 3 , Figure 3 is a schematic diagram of the structure of a configuration file provided in an embodiment of the present application, such as Figure 3 As shown, for the convenience of description, this application is Figure 3 The explanation is from right to left. The files from right to left are: chip configuration sub-file, baseboard configuration sub-file, software configuration sub-file, target project configuration file and image file.

[0080] like Figure 3On the far right, the chip configuration subfile (soc.conf) may include the relevant configuration of the chip in the requirement information of the target project. Exemplarily, the relevant configuration of the chip may be the system kernel kernel / the boot loader u-boot for embedded systems / the configuration of the chip storage chipram, etc. Among them, the target file index of the target project may include a hardware file index, and the electronic device may generate a chip configuration subfile (soc.conf) according to the hardware file index, that is, the chip configuration subfile (soc.conf) may be generated according to the hardware file index of the chip requirements in the configured requirement information. Optionally, the chip configuration subfile (soc.conf) may also include development code for the specific functions of the chip. Then the electronic device may generate a configuration file (product.conf) of the target project according to the chip configuration subfile (soc.conf) and the information to be compiled of the target project.

[0081] Further, on the left side of the chip configuration subfile (soc.conf) is the backplane configuration subfile (board.conf), and the file level of the backplane configuration subfile (board.conf) is above the chip configuration subfile (soc.conf), then the chip configuration subfile (soc.conf) can be referenced, and includes the relevant configuration of the backplane. Exemplarily, the relevant configuration of the backplane may include the relevant configuration of the file system rootfs, the partition-related configuration, the storage type selection, and the adaptation of the underlying software to the backplane (board). Among them, the rootfs refers to the root file system in Linux, which is used to manage and store files, because all behaviors and operations in Linux are reflected in the file. Among them, the backplane configuration subfile may also include one or more configuration files of hardware features (Machine Feature), and the configuration file of the hardware feature (Machine Feature) may be generated according to the hardware file index corresponding to the hardware feature (Machine Feature), that is, it can be generated by referencing the hardware file index that has been configured for the hardware feature (Machine Feature). Optionally, the backplane configuration subfile (board.conf) may also include development code for the unique functions of the backplane.

[0082] Among them, the electronic device can generate a baseboard configuration subfile (board.conf) according to the hardware file index, and the baseboard configuration subfile (board.conf) includes chip functions and baseboard functions, and then the electronic device can generate the configuration file (product.conf) of the target project according to the baseboard configuration subfile (board.conf) and the information to be compiled of the target project. Exemplarily, if the requirement information of the target project includes hardware function A, the hardware feature A can be enabled in the baseboard configuration subfile (board.conf), for example, enableMachine Feature=A, so as to complete the configuration of hardware function A, wherein the hardware file index is A. And so on, until the configuration of all hardware features (Machine Feature) in the requirement information is completed, the file including the configuration of all hardware features (Machine Feature) can be used as the baseboard configuration subfile (board.conf).

[0083] Furthermore, on the left side of the baseboard configuration subfile (board.conf) is the configuration file (product.conf) of the target project. The file level of the configuration file (product.conf) of the target project is above the baseboard configuration subfile (board.conf). Then, the configuration file (product.conf) of the target project can reference the configured baseboard configuration subfile (board.conf) and can also reference the software configuration subfile (distro.conf). The software configuration subfile (distro.conf) is a configuration file generated according to the software file index. The software configuration subfile (distro.conf) can be one or more, corresponding to the corresponding software file indexes. Among the multiple software configuration subfiles (distro.conf) generated according to the multiple software file indexes, one of the software configuration subfiles (distro.conf) can be a software configuration file that references Poky, a development sample of a project in the Yocto community. The development sample has multiple version branches, which is equivalent to a reference release of the Yocto project. The Poky configuration file (distro.conf) can be referenced in the target project's configuration file (product.conf) to retain the functions originally supported by Poky. By referencing Poky's configuration file (distro.conf), it is equivalent to Poky's official TCLIBC version and compilation chain, which is conducive to the support and version release of subsequent open source components.

[0084] Furthermore, the configuration file (product.conf) of the target project can not only reference the configuration file (distro.conf) that comes with Poky, but also reference the configuration files of one or more software features (Distro Feature) of other software functions required by the target project requirement information, that is, other software configuration sub-files (distro.conf) can be generated based on other software file indexes. Thereby, the unique software functions of the Linux product (such as the unique configuration in the project requirements) are realized. Furthermore, the electronic device can generate the configuration file of the target project based on the software configuration sub-file and the information to be compiled of the target project. Exemplarily, the development code includes the enable statement enableDistro Feature = A, B, A and B are software file indexes, then the configuration files including the software functions in the requirement information of the target project can be used as software configuration sub-files (distro.conf), and A and B can be used to indicate the configuration files of software function A and software function B, thereby generating the software configuration sub-file (distro.conf).

[0085] Optionally, the configuration file (product.conf) of the target project may also include a configuration subfile of a non-functional feature (Image Feature), wherein the configuration subfile of the non-functional feature (Image Feature) may be generated according to a non-functional file index. Optionally, the electronic device may also generate a configuration subfile of the non-functional feature (Image Feature) according to the non-functional feature (Image Feature) portion of the development code carried in the above development instruction.

[0086] In a possible implementation, after obtaining the configuration file (product.conf) of the target project, the electronic device can receive a compilation instruction for the configuration file of the target project, and call a compiler to compile the configuration file according to the compilation instruction to obtain the first image file of the target project. The so-called image file is a specific file combination, in which a series of files in the file combination are made into a single package file (pac package) according to a certain format. After calling the compiler to compile the configuration file (product.conf) of the target project, a binary file that can be recognized by the computer device can be obtained, that is, the Linux distribution of the target project. Burn the image file of the Linux distribution in a terminal device to obtain the desired Linux product.

[0087] like Figure 3 As shown, the configuration file (product.conf) of the target project is compiled by the compiler to obtain the following Figure 3The first image file (Edition / pac package) shown on the far left. Further, the first image file is burned into the terminal device, and the terminal device executes the function developed by the target project.

[0088] Specifically, the electronic device compiles the configuration file of the target project by calling the compiler, which can be to parse the configuration file of the target project to obtain index information, wherein the index information is used to indicate the target file index, and then the electronic device can obtain the target file corresponding to the target file index by calling the compiler, and then the electronic device compiles the target file by calling the compiler to obtain a first compilation result, which is the compilation result of the target file, and then the electronic device can compile the target configuration file according to the first compilation result by calling the compiler to obtain a first mirror file. It should be noted that the present application takes a target file as an example, and the target file index of the configuration file of the target project may include multiple ones, corresponding to multiple target files respectively.

[0089] During the compilation process, you can follow the steps below: Figure 2 The file hierarchy shown is compiled from top to bottom. For example, when the configuration file (product.conf) of the target project is compiled and then compiled to reference the software configuration sub-file (distro.conf), the software configuration sub-file (distro.conf) can be obtained, and then the software configuration sub-file (distro.conf) can be compiled to obtain the compilation result of the software configuration sub-file (distro.conf), and then the information to be compiled in the configuration file is compiled. When compiling to reference the baseboard configuration sub-file (board.conf), the baseboard configuration sub-file (board.conf) can be obtained first, and the baseboard configuration sub-file (board.conf) can be compiled to obtain the compilation result of the baseboard configuration sub-file (board.conf). Optionally, the baseboard configuration subfile (board.conf) references the chip configuration subfile (soc.conf), and the electronic device can compile the chip configuration subfile (soc.conf) by calling the compiler to obtain the compilation result of the chip configuration subfile (soc.conf), and continue to compile the baseboard configuration subfile (board.conf) according to the compilation result of the chip configuration subfile (soc.conf) until the compilation of the configuration file (product.conf) of the target project is completed.

[0090] In a possible implementation, the configuration file (product.conf) of the target project is generated based on the target file index and the information to be compiled, and the information to be encoded may include index information, which is a keyword that can be recognized by the compiler, and then the electronic device can determine which target file is indicated according to the target file identifier after calling the compiler to identify the index information, and then obtain the corresponding target file. Exemplarily, in the above statement "enableDistro Feature = A, B", the target file indexes are "A" and "B", and the index information can be "enableDistro Feature", that is, the compiler can determine that A and B are software file indexes by identifying Distro Feature, and then determine that software function A and software function B are enabled according to A and B. Further, the compiler can obtain the target file corresponding to software function A (i.e., the configuration file of software function A) and the target file corresponding to software function B (i.e., the configuration file of software function B) and compile them.

[0091] In a possible implementation, the electronic device obtains the target file corresponding to the target file index by calling the compiler, which can be obtained locally. The electronic device locally stores a configuration file library, and the configuration file library can store multiple configuration files, that is, the target files corresponding to each target file index. The electronic device stores local address information of the configuration file library, and the local address can be set by the developer or by default. The electronic device can obtain the file in the configuration file library according to the local address information by calling the compiler.

[0092] In another possible implementation, the electronic device obtains the target file corresponding to the target file index by calling the compiler, which can be obtained from the cloud. The electronic device stores cloud address information for obtaining the target file, and can obtain the corresponding configuration file from the configuration file library in the cloud according to the cloud address and the target file index, that is, the target file corresponding to each target file index.

[0093] Furthermore, the target file is the original file corresponding to the target file index. If the development code in the configuration file (target file) in the local or cloud configuration file library is updated, that is, the original file is updated to the reference file, the configuration file (product.conf) of the target project is not affected. This is because the configuration file (product.conf) of the target project only references the target file index. After the development in the target file corresponding to the target file index is updated, when the electronic device receives the compilation instruction, when compiling the configuration file (product.conf) of the target project, if the target file needs to be compiled, the electronic device compiles the reference file by calling the compiler to obtain a second compilation result, and then the electronic device compiles the configuration file according to the second compilation result by calling the compiler to obtain a second mirror file.

[0094] It can be understood that after the source code in a configuration file is updated, when compiling the configuration file that references the source code, the configuration file after the source code is updated is obtained for compilation, and there is no need to modify the configuration file (product.conf) of the target project again, that is, the consistency of the original function access is maintained, modifications can be made more quickly, and the image file of the target project can be built more safely, which lays the foundation for the traceability of Linux versions and improves the efficiency of configuration file generation and maintenance.

[0095] In the embodiment of the present application, since the target file index matching the project requirement information is directly obtained and then the configuration file is generated according to the target file index, the configuration file can be quickly generated according to the target file index of each function of the target project, thereby improving the efficiency of generating the configuration file, thereby improving the efficiency of developing Linux products, and is suitable for development scenarios of rapidly iterating Linux products.

[0096] See also Figure 4 , Figure 4 1 is a schematic diagram of a configuration file generation device provided in an embodiment of the present application. The configuration file generation device may be a user device, or a device in a user device, or a device that can be used in conjunction with a user device. Figure 4 The configuration file generating device 40 shown may include a determining unit 401, an acquiring unit 402, a generating unit 403, a receiving unit 404, and a compiling unit 405. Among them:

[0097] A determination unit 401 is used to determine requirement information of a target project to be built in a Linux system, wherein the requirement information is used to describe functions required by the target project;

[0098] An acquisition unit 402 is used to acquire a target file index matching the requirement information;

[0099] The generating unit 403 is configured to generate a configuration file of the target project according to the target file index and the information to be compiled of the target project.

[0100] In one implementation, the configuration file generating device 40 further includes:

[0101] The receiving unit 404 is used to receive a compile instruction for the configuration file;

[0102] The compiling unit 405 is used to compile the configuration file according to the compiling instruction to obtain the first image file of the target project.

[0103] In one implementation, the compiling unit 405 is used to compile the configuration file according to the compiling instruction to obtain the first image file of the target project, specifically for:

[0104] Parsing the configuration file according to the compilation instruction to obtain index information, where the index information is used to indicate the target file index;

[0105] Obtaining a target file corresponding to the target file index;

[0106] Compiling the target file to obtain a first compilation result;

[0107] The configuration file is compiled according to the first compilation result to obtain the first image file.

[0108] In one implementation, the target file is an original file corresponding to the target file index;

[0109] The compiling unit 405 is further used to update the original file into a reference file, compile the reference file, and obtain a second compilation result;

[0110] The configuration file is compiled according to the second compilation result to obtain a second image file.

[0111] In one implementation, the target file index includes a software file index; the generating unit 403 is used to generate a configuration file of the target project according to the target file index and the information to be compiled of the target project, specifically for:

[0112] Generate a software configuration subfile according to the software file index; the software configuration subfile is used to call the software file index to implement the software function of the target project;

[0113] A configuration file of the target project is generated according to the software configuration sub-file and the information to be compiled of the target project.

[0114] In one implementation, the target file index includes a hardware file index; the generating unit 403 is used to generate a configuration file of the target project according to the target file index and the information to be compiled of the target project, specifically for:

[0115] Generate a chip configuration subfile according to the hardware file index, wherein the chip configuration subfile is used to call the hardware file index to implement the chip function of the target project;

[0116] A configuration file of the target project is generated according to the chip configuration subfile and the information to be compiled of the target project.

[0117] In one implementation, the target file index includes a hardware file index; the generating unit 403 is used to generate a configuration file of the target project according to the target file index and the information to be compiled of the target project, specifically for:

[0118] Generate a baseboard configuration subfile according to the hardware file index, wherein the baseboard configuration subfile is used to call the hardware file index to implement the chip function and baseboard function of the target project;

[0119] A configuration file of the target project is generated according to the baseboard configuration sub-file and the information to be compiled of the target project.

[0120] In the embodiment of the present application, since the target file index matching the project requirement information is directly obtained and then the configuration file is generated according to the target file index, the configuration file can be quickly generated according to the target file index of each function of the target project, thereby improving the efficiency of generating the configuration file, thereby improving the efficiency of developing Linux products, and is suitable for development scenarios of rapidly iterating Linux products.

[0121] The configuration file generating device may be, for example, a chip or a chip module. The modules or units included in the devices and products described in the above embodiments may be software modules or hardware modules, or may be partially software modules and partially hardware modules. For example, for each device or product applied to or integrated in a chip, each module contained therein may be implemented in the form of hardware such as circuits, or at least some of the modules may be implemented in the form of software programs, which run on a processor integrated inside the chip, and the remaining (if any) modules may be implemented in the form of hardware such as circuits; for each device or product applied to or integrated in a chip module, each module contained therein may be implemented in the form of hardware such as circuits, and different modules may be located in the same component (e.g., chip, circuit module, etc.) or in different components of the chip module, or at least some of the modules may be implemented in the form of software programs, which run on a processor integrated inside the chip module, and the remaining (if any) modules may be implemented in the form of hardware such as circuits; for each device or product applied to or integrated in a user device, each module contained therein may be implemented in the form of hardware such as circuits, and different modules may be located in the same component (e.g., chip, circuit module, etc.) or in different components in the user device, or at least some of the modules may be implemented in the form of software programs, which run on a processor integrated inside the user device, and the remaining (if any) modules may be implemented in the form of hardware such as circuits.

[0122] For the case where the configuration file generating device can be a chip or a chip system, see Figure 5 The schematic diagram of the structure of the chip shown in the figure, the chip 50 includes a processor 501 and a communication interface 502. It should be noted that the chip or chip system here is a configuration file generating device, that is, the above-mentioned electronic device is a chip or a chip system, and the chip functions described in the embodiments of the present application are used to indicate the chip in the terminal device for burning the image file. Among them, the number of processors 501 can be one or more, and the number of communication interfaces 502 can be multiple. The chip 50 can execute the relevant steps of the configuration file generating device in the aforementioned method embodiment, and the above-mentioned processor 501 is configured to perform the following operations:

[0123] Determine requirement information of a target project to be built in the Linux system, wherein the requirement information is used to describe functions required by the target project;

[0124] Obtaining a target file index that matches the requirement information;

[0125] A configuration file of the target project is generated according to the target file index and the information to be compiled of the target project.

[0126] In one implementation, the processor 501 is further configured to perform the following operations:

[0127] Receiving a compile instruction for the configuration file;

[0128] The configuration file is compiled according to the compilation instruction to obtain a first image file of the target project.

[0129] In one implementation, the processor 501 is used to compile the configuration file according to the compilation instruction to obtain the first image file of the target project, specifically for executing:

[0130] Parsing the configuration file according to the compilation instruction to obtain index information, where the index information is used to indicate the target file index;

[0131] Obtaining a target file corresponding to the target file index;

[0132] Compiling the target file to obtain a first compilation result;

[0133] The configuration file is compiled according to the first compilation result to obtain the first image file.

[0134] In one implementation, the target file is an original file corresponding to the target file index; the processor 501 is further configured to perform the following operations:

[0135] The original file is updated to a reference file, and the reference file is compiled to obtain a second compilation result;

[0136] The configuration file is compiled according to the second compilation result to obtain a second image file.

[0137] In one implementation, the target file index includes a software file index;

[0138] The processor 501 is used to generate a configuration file of the target project according to the target file index and the information to be compiled of the target project, and is specifically used to execute:

[0139] Generate a software configuration subfile according to the software file index; the software configuration subfile is used to call the software file index to implement the software function of the target project;

[0140] A configuration file of the target project is generated according to the software configuration sub-file and the information to be compiled of the target project.

[0141] In one implementation, the target file index includes a hardware file index;

[0142] The processor 501 is used to generate a configuration file of the target project according to the target file index and the information to be compiled of the target project, and is specifically used to execute:

[0143] Generate a chip configuration subfile according to the hardware file index, wherein the chip configuration subfile is used to call the hardware file index to implement the chip function of the target project;

[0144] A configuration file of the target project is generated according to the chip configuration subfile and the information to be compiled of the target project.

[0145] In one implementation, the target file index includes a hardware file index;

[0146] The processor 501 is used to generate a configuration file of the target project according to the target file index and the information to be compiled of the target project, and is specifically used to execute:

[0147] Generate a baseboard configuration subfile according to the hardware file index, wherein the baseboard configuration subfile is used to call the hardware file index to implement the chip function and baseboard function of the target project;

[0148] A configuration file of the target project is generated according to the baseboard configuration sub-file and the information to be compiled of the target project.

[0149] For each device or product applied to or integrated in the chip, each module contained therein can be implemented in the form of hardware such as circuits, or at least some of the modules can be implemented in the form of software programs, which run on the processor 501 integrated inside the chip, and the remaining (if any) modules can be implemented in the form of hardware such as circuits.

[0150] In the embodiment of the present application, by determining the requirement information of the target project to be built in the Linux system, the requirement information is used to describe the functions required by the target project, and obtaining the target file index matching the requirement information, a configuration file of the target project is generated according to the target file index and the compilation information of the target project. Thus, the configuration file can be directly generated according to the target file index matching the requirement information of the project, that is, the target file index can be obtained and the configuration file can be generated according to the functions required by the project, the configuration file can be generated quickly, and the efficiency of generating the configuration file can be improved, thereby improving the efficiency of developing Linux products, and being suitable for the development scenario of Linux products with rapid iteration.

[0151] like Figure 6 As shown, Figure 660 can execute the relevant steps of the terminal device in the above method embodiment, and the module device 60 includes: a communication module 601, a power module 602, a storage module 603 and a chip module 604.

[0152] The power module 602 is used to provide power to the module device; the storage module 603 is used to store data and instructions; and the communication module 601 is used to communicate within the module device or to communicate between the module device and an external device.

[0153] The chip module 604 is used to: determine the requirement information of the target project to be built in the Linux system, where the requirement information is used to describe the functions required by the target project;

[0154] Obtaining a target file index that matches the requirement information;

[0155] A configuration file of the target project is generated according to the target file index and the information to be compiled of the target project.

[0156] In one implementation, the chip module 604 is further used for:

[0157] Receiving a compile instruction for the configuration file;

[0158] The configuration file is compiled according to the compilation instruction to obtain a first image file of the target project.

[0159] In one implementation, the chip module 604 compiles the configuration file according to the compilation instruction to obtain the first image file of the target project, which is specifically used for:

[0160] Parsing the configuration file according to the compilation instruction to obtain index information, where the index information is used to indicate the target file index;

[0161] Obtaining a target file corresponding to the target file index;

[0162] Compiling the target file to obtain a first compilation result;

[0163] The configuration file is compiled according to the first compilation result to obtain the first image file.

[0164] In one implementation, the target file is an original file corresponding to the target file index; the chip module 604 is further used for:

[0165] The original file is updated to a reference file, and the reference file is compiled to obtain a second compilation result;

[0166] The configuration file is compiled according to the second compilation result to obtain a second image file.

[0167] In one implementation, the target file index includes a software file index;

[0168] The chip module 604 generates a configuration file of the target project according to the target file index and the information to be compiled of the target project, which is specifically used for:

[0169] Generate a software configuration subfile according to the software file index; the software configuration subfile is used to call the software file index to implement the software function of the target project;

[0170] A configuration file of the target project is generated according to the software configuration sub-file and the information to be compiled of the target project.

[0171] In one implementation, the target file index includes a hardware file index;

[0172] The chip module 604 generates a configuration file of the target project according to the target file index and the information to be compiled of the target project, which is specifically used for:

[0173] Generate a chip configuration subfile according to the hardware file index, wherein the chip configuration subfile is used to call the hardware file index to implement the chip function of the target project;

[0174] A configuration file of the target project is generated according to the chip configuration subfile and the information to be compiled of the target project.

[0175] In one implementation, the target file index includes a hardware file index;

[0176] The chip module 604 generates a configuration file of the target project according to the target file index and the information to be compiled of the target project, which is specifically used for:

[0177] Generate a baseboard configuration subfile according to the hardware file index, wherein the baseboard configuration subfile is used to call the hardware file index to implement the chip function and baseboard function of the target project;

[0178] A configuration file of the target project is generated according to the baseboard configuration sub-file and the information to be compiled of the target project.

[0179] For each device or product applied to or integrated in the chip module, each module contained therein can be implemented by hardware such as circuits, and different modules can be located in the same component of the chip module (such as a chip, circuit module, etc.) or in different components. Alternatively, at least some of the modules can be implemented by software programs that run on a processor integrated inside the chip module, and the remaining (if any) modules can be implemented by hardware such as circuits.

[0180] An embodiment of the present application also provides a computer-readable storage medium, in which instructions are stored. When the computer-readable storage medium is executed on a processor, the method flow of the above method embodiment is implemented.

[0181] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain operations can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0182] The descriptions of the various embodiments provided in this application can refer to each other, and the descriptions of the various embodiments have different focuses. For parts that are not described in detail in a certain embodiment, refer to the relevant descriptions of other embodiments. For the convenience and simplicity of description, for example, the functions of the various devices and equipment provided in the embodiments of this application and the operations performed can refer to the relevant descriptions of the method embodiments of this application, and the various method embodiments and the various device embodiments can also refer to, combine or quote each other.

[0183] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A configuration file generation method, characterized in that: The method comprises: Receive a creation instruction, where the creation instruction is used to instruct to create a target project in the Linux system and carry development requirements determined by a developer; In response to the creation instruction, the target project is created and requirement information of the target project is determined according to the development requirement, wherein the requirement information is used to describe software functions and / or hardware functions required for the target project, wherein the software functions are functions implemented by software programs, and the hardware functions are functions implemented by adapted hardware devices; Acquire a target file index matching the requirement information; the target file index includes a software file index matching the software function and / or a hardware file index matching the hardware function; A configuration file of the target project is generated according to the target file index and the information to be compiled of the target project; the information to be compiled of the target project is the development code of the target project except the development code corresponding to the target file index.

2. The method according to claim 1, characterized in that The method further comprises: Receiving a compile instruction for the configuration file; The configuration file is compiled according to the compilation instruction to obtain a first image file of the target project.

3. The method according to claim 2, characterized in that The step of compiling the configuration file according to the compilation instruction to obtain the first image file of the target project includes: Parsing the configuration file according to the compilation instruction to obtain index information, where the index information is used to indicate the target file index; Obtaining a target file corresponding to the target file index; Compiling the target file to obtain a first compilation result; The configuration file is compiled according to the first compilation result to obtain the first image file.

4. The method according to claim 3, characterized in that The target file is an original file corresponding to the target file index; the method further includes: The original file is updated to a reference file, and the reference file is compiled to obtain a second compilation result; The configuration file is compiled according to the second compilation result to obtain a second image file.

5. The method according to any one of claims 1 to 4, characterized in that: The target file index includes a software file index; The step of generating a configuration file of the target project according to the target file index and the information to be compiled of the target project comprises: Generate a software configuration subfile according to the software file index; the software configuration subfile is used to call the software file index to implement the software function of the target project; A configuration file of the target project is generated according to the software configuration sub-file and the information to be compiled of the target project.

6. The method according to any one of claims 1 to 4, characterized in that: The target file index includes a hardware file index; The step of generating a configuration file of the target project according to the target file index and the information to be compiled of the target project comprises: Generate a chip configuration subfile according to the hardware file index, wherein the chip configuration subfile is used to call the hardware file index to implement the chip function of the target project; A configuration file of the target project is generated according to the chip configuration subfile and the information to be compiled of the target project.

7. The method according to any one of claims 1 to 4, characterized in that: The target file index includes a hardware file index; The step of generating a configuration file of the target project according to the target file index and the information to be compiled of the target project comprises: Generate a baseboard configuration subfile according to the hardware file index, wherein the baseboard configuration subfile is used to call the hardware file index to implement the chip function and baseboard function of the target project; A configuration file of the target project is generated according to the baseboard configuration sub-file and the information to be compiled of the target project.

8. A configuration file generating device, characterized in that: The configuration file generating device comprises: A determination unit is configured to receive a creation instruction, wherein the creation instruction is used to instruct to create a target project in a Linux system and carry development requirements determined by a developer; in response to the creation instruction, create the target project and determine requirement information of the target project according to the development requirements, wherein the requirement information is used to describe software functions and / or hardware functions required for the target project, wherein the software functions are functions implemented by software programs, and the hardware functions are functions implemented by adapted hardware devices; An acquisition unit, configured to acquire a target file index matching the requirement information; the target file index includes a software file index matching the software function and / or a hardware file index matching the hardware function; A generating unit is used to generate a configuration file of the target project according to the target file index and the information to be compiled of the target project; the information to be compiled of the target project is the development code of the target project except the development code corresponding to the target file index.

9. A chip, characterized in that: The chip includes a communication interface and a processor; The processor is used to receive a creation instruction, where the creation instruction is used to instruct to create a target project in the Linux system and carry development requirements determined by a developer; In response to the creation instruction, the target project is created and requirement information of the target project is determined according to the development requirement, wherein the requirement information is used to describe software functions and / or hardware functions required for the target project, wherein the software functions are functions implemented by software programs, and the hardware functions are functions implemented by adapted hardware devices; The processor is further configured to obtain a target file index matching the requirement information; the target file index includes a software file index matching the software function and / or a hardware file index matching the hardware function; The processor is further used to generate a configuration file of the target project according to the target file index and the information to be compiled of the target project; the information to be compiled of the target project is the development code of the target project except the development code corresponding to the target file index.

10. A module device, characterized in that: The module device includes a communication module, a power module, a storage module and a chip module, wherein: The communication module is used for internal communication of the module device, or for communication between the module device and an external device; The power module is used to provide electrical energy to the module device; The storage module is used to store data and instructions; The chip module is used for: Receive a creation instruction, the creation instruction is used to instruct to create a target project in the Linux system and carry the development requirements determined by the developer; in response to the creation instruction, create the target project and determine the requirement information of the target project according to the development requirements, the requirement information is used to describe the software function and / or hardware function required for the target project, the software function is a function implemented by a software program, and the hardware function is a function implemented by an adapted hardware device; Acquire a target file index matching the requirement information; the target file index includes a software file index matching the software function and / or a hardware file index matching the hardware function; A configuration file of the target project is generated according to the target file index and the information to be compiled of the target project; the information to be compiled of the target project is the development code of the target project except the development code corresponding to the target file index.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed on a configuration file generating device, the configuration file generating device executes the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Linux operation system customization method and device

    CN108614701A

  • Software customization method, device and system and terminal

    CN109725897A

  • Installation package generation method and device, medium and electronic equipment

    CN110895471A

  • Uncompiled Android system customized version integrated manufacturing method and system and storage medium

    CN112148301A

  • Project construction method and device, computer equipment and storage medium

    CN112416327A