Chip equipment tree file configuration method and device, equipment and storage medium

By generating the initial device tree file and mapping it with chip hardware information, the device tree file is automatically configured, which solves the high configuration cost and low efficiency caused by hardware parameter changes in the SOPC environment, and realizes efficient and scalable device tree file configuration.

CN119201269APending Publication Date: 2024-12-27SHENZHEN PANGO MICROSYST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411246715.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-05
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

In the SOPC environment, when hardware parameters are variable, traditional solutions require developers to manually modify the device tree file, resulting in high configuration costs and low efficiency, and difficult to adapt to chip type changes.

Method used

By generating the initial device tree file and mapping it with the actual hardware information of the chip, the mapping file is generated, so as to automatically configure the fields to be configured in the device tree file, reduce manual intervention, and improve configuration efficiency and scalability.

Benefits of technology

It realizes the automated configuration of device tree files, reduces labor costs, improves configuration efficiency and maintainability, and can quickly adapt to chip type changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201269A_ABST
    Figure CN119201269A_ABST
Patent Text Reader

Abstract

The invention discloses a chip equipment tree file configuration method and device, equipment and a storage medium, and the chip equipment tree file configuration method comprises the steps: generating an initial equipment tree file of a chip, mapping a configuration field in the initial equipment tree file and actual hardware information of the chip, and generating a mapping file; acquiring actual hardware information of a chip corresponding to a to-be-configured configuration field in the initial device tree file from the mapping file; and configuring the configuration field to be configured in the device tree file according to the configuration result of the actual hardware information of the chip corresponding to the configuration field to be configured in the initial device tree file. According to the configuration method for the chip device tree file, the device tree file can be automatically modified only by creating the mapping file and obtaining the mapping relation between the configuration field of the device tree file obtained through the mapping file and the actual hardware information of the chip, the configuration efficiency of the device tree file is improved, the scheme can be executed through software, and the method is easy to implement. And the labor cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of embedded technology, and in particular to a configuration method, apparatus, device and storage medium for a chip device tree file. Background Art

[0002] The device tree file is a data structure and configuration file that describes the layout, characteristics, connection relationships, and other hardware information of each device in the chip hardware system. In embedded systems and some computer systems, especially in operating systems using the Linux kernel, the device tree file is used to assist the operating system in initializing hardware devices and loading corresponding drivers. For SOPC (System On a Programmable Chip) environments with variable hardware parameters, it is often necessary to adapt the corresponding device tree file according to the hardware parameters. To address this problem, the traditional solution is for developers to manually modify the device tree file. However, when there are too many changes, this will bring a large workload to developers and increase the configuration cost of the device tree file. Summary of the invention

[0003] In view of the above problems, the present application provides a chip device tree file configuration method, apparatus, device and storage medium to solve the above technical problems.

[0004] In a first aspect, the present application provides a method for configuring a chip device tree file, comprising:

[0005] Generate an initial device tree file of the chip, wherein the configuration fields in the initial device tree file are configured as preset initial values;

[0006] Mapping the configuration fields in the initial device tree file with the actual hardware information of the chip to generate a mapping file;

[0007] Acquire actual hardware information of the chip corresponding to the configuration field to be configured in the initial device tree file from the mapping file;

[0008] The configuration fields to be configured in the device tree file are configured according to the configuration results of the actual hardware information of the chip corresponding to the configuration fields to be configured in the initial device tree file.

[0009] In some embodiments, the step of mapping the configuration fields in the initial device tree file and the actual hardware information of the chip to generate a mapping file includes:

[0010] Generating a hardware description file of the chip based on actual hardware information of the chip;

[0011] The configuration fields in the initial device tree file and the configuration fields in the hardware description file are mapped to generate the preset mapping file.

[0012] In some embodiments, the step of obtaining the actual hardware information of the chip corresponding to the configuration field to be configured in the initial device tree file from the mapping file includes:

[0013] The mapping file is read to obtain the configuration field in the hardware description file corresponding to the configuration field to be configured in the initial device tree file.

[0014] In some embodiments, the step of generating a hardware description file of the chip based on the actual hardware information of the chip further includes:

[0015] The configuration fields in the hardware description file of the chip are configured as target values.

[0016] In some embodiments, the step of configuring the configuration fields to be configured in the device tree file according to the configuration results of the actual hardware information of the chip corresponding to the configuration fields to be configured in the initial device tree file includes:

[0017] If the configuration field in the hardware description file corresponding to the configuration field to be configured in the initial device tree file is obtained from the mapping file, modifying the value of the configuration field in the initial device tree file according to the target value of the configuration field in the hardware description file;

[0018] If the configuration field in the hardware description file corresponding to the configuration field to be configured in the initial device tree file is not obtained from the mapping file, the value of the configuration field in the initial device tree file is maintained as the preset initial value.

[0019] In some embodiments, the hardware description file is a file in .xml format.

[0020] In some embodiments, the hardware description file is generated by an embedded development tool.

[0021] In a second aspect, the present application provides a configuration device for a chip device tree file, comprising:

[0022] A device tree file generating module, used to generate an initial device tree file of the chip, wherein the configuration fields in the initial device tree file are configured as preset initial values;

[0023] A mapping file generation module, used to map the configuration fields in the initial device tree file with the actual hardware information of the chip to generate a mapping file;

[0024] A hardware information acquisition module, used to acquire actual hardware information of the chip corresponding to the configuration field to be configured in the initial device tree file from the mapping file;

[0025] The device tree file configuration module is used to configure the configuration fields to be configured in the device tree file according to the configuration results of the actual hardware information of the chip corresponding to the configuration fields to be configured in the initial device tree file.

[0026] In a third aspect, the present application provides an electronic device, including a memory and a processor, wherein:

[0027] The memory is used to store computer programs;

[0028] The processor is used to read the program in the memory and execute the steps of the chip device tree file configuration method provided in the first aspect above.

[0029] In a fourth aspect, the present application provides a computer-readable storage medium having a readable computer program stored thereon, which, when executed by a processor, implements the steps of the chip device tree file configuration method provided in the first aspect above.

[0030] The configuration method, device, equipment and storage medium of the chip device tree file provided by the present application include: generating the initial device tree file of the chip, mapping the configuration fields in the initial device tree file with the actual hardware information of the chip, and generating a mapping file; obtaining the actual hardware information of the chip corresponding to the configuration fields to be configured in the initial device tree file from the mapping file; configuring the configuration fields to be configured in the device tree file according to the configuration results of the actual hardware information of the chip corresponding to the configuration fields to be configured in the initial device tree file. Through this scheme, the configuration method of the chip device tree file provided by the present application only needs to create a mapping file, and the mapping relationship between the configuration fields of the device tree file obtained by the mapping file and the actual hardware information of the chip can realize automatic modification of the device tree file, thereby improving the configuration efficiency of the device tree file, and the scheme can be executed by software, thereby reducing labor costs. In addition, when the chip type changes, only the initial device tree file and the mapping file need to be modified accordingly to solve the adaptation problem caused by the chip type change, thereby further improving the scalability and maintainability of the configuration device tree file.

[0031] These and other aspects of the present application will become more clearly understood in the description of the following embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only 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.

[0033] Figure 1 A flowchart of a method for configuring a chip device tree file provided in an embodiment of the present application is shown.

[0034] Figure 2 Another flow chart of the chip device tree file configuration method provided in an embodiment of the present application is shown.

[0035] Figure 3 Another flowchart of the chip device tree file configuration method provided in the embodiment of the present application is shown.

[0036] Figure 4 Another flowchart of the chip device tree file configuration method provided in the embodiment of the present application is shown.

[0037] Figure 5 Another flowchart of the chip device tree file configuration method provided in the embodiment of the present application is shown.

[0038] Figure 6 A schematic diagram of a chip device tree file configuration device provided in an embodiment of the present application is shown.

[0039] Figure 7 A schematic diagram of an electronic device provided in an embodiment of the present application is shown.

[0040] Figure 8 A schematic diagram of a computer storage medium provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0041] In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application.

[0042] In the embodiments of the present application, it should be noted that, in this article, relational terms such as first and second, etc. are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations.

[0043] Moreover, the terms "comprises," "comprising," or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0044] In addition, the "plurality" in the embodiments of the present application refers to two or more than two. In view of this, in the embodiments of the present application, "plurality" can also be understood as "at least two". "At least one" can be understood as one or more, for example, one, two or more. For example, including at least one means including one, two or more, and there is no limit on which ones are included. For example, including at least one of A, B and C, then A, B, C, A and B, A and C, B and C, or A, B and C can be included.

[0045] It should be noted that, in the embodiments of the present application, "and / or" describes the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / ", unless otherwise specified, generally indicates that the associated objects before and after are in an "or" relationship.

[0046] The present application embodiment provides a method for configuring a chip device tree file. Figure 1 A flowchart of a method for configuring a chip device tree file provided in an embodiment of the present application is shown. Figure 1 As shown, the configuration method of the chip device tree file includes:

[0047] Step S100: Generate an initial device tree file of the chip, and the configuration fields in the initial device tree file are configured as preset initial values. Optionally, the initial device tree file is a device tree file described by the designer according to the detailed information of the chip, and the device tree file is used as a template. The configuration fields in the device tree file used to represent the chip hardware information are configured as preset initial values, and the initial values ​​are usually used to indicate that the configuration fields are in an unavailable state.

[0048] It is understandable that, in the embodiment of the present application, the configuration fields of the device tree file are fields that describe the hardware characteristics of the chip, including but not limited to describing the peripherals (Peripheral) and other hardware resources on the chip. These configuration fields are used to help the operating system understand and configure the hardware devices.

[0049] Step S200: Map the configuration fields in the initial device tree file to the actual hardware information of the chip to generate a mapping file. Optionally, the configuration fields in the initial device tree file are used to describe the chip hardware characteristics, so the configuration fields in the initial device tree file correspond to the actual hardware information of the chip.

[0050] It is understandable that the mapping relationship between the configuration fields in the device tree file and the actual hardware information of the chip is determined by the designer. Under this premise, creating a mapping file containing this relationship is a conventional technical means for technical personnel in this field. Therefore, the specific creation process of the mapping file is not described in the embodiments of the present application.

[0051] Step S300: Obtain the actual hardware information of the chip corresponding to the configuration field to be configured in the initial device tree file from the mapping file. Optionally, the configuration method of the chip device tree file provided in the embodiment of the present application is automatically executed by software, wherein the initial device tree file and the mapping file are designed by the designer and read by the software, and when the software configures the device tree file, the software will directly execute step S300: Obtain the actual hardware information of the chip corresponding to the configuration field to be configured in the initial device tree file from the mapping file.

[0052] Exemplarily, when it is necessary to configure the configuration fields related to the peripherals in the device tree file, the software obtains the actual hardware information of the chip corresponding to each configuration field related to the peripherals from the mapping file one by one.

[0053] Step S400: Configure the configuration fields to be configured in the device tree file according to the configuration results of the actual hardware information of the chip corresponding to the configuration fields to be configured in the initial device tree file. Optionally, for a chip system environment with variable hardware parameters, when it is necessary to change the parameters of the actual hardware information of the chip, the software can modify the configuration fields in the device tree file according to the configuration results required by the user after obtaining the actual hardware information of the chip corresponding to the configuration fields to be configured in the initial device tree file.

[0054] In some embodiments, the chip device tree file configuration method provided in the embodiments of the present application is applied in a SOPC (System On a Programmable Chip) environment where chip hardware parameters are variable, and is used to generate a device tree file and to modify the value of the configuration field of the device tree file.

[0055] The configuration method of the chip device tree file provided in the embodiment of the present application only needs to create a mapping file of the configuration field of the device tree file and the actual hardware information of the chip. The mapping relationship between the configuration field of the device tree file and the actual hardware information of the chip obtained by the mapping file can realize the automatic modification of the device tree file by the software, which greatly improves the configuration efficiency of the device tree file. The solution is executed by software, which reduces labor costs. In addition, when the chip type changes, only the initial device tree file and the mapping file need to be modified accordingly to solve the adaptation problem caused by the chip type change, which further improves the scalability and maintainability of the configuration device tree file.

[0056] In some embodiments, Figure 2 Another flow chart of the configuration method of the chip device tree file provided in the embodiment of the present application is shown. Figure 2 As shown, step S200: mapping the configuration fields in the initial device tree file with the actual hardware information of the chip, the step of generating the mapping file includes:

[0057] Step S210: Generate a hardware description file of the chip based on the actual hardware information of the chip.

[0058] Step S220: Map the configuration fields in the initial device tree file and the configuration fields in the hardware description file to generate a preset mapping file.

[0059] The chip device tree file configuration method provided in the embodiment of the present application converts the actual hardware information of the chip into a hardware description file that can be recognized by software, and then a mapping file between the configuration fields in the initial device tree file and the configuration fields in the hardware description file can be established.

[0060] In some embodiments, in the configuration method of the chip device tree file of the embodiment of the present application, the hardware description file is a file in .xml format. Optionally, in an embedded system, the hardware information of the chip is usually described as a hardware description file for storage.

[0061] In some embodiments, in the configuration method of the chip device tree file in the embodiment of the present application, the hardware description file in the ".xml" format is generated by an embedded development tool.

[0062] In some embodiments, Figure 3 Another flow chart of the configuration method of the chip device tree file provided in the embodiment of the present application is shown. Figure 3 As shown, step S300: the step of obtaining the actual hardware information of the chip corresponding to the configuration field to be configured in the initial device tree file from the mapping file includes:

[0063] Step S310: Read the mapping file to obtain the configuration field in the hardware description file corresponding to the configuration field to be configured in the initial device tree file. Optionally, in the configuration method of the chip device tree file based on the above step S200, the mapping file is used to determine which configuration field in the hardware description file determines the value of the configuration field in the device tree, and to confirm the value of the configuration field in the device tree file through the value of the configuration field in the hardware description file.

[0064] In some embodiments, Figure 4 Another flow chart of the configuration method of the chip device tree file provided in the embodiment of the present application is shown. Figure 4 As shown, step S210: the step of generating a hardware description file of the chip based on the actual hardware information of the chip, further includes:

[0065] Configure the configuration fields in the hardware description file of the chip to the target value. Optionally, the target value is the hardware information that needs to be modified when the configuration method of the chip device tree file is currently executed, so that when the software reads the configuration fields in the hardware description file corresponding to the configuration fields to be configured in the initial device tree file, it can also read the value of the hardware information to be modified. Exemplarily, when it is necessary to configure the configuration fields related to the peripherals in the device tree file, the software obtains the values ​​of the configuration fields in the hardware description file corresponding to each configuration field related to the peripherals from the mapping file one by one, so as to modify the values ​​of the configuration fields related to the peripherals in the device tree file accordingly.

[0066] In some embodiments, Figure 5 Another flow chart of the configuration method of the chip device tree file provided in the embodiment of the present application is shown. Figure 5 As shown, step S400: the step of configuring the configuration fields to be configured in the device tree file according to the configuration results of the actual hardware information of the chip corresponding to the configuration fields to be configured in the initial device tree file, includes:

[0067] Step S410: if the configuration field in the hardware description file corresponding to the configuration field to be configured in the initial device tree file is obtained from the mapping file, the value of the configuration field in the initial device tree file is modified according to the target value of the configuration field in the hardware description file.

[0068] Step S420: If the configuration field in the hardware description file corresponding to the configuration field to be configured in the initial device tree file is not obtained from the mapping file, the value of the configuration field in the initial device tree file is maintained as a preset initial value.

[0069] Optionally, the hardware description file may only include the hardware information that needs to be configured, and when the hardware information to be configured is the same as the initial value of the configuration field in the initial device file, the hardware description file may not include the hardware information. In this way, when the software reads the mapping file, the game configuration field in the initial device tree file does not have the corresponding configuration field in the hardware description file.

