CN112463202B - Configuration method and device of operating system functional components - Google Patents

Configuration method and device of operating system functional components Download PDF

Info

Publication number
CN112463202B
CN112463202B CN201910764718.0A CN201910764718A CN112463202B CN 112463202 B CN112463202 B CN 112463202B CN 201910764718 A CN201910764718 A CN 201910764718A CN 112463202 B CN112463202 B CN 112463202B
Authority
CN
China
Prior art keywords
functional component
file
attribute
attribute information
functional
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910764718.0A
Other languages
Chinese (zh)
Other versions
CN112463202A (en
Inventor
严文娟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Coretek Systems Inc
Kyland Technology Co Ltd
Original Assignee
Coretek Systems Inc
Kyland Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Coretek Systems Inc, Kyland Technology Co Ltd filed Critical Coretek Systems Inc
Priority to CN201910764718.0A priority Critical patent/CN112463202B/en
Publication of CN112463202A publication Critical patent/CN112463202A/en
Application granted granted Critical
Publication of CN112463202B publication Critical patent/CN112463202B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a configuration method and device of an operating system functional component. After receiving configuration information, the configuration information comprises a function component identifier of a function component to be configured, an attribute name of the function component to be configured and a configured attribute value; according to the configuration information, modifying the initial attribute value of the attribute name corresponding to the functional component identifier in the stored functional component xml file into a configured attribute value; analyzing the modified functional component xml file by adopting a preset analysis algorithm to obtain a statement file; and compiling the stored source file according to the declaration file to obtain an executable program file. Compared with the prior art, the method can flexibly modify the functional components required by the operating system under the condition of not manually modifying the attribute values of the attribute information of the functional components and the source file codes corresponding to the attribute values, thereby improving the utilization rate of the functional components and reducing the time consumption and labor cost of the configuration process of the functional components.

Description

Configuration method and device of operating system functional components
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for configuring an operating system functional component.
Background
An embedded operating system typically supports a number of functional components that provide operating functionality for the computing device, which may include an operating system kernel, a file system, a network protocol stack, a processor, a (Peripheral Component Interconnect, PCI) bus, and the like.
However, the inventor finds that source files (such as program codes) and corresponding attribute information (such as macros, data types, tags, and other information) of a plurality of functional components required by the current operating system are all configured in a unified file, and if a certain attribute value of certain functional component attribute information needs to be reconfigured, a user needs to first query a position of a target functional component in a code library and manually modify an attribute value of the target functional component attribute information and a source file code corresponding to the attribute value, which results in that the configuration process of the functional component is too long, and the manual modification of the user increases labor cost.
Disclosure of Invention
The embodiment of the application provides a configuration method for functional components of an operating system, which solves the problem that in the prior art, attribute values of attribute information of the functional components and source file codes corresponding to the attribute values are manually modified, so that the time consumption of the configuration process of the functional components is shortened, and the labor cost is reduced.
In a first aspect, a method for configuring an operating system functional component is provided, and the method may include:
receiving configuration information, wherein the configuration information comprises a function component identifier of a function component to be configured, an attribute name of the function component to be configured and a configured attribute value;
according to the configuration information, modifying the initial attribute value of the attribute name corresponding to the functional component identifier in the stored functional component xml file into the configured attribute value;
analyzing the modified functional component xml file by adopting a preset analysis algorithm to obtain a statement file;
and compiling the stored source file according to the statement file to obtain an executable program file.
In an optional implementation, before receiving the configuration information, the method further includes:
acquiring a source file of each functional component to be configured, first attribute information of the source file and second attribute information of a corresponding functional component in at least one functional component to be configured, which are input by a user according to the functional requirements of a current operating system; wherein, different attribute values in the second attribute information of the same functional component correspond to different source files;
writing first attribute information and second attribute information of a first functional component to be configured by adopting a preset writing rule to obtain a rule file of the first functional component to be configured, wherein the rule file comprises the first attribute information, the second attribute information and a functional component identifier of the first functional component to be configured; the first functional component to be configured is any one of the at least one functional component to be configured, and the second attribute information comprises an attribute name and an initial attribute value;
and configuring the rule file into a functional component xml file by adopting a preset file configuration algorithm and the first attribute information, wherein the functional component xml file comprises the second attribute information of the first functional component to be configured, the functional component identifier and an index of a source file of the first functional component to be configured.
In an optional implementation, the configuration information further includes a functional component identifier of a functional component to be deleted;
and deleting the index of the functional component to be deleted corresponding to the functional component identifier in the functional component xml file.
In an optional implementation, after modifying an initial attribute value of an attribute name corresponding to the functional component identifier in a stored functional component xml file to the configured attribute value according to the configuration information, the method further includes:
and displaying the modified functional component xml file.
In an alternative implementation, the declaration file includes a header file and a makefile.
In a second aspect, an apparatus for configuring functional components of an operating system is provided, and the apparatus may include: the device comprises a receiving unit, a modifying unit, an analyzing unit and an acquiring unit;
the receiving unit is used for receiving configuration information, wherein the configuration information comprises a function component identifier of a function component to be configured, an attribute name of the function component to be configured and a configured attribute value;
the modification unit is used for modifying the initial attribute value of the attribute name corresponding to the functional component identifier in the stored functional component xml file into the configured attribute value according to the configuration information;
the analysis unit is used for analyzing the modified functional component xml file by adopting a preset analysis algorithm to obtain a statement file;
and the acquisition unit is used for compiling the stored source file according to the statement file to acquire an executable program file.
In an alternative implementation, the apparatus further comprises a configuration unit;
the acquiring unit is further configured to acquire a source file of each to-be-configured functional component in at least one to-be-configured functional component, first attribute information of the source file, and second attribute information of a corresponding functional component, which are input by a user according to a function requirement of a current operating system; different attribute values in second attribute information of the same functional component correspond to different source files;
writing first attribute information and second attribute information of a first functional component to be configured by adopting a preset writing rule to obtain a rule file of the first functional component to be configured, wherein the rule file comprises the first attribute information, the second attribute information and a functional component identifier of the first functional component to be configured; the first functional component to be configured is any one of the at least one functional component to be configured, and the second attribute information comprises an attribute name and an initial attribute value;
the configuration unit is further configured to configure the rule file into a functional component xml file by using a preset file configuration algorithm and the first attribute information, where the functional component xml file includes the second attribute information of the first to-be-configured functional component, the functional component identifier, and an index of a first to-be-configured functional component source file.
In an optional implementation, the apparatus further comprises a deletion unit; the configuration information also comprises a functional component identifier of a functional component to be deleted;
and the deleting unit is used for deleting the index of the functional component to be deleted corresponding to the functional component identifier in the functional component xml file.
In an alternative implementation, the apparatus further comprises a display unit;
and the display unit is used for displaying the modified functional component xml file.
In an alternative implementation, the declaration file includes a header file and a makefile.
In a third aspect, an electronic device is provided, which includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
a processor configured to implement the method steps of any one of the first aspect described above when executing a program stored in the memory.
In a fourth aspect, a computer-readable storage medium is provided, having stored therein a computer program which, when executed by a processor, performs the method steps of any of the above first aspects.
In the configuration method for the functional component of the operating system provided in the above embodiment of the present invention, after receiving the configuration information, the configuration information includes the functional component identifier of the functional component to be configured, the attribute name of the functional component to be configured, and the configured attribute value; according to the configuration information, modifying the initial attribute value of the attribute name corresponding to the functional component identifier in the stored functional component xml file into a configured attribute value; analyzing the modified functional component xml file by adopting a preset analysis algorithm to obtain a statement file; and compiling the stored source file according to the declaration file to obtain an executable program file. Compared with the prior art, the method can flexibly modify the functional components needed by the operating system under the condition of not manually modifying the attribute values of the attribute information of the functional components and the source file codes corresponding to the attribute values, thereby improving the utilization rate of the functional components, shortening the time consumption of the configuration process of the functional components and reducing the labor cost.
Drawings
Fig. 1 is a flowchart illustrating a method for configuring a functional component in an operating system according to an embodiment of the present invention;
FIG. 2 is a diagram of a modified functional component xml file according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a device for configuring a functional component in an operating system according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without any creative effort belong to the protection scope of the present application.
The configuration method of the functional components in the operating system provided by the embodiment of the invention is applied to a computer.
Fig. 1 is a flowchart illustrating a method for configuring a functional component in an operating system according to an embodiment of the present invention. As shown in fig. 1, the method may include:
step 110, receiving configuration information.
The configuration information may be information that a user configures a functional component in an operating system according to actual requirements, or information that is set by a system cycle, which is not limited herein in the embodiment of the present invention.
Before executing the step, a user may write a source file of at least one functional component and second attribute information of the corresponding functional component according to a functional requirement of a current operating system of the computer, where the second attribute information may be a type of the functional component, a number of the functional components, a type of soft and hard floating points, and the like. The source file is a source program code for executing the functional component to be configured. Wherein, different attribute values in the second attribute information of the same functional component can correspond to different source files;
after a user inputs a source file of at least one functional component and second attribute information of a corresponding functional component into a current computer, the computer may extract first attribute information, such as an assignor, a prefix character, a default value, an output mode, etc., of each source file in the source file of at least one functional component, so that the computer acquires the first attribute information of the source file and the source file of at least one functional component and the second attribute information of the corresponding functional component, where the second attribute information may include an attribute name and an attribute value.
Alternatively, the computer stores a source file of the at least one functional component, and records a storage path of the source file, wherein the user can store the source file of the at least one functional component in a set target location, such as a C-disc or a D-disc.
And then, the computer adopts a preset compiling rule to compile the first attribute information and the second attribute information of the first functional component, and a rule file corresponding to the first functional component is obtained.
The rule file may include first attribute information, second attribute information, and a functional component identifier of the first functional component; the first functional component is any one of the at least one functional component.
One attribute name may correspond to one attribute value or may correspond to a plurality of different attribute values. For example, the attribute name of the CPU may correspond to two attribute values of Pentium4 and Pentium, and the two attribute values of Pentium4 and Pentium correspond to two different source files, respectively.
The rule file may be a schema rule file, the schema rule file includes attribute names and attribute values of the first attribute information and the second attribute information, and the attribute names and the attribute values in the schema rule file may be as shown in table 1.
TABLE 1
Figure GDA0004038975530000061
Figure GDA0004038975530000071
And configuring the rule file into a functional component xml file by adopting a preset file configuration algorithm and the first attribute information. The functional component extensible markup language xml file comprises second attribute information of the first functional component, a functional component identifier and an index, namely a storage path, of a source file of the first functional component.
Returning to step 110, the configuration information received by the computer may include the functional component identifier of the functional component to be configured, the attribute name of the functional component to be configured, and the configured attribute value.
The configured attribute value is selected from different attributes corresponding to the attribute name of the functional component to be configured in the second attribute information, and the configured attribute value has a stored source file, so that a user is prevented from manually modifying a source file to configure the corresponding functional component.
And step 120, modifying the initial attribute value of the attribute name corresponding to the functional component identifier in the stored functional component xml file into the configured attribute value according to the configuration information.
The computer searches a target function component identifier which is the same as the function component identifier in the configuration information in the stored function component xml file, and updates an initial attribute value under an attribute name corresponding to the target function component identifier to a configured attribute value in the configuration information, so that the process of manually modifying the attribute value of the target function component in the prior art is overcome, the time consumption of the configuration process of the function component is shortened, and the labor cost is also reduced.
After the step 120 is executed, the modified xml file of the functional component may be displayed, that is, the functional component identifier of the functional component to be configured and the modified second attribute information, and the functional component identifiers of other non-configured functional components and the corresponding second attribute information are displayed, so that the user can clearly and conveniently view the related information of the current functional component.
As shown in fig. 2, the modified xml file of the functional component includes, for example, a selected functional component identified as "processor", and the Board Support Package (BSP) configuration in the configuration item box includes: processor, PCI bus, control panel, ATA hard disk. The user selects 'processor' in the configuration item box, and second attribute information of the processor is displayed in the attribute box:
the CPU type: pentium4;
soft and hard floating points: hard;
the number of CPUs: 4;
whether SMP is supported: false;
whether hyper-threading is supported: false.
The user can select the configured attribute value corresponding to the corresponding attribute name through a pull-down arrow of the attribute value in the attribute box.
It should be noted that the second attribute information displayed in the attribute box may be selected according to actual circumstances.
Optionally, the configuration information may further include a functional component identifier of the functional component to be deleted;
the computer can delete the index of the functional component to be deleted corresponding to the functional component identifier in the functional component xml file, so that the functional component to be deleted is not displayed on the display screen. Since the source file corresponding to the functional component and the xml file of the functional component are stored separately, the source file of the functional component is not deleted when the index of the functional component is deleted.
It should be noted that, if it is expected that a deleted functional component is displayed later, that is, the deleted functional component is to be added to the current functional component xml file, an index of the deleted functional component, that is, a storage path of the rule file corresponding to the deleted functional component, needs to be added to the current functional component xml file.
And step 130, analyzing the modified functional component xml file by adopting a preset analysis algorithm to obtain a statement file.
The declaration file includes a header file and a makefile. Wherein, the header file can comprise variable declaration or function declaration; the makefile may include macro declarations.
And step 140, compiling the stored source file according to the statement file to obtain an executable program file.
And compiling the stored source file according to the header file, the makefile and the stored main makefile to obtain an executable program file for running an operating system of the computer. The main makefile comprises a series of compiling rules for specifying which source files need to be compiled first, which source files need to be compiled later, and which source files need to be recompiled.
In the compiling process, the source files after the header file is quoted and the makefile are compiled according to the compiling rule provided by the main makefile, and the source files without quoting the source files are compiled to obtain the executable program files corresponding to the first functional component.
In the configuration method of the functional component of the operating system provided in the above embodiment of the present invention, after receiving the configuration information, the configuration information includes the functional component identifier of the functional component to be configured, the attribute name of the functional component to be configured, and the configured attribute value; according to the configuration information, modifying the initial attribute value of the attribute name corresponding to the functional component identifier in the stored functional component xml file into a configured attribute value; analyzing the modified functional component xml file by adopting a preset analysis algorithm to obtain a statement file; and compiling the stored source file according to the declaration file to obtain an executable program file. Compared with the prior art, the method can flexibly modify the functional components required by the operating system under the condition of not manually modifying the attribute values of the attribute information of the functional components and the source file codes corresponding to the attribute values, thereby improving the utilization rate of the functional components, shortening the time consumption of the configuration process of the functional components and reducing the labor cost.
Corresponding to the foregoing method, an embodiment of the present invention further provides a device for configuring a functional component in an operating system, where as shown in fig. 3, the device for configuring a functional component in an operating system includes: a receiving unit 310, a modifying unit 320, an analyzing unit 330 and an obtaining unit 340;
a receiving unit 310, configured to receive configuration information, where the configuration information includes a functional component identifier of a functional component to be configured, an attribute name of the functional component to be configured, and a configured attribute value;
a modifying unit 320, configured to modify an initial attribute value of an attribute name corresponding to the functional component identifier in a stored functional component xml file into the configured attribute value according to the configuration information;
the analysis unit 330 is configured to analyze the modified functional component xml file by using a preset analysis algorithm to obtain a declaration file;
an obtaining unit 340, configured to compile a stored source file according to the declaration file, and obtain an executable program file.
In an alternative implementation, the apparatus further comprises a configuration unit 350;
the obtaining unit 340 is further configured to obtain a source file of each to-be-configured functional component, first attribute information of the source file, and second attribute information of a corresponding functional component, of at least one to-be-configured functional component, which are input by a user according to a function requirement of a current operating system; wherein, different attribute values in the second attribute information of the same functional component correspond to different source files;
writing first attribute information and second attribute information of a first functional component to be configured by adopting a preset writing rule to obtain a rule file of the first functional component to be configured, wherein the rule file comprises the first attribute information, the second attribute information and a functional component identifier of the first functional component to be configured; the first functional component to be configured is any one of the at least one functional component to be configured, and the second attribute information comprises an attribute name and an initial attribute value;
the configuring unit 350 is further configured to configure the rule file into a function component xml file by using a preset file configuration algorithm and the first attribute information, where the function component xml file includes the second attribute information of the first function component to be configured, the function component identifier, and an index of the first function component source file to be configured.
In an alternative implementation, the apparatus further comprises a deletion unit 360; the configuration information also comprises a functional component identifier of a functional component to be deleted;
a deleting unit 360, configured to delete the index of the to-be-deleted functional component corresponding to the functional component identifier in the functional component xml file.
In an alternative implementation, the apparatus further comprises a display unit 370;
and a display unit 370 for displaying the modified functional component xml file.
In an alternative implementation, the declaration file includes a header file and a makefile.
The functions of the functional units of the display apparatus of the xml document provided in the above embodiments of the present invention may be implemented through the above method steps, and therefore, detailed working processes and beneficial effects of the units in the display apparatus of the xml document provided in the embodiments of the present invention are not repeated herein.
An embodiment of the present invention further provides an electronic device, as shown in fig. 4, including a processor 410, a communication interface 420, a memory 430, and a communication bus 440, where the processor 410, the communication interface 420, and the memory 430 complete mutual communication through the communication bus 440.
A memory 430 for storing computer programs;
the processor 410, when executing the program stored in the memory 430, implements the following steps:
receiving configuration information, wherein the configuration information comprises a function component identifier of a function component to be configured, an attribute name of the function component to be configured and a configured attribute value;
according to the configuration information, modifying the initial attribute value of the attribute name corresponding to the functional component identifier in the stored functional component xml file into the configured attribute value;
analyzing the modified functional component xml file by adopting a preset analysis algorithm to obtain a statement file;
and compiling the stored source file according to the statement file to obtain an executable program file.
In an optional implementation, before receiving the configuration information, the method further includes:
acquiring a source file of each functional component to be configured in at least one functional component to be configured, first attribute information of the source file and second attribute information of the corresponding functional component, which are input by a user according to the functional requirements of a current operating system; wherein, different attribute values in the second attribute information of the same functional component correspond to different source files;
writing first attribute information and second attribute information of a first functional component to be configured by adopting a preset writing rule to obtain a rule file of the first functional component to be configured, wherein the rule file comprises the first attribute information, the second attribute information and a functional component identifier of the first functional component to be configured; the first functional component to be configured is any one of the at least one functional component to be configured, and the second attribute information comprises an attribute name and an initial attribute value;
and configuring the rule file into a functional component xml file by adopting a preset file configuration algorithm and the first attribute information, wherein the functional component xml file comprises the second attribute information of the first functional component to be configured, the functional component identifier and an index of a source file of the first functional component to be configured.
In an optional implementation, the configuration information further includes a functional component identifier of a functional component to be deleted;
and deleting the index of the functional component to be deleted corresponding to the functional component identifier in the functional component xml file.
In an optional implementation, after modifying an initial attribute value of an attribute name corresponding to the functional component identifier in a stored functional component xml file to the configured attribute value according to the configuration information, the method further includes:
and displaying the modified functional component xml file.
In an alternative implementation, the declaration file includes a header file and a makefile.
The aforementioned communication bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Alternatively, the memory may be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
Since the implementation manner and the beneficial effects of the devices of the electronic device in the foregoing embodiment can be implemented by referring to the steps in the embodiment shown in fig. 1, detailed working processes and beneficial effects of the electronic device provided in the embodiment of the present invention are not described herein again.
In another embodiment of the present invention, a computer-readable storage medium is further provided, which stores instructions that, when executed on a computer, cause the computer to perform the method for configuring a functional component in an operating system described in any of the above embodiments.
In a further embodiment provided by the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the method for configuring a functional component in an operating system as described in any of the above embodiments.
As will be appreciated by one of skill in the art, the embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all changes and modifications that fall within the true scope of the embodiments of the present application.
It is apparent that those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the embodiments of the present application. Thus, if such modifications and variations of the embodiments of the present application fall within the scope of the claims of the embodiments of the present application and their equivalents, the embodiments of the present application are also intended to include such modifications and variations.

Claims (8)

1. A method for configuring an operating system functional component, the method comprising:
receiving configuration information, wherein the configuration information comprises a function component identifier of a function component to be configured, an attribute name of the function component to be configured and a configured attribute value;
according to the configuration information, modifying the initial attribute value of the attribute name corresponding to the functional component identifier in the stored functional component extensible markup language xml file into the configured attribute value;
analyzing the modified functional component xml file by adopting a preset analysis algorithm to obtain a statement file;
compiling the stored source file according to the statement file to obtain an executable program file;
before receiving the configuration information, the method further comprises:
acquiring a source file of each functional component to be configured in at least one functional component to be configured, first attribute information of the source file and second attribute information of the corresponding functional component, which are input by a user according to the functional requirements of a current operating system; wherein, different attribute values in the second attribute information of the same functional component correspond to different source files;
writing first attribute information and second attribute information of a first functional component to be configured by adopting a preset writing rule to obtain a rule file of the first functional component to be configured, wherein the rule file comprises the first attribute information, the second attribute information and a functional component identifier of the first functional component to be configured; the first functional component to be configured is any one of the at least one functional component to be configured, and the second attribute information comprises an attribute name and an initial attribute value;
and configuring the rule file into a functional component xml file by adopting a preset file configuration algorithm and the first attribute information, wherein the functional component xml file comprises the second attribute information of the first functional component to be configured, the functional component identifier and an index of a source file of the first functional component to be configured.
2. The method of claim 1, wherein the configuration information further comprises a functional component identification of a functional component to be deleted;
and deleting the index of the functional component to be deleted corresponding to the functional component identifier in the functional component xml file.
3. The method according to claim 1, wherein after modifying an initial attribute value of an attribute name corresponding to the function component identifier in a stored function component xml file to the configured attribute value according to the configuration information, the method further comprises:
and displaying the modified functional component xml file.
4. The method of claim 1, wherein the declaration file includes a header file and a makefile.
5. An apparatus for displaying xml documents, the apparatus comprising: the device comprises a receiving unit, a modifying unit, an analyzing unit and an acquiring unit;
the receiving unit is used for receiving configuration information, wherein the configuration information comprises a function component identifier of a function component to be configured, an attribute name of the function component to be configured and a configured attribute value;
the modification unit is used for modifying the initial attribute value of the attribute name corresponding to the functional component identifier in the stored functional component xml file into the configured attribute value according to the configuration information;
the analysis unit is used for analyzing the modified functional component xml file by adopting a preset analysis algorithm to obtain a statement file;
the obtaining unit is used for compiling the stored source file according to the statement file to obtain an executable program file;
the apparatus further comprises a configuration unit;
the acquiring unit is further configured to acquire a source file of each to-be-configured functional component in at least one to-be-configured functional component, first attribute information of the source file, and second attribute information of a corresponding functional component, which are input by a user according to a function requirement of a current operating system; wherein, different attribute values in the second attribute information of the same functional component correspond to different source files;
writing first attribute information and second attribute information of a first functional component to be configured by adopting a preset writing rule to obtain a rule file of the first functional component to be configured, wherein the rule file comprises the first attribute information, the second attribute information and a functional component identifier of the first functional component to be configured; the first functional component to be configured is any one of the at least one functional component to be configured, and the second attribute information comprises an attribute name and an initial attribute value;
the configuration unit is configured to configure the rule file into a functional component xml file by using a preset file configuration algorithm and the first attribute information, where the functional component xml file includes the second attribute information of the first to-be-configured functional component, the functional component identifier, and an index of a first to-be-configured functional component source file.
6. The apparatus of claim 5, wherein the apparatus further comprises a deletion unit; the configuration information also comprises a functional component identifier of a functional component to be deleted;
and the deleting unit is used for deleting the index of the functional component to be deleted corresponding to the functional component identifier in the functional component xml file.
7. An electronic device, characterized in that the electronic device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1-4 when executing a program stored on a memory.
8. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 4.
CN201910764718.0A 2019-08-19 2019-08-19 Configuration method and device of operating system functional components Active CN112463202B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910764718.0A CN112463202B (en) 2019-08-19 2019-08-19 Configuration method and device of operating system functional components

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910764718.0A CN112463202B (en) 2019-08-19 2019-08-19 Configuration method and device of operating system functional components

Publications (2)

Publication Number Publication Date
CN112463202A CN112463202A (en) 2021-03-09
CN112463202B true CN112463202B (en) 2023-03-31

Family

ID=74807081

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910764718.0A Active CN112463202B (en) 2019-08-19 2019-08-19 Configuration method and device of operating system functional components

Country Status (1)

Country Link
CN (1) CN112463202B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114968388B (en) * 2022-08-01 2022-11-29 摩尔线程智能科技(北京)有限责任公司 Booting method and system applied to microprocessor

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107301041A (en) * 2017-05-27 2017-10-27 福州汇思博信息技术有限公司 A kind of method and system of custom-built system function
CN109918121A (en) * 2019-02-22 2019-06-21 深圳市酷开网络科技有限公司 A kind of configuration method based on different chip solutions, intelligent terminal and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7539981B2 (en) * 2004-01-30 2009-05-26 Microsoft Corporation XML-based preprocessor

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107301041A (en) * 2017-05-27 2017-10-27 福州汇思博信息技术有限公司 A kind of method and system of custom-built system function
CN109918121A (en) * 2019-02-22 2019-06-21 深圳市酷开网络科技有限公司 A kind of configuration method based on different chip solutions, intelligent terminal and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于Linux的操作系统实验平台的设计与实现;李杰凤等;《计算技术与自动化》;20100615(第02期);第92-95页 *

Also Published As

Publication number Publication date
CN112463202A (en) 2021-03-09

Similar Documents

Publication Publication Date Title
CN107562467B (en) Page rendering method, device and equipment
US8887135B2 (en) Generating test cases for functional testing of a software application
US11030083B2 (en) Systems and methods for reducing storage required for code coverage results
CN106648556B (en) Method and device for front-end and back-end integrated development test
CN110955428A (en) Page display method and device, electronic equipment and medium
US9195456B2 (en) Managing a catalog of scripts
US8839197B2 (en) Automated analysis of composite applications
CN108171528B (en) Attribution method and attribution system
CN103246578A (en) Method and browser for processing collapse of application software
CN110069827B (en) Layout and wiring method and device for FPGA (field programmable Gate array) online logic analyzer
CN108268615B (en) Data processing method, device and system
CN106033387B (en) The method and apparatus for testing flash intrinsic controls
CN112256670A (en) Data migration method, terminal device and readable storage medium
CN112463202B (en) Configuration method and device of operating system functional components
CN114185874A (en) Big data based modeling method and device, development framework and equipment
CN116467179A (en) Test case batch editing method and device and processing equipment
CN107341038B (en) Compatibility processing method and device and electronic equipment
US10649743B2 (en) Application developing method and system
CN114254068A (en) Data transfer method and system
CN114116773A (en) Structured Query Language (SQL) text auditing method and device
US20170161034A1 (en) Improving application code execution performance by consolidating accesses to shared resources
CN107506299B (en) Code analysis method and terminal equipment
CN108830920B (en) Method and device for creating constant buffer area and readable storage medium
CN107357926B (en) Webpage processing method and device and electronic equipment
KR101673151B1 (en) Method and Apparatus for Analyzing Relationship Change of Program Source and DB Schema

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant