Compilation method and device for heterogeneous hybrid system, medium and intelligent automobile

By analyzing the construction environment configuration of heterogeneous hybrid systems in intelligent cars, configuring toolchains and building compilation tasks, the problem of high development costs of heterogeneous hybrid systems is solved, and the ability to build different operating systems in the same compilation system is realized.

CN119938052APending Publication Date: 2025-05-06ZEBRED NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411810530.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

The heterogeneous hybrid systems in smart cars use different construction systems because each operating system and its application software use different construction systems, resulting in high development costs and cannot be built in a unified manner in the same construction system.

Method used

By analyzing the overall construction environment configuration of the system to be compiled in a heterogeneous hybrid system, obtain the toolchain requirement information and compilation configuration of the module to be compiled, configure the toolchain, and build a compilation task and relationship structure diagram, and use the toolchain to process the compilation task until it is completed.

Benefits of technology

It supports the compilation and construction of various operating systems and their system software in heterogeneous hybrid systems in the same compilation system, reducing development costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119938052A_ABST
    Figure CN119938052A_ABST
Patent Text Reader

Abstract

The invention discloses a compiling method and device for a heterogeneous hybrid system, a medium and an intelligent automobile, and the method comprises the steps: analyzing the overall construction environment configuration of any to-be-compiled system in the heterogeneous hybrid system, and obtaining the tool chain demand information and compiling configuration of a plurality of to-be-compiled modules; configuring a corresponding tool chain according to the tool chain demand information of the plurality of to-be-compiled modules; constructing a corresponding compiling task according to the compiling configuration of the plurality of to-be-compiled modules; according to the compiling configuration of all the to-be-compiled modules, constructing a relation structure graph; the relation structure atlas is used for representing compiling dependency relations of all the to-be-compiled modules; processing compiling tasks of the to-be-compiled modules by using a correspondingly configured tool chain with reference to the relation structure map until compiling is completed; wherein an independent tool chain compiling environment is created for each compiling task to execute compiling operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent driving technology, and in particular to a compilation method, device, medium and intelligent vehicle for a heterogeneous hybrid system. Background Art

[0002] Smart cars usually contain multiple operating systems and a large number of applications and system software running on them, which is a typical heterogeneous hybrid system. For example, RTOS systems, QNX systems, and Linux systems are used for autonomous driving, Android systems and Linux systems are used for smart cockpits, and OPTEE systems are used for security protection.

[0003] At present, the operating systems and application software in smart cars are usually completed using different build systems, which means that the development of heterogeneous hybrid systems requires the support of various different build systems. It is impossible to complete the unified construction of all operating systems in the same build system, which results in excessively high development costs and is not conducive to long-term development. Summary of the invention

[0004] To solve the above technical problems, this specification provides a compilation method, device, medium and smart car for a heterogeneous hybrid system, which can support the compilation and construction of various different operating systems and their system software in the heterogeneous hybrid system in the same compilation system, thereby reducing the development cost of the heterogeneous hybrid system.

[0005] In a first aspect of the present specification, a compilation method for a heterogeneous hybrid system is disclosed, the method comprising:

[0006] Analyze the overall build environment configuration of any system to be compiled in the heterogeneous hybrid system, and obtain the toolchain requirement information and compilation configuration of several modules to be compiled;

[0007] Configure the corresponding tool chain according to the tool chain requirement information of the modules to be compiled;

[0008] Constructing corresponding compilation tasks according to the compilation configurations of the modules to be compiled; and constructing a relationship structure map according to the compilation configurations of all modules to be compiled; the relationship structure map is used to characterize the compilation dependency relationships of all modules to be compiled;

[0009] Referring to the relationship structure diagram, the compilation tasks of the plurality of modules to be compiled are processed using a correspondingly configured tool chain until the compilation is completed; wherein, an independent tool chain compilation environment is created for each compilation task to perform the compilation operation.

[0010] Preferably, the step of constructing corresponding compilation tasks according to the compilation configurations of the plurality of modules to be compiled; and constructing a relationship structure graph according to the compilation configurations of all modules to be compiled specifically includes:

[0011] Creating respective compilation tasks according to the compilation parameters and compilation actions of the plurality of modules to be compiled in the compilation configuration; and

[0012] The relationship structure graph is constructed by combining the specified dependencies in the compilation configurations of all the modules to be compiled.

[0013] Preferably, referring to the relationship structure graph and using a correspondingly configured tool chain to process the compilation tasks of the plurality of modules to be compiled specifically includes:

[0014] According to the relationship structure graph, construct a topological structure of all compilation tasks;

[0015] According to the topology structure, one or more compilation tasks without dependencies are preferentially selected for compilation processing.

[0016] Preferably, referring to the relationship structure graph and using a correspondingly configured tool chain to process the compilation tasks of the plurality of modules to be compiled specifically includes:

[0017] For each compilation task, create a corresponding toolchain compilation environment by referring to the toolchain configuration of the module to be compiled.

[0018] Obtaining source code corresponding to the compilation task;

[0019] In a corresponding tool chain compilation environment, the source code is compiled into target code using the configured tool chain.

[0020] Preferably, after the source code is compiled into the target code using the configured tool chain, the method further comprises:

[0021] The target code is installed to a set location so as to be called by other compilation tasks having dependencies.

[0022] Preferably, after the source code is compiled into the target code using the configured tool chain, the method further comprises:

[0023] The target code is verified and a corresponding software package is produced according to packaging requirements.

[0024] Preferably, after referring to the relationship structure graph and processing the compilation tasks of the plurality of modules to be compiled using a correspondingly configured tool chain, the method further comprises:

[0025] If the compilation fails, the corresponding topology link is deleted from the topology structure.

[0026] In a second aspect of the present specification, a compilation device for a heterogeneous hybrid system is disclosed, the device comprising:

[0027] A parsing module is used to parse the overall build environment configuration of any system to be compiled in the heterogeneous hybrid system, and obtain tool chain requirement information and compilation configuration of several modules to be compiled;

[0028] A configuration module, used to configure a corresponding tool chain according to the tool chain requirement information of the modules to be compiled;

[0029] A construction module, used to construct corresponding compilation tasks according to the compilation configurations of the modules to be compiled; and to construct a relationship structure map according to the compilation configurations of all modules to be compiled; the relationship structure map is used to characterize the compilation dependency relationships of all modules to be compiled;

[0030] A compilation module is used to refer to the relationship structure map and use the corresponding configured tool chain to process the compilation tasks of the several modules to be compiled until the compilation is completed; wherein, an independent tool chain compilation environment is created for each compilation task to perform the compilation operation.

[0031] The third aspect of this specification discloses a computer-readable storage medium having a computer program stored thereon, which implements the steps of the method described in the first aspect when executed by a processor.

[0032] The fourth aspect of this specification discloses an intelligent car, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in the first aspect when executing the program.

[0033] Through one or more embodiments of this specification, this specification has the following beneficial effects or advantages:

[0034] The technical solution in this specification, by parsing the overall construction environment configuration of any system to be compiled in a heterogeneous hybrid system, obtains the tool chain requirement information and compilation configuration of several modules to be compiled; on the one hand, the tool chain is configured as needed according to the tool chain requirement information, and on the other hand, the compilation tasks and relationship structure maps of several modules to be compiled under the system to be compiled are constructed according to the compilation configuration to prepare for compilation. After preparation, refer to the relationship structure map, use the corresponding configured tool chain to process the compilation tasks of the several modules to be compiled until the compilation is completed, and create an independent tool chain compilation environment for each compilation task to perform the compilation operation. It can be seen that this technical solution can support the analysis of the tool chain requirement information and compilation configuration required for any system to be compiled in a heterogeneous hybrid system, configure the required tool chain as needed, and create an independent tool chain compilation environment to perform the compilation of each compilation task. Therefore, this technical solution can support the compilation and construction of various operating systems and their system software in a heterogeneous hybrid system, thereby reducing the development cost of a heterogeneous hybrid system.

[0035] The above description is only an overview of the technical solution of this specification. In order to more clearly understand the technical means of this specification, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of this specification more obvious and easy to understand, the specific implementation methods of this specification are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present specification. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0037] Figure 1 A diagram showing an implementation process of a compilation method for a heterogeneous hybrid system according to an embodiment of the present specification is shown;

[0038] Figure 2 shows an overall compilation logic diagram according to one embodiment of the present specification;

[0039] Figure 3 A schematic diagram of a compiling device for a heterogeneous hybrid system according to an embodiment of the present specification is shown. DETAILED DESCRIPTION

[0040] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0041] Terminology explanation:

[0042] Compiler for heterogeneous hybrid systems: An automated tool used to generate user-usable targets from source code; usable targets include libraries, executable files, scripts, etc.

[0043] RTOS system: real-time operating system.

[0044] Linux system: open source operating system.

[0045] OPTEE system: an open source portable trusted execution environment.

[0046] QNX system: A Unix-like real-time operating system that complies with the POSIX specification.

[0047] Android system: A free and open source mobile operating system based on the Linux kernel (excluding GNU components). Mainly used in mobile devices such as smartphones and tablets.

[0048] AliOS system: an operating system used in smart cars.

[0049] JAVA Script: A lightweight, interpreted programming language with a function-first approach.

[0050] C / C++: Systems-level programming language.

[0051] Makefile: A compilation language that defines a series of rules to organize the compilation of large-scale software systems, including tools, syntax formats, keywords, functions, and a set of rules.

[0052] CMake: Used to generate Makefile files, including tools, syntax formats, keywords, functions and a set of rules.

[0053] Since the existing compilation scheme is usually only developed for one operating system and its running applications and system software, different operating systems and their applications and system software use different build systems, for example, referring to CMake as the core, combined with Shell Script, Python and other compilation tools compilation system; or referring to AliOS Xmake as the core, by writing mk files to build AliOS xmake system; or using Java Script, or C / C++ and other languages ​​to develop Android system, etc., can only be developed for their own operating systems, and cannot support the compilation and construction of various different operating systems and their system software in heterogeneous hybrid systems in the same set of compilation devices. To this end, the embodiment of this specification provides a compilation method for heterogeneous hybrid systems, by parsing the overall construction environment configuration of any system to be compiled in the heterogeneous hybrid system, obtaining tool chain requirement information and compilation configuration of several modules to be compiled; on the one hand, according to the tool chain requirement information, the tool chain is configured on demand, and on the other hand, according to the compilation configuration, the compilation tasks and relationship structure maps of several modules to be compiled under the system to be compiled are constructed for compilation preparation. After preparation, refer to the relationship structure map, use the corresponding configured tool chain to process the compilation tasks of several modules to be compiled until the compilation is completed, and create an independent tool chain compilation environment for each compilation task to perform the compilation operation. It can be seen that the present technical solution can support parsing the tool chain requirement information and compilation configuration required for any system to be compiled in a heterogeneous hybrid system, configure the required tool chain on demand, and create an independent tool chain compilation environment to perform the compilation of various compilation tasks. Therefore, it can support the compilation and construction of various operating systems and their system software in a heterogeneous hybrid system, so that various operating systems and their system software in a heterogeneous hybrid system can be compiled and constructed in the same set of compilation devices, thereby reducing the development cost of the heterogeneous hybrid system.

[0054] See also Figure 1 , is a flow chart of a compilation method for a heterogeneous hybrid system provided in an embodiment of this specification. The method comprises the following steps:

[0055] S101, parsing the overall construction environment configuration of any to-be-compiled system in the heterogeneous hybrid system, and obtaining tool chain requirement information and compilation configuration of several to-be-compiled modules.

[0056] In this embodiment, the type and number of systems to be compiled in the heterogeneous hybrid system are not limited. For example, RTOS systems, QNX systems, and Linux systems for autonomous driving, Android systems and Linux systems for smart cockpits, OPTEE operating systems for security protection, etc., can all be used as systems to be compiled. Each system to be compiled has its own different overall build environment configuration. The overall build environment configuration of the system to be compiled is mainly used to describe the relevant configuration of the overall build environment of the system to be compiled, such as several modules to be compiled, tool chain requirements, dependencies, build methods, compilation actions, etc. contained in the system to be compiled. Exemplary, for example, the system to be compiled is a safetylinux system, and each software package (module to be compiled) in the safetylinux system has a separate configuration. The configuration of the same part can be shared by include or inherit.

[0057] Set the toolchain through alios-toolchain configuration. In local.conf, set all the required toolchain paths through specified variables, and the build system will automatically verify and set these toolchain environments. At the same time, in multi-complers.conf, specify the toolchain it depends on for each software package through the TOOLCHAIN ​​variable. After loading and parsing, the compiler in this manual will automatically set the relevant toolchain for the module to be compiled.

[0058] Through the safetylinux-rootfs configuration, the overall build environment is set for all software packages. These software packages can be divided into bsp, multimedia, graphics, devtools, etc. in the operating system. For a certain software package module, do_configure, do_compile, do_install, do_package are used to complete the process of compiling configuration generation, compiling, installing and generating binary installation packages.

