A module configuration unified compiling method, device, equipment and medium

By receiving and parsing standardized compilation commands, dynamically generating compilation project names and environment variables, and parsing configuration files to generate global variables and macro definitions, the problem of scattered Android SDK module configurations is solved, simplifying the compilation process and unifying configuration, thereby improving compilation and development efficiency.

CN122633186APending Publication Date: 2026-08-25GUANGZHOUSNGKE INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610773843.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-29
Publication Date
2026-08-25

AI Technical Summary

Technical Problem

The existing Android SDK module configurations are scattered and lack a unified standard. The compilation process is cumbersome and complex, resulting in difficulty in driver adaptation and low efficiency in development and secondary development.

Method used

This paper provides a unified compilation method for module configuration. By receiving standardized compilation commands, parsing command parameters to generate compilation operations, dynamically generating compilation project names and environment variables, parsing configuration files to generate global variables and macro definitions, and combining compilation operations and runtime environment to generate compilation steps, the paper simplifies the compilation process and unifies configuration.

Benefits of technology

It simplifies the compilation process, standardizes compilation specifications, reduces operational errors, improves compilation efficiency, lowers the barrier to entry for developers, and supports non-professionals in quickly integrating and debugging functional modules.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122633186A_ABST
    Figure CN122633186A_ABST
Patent Text Reader

Abstract

The application relates to the computer technical field and provides a module configuration unified compiling method, device, equipment and medium, the method comprises the following steps: receiving a standardized compiling command, after the compliance verification of the standardized compiling command is completed, the command parameters transmitted by the standardized compiling command are analyzed, a compiling operation is generated based on the basic command parameters and the compiling module name obtained by analysis; based on the project name and other command parameters except the project name transmitted by the standardized compiling command, the compiling project name, the compiling target and the compiling environment variable are dynamically generated; the configuration items in the configuration file of the project corresponding to the compiling project name are analyzed, the global variable and the macro definition are generated; the compiling operation, the compiling project name and the compiling running environment are combined to generate the corresponding compiling step, and the compiling command flow matched with the compiling step is executed according to the compiling switch, and the compiling is completed. The application can simplify the function module integration and the compiling process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a compilation method with unified module configuration, a compilation device with unified module configuration, a corresponding electronic device, and a corresponding computer-readable storage medium. Background Technology

[0002] Currently, the Android SDK (Software Development Kit) released by chip platform manufacturers has a complex compilation process. It requires switching between multiple versions, such as userdebug, user (official commercial version), native (pure native version), and GMS (Google Mobile Services), depending on the requirements. The compilation commands are also complex, requiring frequent switching of directories, project versions, and source environment variables, which reduces development efficiency and accuracy. At the configuration level, the module configurations are scattered and lack a unified standard. When the project changes or the manufacturer frequently changes the driver module, a large number of underlying drivers need to be re-adapted and debugged. During the adaptation process, it is easy to miss some adaptations. It is also not conducive to the rapid integration of functional modules by debugging personnel. Especially for those who are not familiar with the underlying compilation structure, the time cost of configuration and compilation is high, which reduces the efficiency, accuracy, and management convenience of secondary development.

[0003] Therefore, the existing Android SDK module configurations are scattered and lack a unified standard, the compilation process is cumbersome and complicated, resulting in high difficulty in driver adaptation and low efficiency in development and secondary development. Summary of the Invention

[0004] This application provides a unified compilation method, apparatus, device, and medium for module configuration, which can integrate native compilation methods, simplify the compilation process, unify compilation standards, achieve simplified compilation, reduce operational errors, and improve compilation efficiency; at the same time, it establishes a unified configuration mode, simplifies the integration of functional modules and parameter configuration, and significantly lowers the usage threshold for developers.

[0005] In one aspect, this application provides a unified compilation method for module configuration, applied to scripts, the method comprising: The system receives a standardized compilation command. After the standardized compilation command completes compliance verification, it parses the command parameters passed in by the standardized compilation command and generates a compilation operation based on the parsed basic command parameters and the compilation module name. Based on the project name passed in to the standardized compilation command and other command parameters besides the project name, the compilation project name, compilation target and compilation environment variables are dynamically generated; By parsing the configuration items in the configuration file of the project corresponding to the compilation project name, global variables and macro definitions are generated; wherein, the compilation target, the compilation environment variables and the global variables are used to integrate and build a complete compilation and execution environment, and the macro definitions are used to provide compilation switches; The compilation operation, the compilation project name, and the compilation runtime environment are combined to generate corresponding compilation steps, and the compilation command stream matching the compilation steps is executed according to the compilation switch to complete the compilation.

[0006] In some embodiments of this application, the standardized compilation command includes at least three parameters: project name, basic command parameters, and compilation module name; wherein, the first two characters of the project name are used to indicate different main control platforms; the basic command parameters are used to indicate basic compilation command operations; and the characters in the compilation module name, excluding the optional suffix, are used to indicate the execution of different compilation operations, and the optional suffix is ​​used to expand other characters. The standardized compilation command also includes optional parameters, namely version parameters, which are used to indicate different compilation versions.

[0007] In some embodiments of this application, the dynamic generation of the compilation project name, compilation target, and compilation environment variables based on the project name passed in the standardized compilation command and other command parameters besides the project name includes: The input project name and other command parameters other than the project name are parsed according to specific rules by a preset project parsing function to obtain a combination of variables containing chip platform and compilation version information; The variable combination is processed by a preset integration function to generate the compilation project name and device name of each module; the device name is used to generate the storage path of the compilation target product, and the storage path is associated with the compilation target and compilation environment variables.

[0008] In some embodiments of this application, the step of generating global variables and macro definitions by parsing configuration items in the configuration file of the project corresponding to the compiled project name includes: Based on the compiled project name, locate the configuration file of the corresponding project, and parse the configuration items in the configuration file by combining preset regular expressions to extract multiple defined values; The defined values ​​are set as global variables for global reference by the compilation environment; Add the keyword #define at the beginning of the global variable name and assign the value 1 to the end of the variable name to form a macro definition in standard macro format.

[0009] In some embodiments of this application, the method further includes: The global variables are exported for use in the compilation rule file, the macro definitions are saved to header files according to the specified paths for C code to reference, and the extensible configuration directory list is traversed to copy the header files to the target paths corresponding to each module.

[0010] In some embodiments of this application, the method further includes: By comparing the header file generated with the one generated previously, a header file update operation is performed when there are differences.

[0011] In some embodiments of this application, the method further includes: Before compilation, the custom files in the project directory of the target project are copied and overwritten to the native directory to participate in the compilation; wherein, the structure of the project directory corresponds one-to-one with the structure of the native directory, and all custom files are placed in the custom-specific directory; After compilation, restore the overwritten original directory.

[0012] On the other hand, this application provides a compilation apparatus for unified module configuration, applied to scripts, the apparatus comprising: The compilation operation generation module is used to receive standardized compilation commands, and after the standardized compilation commands complete compliance verification, it generates compilation operations based on the parsed basic command parameters and compilation module name by parsing the command parameters passed in by the standardized compilation commands. A project name generation module is developed to dynamically generate the compilation project name, compilation target, and compilation environment variables based on the project name passed in by the standardized compilation command and other command parameters other than the project name; The global variable and macro definition generation module is used to generate global variables and macro definitions by parsing the configuration items in the configuration file of the project corresponding to the compilation project name; wherein, the compilation target, the compilation environment variables and the global variables are used to integrate and build a complete compilation and execution environment, and the macro definitions are used to provide compilation switches; The compilation execution module is used to combine the compilation operation, the compilation project name and the compilation runtime environment to generate corresponding compilation steps, and execute the compilation command stream that matches the compilation steps according to the compilation switch to complete the compilation.

[0013] In some embodiments of this application, the standardized compilation command includes at least three parameters: project name, basic command parameters, and compilation module name; wherein, the first two characters of the project name are used to indicate different main control platforms; the basic command parameters are used to indicate basic compilation command operations; and the characters in the compilation module name, excluding the optional suffix, are used to indicate the execution of different compilation operations, and the optional suffix is ​​used to expand other characters. The standardized compilation command also includes optional parameters, namely version parameters, which are used to indicate different compilation versions.

[0014] In some embodiments of this application, the project name generation module includes: A submodule for generating project names is developed. This submodule uses a preset project parsing function to parse the input project name and other command parameters (excluding the project name) according to specific rules, resulting in a combination of variables containing chip platform and compilation version information. The variable combination is then processed by a preset integration function to generate the compilation project name and device name for each module. The device name is used to generate the storage path for the compilation target output, and the storage path is associated with the compilation target and compilation environment variables.

[0015] In some embodiments of this application, the global variable and macro definition generation module includes: The global variable generation submodule is used to locate the configuration file of the corresponding project based on the compilation project name, parse the configuration items in the configuration file by combining preset regular expressions, and extract multiple defined values; these multiple defined values ​​are used as global variables for global reference by the compilation environment. The macro definition generation submodule is used to add the #define keyword at the beginning of the variable name of the global variable and assign the value 1 to the end of the variable name to form a macro definition in standard macro format.

[0016] In some embodiments of this application, the global variable and macro definition generation module 303 may further include the following sub-modules: The difference comparison submodule is used to compare the header file generated by the current configuration with the header file generated last time, and to perform a header file update operation when there are differences.

[0017] In some embodiments of this application, the apparatus further includes: The centralized management module is used to copy and overwrite the custom files in the project directory of the target project to the native directory before compilation; wherein, the structure of the project directory and the structure of the native directory correspond one-to-one, and all custom files are placed in the custom-specific directory; In some embodiments of this application, the apparatus further includes: The target restore module is used to restore the overwritten original directories after compilation.

[0018] In another aspect, this application also provides an electronic device, including: a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the unified compilation method for module configuration as described in any one of the claims.

[0019] In another aspect, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the unified compilation method for module configuration as described in any one of the claims.

[0020] In another aspect, this application also provides a computer program product containing instructions that, when run on a computer, cause the computer to execute the compilation method of the module configuration uniformity described in the above aspects.

[0021] This application provides a unified compilation method, apparatus, device, and medium for module configuration. It receives standardized compilation commands via scripts. After compliance verification of the standardized compilation commands, it parses the command parameters passed to the standardized compilation commands and generates compilation operations based on the parsed basic command parameters and the compilation module name. It can also dynamically generate a compilation project name, compilation target, and compilation runtime environment based on the project name passed to the standardized compilation commands and other command parameters besides the project name. Furthermore, it generates global variables and macro definitions by parsing configuration items in the configuration file of the project corresponding to the compilation project name. The compilation target, compilation environment variables, and global variables can be integrated to construct a complete compilation runtime environment. Macro definitions can be used to provide compilation switch combinations to generate corresponding compilation steps. Finally, it can combine compilation operations, compilation project names, and compilation runtime environments to generate corresponding compilation steps and execute compilation command streams matching the compilation steps according to the compilation switches to complete the compilation. By integrating native compilation methods, it simplifies the compilation process, unifies compilation standards, achieves simplified compilation, reduces operational errors, and improves compilation efficiency. Simultaneously, it establishes a unified configuration mode, simplifying functional module integration and parameter configuration, significantly lowering the barrier to entry for developers. Attached Figure Description