[0070] Next, an example is given to illustrate the configuration method of the chip device tree file provided in the embodiment of the present application, taking the configuration of chip peripheral information in the SOPC environment as an example for explanation, and the specific scheme is as follows:

[0071] A device tree file is generated, wherein the device tree file at least includes peripheral fields corresponding to peripheral driver information supported by the chip, and the peripheral fields of the device tree file are all set to a disabled state.

[0072] Configure the hardware parameters in the embedded development tool according to the actual hardware information of the chip, and generate a hardware description file in .xml format that includes at least the chip peripheral information.

[0073] The mapping relationship between the configuration fields in the hardware description file and the peripheral fields in the device tree file is organized into a mapping file.

[0074] The software reads the mapping file, obtains the configuration field of the hardware description file corresponding to the peripheral field of the device tree file, and obtains the specific value of the configuration field of the hardware description file. Specifically, when there is no mapping of the field of a peripheral module in the device tree file in the hardware description file, the field remains in an unavailable state (disabled); conversely, when there is a mapping of the field of a peripheral module in the device tree file in the hardware description file, the peripheral field of the device tree file is modified according to the value of the configuration field of the hardware description file. For example, if the configuration field of the hardware description file is enabled, the value of the peripheral field of the device tree file is configured to be available (okay); if the configuration field of the hardware description file is disabled, the value of the peripheral field of the device tree file is configured to be unavailable (disabled).

[0075] It can be understood that the above is an example of configuring the chip peripheral information to illustrate the configuration method of the chip device tree file provided in the embodiment of the present application. In actual application, the configurable hardware information includes all hardware supported by the chip, such as the clock frequency of the chip hardware module, the interrupt of the hardware module, the layout of the hardware module and other parameters.

[0076] Based on the above-mentioned chip device tree file configuration method, the embodiment of the present application also provides a chip device tree file configuration device, Figure 6 A schematic diagram of a configuration device for a chip device tree file provided in an embodiment of the present application is shown. Figure 6As shown, the configuration device of the chip device tree file includes:

[0077] The device tree file generating module 100 is used to generate an initial device tree file of the chip, wherein the configuration fields in the initial device tree file are configured as preset initial values;

[0078] A mapping file generation module 200 is used to map the configuration fields in the initial device tree file with the actual hardware information of the chip to generate a mapping file;

[0079] The hardware information acquisition module 300 is used to acquire the actual hardware information of the chip corresponding to the configuration field to be configured in the initial device tree file from the mapping file;

[0080] The device tree file configuration module 400 is used to configure the configuration fields to be configured in the device tree file according to the configuration results of the actual hardware information of the chip corresponding to the configuration fields to be configured in the initial device tree file.

[0081] For other details about how each module in the above-mentioned chip device tree file configuration device implements the above-mentioned technical solution, reference may be made to the description of the chip device tree file configuration method provided in the above-mentioned invention embodiment, which will not be repeated here.

[0082] Based on the configuration method of the chip device tree file, the embodiment of the present application also provides an electronic device, Figure 7 A schematic diagram of an electronic device provided by an embodiment of the present application is shown, Figure 7 As shown, the electronic device provided in the embodiment of the present application includes a processor 71 and a memory 72 coupled to the processor 71. The memory 72 stores a computer program, and when the computer program is executed by the processor 71, the processor 71 executes the steps of the configuration method of the chip device tree file in the above embodiment.

[0083] For other details about how the processor 71 in the above-mentioned chip device tree file configuration device implements the above-mentioned technical solution, please refer to the description of the chip device tree file configuration method provided in the above-mentioned invention embodiment, which will not be repeated here.