[0059] Let's take a small module as an example, such as compiling a helloworld program, but we need to use rust cross-compilation. The example is as follows:

[0060]

[0061] DESCRIPTION is the description information. This small module has no dependencies, so DEPENDS is empty. When compiling, the tool chain is specified as rustc through the TOOLCHAIN ​​variable. When compiling the helloworld module, the build system will create a rustc tool chain environment for the module. The tool chain environment is set through the rustc configuration. The example is as follows:

[0062]

[0063] The CARGO variable is specified here, and the rustc toolchain is checked to see if it is available. After the build system starts parsing the configuration, it checks the toolchain. Then it assigns a compilation task to helloworld. When the compilation task is executed, the entire toolchain environment, root file system and other basic environments are built. During the actual compilation, helloworld is compiled using CARGO through the compilation action specified by do_compile in the previous configuration. The do_install installation operation is ignored.

[0064] The above is the compilation process of a helloworld module.

[0065] The overall construction environment configuration is not integrated with the source code of the system to be compiled, and the source code of the system to be compiled exists separately, for example, is stored separately on a server and can be directly downloaded when used.

[0066] Before parsing, import the basic environment configuration, such as commonly used compilation tools, such as Shell, Python, etc. All compilations are prepared for the cross-compilation environment, and the compilation device itself in this manual uses the local host environment. The basic environment configuration is the necessary configuration that depends on the local host environment. For example, the shell environment and its necessary command line tools, the gcc compiler environment used to compile the host tool, the host python environment required to run the python script, etc.

[0067] When parsing the overall build environment configuration of the system to be compiled, the toolchain requirement information and compilation configuration of each of the several modules to be compiled contained in the system to be compiled are parsed. Among them, the toolchain includes the compiler and related database used for compilation. The compilation configuration includes all configuration files used to compile the model to be compiled. Specifically, the compilation configuration includes information such as the specified dependencies, compilation parameters, and compilation actions of the module to be compiled. It is worth noting that each module to be compiled has its own different toolchain requirement information and compilation configuration.

[0068] After obtaining the parsing results, the toolchain environment is checked according to the toolchain requirement information of several modules to be compiled. For example, it is checked whether the compiler version meets the compiler requirements in the toolchain requirement information, and whether the compiler is available.

[0069] S102, configuring a corresponding tool chain according to tool chain requirement information of a number of modules to be compiled.

[0070] In this embodiment, different tool chains are configured as needed for different modules to be compiled, and independent tool chain compilation environments will be configured for different modules to be compiled later, and compilation operations are performed in their own independent tool chain compilation environments. Even if the types or versions of compilers and databases used by different modules to be compiled conflict, the compilation will not be affected, so as to achieve better performance effects of compiler optimization. Of course, the same module to be compiled may use multiple different types of tool chains. Specifically, the system to be compiled contains several different types of modules to be compiled and their tool chains. For example, c / c++ modules and their configured tool chains: gcc, clang, etc. Tool chains configured for different types of software modules: gcc, rustc, etc. Different tool chains have different compilation effects, so by allowing different modules to be compiled to be configured with different tool chains, it is possible to take advantage of the differences in tool chains to obtain better compilation effects.

[0071] S103, constructing corresponding compilation tasks according to the compilation configurations of the modules to be compiled; and constructing a relationship structure graph according to the compilation configurations of all the modules to be compiled.

[0072] In this embodiment, respective compilation tasks are created according to the compilation parameters and compilation actions of several modules to be compiled in the compilation configuration. A compilation task is created for each module to be compiled. And, in combination with the specified dependencies in the compilation configuration of all modules to be compiled, a relationship structure map is constructed. Specifically, each module to be compiled has specified dependencies in its compilation configuration. Take the modules to be compiled: module A, module B, and module C as an example. Module A specifies the dependency module B, and module B specifies the dependency module C. According to this specified dependency, a dependency relationship link of module C→module B→module A can be constructed. In combination with the dependency relationship links of all modules to be compiled, a relationship structure map is constructed.