[0022] Figure 1 This is a flowchart illustrating the steps of a unified compilation method for module configuration provided in an embodiment of this application. Figure 2 This is a schematic diagram of the compilation commands provided in an embodiment of this application; Figure 3 This is a structural block diagram of a compilation device with unified module configuration provided in an embodiment of this application; Figure 4 This is a structural block diagram of an electronic device provided in an embodiment of this application; Figure 5 This is a structural block diagram of a computer-readable storage medium provided in an embodiment of this application. Detailed Implementation

[0023] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0024] This application's embodiments integrate a native compilation method, relying on the Linux system as the Android-specific compilation environment. It follows the native compilation logic, uses general-purpose Shell scripts for development, and requires no additional runtime environment deployment. It is independent and decoupled from the native compilation system, simplifying the compilation process, unifying compilation standards, achieving simplified compilation, reducing operational errors, and improving compilation efficiency. Simultaneously, it can establish a unified configuration mode, simplifying the integration of functional modules and parameter configuration, significantly lowering the barrier to entry for developers. Specifically, it can cover all native compilation methods, simplifying compilation steps, making compilation uniform and concise—essentially user-friendly and error-free, thus improving compilation efficiency. Furthermore, the unified configuration of functional modules supports references to Android mk, Makefile, and C files, enabling even non-professional module debuggers to configure them, offering strong extensibility. Finally, it can automatically generate configuration attributes, facilitating software version management and dynamic viewing of hardware information.

[0025] Reference Figure 1 The diagram illustrates a flowchart of a unified compilation method for module configuration provided in an embodiment of this application, which may specifically include the following steps: Step S101: Receive the standardized compilation command. After the standardized compilation command completes the compliance verification, generate the compilation operation based on the parsed basic command parameters and the compilation module name by parsing the command parameters passed in by the standardized compilation command.

[0026] In this embodiment, the Linux system environment is used as the designated compilation environment for Android compilation, and the script adopts the most commonly used Shell scripting design in Linux systems. Shell scripts can complete the entire process of command parsing, project configuration, code management, and automated compilation, ultimately achieving the goals of simplified compilation, unified configuration, and efficient compilation.

[0027] In some embodiments of this application, a standardized compilation command is received via a script. After the standardized compilation command completes compliance verification, the command parameters can be parsed to generate compilation operation instructions.

[0028] Optionally, the general format of the standardized compilation command can be represented as: . / mk PrjName Action[Module][Variant]. Compliance checks on the standardized compilation command can be performed by verifying whether the command-line rules and parameters conform to the aforementioned general format. That is, command parameters are parsed only if the command-line rules and parameters conform.

[0029] Optionally, the standardized compilation command includes at least the following three parameters: project name, basic command parameters, and compilation module name.

[0030] The first two characters of the project name can be used to indicate different main control platforms, that is, to identify the platform and project configuration.

[0031] Basic command parameters can be used to indicate basic compilation command operations, such as r, clean, new, mmm. r refers to remake, indicating that the compilation operation is not clean; clean indicates a cleanup operation; new compilation is clean + full compilation, that is, compilation operation after cleanup; mmm specifies the directory for compilation, that is, compilation operation of the module alone.

[0032] Characters other than optional suffixes in the compiled module name, such as all, vendor, system, kernel, lk, etc., can be used to indicate different compilation operations. Optional suffixes can be used to expand other characters. For example, npac (allpac) resolves to automatic full compilation and firmware packaging, realizing the linkage between compilation and packaging; sts (allsts) resolves to full compilation of STS firmware.

[0033] Optionally, standardized build commands can also include optional parameters. Optional parameters can be version parameters, which can be used to indicate different build versions, such as user or userdebug.

[0034] For example, taking the compilation command `. / mk sew30109vb_6h10 r allnpac userdebug` as an example, the first command parameter `sew30109vb_6h10` is the project name, where the two characters `se` represent the T606 platform; the second command parameter `r` indicates that the compilation should not be cleaned; the third command parameter `allnpac` is the compilation module name, where `all` indicates full compilation, and the suffix `npac` indicates automatic full compilation and firmware packaging; the fourth parameter `userdebug` is the compilation version option. This application does not limit this aspect.

[0035] In practical applications, scripts can generate compilation operations by parsing fixed-position parameters passed from the command line. Specifically, the script first parses the second basic command parameter to determine the basic compilation types such as remake, clean, new, and mmm. Then, it parses the third parameter to separate the compilation module and the pac suffix, determines whether to perform a packaging operation, and then combines the basic compilation type, compilation module, and packaging strategy to automatically generate a complete compilation operation.

[0036] Step S102: Based on the project name passed in by the standardized compilation command and other command parameters other than the project name, dynamically generate the compilation project name, compilation target and compilation environment variables.

[0037] In some embodiments of this application, the compilation project name, compilation target (i.e., target) and compilation environment variables can be dynamically generated by passing in the project name parameter and other command parameters.

[0038] Specifically, engineering analysis and environment construction can be achieved through dedicated functions.

[0039] Optionally, the passed project name and other command parameters besides the project name can be parsed according to specific rules by the preset project parsing function, namely Project_Split function, to obtain a combination of variables containing chip platform (i.e. SOC platform) and compilation version information. Then, the aforementioned variable combination can be processed by the preset integration function, namely project_combine function, to generate the compilation project name and device name (i.e. Device name) of each module.