[0084] Among them, the processor 71 can also be called a CPU (Central Processing Unit), and the processor 71 may be an integrated circuit chip with signal processing capabilities; the processor 71 can also be a general-purpose processor, DSP (Digital Signal Process), ASIC (Application Specific Integrated Circuit), FPGA (Field Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, among which the general-purpose processor can be a microprocessor or the processor 71 can also be any conventional processor, etc.

[0085] Based on the above-mentioned chip device tree file configuration method, the embodiment of the present application also provides a computer-readable storage medium, Figure 8 A schematic diagram of a computer storage medium provided in an embodiment of the present application is shown, Figure 8 As shown, a readable computer program 81 is stored on the storage medium; wherein the computer program 81 can be stored in the above storage medium in the form of a software product, including several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, magnetic disk or optical disk, ROM (Read-Only Memory), RAM (Random Access Memory) and other media that can store program codes, or terminal devices such as computers, servers, mobile phones, and tablets.

[0086] The above contents are further detailed descriptions of the present application in combination with specific implementation methods, and it cannot be determined that the specific implementation of the present application is limited to these descriptions. For ordinary technicians in the technical field to which the present application belongs, several simple deductions or substitutions can be made without departing from the concept of the present application, which should be regarded as the protection scope of the present application.

Claims

1. A method for configuring a chip device tree file, characterized in that: include: Generate an initial device tree file of the chip, wherein the configuration fields in the initial device tree file are configured as preset initial values; Mapping the configuration fields in the initial device tree file with the actual hardware information of the chip to generate a mapping file; Acquire actual hardware information of the chip corresponding to the configuration field to be configured in the initial device tree file from the mapping file; The configuration fields to be configured in the device tree file are configured according to the configuration results of the actual hardware information of the chip corresponding to the configuration fields to be configured in the initial device tree file.

2. The method for configuring a chip device tree file according to claim 1, characterized in that: The step of mapping the configuration fields in the initial device tree file and the actual hardware information of the chip to generate a mapping file comprises: Generating a hardware description file of the chip based on actual hardware information of the chip; The configuration fields in the initial device tree file and the configuration fields in the hardware description file are mapped to generate the preset mapping file.

3. The method for configuring a chip device tree file according to claim 2, wherein: The step of obtaining the actual hardware information of the chip corresponding to the configuration field to be configured in the initial device tree file from the mapping file includes: The mapping file is read to obtain the configuration field in the hardware description file corresponding to the configuration field to be configured in the initial device tree file.

4. The method for configuring a chip device tree file according to claim 2, wherein: The step of generating a hardware description file of the chip based on the actual hardware information of the chip further includes: The configuration fields in the hardware description file of the chip are configured as target values.

5. The method for configuring a chip device tree file according to claim 4, characterized in that: The step of configuring the configuration fields to be configured in the device tree file according to the configuration results of the actual hardware information of the chip corresponding to the configuration fields to be configured in the initial device tree file comprises: If the configuration field in the hardware description file corresponding to the configuration field to be configured in the initial device tree file is obtained from the mapping file, modifying the value of the configuration field in the initial device tree file according to the target value of the configuration field in the hardware description file; If the configuration field in the hardware description file corresponding to the configuration field to be configured in the initial device tree file is not obtained from the mapping file, the value of the configuration field in the initial device tree file is maintained as the preset initial value.

6. The method for configuring a chip device tree file according to claim 2, wherein: The hardware description file is a file in .xml format.

7. The method for configuring a chip device tree file according to claim 6, wherein: The hardware description file is generated by an embedded development tool.

8. A configuration device for a chip device tree file, characterized in that: include: A device tree file generating module, used to generate an initial device tree file of the chip, wherein the configuration fields in the initial device tree file are configured as preset initial values; A mapping file generation module, used to map the configuration fields in the initial device tree file with the actual hardware information of the chip to generate a mapping file; A hardware information acquisition module, used to acquire actual hardware information of the chip corresponding to the configuration field to be configured in the initial device tree file from the mapping file; The device tree file configuration module is used to configure the configuration fields to be configured in the device tree file according to the configuration results of the actual hardware information of the chip corresponding to the configuration fields to be configured in the initial device tree file.

9. An electronic device, characterized in that: comprising a memory and a processor, wherein: The memory is used to store computer programs; The processor is used to read the computer program in the memory and execute the steps of the chip device tree file configuration method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: A readable computer program is stored thereon, and when the program is executed by a processor, the steps of the chip device tree file configuration method as described in any one of claims 1 to 7 are implemented.