[0073] Among them, the relationship structure map is used to characterize the compilation dependencies of all modules to be compiled. It is worth noting that the relationship structure map contains both modules to be compiled with dependency links and independent modules to be compiled without dependencies. Furthermore, if the module to be compiled has a dependency link, it is necessary to first compile the module to be compiled in the inherited position in the dependency link. For example, in the dependency link of module C→module B→module A, module C is in the first inherited position, module B is in the second inherited position, and module A is in the inherited position. It is necessary to compile in the order of module C, module B, and module A. If the compilation of module C in the first inherited position fails, the dependency link as a whole is unavailable. If the module to be compiled has no dependency link, the module to be compiled can be directly compiled, and the compilation result of the module to be compiled will not affect the modules to be compiled in other links.

[0074] S104, referring to the relationship structure map, using the corresponding configured tool chain to process the compilation tasks of several modules to be compiled until the compilation is completed.

[0075] For each compilation task, an independent tool chain compilation environment is created to perform the compilation operation.

[0076] In order to facilitate the management of compilation tasks of several modules to be compiled, the compilation tasks are added to the task list for management, and a real-time check is made to see whether all the compilation tasks in the task list have been compiled. If not, the compilation tasks are selected in the task list for compilation based on the constructed relationship structure graph. If all the compilation tasks in the task list have been compiled, the process ends.

[0077] When selecting compilation tasks, a topological structure of all compilation tasks is constructed according to the relationship structure map; according to the topological structure, one or more compilation tasks without dependencies are preferentially selected for processing. Specifically, when multiple compilation tasks without dependencies are selected, they can be processed in parallel to improve compilation efficiency. When the compilation tasks without dependencies are selected, compilation tasks with dependency links are selected for processing. When selecting compilation tasks with dependency links, the dependency links can be selected randomly, and then the compilation tasks are selected from the dependency links in the order of inheritance for processing; or the dependency links can be selected according to the principle of the number of compilation tasks from small to large, and then the compilation tasks are selected from the dependency links in the order of inheritance for processing. Of course, the above two selection methods are only for illustration and do not constitute a limitation.

[0078] The compilation process for each compilation task is similar, so this embodiment takes the compilation process of a single compilation task as an example for description, and other compilation tasks can refer to the compilation.

[0079] During the compilation process of a single compilation task, after checking the execution environment of the compilation task, the compilation task is officially executed, and the final binary file is generated through the configured tool chain.

[0080] In the specific implementation process, first, for the compilation task, refer to the tool chain configuration of the module to be compiled to which the compilation task belongs, create a corresponding tool chain compilation environment, and execute the compiler to compile the source code to generate the target code. Specifically, in the overall construction process of the system to be compiled, several modules to be compiled will be parsed, and each module to be compiled can be set up with an independent tool chain compilation environment. The tool chain compilation environment of each compilation task is independent of each other and does not affect each other, thereby supporting different compilers to complete the source code compilation of each operating system and its running applications and system software. Further, according to the dependency relationship of the module to be compiled to which the compilation task belongs, the root file system, auxiliary tools, etc. required for compilation are constructed for compilation. After the compilation preparation work is done, the source code corresponding to the compilation task is obtained. Specifically, the source code of the compilation task exists separately in storage devices such as servers and databases. Therefore, it is necessary to download the source code according to the handshake between the two parties. After downloading, check the legality and correctness of the source code, and merge it into the patch file prepared for the source code. In the corresponding tool chain compilation environment, the configured tool chain is used to compile the source code into the target code.

[0081] It is worth noting that in order to complete the compilation task faster, the compilation task can be split into smaller-grained compilation subtasks by stage according to the execution actions in the compilation task, and processed in the corresponding tool chain compilation environment.

[0082] When the compilation is completed, the target code is installed to the set location so that it can be called by other compilation tasks that have dependencies on the compilation task. For example, if the compilation task corresponding to module C is completed, the compilation task corresponding to module C is stored in the specified location so that the compilation task corresponding to module B can be called when needed.

[0083] Furthermore, the target code is verified and the corresponding software package is made according to the packaging requirements for subsequent use.

[0084] When the compilation task is completed, the file dependency check and the runtime environment dependency check are performed.

[0085] In an optional implementation, the success of the compilation task (i.e., whether the compilation is completed) is monitored in real time. If the compilation fails, the corresponding topological link and other tasks that depend on the compilation task are deleted from the topological structure. Taking the compilation tasks corresponding to the order of module C, module B, and module A as an example, if the compilation of the compilation task corresponding to module C fails, the dependency link as a whole is unavailable, and the corresponding topological link and other tasks that depend on the compilation task are deleted, and the next compilation task is continued to perform the compilation. Exemplarily, other compilation tasks that have no dependency on the compilation task corresponding to module C are selected for compilation. If the compilation is successful, the next compilation task is directly transferred to perform the compilation until the compilation tasks corresponding to all modules to be compiled are compiled.