[0040] For example, the executable code that generates the compilation project name and Device name for the system module can be as follows: # ussi_arm64_full-userdebug-native # ussi_arm64 export Project_ussi_full_name=ussi_${PLATFORM_KERN_ARCH}_${Project_vlx}-${SKTL_BUILD_VARIANT}-${SKTL_TARGET_BUILD_VERSION} export SKTL_SYSTEM_DEVICE=ussi_${PLATFORM_KERN_ARCH} Among them, the chip SOC name and the corresponding packaged product path name can be generated based on the first two characters of the project name, and the compilation project suffix name can be generated based on the second field of the project name. The target version can also be determined by combining the fourth version parameter. The device name specifically refers to the hardware device identifier corresponding to the current compilation. It is used to generate the storage path of the compilation target product, bind the device compilation configuration, associate the storage path with the compilation target and compilation environment variables, and determine the compilation path.

[0041] Step S103: Generate global variables and macro definitions by parsing the configuration items in the configuration file of the project corresponding to the compilation project name.

[0042] In some embodiments of this application, the script generates macro definitions and global variables by parsing the configuration items in the ProjectConfig.mk configuration file of the corresponding project, which are used by the Makefile and code include to realize the compilation control of code and modules, and complete the construction of the compilation environment and the configuration of function module switching.

[0043] Global variables can be used to provide a compilation environment, specifically configuring compilation paths, project properties, platform information, etc., to build a basic compilation and runtime environment. In specific implementations, compilation targets, compilation environment variables, and global variables can be integrated to construct a complete compilation and runtime environment. Macro definitions can be used to provide compilation switches, specifically acting as compilation logic switches to control whether code segments and functional modules participate in compilation as needed.

[0044] Specifically, the configuration file ProjectConfig.mk of the corresponding project can be located based on the project name. The configuration items in the configuration file can be parsed by matching and analyzing the combination of preset regular expressions to extract multiple definition values. These multiple definition values ​​are then used as global variables for global reference by the compilation environment, and corresponding macro definitions are generated based on the global variables.

[0045] Optionally, the default regular expression combination can be grep+awk. Specifically, grep+awk operations can be used to obtain key fields and dynamically generate corresponding variables by truncating the string. In the implementation, the script opens the configuration file, parses the configuration items in the ProjectConfig.mk file and saves them to the corresponding variables, generates the compilation output and obj PATH environments, and uses the combination of regular expressions grep and awk to parse out the defined values ​​on the right side of the equals sign for specific configuration items. Multiple defined values ​​can be separated by spaces and used as global variables for global reference in the compilation environment. Specifically, grep can be used to capture configuration items, and awk can be used to truncate the values ​​on the right side of the equals sign, extracting the configuration content into variable values ​​that the script can recognize, i.e., multiple defined values.

[0046] For example, defined values ​​may include space-separated configuration items, single configuration items, and multiple configuration item values ​​with spaces and prefixes removed. This application does not impose any limitations on this.

[0047] Optionally, specific prefixes can be added to multiple defined values ​​and combined to generate local variables for local module reference, thereby meeting the reference requirements of different scenarios.

[0048] For example: SKTL_TOUCH_MODUEL=$(get_muti_var_from_mk "SKTL_TOUCH_MODUEL" "SKTL_TP_") # Local variable, for local reference SKTL_TOUCH_MODUEL_EXPORT=$(get_export_var_from_mk "SKTL_TOUCH_MODUEL") # Global variable, for global reference by the compilation environment The ProjectConfig.mk configuration supports multiple modules, such as SKTL_LCD_MODUEL=SKTL_LCD_65 SKTL_LCD_66. After processing, a new variable can be generated: SKTL_LCD_MODUEL_LOCAL=SKTL_LCD_6566. This variable is a local variable, mainly used to automatically generate firmware names. `export SKTL_LCD_MODUEL_GLOBAL=SKTL_LCD_65 SKTL_LCD_66` is a global variable that can be used by the Makefile. `get_export_var_from_mk` retrieves the values ​​of ProjectConfig.mk configuration items, separated by spaces. `get_var_from_mk` retrieves the value of a single configuration item from ProjectConfig.mk. `get_muti_var_from_mk` retrieves the value of multiple configuration items from ProjectConfig.mk, removing spaces and prefixes.

[0049] Optionally, generating macro definitions based on global variables can be done by adding the `#define` keyword at the beginning of the global variable name and assigning the value 1 to the end, forming a standard macro format: `#define variable_name1`, such as the macro definition `#define VAR 1`. This allows the obtained global variable to be exported to the Android build file and CMakefile, while simultaneously generating `#define` macros and saving them to the corresponding file path for C files to reference in header files.

[0050] In some embodiments of this application, global variables can be exported for use in the compilation rule file (i.e., Makefile), macro definitions can be saved to header files according to specified paths for C code reference, and an extensible list of configuration directories can be traversed to copy header files to the target paths corresponding to each module. It should be noted that in subsequent steps, the Makefile can control the compilation strategy of functional modules based on global variables, performing on-demand compilation and achieving module compilation control; header files can implement compilation control of code segments.

[0051] In practical applications, macro definition header files can be generated according to specified paths for reference by various functional modules. Specifically, the script can traverse an expandable list of configuration directories and automatically copy the generated header files to the target paths corresponding to each module.

[0052] For example, the directory list of files to be generated can be as follows: gen_configs_list=( "${PLATFORM_VENDOR_SDK_PATH} / bsp / bootloader / lk / platform / sprd_shared / include / sktlconfig.h" "${PLATFORM_VENDOR_SDK_PATH} / vendor / sprd / modules / libcamera / sensor / inc / sktlconfig.h" "${PLATFORM_VENDOR_SDK_PATH} / bsp / sensorhub / public / sensor_hub_sprd / public / system / sktlconfig.h" "${PLATFORM_VENDOR_SDK_PATH} / vendor / sprd / modules / charge / charge / sktlconfig.h" "${PLATFORM_VENDOR_SDK_PATH} / bsp / bootloader / chipram / ddr / ddr_init / init / ddrc / r2p3 / sktlconfig.h" ) The `gen_configs_list` function is extensible; simply add it to the corresponding path, and the script will automatically generate a `.h` file in that path for different modules to reference. This means variables can be written to a file using the standard macro definition format `#define VAR 1`, and the script can then iterate through the directories listed above and copy them sequentially to each directory.

[0053] Optionally, the script can incorporate a difference comparison mechanism during the generation of macro definition header files, i.e., perform a before-and-after comparison check. Specifically, it compares the header file generated by the current configuration with the header file generated last time. If a difference is found, a header file update operation is performed, ensuring that the header file is only regenerated when configuration items are modified. This avoids invalid recompilation triggered by timestamp changes and effectively optimizes compilation time.

[0054] In the embodiments of this application, the generated global variables and macro definitions can be used universally in the entire compilation environment. As an example, Android.mk can directly call the variable name for logical judgment and assignment. As another example, CMakefile can use the command to assign values ​​and control the compilation logic of C files. As yet another example, C / C++ code can include the generated header file and directly use macro definitions to dynamically control the compilation of code segments.

[0055] Example of referencing in the Android mk / Makefile file: ifeq ($(strip $(SKTL_LCD_ROTATION)), LCD_ROTATION_270) PRODUCT_VENDOR_PROPERTIES += \ ro.minui.default_rotation=ROTATION_LEFT \ ro.vendor.minui.hwrotation=270 else ifeq ($(strip $(SKTL_LCD_ROTATION)), LCD_ROTATION_90) PRODUCT_VENDOR_PROPERTIES += \ ro.minui.default_rotation=ROTATION_RIGHT \ ro.vendor.minui.hwrotation=90 else ifeq ($(strip $(SKTL_LCD_ROTATION)), LCD_ROTATION_180) PRODUCT_VENDOR_PROPERTIES += \ ro.minui.default_rotation=ROTATION_DOWN \ ro.vendor.minui.hwrotation=180 Endif SKTL_LCD_MODUEL_TEMP =$(shell echo $(SKTL_LCD_MODUEL_EXPORT)) $(info "SKTL_LCD_MODUEL_TEMP = $(SKTL_LCD_MODUEL_TEMP)") ifneq ($(filter SKTL_LCD_01,$(SKTL_LCD_MODUEL_TEMP)),) MODULE_SRCS += $(LOCAL_DIR) / lcd / lcd_HX8279_XCX101WUM_40WP_mipi_fhd.c Endif C / C++ file reference: #include "sktlconfig.h" As mentioned above, global macro variables can be referenced in Android.mk and C Makefile via `export`. In Android.mk, this can be achieved by directly referencing the variable name to obtain its value, which can then be used to determine or assign the value to a relevant variable in the SDK source code. Similarly, in C Makefile, the global macro can be printed and assigned to a new variable in the Makefile using the `echo` command, specifically: `SKTL_LCD_MODUEL_TEMP := $(shell echo $(SKTL_LCD_MODUEL_EXPORT))`. Then, `SKTL_LCD_MODUEL_TEMP` can be referenced to control whether C files participate in the compilation implementation. Header file references can be achieved by directly `#include "sktlconfig.h"` in C / C++ files, allowing the generated configuration macro definitions to be directly referenced in C files, thus dynamically compiling the corresponding code segments.

[0056] In this embodiment, it is also possible to support customized overlay directories for different product engineering projects, that is, configuration files and customized directories can be centralized for iterative version management. Specifically, customized configurations scattered in various directories of the original SDK, such as drivers, parameters, patches, scripts, etc., can be uniformly converged into a customized dedicated directory, namely the sktl directory, for centralized management.

[0057] In some embodiments of this application, before compilation, custom files in the project directory of the target project can be copied to the native directory to participate in compilation; wherein, the structure of the project directory corresponds one-to-one with the structure of the native directory, and all custom files can be placed in the sktl directory.

[0058] For example, the sktl directory structure can be as follows: $ tree -L 4 ├── build All functional scripts are centrally managed │├── sk2s_build_daily.sh #Daily automatic compilation script │├── sk2s_chan_prj.sh #Script for switching projects / versions │├── sk2s_gitpatch.sh # Git patch management │├── sk2s_idh_patch.sh #IDH patch script │├── sk2s_ignore_staged.sh │├── sk2smk #Core compilation tool │├── sk2s_repo_sync_all.sh #Synchronize all code │├── sk_build_daily_example.conf │├── sksystempropfile.sh │├── sktlmk2 #Version compilation tool The #build directory centrally manages all functional scripts, including all commands for compiling, patching, synchronizing code, and packaging versions. The config directory is divided into common and different project directories. │├── common #Common configuration (shared by all projects) ││├── ProjectConfig.mk ││└── sk_system.prop │├── sep30109vb_6h10 #Project A Dedicated Configuration ││├── Private_file │││└── bootlogo #boot animation ││├── ProjectConfig.mk ││└── sk_system.prop │├── set30109vc_6h10 #Specific configuration for Project B ││├── Private_file │││└── bootlogo ││├── ProjectConfig.mk ││└── sk_system.prop The `#config` directory contains the system configuration, boot logo, and project parameters for each project. Each project has its own folder containing the boot animation, system properties, project name, version number, and compiler settings. ├── custom Version file, currently supports version management configuration for closed-source bin files such as modem. │├── Android.mk │├── se_modem ││├── adsp #Audio DSP Firmware │││├── AudioDSP_SHARKL6_25A_W25.18.2 │││└── AudioDSP_SHARKL6_25A_W25.31.2 ││├── cp0_cp1 #4G Modem │││├── 4G_MODEM_22B_W25.23.2 │││└── 4G_MODEM_22B_W25.26.1 ││├── cp2 #WCN WiFi and Bluetooth firmware │││└── WCN_TRUNK_22A_W25.34.2 ││├── gnss #GPS positioning firmware │││├── GNSS_20B_W25.23.2 │││└── GNSS_20B_W25.24.1 ││└── nv #NV parameters (RF parameters, calibration data) ││├── SKTL_W25.26.1_NV_2501 ││ └── SKTL_W25.26.1_NV_2502 │└── sk_prj_list │ └── sk_prj_list.conf #The custom directory is where hardware drivers, baseband, modem, GPS, and WiFi firmware are stored. └── Project: Customized Engineering Catalog for Different Products ├── Android.mk ├── sep30109vb_6h10 #Custom code for Project A │└── sprd_t │ ├── bsp #board-level support package │ ├── device #Device configuration │ └── vendor #Customized by manufacturers ├── set30109vc_6h10 #Custom code for Project B │├── sprd_t ││├── bsp ││├── device ││└── vendor │└── sprd_v │ ├── device │ ├── frameworks │ └── packages The #project directory contains system customizations, interface modifications, function switches, and proprietary code for each project. Among them, “│”, “├──”, and “└──” are ASCII art symbols in a directory tree, usually used to display the hierarchical structure of folders or files. “│” represents hierarchical continuation, “├──” represents a sub-item of the current level, “└──” represents the last sub-item of the same level, and “│├──” represents a file / subdirectory under the parent directory.