[0086] To illustrate and explain the overall compilation logic in the present invention, refer to Figure 2 .

[0087] S201, executing source code compilation of any system to be compiled in the heterogeneous hybrid system.

[0088] Among them, after the source code compilation of the system to be compiled is completed, it can be stored separately in the server and directly downloaded when used.

[0089] S202, import the basic environment configuration of the compilation device, for example, commonly used compilation tools such as Shell and Python. The compilation device can be used to compile any system to be compiled in the heterogeneous hybrid system.

[0090] S203, parsing the overall construction environment configuration of the system to be compiled, and obtaining tool chain requirement information and compilation configuration of several modules to be compiled.

[0091] Furthermore, after the toolchain requirement information and compilation configuration of several modules to be compiled, the toolchain environment is checked accordingly.

[0092] S204: Configure corresponding tool chains according to tool chain requirement information of several modules to be compiled.

[0093] Among them, different tool chains are configured as needed for different modules to be compiled, and independent tool chain compilation environments will be configured for different modules to be compiled later. Compilation operations are performed in their respective independent tool chain compilation environments, and the best compilation performance is obtained by utilizing the different advantages of the tool chains.

[0094] S205: Construct corresponding compilation tasks according to the compilation configurations of the modules to be compiled.

[0095] S206, constructing a relationship structure graph according to the compilation configurations of all modules to be compiled, and adding the compilation task to the task list for management.

[0096] Execute S207 to check in real time whether all the compilation tasks in the task list have been compiled. If not, execute S208; if yes, then end.

[0097] S208: Select a compilation task in the task list according to the constructed relationship structure graph.

[0098] Start compiling.

[0099] During the execution of the compilation task, S209 is executed to create a corresponding tool chain compilation environment by referring to the tool chain configuration of the module to be compiled to which the compilation task belongs.

[0100] S210, constructing a root file system and auxiliary tools required for compilation according to the dependency relationship of the modules to be compiled to which the compilation task belongs.

[0101] S211, obtaining source code corresponding to the compilation task.

[0102] S212, merge the patch file prepared for the source code.

[0103] S213, in a corresponding tool chain compilation environment, using the configured tool chain to compile the source code into target code.

[0104] S214, when the compilation is completed, the target code is installed to a set location so that it can be called by other compilation tasks that have a dependency relationship with the compilation task.

[0105] S215, verify the target code and make a corresponding software package according to the packaging requirements.

[0106] S216, executing file dependency check and operating environment dependency check.

[0107] S217, real-time monitoring of whether the compilation task is completed. If completed, transfer to S207. If a compilation error occurs, execute S218, interrupt the compilation task, delete the corresponding topological link and other tasks that depend on the compilation task from the topological structure, and transfer to S207.

[0108] It is worth noting that any system to be compiled in a heterogeneous hybrid system can be compiled according to the compilation method introduced in the embodiments of this specification, so as to support the compilation and construction of various operating systems and their system software in the heterogeneous hybrid system, thereby reducing the development cost of the heterogeneous hybrid system.

[0109] In order to further illustrate and explain the compilation method in this specification, a specific example is used for illustration below.

[0110] Compile the safetylinux system. Set the toolchain environment required by the safetylinux system through the alios-toolchains configuration set, set the configuration of all modules to be compiled through the safetylinux-rootfs configuration set, and start the compilation device in this manual to compile. During the compilation process, the compilation device first parses all configurations, builds a dependency tree according to the module dependencies and creates a task list, and builds tasks in order according to the task list through the topological order. Until all compilation tasks are compiled, the root file system and image of the safetylinux operating system are generated, and the compilation is completed.

[0111] Compile the RTOS system. Set the toolchain environment of the RTOS operating system through the alios-toolchains configuration set, set the configuration of all RTOS modules to be compiled through the rtos-rootfs configuration set, and then start the compilation device in this manual to compile. During the compilation process, after the compilation device parses all configurations, it builds a dependency tree according to the module dependencies and creates a task list. Then compile in the order of the task list until all tasks are compiled, generate the root file system and system image, and complete the compilation of the RTOS system.