[0059] In some embodiments of this application, after compilation, the customized overridden files can be traversed and the overridden original directories can be restored, ensuring that the source code is clean and pure, and supporting functional expansion.

[0060] Step S104: Combine the compilation operation, compilation project name and compilation runtime environment to generate corresponding compilation steps, and execute the compilation command stream that matches the compilation steps according to the compilation switch to complete the compilation.

[0061] In some embodiments of this application, compilation targets, compilation environment variables, and global variables can be integrated to construct a complete compilation and runtime environment. Specifically, based on the generated compilation operations (Command, Action), compilation project name, and compilation runtime environment, corresponding compilation steps can be generated, and the compilation command flow can be automatically executed according to the compilation switches. The compilation switches can control whether code segments and functional modules participate in compilation as needed.

[0062] Optional, automatically executed compilation commands can be such as Figure 2 As shown, the compilation includes cleanup (clean), full recompile (new), incremental compilation (remake), Android module compilation (mmm), kernel module compilation (m), OTA (Over-the-Air Technology) package compilation (ota), differential package compilation (dota), and packaging operations (pac). Each command follows a unified execution paradigm of environment configuration and corresponding command flow, covering the complete process from compilation cleanup, incremental / full build, module-level compilation to OTA package generation and final packaging, achieving standardization and differentiated adaptation of compilation actions in different scenarios.

[0063] Each type of command corresponds to a fixed execution logic and underlying command flow.

[0064] For example, the cleanup command `clean` is mainly used to remove .out and .obj files generated during the compilation process. It supports cleaning by module (uboot, kernel, Androidsystem / vendor, etc.). Its underlying command flow can be represented as `setenv+cleanxxx`, which can clean up the compilation artifacts of a single module, avoiding the time-consuming full cleanup. The full recompile command `new` is mainly used to first remove all .out directories and then recompile all modules (uboot, kernel, Android, etc.). Its underlying command flow can be represented as `setenv+cleanxxx+remakexxx`, which can ensure a clean environment without remnants when making significant modifications or cross-module changes. The incremental compilation command `remake` is mainly used to incrementally compile a specified module (uboot, kernel, Android, etc.) without cleaning up existing artifacts. Its underlying command flow can be represented as `setenv+remakexxx`, which can quickly generate the target artifact after minor code modifications, significantly saving compilation time. The Android module compilation command `mmm` is mainly used to compile modules in a specified directory of the Android system (based on the Android.bp file). Its underlying command flow can be represented as `setenv+mm`. `mxxxpath` allows modification of only a specific system module (such as modules under the `system` or `vendor` directories) without requiring a full recompilation. The kernel module compilation command `m` is primarily used to compile kernel `.ko` module files individually; its underlying command flow can be represented as `setbspenv + remakemodules`, enabling modifications to driver modules and kernel functionality without recompiling the entire kernel image. The OTA package compilation command `ota` is primarily used to compile a complete OTA upgrade package individually; its underlying command flow can be represented as `remakeotapackage`, generating a full OTA upgrade package for complete device upgrades. The differential package compilation command `do`... `ta` is primarily used to generate differential OTA upgrade packages based on old and new version zip packages. Its underlying command flow can be represented as `setenv + makediffpackage`, enabling the generation of incremental upgrade packages during version iterations, significantly reducing the size of the upgrade package. The packaging operation command `pac` is mainly used to generate the final release pac package, supporting both default and custom modes. In default mode, it can automatically generate a version package name with a timestamp. In custom mode, a specified pac package name can be passed in. Its underlying command flow can be represented as `make_new_pac`, which can generate a directly releaseable mass production package or test package after compilation.

[0065] In other words, all commands can follow a unified execution paradigm, which involves first configuring the compilation environment (loading the target project's environment variables and compilation targets) via `setenv` (or `setbspenv`), and then executing the corresponding command stream (clean / remake / mmm / packaging, etc.). The core differences between different commands lie only in the cleanup logic, compilation scope, and output type. This application's embodiments do not impose any limitations on this.

[0066] In this embodiment, a script receives standardized compilation commands. After the standardized compilation commands complete compliance verification, the script parses the command parameters passed to the standardized compilation commands. Based on the parsed basic command parameters and the compilation module name, a compilation operation is generated. Furthermore, the script can dynamically generate a compilation project name, compilation target, and compilation runtime environment based on the project name passed to the standardized compilation commands and other command parameters besides the project name. It also generates global variables and macro definitions by parsing configuration items in the configuration file of the project corresponding to the compilation project name. The compilation target, compilation environment variables, and global variables can be integrated to construct a complete compilation runtime environment. Macro definitions can be used to provide compilation switch combinations to generate corresponding compilation steps. Finally, the compilation operation, compilation project name, and compilation runtime environment can be combined to generate corresponding compilation steps. The script then executes the compilation command stream matching the compilation steps according to the compilation switches to complete the compilation. By integrating native compilation methods, the compilation process is simplified, compilation standards are unified, simplified compilation is achieved, operational errors are reduced, and compilation efficiency is improved. Simultaneously, a unified configuration mode is established, simplifying the integration of functional modules and parameter configuration, significantly lowering the barrier to entry for developers.

[0067] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of this application are not limited to the described order of actions, because according to the embodiments of this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of this application.

[0068] Reference Figure 3 This diagram illustrates a structural block diagram of a unified module configuration compilation device provided in an embodiment of this application, which is applied to scripts and may specifically include the following modules: The compilation operation generation module 301 is used to receive standardized compilation commands. After the standardized compilation commands complete compliance verification, it generates compilation operations based on the basic command parameters and compilation module name obtained by parsing the command parameters passed in by the standardized compilation commands. A project name generation module 302 is developed to dynamically generate the compilation project name, compilation target, and compilation environment variables based on the project name passed in the standardized compilation command and other command parameters other than the project name; The global variable and macro definition generation module 303 is used to generate global variables and macro definitions by parsing the configuration items in the configuration file of the project corresponding to the compilation project name; among them, the compilation target, compilation environment variables and global variables are used to integrate and build a complete compilation and runtime environment, and the macro definitions are used to provide compilation switches; The compilation execution module 304 is used to combine the compilation operation, the compilation project name and the compilation runtime environment to generate the corresponding compilation steps, and execute the compilation command stream that matches the compilation steps according to the compilation switch to complete the compilation.

[0069] In some embodiments of this application, the standardized compilation command includes at least the following three parameters: project name, basic command parameters, and compilation module name; wherein, the first two characters of the project name are used to indicate different main control platforms; the basic command parameters are used to indicate basic compilation command operations; and the characters in the compilation module name, excluding the optional suffix, are used to indicate the execution of different compilation operations, and the optional suffix is ​​used to expand other characters; The standardized compilation command also includes optional parameters, such as version parameters, which are used to indicate different compilation versions.

[0070] In some embodiments of this application, the project name generation module 302 may include the following sub-modules: A submodule for generating project names is developed. It uses a preset project parsing function to parse the passed project name and other command parameters according to specific rules, resulting in a combination of variables containing chip platform and compilation version information. The preset integration function processes the variable combination to generate the compilation project name and device name for each module. The device name is used to generate the storage path of the compilation target output, and the storage path is associated with the compilation target and compilation environment variables.

[0071] In some embodiments of this application, the global variable and macro definition generation module 303 may include the following sub-modules: The global variable generation submodule is used to locate the configuration file of the corresponding project based on the compilation project name, and parse the configuration items in the configuration file by matching a combination of preset regular expressions to extract multiple defined values; these multiple defined values ​​are then used as global variables for global reference by the compilation environment. The macro definition generation submodule is used to add the #define keyword at the beginning of the variable name of a global variable and assign the value 1 to the end of the variable name to form a macro definition in standard macro format.

[0072] In some embodiments of this application, the global variable and macro definition generation module 303 may further include the following sub-modules: The difference comparison submodule is used to compare the header file generated by the current configuration with the header file generated last time, and to perform a header file update operation when there are differences.

[0073] In some embodiments of this application, the apparatus provided in this application may further include the following modules: The centralized management module is used to copy and overwrite the custom files in the target project's project directory to the native directory before compilation; the structure of the project directory corresponds one-to-one with the structure of the native directory, and all custom files are placed in a custom-specific directory; In some embodiments of this application, the apparatus provided in this application may further include the following modules: The target restore module is used to restore the overwritten original directories after compilation.

[0074] In this embodiment, a script receives standardized compilation commands. After the standardized compilation commands complete compliance verification, the script parses the command parameters passed to the standardized compilation commands. Based on the parsed basic command parameters and the compilation module name, a compilation operation is generated. Furthermore, the script can dynamically generate a compilation project name, compilation target, and compilation runtime environment based on the project name passed to the standardized compilation commands and other command parameters besides the project name. It also generates global variables and macro definitions by parsing configuration items in the configuration file of the project corresponding to the compilation project name. The compilation target, compilation environment variables, and global variables can be integrated to construct a complete compilation runtime environment. Macro definitions can be used to provide compilation switch combinations to generate corresponding compilation steps. Finally, the compilation operation, compilation project name, and compilation runtime environment can be combined to generate corresponding compilation steps. The script then executes the compilation command stream matching the compilation steps according to the compilation switches to complete the compilation. By integrating native compilation methods, the compilation process is simplified, compilation standards are unified, simplified compilation is achieved, operational errors are reduced, and compilation efficiency is improved. Simultaneously, a unified configuration mode is established, simplifying the integration of functional modules and parameter configuration, significantly lowering the barrier to entry for developers.

[0075] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0076] This application also provides an electronic device, see embodiments thereof. Figure 4The provided electronic device 400 includes a memory 410, a processor 420, and a computer program 411 stored in the memory 410 and capable of running on the processor 420. When the computer program 411 is executed by the processor, it implements the various processes of the above-mentioned module configuration unified compilation method embodiment and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0077] This application also provides a computer-readable storage medium, see embodiments thereof. Figure 5 The computer-readable storage medium 500 provides a computer program 411. When the computer program 411 is executed by the processor, it implements the various processes of the above-mentioned module configuration unified compilation method embodiment and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0078] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0079] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of the embodiments of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or modules is not necessarily limited to those steps or modules explicitly listed, but may include other steps or modules not explicitly listed or inherent to these processes, methods, products, or devices. The division of modules in the embodiments of this application is merely a logical division; in actual applications, there may be other division methods. For example, multiple modules may be combined into or integrated into another system, or some features may be ignored or not performed. Additionally, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interface, and the indirect coupling or communication connection between modules may be electrical or other similar forms, none of which are limited in the embodiments of this application. Furthermore, the modules or sub-modules described as separate components may or may not be physically separated, may or may not be physical modules, or may be distributed among multiple circuit modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiments of this application.