[0112] Based on the same inventive concept as in the aforementioned embodiment, the embodiment of this specification also provides a compilation device for a heterogeneous hybrid system, which can support the compilation and construction of various operating systems and their system software in the heterogeneous hybrid system, so that various operating systems and their system software in the heterogeneous hybrid system can be compiled and constructed in the same set of compilation devices, thereby reducing the development cost of the heterogeneous hybrid system.

[0113] See also Figure 3 , is a schematic diagram of a compilation device for a heterogeneous hybrid system, including:

[0114] The parsing module 301 is used to parse the overall construction environment configuration of any system to be compiled in the heterogeneous hybrid system, and obtain tool chain requirement information and compilation configuration of several modules to be compiled;

[0115] A configuration module 302, configured to configure a corresponding tool chain according to the tool chain requirement information of the modules to be compiled;

[0116] A construction module 303 is used to construct corresponding compilation tasks according to the compilation configurations of the modules to be compiled; and to construct a relationship structure map according to the compilation configurations of all modules to be compiled; the relationship structure map is used to characterize the compilation dependency relationships of all modules to be compiled;

[0117] The compilation module 304 is used to process the compilation tasks of the plurality of modules to be compiled 204 with reference to the relationship structure map until the compilation is completed; wherein, an independent tool chain compilation environment is created for each compilation task to perform the compilation operation.

[0118] In an optional implementation manner, the construction module 303 is specifically used to:

[0119] Creating respective compilation tasks according to the compilation parameters and compilation actions of the plurality of modules to be compiled 304 in the compilation configuration; and

[0120] The relationship structure graph is constructed by combining the specified dependencies in the compilation configuration of all the modules to be compiled 304.

[0121] In an optional implementation, the compiling module 304 is specifically configured to:

[0122] According to the relationship structure graph, construct a topological structure of all compilation tasks;

[0123] According to the topology structure, one or more compilation tasks without dependencies are preferentially selected for compilation processing.

[0124] In an optional implementation, the compiling module 304 is specifically configured to:

[0125] For each compilation task, refer to the tool chain configuration of the module to be compiled 304 to create a corresponding tool chain compilation environment;

[0126] Obtaining source code corresponding to the compilation task;

[0127] In a corresponding tool chain compilation environment, the source code is compiled into target code using the configured tool chain.

[0128] In an optional embodiment, the device further comprises:

[0129] The installation module is used to install the target code to a set location so as to be called by other compilation tasks having a dependent relationship.

[0130] In an optional implementation, the device further includes: a verification and packaging module, configured to verify the target code and create a corresponding software package according to packaging requirements.

[0131] In an optional implementation, the device further includes: a deletion module, configured to delete the corresponding topology link from the topology structure if the compilation fails.

[0132] Based on the same inventive concept as in the aforementioned embodiment, the embodiment of this specification further provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of any of the aforementioned methods are implemented.

[0133] Based on the same inventive concept as in the aforementioned embodiments, an embodiment of the present specification also provides a smart car, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the aforementioned methods when executing the program.

[0134] Through one or more embodiments of this specification, this specification has the following beneficial effects or advantages:

[0135] The technical solution in this specification, by parsing the overall construction environment configuration of any system to be compiled in a heterogeneous hybrid system, obtains the tool chain requirement information and compilation configuration of several modules to be compiled; on the one hand, the tool chain is configured as needed according to the tool chain requirement information, and on the other hand, the compilation tasks and relationship structure maps of several modules to be compiled under the system to be compiled are constructed according to the compilation configuration to prepare for compilation. After preparation, refer to the relationship structure map, use the corresponding configured tool chain to process the compilation tasks of the several modules to be compiled until the compilation is completed, and create an independent tool chain compilation environment for each compilation task to perform the compilation operation. It can be seen that this technical solution can support the analysis of the tool chain requirement information and compilation configuration required for any system to be compiled in a heterogeneous hybrid system, configure the required tool chain as needed, and create an independent tool chain compilation environment to perform the compilation of each compilation task. Therefore, this technical solution can support the compilation and construction of various operating systems and their system software in a heterogeneous hybrid system, thereby reducing the development cost of a heterogeneous hybrid system.

[0136] The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general purpose systems may also be used together with the teachings based thereon. Based on the above description, it is apparent that the structure required for constructing such systems is. In addition, this specification is not directed to any particular programming language either. It should be understood that the contents of this specification described herein may be implemented using various programming languages, and the description of the specific languages ​​above is intended to disclose the preferred implementation of this specification.

[0137] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of this description can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.