[0080] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0081] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and modules described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0082] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between devices or modules through some interfaces, and may be electrical, mechanical, or other forms.

[0083] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0084] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium.

[0085] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.

[0086] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

[0087] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0088] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The functions specified in one or more boxes; these computer program instructions may also be loaded onto a computer or other programmable data processing terminal equipment to cause a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0089] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present application.

[0090] Finally, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.

[0091] The technical solutions provided in the embodiments of this application have been described in detail above. Specific examples have been used in the embodiments of this application to illustrate the principles and implementation methods of the embodiments of this application. The description of the above embodiments is only for the purpose of helping to understand the methods and core ideas of the embodiments of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the embodiments of this application. Therefore, the content of this specification should not be construed as a limitation on the embodiments of this application.

Claims

1. A compilation method for unified module configuration, characterized in that, Applied to a script, the method includes: The system receives a standardized compilation command. After the standardized compilation command completes compliance verification, it parses the command parameters passed in by the standardized compilation command and generates a compilation operation based on the parsed basic command parameters and the compilation module name. Based on the project name passed in the standardized compilation command and other command parameters besides the project name, the compilation project name, compilation target and compilation environment variables are dynamically generated; By parsing the configuration items in the configuration file of the project corresponding to the compilation project name, global variables and macro definitions are generated; wherein, the compilation target, the compilation environment variables and the global variables are used to integrate and build a complete compilation and execution environment, and the macro definitions are used to provide compilation switches; The compilation operation, the compilation project name, and the compilation runtime environment are combined to generate corresponding compilation steps, and the compilation command stream matching the compilation steps is executed according to the compilation switch to complete the compilation.

2. The method according to claim 1, characterized in that, The standardized compilation command includes at least three parameters: project name, basic command parameters, and compilation module name; wherein, the first two characters of the project name are used to indicate different main control platforms; the basic command parameters are used to indicate basic compilation command operations; and the characters in the compilation module name, excluding the optional suffix, are used to indicate the execution of different compilation operations, and the optional suffix is ​​used to expand other characters. The standardized compilation command also includes optional parameters, namely version parameters, which are used to indicate different compilation versions.

3. The method according to claim 2, characterized in that, The process of dynamically generating a compilation project name, compilation target, and compilation environment variables based on the project name passed in the standardized compilation command and other command parameters besides the project name includes: The input project name and other command parameters other than the project name are parsed according to specific rules by a preset project parsing function to obtain a combination of variables containing chip platform and compilation version information; The variable combination is processed by a preset integration function to generate the compilation project name and device name of each module; the device name is used to generate the storage path of the compilation target product, and the storage path is associated with the compilation target and compilation environment variables.

4. The method according to claim 1, characterized in that, The process of generating global variables and macro definitions by parsing the configuration items in the configuration file of the project corresponding to the compiled project name includes: Based on the compiled project name, locate the configuration file of the corresponding project, and parse the configuration items in the configuration file by combining preset regular expressions to extract multiple defined values; The defined values ​​are set as global variables for global reference by the compilation environment; Add the keyword #define at the beginning of the global variable name and assign the value 1 to the end of the variable name to form a macro definition in standard macro format.

5. The method according to claim 4, characterized in that, The method further includes: The global variables are exported for use in the compilation rule file, the macro definitions are saved to header files according to the specified paths for C code to reference, and the extensible configuration directory list is traversed to copy the header files to the target paths corresponding to each module.

6. The method according to claim 5, characterized in that, The method further includes: By comparing the header file generated with the one generated previously, a header file update operation is performed when there are differences.

7. The method according to claim 1, characterized in that, The method further includes: Before compilation, the custom files in the project directory of the target project are copied and overwritten to the native directory to participate in the compilation; wherein, the structure of the project directory corresponds one-to-one with the structure of the native directory, and all custom files are placed in the custom-specific directory; After compilation, restore the overwritten original directory.

8. A compilation device with unified module configuration, characterized in that, Applied to a script, the device includes: The compilation operation generation module is used to receive standardized compilation commands, and after the standardized compilation commands complete compliance verification, it generates compilation operations based on the parsed basic command parameters and compilation module name by parsing the command parameters passed in by the standardized compilation commands. A project name generation module is developed to dynamically generate the compilation project name, compilation target, and compilation environment variables based on the project name passed in by the standardized compilation command and other command parameters other than the project name; The global variable and macro definition generation module is used to generate global variables and macro definitions by parsing the configuration items in the configuration file of the project corresponding to the compilation project name; wherein, the compilation target, the compilation environment variables and the global variables are used to integrate and build a complete compilation and execution environment, and the macro definitions are used to provide compilation switches; The compilation execution module is used to combine the compilation operation, the compilation project name and the compilation runtime environment to generate corresponding compilation steps, and execute the compilation command stream that matches the compilation steps according to the compilation switch to complete the compilation.

9. An electronic device, characterized in that, include: A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the module configuration uniform compilation method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, it implements the unified compilation method for module configuration as described in any one of claims 1 to 7.