[0138] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present specification, the various features of the present specification are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the following intention: the claimed specification requires more features than the features explicitly recited in each claim. More specifically, as reflected in the claims below, the inventive aspects lie in less than all the features of the individual embodiments disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present specification.

[0139] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0140] In addition, those skilled in the art will appreciate that, although some embodiments herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of this specification and form different embodiments. For example, in the claims below, any one of the claimed embodiments may be used in any combination.

[0141] The various component embodiments of this specification may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) may be used in practice to implement some or all functions of some or all components of a gateway, a proxy server, or a system according to an embodiment of this specification. This specification may also be implemented as a device or apparatus program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program implementing this specification may be stored on a computer-readable medium, or may have the form of one or more signals. Such a signal may be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0142] It should be noted that the above embodiments illustrate rather than limit the present specification, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present specification may be implemented with the aid of hardware comprising a number of different elements and with the aid of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc., does not indicate any order. These words may be interpreted as names.

Claims

1. A compilation method for a heterogeneous hybrid system, the method comprising: Analyze the overall build environment configuration of any system to be compiled in the heterogeneous hybrid system, and obtain the toolchain requirement information and compilation configuration of several modules to be compiled; Configure the corresponding tool chain according to the tool chain requirement information of the modules to be compiled; Constructing corresponding compilation tasks according to the compilation configurations of the modules to be compiled; and constructing a relationship structure map according to the compilation configurations of all modules to be compiled; the relationship structure map is used to characterize the compilation dependency relationships of all modules to be compiled; Referring to the relationship structure diagram, the compilation tasks of the plurality of modules to be compiled are processed using a correspondingly configured tool chain until the compilation is completed; wherein, an independent tool chain compilation environment is created for each compilation task to perform the compilation operation.

2. The method according to claim 1, wherein the corresponding compilation task is constructed according to the compilation configuration of the plurality of modules to be compiled; And, build a relationship structure map based on the compilation configuration of all modules to be compiled, including: Creating respective compilation tasks according to the compilation parameters and compilation actions of the plurality of modules to be compiled in the compilation configuration; as well as, The relationship structure graph is constructed by combining the specified dependencies in the compilation configurations of all the modules to be compiled.

3. The method according to claim 1, wherein the step of referring to the relationship structure graph and processing the compilation tasks of the plurality of modules to be compiled using a correspondingly configured tool chain specifically comprises: According to the relationship structure graph, construct a topological structure of all compilation tasks; According to the topology structure, one or more compilation tasks without dependencies are preferentially selected for compilation processing.

4. The method according to claim 3, wherein the step of referring to the relationship structure graph and processing the compilation tasks of the plurality of modules to be compiled using a correspondingly configured tool chain specifically comprises: For each compilation task, create a corresponding toolchain compilation environment by referring to the toolchain configuration of the module to be compiled. Obtaining source code corresponding to the compilation task; In a corresponding tool chain compilation environment, the source code is compiled into target code using the configured tool chain.

5. The method according to claim 4, after compiling the source code into target code using the configured tool chain, the method further comprises: The target code is installed to a set location so as to be called by other compilation tasks having dependencies.

6. The method according to claim 4 or 5, after the source code is compiled into the target code using the configured tool chain, the method further comprises: The target code is verified and a corresponding software package is produced according to packaging requirements.

7. The method according to claim 4, after referring to the relationship structure graph and using a correspondingly configured tool chain to process the compilation tasks of the plurality of modules to be compiled, the method further comprises: If the compilation fails, the corresponding topology link is deleted from the topology structure.

8. A compilation device for a heterogeneous hybrid system, the device comprising: A parsing module is used to parse the overall build environment configuration of any system to be compiled in the heterogeneous hybrid system, and obtain tool chain requirement information and compilation configuration of several modules to be compiled; A configuration module, used to configure a corresponding tool chain according to the tool chain requirement information of the modules to be compiled; A construction module, used to construct corresponding compilation tasks according to the compilation configurations of the modules to be compiled; and to construct a relationship structure map according to the compilation configurations of all modules to be compiled; the relationship structure map is used to characterize the compilation dependency relationships of all modules to be compiled; A compilation module is used to refer to the relationship structure map and use the corresponding configured tool chain to process the compilation tasks of the several modules to be compiled until the compilation is completed; wherein, an independent tool chain compilation environment is created for each compilation task to perform the compilation operation.

9. A computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

10. An intelligent car, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 7 when executing the program.