Method, device, equipment and medium for updating embedded operating system

By obtaining the updated parameter information and building block dependency information in the script file, and determining and downloading the components to be updated, the problem of difficulty in updating the embedded operating system is solved, and an efficient update process is achieved.

CN114816475BActive Publication Date: 2025-08-26QINGDAO HAIER TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210411608.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-19
Publication Date
2025-08-26
Estimated Expiration
2042-04-19

AI Technical Summary

Technical Problem

The update process of existing embedded operating systems is difficult and inefficient, and developers need to spend a lot of time determining which modules need to be updated, which is prone to missed configurations and lead to confusion.

Method used

By obtaining the updated parameter information of the embedded operating system, based on the identification information and building block dependency information in the script file, the components to be updated are determined from the target building block component, and the corresponding script file is downloaded and compiled to generate the updated executable file.

Benefits of technology

It realizes simple and one-stop updates of embedded operating systems, improves update efficiency, and saves download time and developer workload.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114816475B_ABST
    Figure CN114816475B_ABST
Patent Text Reader

Abstract

The present application provides an update method, apparatus, device, and medium for an embedded operating system, the method comprising: obtaining updated parameter information corresponding to the embedded operating system; determining a to-be-updated building block component from the target building block component based at least on identification information of a to-be-updated functional module in the updated parameter information and building block dependency information in a script file corresponding to a target building block component, downloading the to-be-updated building block component and a script file corresponding to the to-be-updated building block component to a target environment; compiling the updated building block component based on building block configuration information in a script file corresponding to the updated building block component and identification information of the to-be-updated functional module in the updated parameter information, obtaining an updated executable file as the updated embedded operating system. The update process of the present application is simple, and the update efficiency of the embedded operating system is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computers, and in particular to an updating method, apparatus, device and medium for an embedded operating system. Background Art

[0002] An embedded operating system (OS) is an operating system for resource-constrained devices such as smart lights, air conditioners, and refrigerators. Unlike operating systems used in mobile phones and PCs, embedded OSes operate in a complex environment and have varying resource requirements. For example, an embedded OS can run on a Bluetooth low energy device with tens of kilobytes of memory, or on a network device with tens of megabytes of memory and Wi-Fi connectivity. This complexity makes embedded OSes difficult to standardize, leading to various challenges when building and updating the OS.

[0003] Currently, embedded operating systems are built based on software modules. When the embedded operating system needs to be updated, it is necessary to re-download the relevant code (i.e., software modules) according to the construction process, and then tailor and configure the functions in a certain file through macros or other methods according to the system requirements. However, currently, all source code can usually only be downloaded from one software repository. The source code contains both the software required for the project and some unnecessary software. Developers usually need to spend several days to determine which modules are needed and which are not, resulting in the download process consuming a lot of developers' time. In addition, since each software module is usually configured in a different header file, and even a single software module is configured multiple times in different places, the configurable files are not in the same configuration header file, which makes it easy to miss relevant configurations, causing confusion and affecting update efficiency.

[0004] In summary, existing methods for updating embedded operating systems have the disadvantages of being difficult to update and having low update efficiency, which need to be urgently addressed. Summary of the Invention

[0005] In view of this, the present application provides an update method, apparatus, device, and medium for an embedded operating system to solve the problems of difficulty and low update efficiency in the prior art. The technical solution is as follows:

[0006] A method for updating an embedded operating system, comprising:

[0007] Obtaining updated parameter information corresponding to an embedded operating system, wherein the embedded operating system is constructed by a target building block assembly in a target environment, each building block assembly included in the target building block assembly is composed of a plurality of functional modules and each corresponding to a script file, and the updated parameter information includes at least identification information of the to-be-updated functional module required for updating the embedded operating system;

[0008] Determining the building block component to be updated from the target building block component based at least on the identification information of the to-be-updated functional module in the updated parameter information and the building block dependency information in the script file corresponding to the target building block component, and downloading the to-be-updated building block component and the script file corresponding to the to-be-updated building block component to the target environment;

[0009] The updated building block components are compiled according to the building block configuration information in the script file corresponding to the updated building block components and the identification information of the functional modules to be updated in the updated parameter information to obtain an updated executable file as the updated embedded operating system, wherein the updated building block components include the unupdated building block components and the building block components to be updated.

[0010] Optionally, determining the building block component to be updated from the target building block component based on at least the identification information of the function module to be updated in the updated parameter information and the building block dependency information in the script file corresponding to the target building block component includes:

[0011] Determine the building block component to be updated from the target building block component according to the identification information of the to-be-updated functional module in the updated parameter information and the building block dependency information in the script file corresponding to the target building block component;

[0012] or,

[0013] The building block component to be updated is determined from the target building block component according to the identification information of the to-be-updated functional module in the updated parameter information, the to-be-updated version information of the target building block component in the updated parameter information, and the building block dependency information in the script file corresponding to the target building block component.

[0014] Optionally, determining the building block component to be updated from the target building block component according to the identification information of the to-be-updated functional module in the updated parameter information, the to-be-updated version information of the target building block component in the updated parameter information, and the building block dependency information in the script file corresponding to the target building block component includes:

[0015] Determining a first to-be-updated building block component from the target building block components according to the identification information of the to-be-updated functional module in the updated parameter information and the to-be-updated version information of the target building block components in the updated parameter information;

[0016] According to the building block dependency information in the script file corresponding to the first building block component to be updated, determining from the target building block components a building block component that has a building block dependency relationship with the first building block component to be updated as the second building block component to be updated;

[0017] A to-be-updated building block assembly is obtained from the first to-be-updated building block assembly and the second to-be-updated building block assembly.

[0018] Optionally, the building block dependency information in the script file corresponding to the target building block component is interface dependency information.

[0019] Optionally, the script file corresponding to the building block component to be updated also includes version information of the building block component to be updated;

[0020] Download the building block components to be updated and the corresponding script files to the target environment, including:

[0021] Determine, based on preset warehouse information, the software sub-warehouse where the building block component to be updated is located as the target software sub-warehouse, wherein the warehouse information includes a correspondence between identification information of the building block component and identification information of the software sub-warehouse;

[0022] If the updated parameter information does not include the version information to be updated, then download the latest version of the building block component to be updated and the script file corresponding to the latest version of the building block component to be updated from the target software sub-warehouse to the target environment;

[0023] If the updated parameter information includes the version information to be updated, the building block components to be updated under the version information to be updated and the script files corresponding to the building block components to be updated under the version information to be updated are downloaded from the target software sub-warehouse to the target environment.

[0024] Optionally, based on the building block configuration information in the script file corresponding to the updated building block component and the identification information of the function module to be updated in the updated parameter information, the updated building block component is compiled to obtain an updated executable file, including:

[0025] Obtain an updated configuration file based on the building block configuration information in the script file corresponding to the updated building block component and the identification information of the function module to be updated in the updated parameter information;

[0026] According to the updated configuration file, the updated building block component is trimmed to obtain a trimmed updated building block component;

[0027] Generate updated compiled files based on updated configuration files;

[0028] The updated building block components are compiled according to the updated compiled file to obtain an updated executable file.

[0029] Optionally, based on the building block configuration information in the script file corresponding to the updated building block component and the identification information of the function module to be updated in the updated parameter information, an updated configuration file is obtained, including:

[0030] The building block configuration information in the script file corresponding to the building block component to be updated is modified according to the identification information of the to-be-updated functional module in the updated parameter information, and the updated configuration file is obtained from the modified building block configuration information and the building block configuration information in the script file corresponding to the non-updated building block component.

[0031] Optionally, the updated building block component is trimmed according to the updated configuration file to obtain a trimmed updated building block component, including:

[0032] According to the updated configuration file, other functional modules except the functional module to be updated in the updated building block component are trimmed to obtain a trimmed updated building block component.

[0033] Optionally, the script file corresponding to the updated building block component also includes updated building block post-processing information;

[0034] After compiling the updated building block component according to the building block configuration information in the script file corresponding to the updated building block component and the identification information of the to-be-updated functional module in the updated parameter information to obtain an updated executable file, the method further includes:

[0035] The updated executable file is post-processed according to the updated building block post-processing information, and the post-processed executable file serves as the updated embedded operating system.

[0036] Optionally, post-process the updated executable file based on the updated building block post-processing information, including:

[0037] If the updated block post-processing information includes encryption processing, then obtain the encryption command from the external specified location, and encrypt the updated executable file based on the encryption command;

[0038] and / or,

[0039] If the updated block post-processing information includes adding a header, then obtaining a header adding command from an external specified location, and adding header information to the updated executable file based on the header adding command;

[0040] and / or,

[0041] If the updated building block post-processing information includes function printing processing, a function printing command is obtained from an external designated location, and function list information corresponding to the updated executable file is printed out based on the function printing command.

[0042] An updating device for an embedded operating system, comprising: a module for acquiring updated parameter information, a re-downloading module, and a re-compiling module;

[0043] An updated parameter information acquisition module is configured to acquire updated parameter information corresponding to an embedded operating system to be updated, wherein the embedded operating system to be updated is constructed by a target building block assembly in a target environment, each building block assembly included in the target building block assembly is composed of a number of functional modules and each has a corresponding script file, and the updated parameter information includes at least identification information of the functional modules to be updated required for updating the embedded operating system;

[0044] a re-downloading module, configured to determine the building block component to be updated from the target building block component based on at least the identification information of the to-be-updated functional module in the updated parameter information and the building block dependency information in the script file corresponding to the target building block component, and download the to-be-updated building block component and the script file corresponding to the to-be-updated building block component to the target environment;

[0045] The recompilation module is used to compile the updated building block components according to the building block configuration information in the script file corresponding to the updated building block components and the identification information of the functional modules to be updated in the updated parameter information, to obtain an updated executable file as the updated embedded operating system, wherein the updated building block components include the unupdated building block components and the building block components to be updated.

[0046] An updating device for an embedded operating system, comprising a memory and a processor;

[0047] Memory, used to store programs;

[0048] The processor is used to execute a program to implement each step of any of the above methods for updating an embedded operating system.

[0049] A readable storage medium stores a computer program thereon. When the computer program is executed by a processor, the computer program implements the steps of any of the above-mentioned methods for updating an embedded operating system.

[0050] Through the above technical solution, it can be seen that the update method of the embedded operating system provided by the present application first obtains the updated parameter information corresponding to the embedded operating system, and then determines the building block component to be updated from the target building block component based on at least the identification information of the function module to be updated in the updated parameter information and the building block dependency information in the script file corresponding to the target building block component, and downloads the building block component to be updated and the script file corresponding to the building block component to the target environment, and finally compiles the updated building block component based on the building block configuration information in the script file corresponding to the updated building block component and the identification information of the function module to be updated in the updated parameter information, and obtains the updated executable file as the updated embedded operating system. It can be seen that when updating the embedded operating system, the present application only needs to configure the updated parameter information to update the embedded operating system in one stop, the update process is relatively simple, and the update efficiency of the embedded operating system is improved; and when updating the embedded operating system, only those building block components that need to be updated are downloaded, without downloading all building block components, saving download time, and developers do not need to worry about which building block components are needed and which building block components are not needed among the downloaded building block components, saving developers' time. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without any creative work.

[0052] Figure 1 A flowchart of a method for updating an embedded operating system provided in an embodiment of the present application;

[0053] Figure 2a A schematic diagram of an embedded operating system architecture provided by the prior art;

[0054] Figure 2b A schematic diagram of the architecture of the embedded operating system built for this application;

[0055] Figure 3 A schematic diagram of the structure of an update device for an embedded operating system provided in an embodiment of the present application;

[0056] Figure 4 This is a hardware structure block diagram of the update device for the embedded operating system provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0058] In view of the problems existing in the prior art, the inventors of this case conducted in-depth research and finally proposed a method for updating an embedded operating system. The following embodiments will now introduce the method for updating the embedded operating system provided by this application in detail.

[0059] See also Figure 1 , shows a flow chart of an embedded operating system update method provided by an embodiment of the present application, the embedded operating system update method may include:

[0060] Step S101: Obtain updated parameter information corresponding to the embedded operating system.

[0061] Among them, the embedded operating system is built by the target building block component in the target environment. Each building block component contained in the target building block component corresponds to a script file. The script file includes building block dependency information and building block configuration information. The building block dependency information is used to describe the dependency relationship between the corresponding building block component and other building block components. The building block configuration information is used to describe whether several functional modules that constitute the corresponding building block component are the set functional modules required to build the embedded operating system. The updated parameter information at least includes the identification information of the functional module to be updated required to update the embedded operating system.

[0062] The embedded operating system provided in the embodiment of the present application is constructed by target building block components in a target environment.

[0063] Specifically, the process of building a target building block component may include: building a target environment; obtaining identification information of a first building block component and target parameter information matching the embedded operating system; downloading the first building block component and a script file corresponding to the first building block component to the target environment at least based on the identification information of the first building block component; downloading the second building block component and a script file corresponding to the second building block component to the target environment at least based on the building block dependency information in the script file corresponding to the first building block component; compiling the downloaded target building block component according to the building block configuration information in the script file corresponding to the target building block component and the identification information of the function module set in the target parameter information to obtain a compiled executable file as the built embedded operating system.

[0064] Among them, the first building block component is the root building block component in the target building block component, the second building block component is the other building block components in the target building block component except the first building block component, and the script file corresponding to each building block component included in the target building block component includes building block dependency information and building block configuration information. The building block dependency information is used to describe the dependency relationship between the corresponding building block component and other building block components. The building block configuration information is used to describe whether several functional modules constituting the corresponding building block component are set functional modules required to build an embedded operating system. The target parameter information at least includes identification information of the set functional module.

[0065] Here, the target environment is built because: considering the differences in desktop operating systems, compilation software versions, functional software, etc. when building an embedded operating system, it will take a lot of time to build the compilation environment. For this reason, this embodiment can first build the target environment, so that the differences in operating systems (for example, Windows system, Linux system, etc.) can be shielded with the smallest space, and then the embedded operating system can be built in the target environment.

[0066] Optionally, the process of building the target environment in this embodiment can be implemented in multiple ways. This application provides but is not limited to the following two implementation methods.

[0067] The first method is to create a Docker virtual image and pre-install all tool software in the image.

[0068] The first method requires the creation of an operating system image, which occupies more disk space. Based on this, preferably, the following second implementation method can be used in this step.

[0069] The second method: Use virtual environment technology and target sandbox software to build the target environment.

[0070] Optionally, the virtual environment technology here can specifically be Python's virtual environment technology, and the target sandbox software can be miniconda software or other python sandbox software. That is, this step can use Python's virtual environment technology and use miniconda software or other python sandbox software to build the target environment.

[0071] It should be noted that the target environment built in this embodiment can be run locally when the system is built, or it can be downloaded and run from a software warehouse.

[0072] Since this application is based on the target environment to build an embedded operating system, the tool software used in the process of updating the embedded operating system (such as build tools and build software, here, the build software can be, for example, CMake or Make software) also needs to be pre-installed in the target environment, that is, the tool software used in the update process of the embedded operating system needs to run in the target environment.

[0073] The building block assembly and related information are introduced below so that those skilled in the art can better understand the building block assembly and related information provided by this embodiment.

[0074] See also Figure 2a As shown, in the prior art (before the building block componentization transformation), the entire embedded operating system is a unified whole, and different software modules are distinguished within the whole; this embodiment can pre-componentize the existing software modules into components to obtain building block components corresponding to each software module. Then, this embodiment can use the building block components as the basic units of the embedded operating system to build and update the embedded operating system. Based on this, the architectural diagram of the embedded operating system can be seen in FIG. Figure 2b As shown, the target building block component in this embodiment is Figure 2b Of all the building blocks shown, the first building block is Figure 2b The building block components in the dotted box are as follows: Figure 2b All building block components outside the dotted box are shown.

[0075] Optionally, in this embodiment, a building block component transformation tool for component building block processing of software modules can be written in a high-level language (such as Python), and then each existing software module can be processed into a building block component based on the written building block component transformation tool.

[0076] It should be noted that in the prior art, each software module is composed of several functional modules. Accordingly, after the present application performs component building block processing on the software module, each building block component is composed of functional modules. For example, building block component A is composed of functional modules 1 to 5, building block component B is composed of functional modules 6 to 7, building block component C is composed of functional modules 8 to 10, building block component D is composed of functional module 11, and so on.

[0077] In this embodiment, after each software module in the prior art is transformed into a building block component, a corresponding script file can be written for each building block component to describe the relevant information of the building block component required for the embedded operating system update process through the script file.

[0078] In an optional embodiment, the script file corresponding to any building block component includes at least building block dependency information and building block configuration information.

[0079] Among them, the building block dependency information in the script file corresponding to a building block component is used to describe the dependency relationship between the building block component and other building block components. For example, the script file corresponding to the first building block component contains the dependency relationship between the first building block component and the lower building block component (i.e., the second building block component).

[0080] Optionally, the dependency relationship can be described using a dependency table, that is, the dependency table represents the upper and lower layer dependency relationship between the building block component and other building block components; since the upper layer building block component will call the interface provided by the lower layer building block component, the building block dependency information can optionally include interface dependency information.

[0081] The building block configuration information in the script file corresponding to a building block component is used to describe whether the several functional modules that make up the building block component are set functional modules required for building an embedded operating system (when building an embedded operating system, some or all functional modules of a building block component may be used. In this embodiment, the functional modules used when building an embedded operating system are defined as set functional modules).

[0082] Optionally, in this embodiment, Y and N can be used to indicate whether each functional module is a set functional module, wherein if a functional module is configured as Y, it indicates that the functional module is a set functional module, and if it is configured as N, it indicates that the functional module is not a set functional module. Initially, both can be configured as Y or N.

[0083] For example, the building block configuration information of a building block component (logging component) included in the current embedded operating system may be:

[0084] Feature_config:

[0085] LOG_SUPPORT_ASYNC Y (N here can also be Y)

[0086] LOG_SUPPORT_FS N (N here can also be Y)

[0087] LOG_SUPPORT_CLOUD N (N here can also be Y)

[0088] Here, "LOG_SUPPORT_ASYNC", "LOG_SUPPORT_FS" and "LOG_SUPPORT_CLOUD" are the three functional modules that make up the log component. Among them, "LOG_SUPPORT_ASYNC" represents the asynchronous log function. If it is Y, it means that the embedded operating system supports asynchronous log. If it is N, it means it does not support it. "LOG_SUPPORT_FS" represents the log storage to the file system function. If it is Y, it means that the embedded operating system supports log storage to the file system. If it is N, it means it does not support it. "LOG_SUPPORT_CLOUD" represents the log transmission to the cloud service front end function. If it is Y, it means that the embedded operating system supports log transmission to the cloud service front end. If it is N, it means it does not support it.

[0089] It should be noted that the above Y and N are only examples. In addition, other identifiers can also be used, and this application does not limit this.

[0090] Optionally, the script file can be implemented using a scripting language such as YAML, JSON, or XML, which is easy for developers to read and write and easy to process using a high-level language. Preferably, the script file can be implemented using the YAML scripting language.

[0091] It is understandable that some embedded operating systems may need to implement functions for which no relevant code has been developed, meaning that no software module corresponding to such functions exists in the prior art. In such cases, this embodiment can still generate a building block component corresponding to the required function using a pre-programmed building block component modification tool. However, since no relevant code has been developed, the building block component corresponding to the required function will be empty. In order to subsequently add relevant code and other information to the empty building block component based on the required function, the building block component scaffolding code corresponding to the empty building block component can be automatically generated based on the undeveloped relevant code.

[0092] Optionally, the building block component scaffolding code includes the following information: first, a component information file, which is used to automatically add relevant information based on the code directory name; second, a default code directory structure, which is used to scan the code directory and automatically generate directory information; third, default system configuration options, which are used to reserve space for developers to customize as needed; and fourth, default compilation options, which are used to reserve space for developers to customize as needed. Of course, the building block component scaffolding code can also include other information, which is not limited by this application.

[0093] In this step, after the embedded operating system is built, if you need to Figure 2b If the embedded operating system shown in FIG. 1 is updated, updated parameter information corresponding to the embedded operating system can be obtained.

[0094] The updated parameter information at least includes identification information of the function module to be updated, which refers to the setting function module required for updating the embedded operating system, that is, the setting function module required for building the updated embedded operating system.

[0095] Optionally, there may be multiple specific implementation methods for the step of "obtaining updated parameter information corresponding to the embedded operating system". This application provides but is not limited to the following two implementation methods.

[0096] The first method is to rewrite the target parameter information to obtain updated parameter information corresponding to the embedded operating system.

[0097] In this embodiment, the process of updating the built embedded operating system primarily involves updating the version information of a building block component and / or adding or deleting a set function module. Therefore, when the built embedded operating system needs to be updated, the version information of the target building block component and / or the identification information of the set function module in the target parameter information can be updated to obtain updated parameter information. This step can then obtain the updated parameter information.

[0098] For example, assuming that the target parameter information includes identification information of functional modules 1 to 3 of building block component A, if the current embedded operating system to be updated is updated, the new version of the embedded operating system (i.e., the updated embedded operating system) needs to include functional modules 1 to 4 of building block component A, then this step can add identification information of functional module 4 of building block component A to the target parameter information.

[0099] For another example, assuming that the target parameter information includes the identification information of functional modules 1 to 3 of building block component A under version V1.0, if it is necessary to update the embedded operating system based on functional modules 1 to 3 of building block component A under version V2.0, the identification information of functional modules 1 to 3 of building block component A under version V1.0 in the target parameter information can be rewritten as the identification information of functional modules 1 to 3 of building block component A under version V2.0.

[0100] The second method is to compile updated parameter information corresponding to the updated embedded operating system to be obtained.

[0101] Step S102: Determine the building block component to be updated from the target building block component based on at least the identification information of the to-be-updated functional module in the updated parameter information and the building block dependency information in the script file corresponding to the target building block component, and download the to-be-updated building block component and the script file corresponding to the to-be-updated building block component to the target environment.

[0102] It is understandable that whether updating the version information of the target building block component in the target parameter information or updating the identification information of the set functional module, the corresponding building block component needs to be re-downloaded. At the same time, due to the dependency relationship between some building block components, when there is a building block component that needs to be re-downloaded among these building block components, the building block components that have a dependency relationship with the building block component that needs to be re-downloaded may also need to be re-downloaded. Therefore, this step can determine the building block component to be updated from the target building block component based on the identification information of the functional module to be updated in the updated parameter information and the building block dependency information in the script file corresponding to the target building block component. Here, the building block component to be updated is the building block component that needs to be re-downloaded.

[0103] It should be noted that the reason why this embodiment determines a portion of the building blocks to be updated based on the building block dependency information in the script file corresponding to the target building block is because the building block dependency information includes interface dependency information. If any building block with interface dependencies needs to be re-downloaded, the other building blocks with interface dependencies also need to be re-downloaded. Otherwise, after the embedded operating system is updated, the upper-layer building block component may fail when calling the interface provided by the lower-layer building block component. Based on this, the building block dependency information in the script file corresponding to the target building block can optionally be specifically interface dependency information.

[0104] It is worth noting that when the embedded operating system is built, the target building block components have been downloaded to the target environment. Therefore, when the embedded operating system is updated through the embodiment of the present application, only the building block components that need to be updated in the target building block components need to be downloaded to the target environment. Those building block components that do not need to be updated have already been downloaded during construction, so there is no need to download them again in this step.

[0105] As described in the above steps, in this embodiment, a build tool is pre-installed in the target environment. In this step, the building block component to be updated and the script file corresponding to the building block component to be updated can be downloaded through the build tool.

[0106] In an optional embodiment, the "determining the building block component to be updated" in this step may specifically be determining identification information of the building block component to be updated. Accordingly, the process of "downloading the building block component to be updated and the script file corresponding to the building block component to be updated to the target environment" may include: downloading the building block component to be updated and the script file corresponding to the building block component to be updated to the target environment based on at least the identification information of the building block component to be updated.

[0107] Step S103: Compile the updated building block component according to the building block configuration information in the script file corresponding to the updated building block component and the identification information of the to-be-updated functional module in the updated parameter information to obtain an updated executable file as the updated embedded operating system.

[0108] The updated building block components include unupdated building block components and to-be-updated building block components. The unupdated building block components refer to other building block components in the target building block components except the to-be-updated building block components.

[0109] After re-downloading the building block components to be updated and the script files corresponding to the building block components to be updated, they need to be recompiled through this step to obtain the updated embedded operating system.

[0110] As introduced in the above steps, this embodiment will pre-install the build tools and build software in the target environment. In addition, optionally, this step can also automatically download the compiler software from the software warehouse when the build system has not installed the compiler software. Then, based on the building block configuration information in the script file corresponding to the unupdated building block component, the building block configuration information in the script file corresponding to the building block component to be updated, and the identification information of the functional module to be updated in the updated parameter information, the installed build tools, build software and compiler software can be used to compile the building block component to be updated downloaded in the above steps and the unupdated building block component downloaded when the embedded operating system is built, and output the compilation information. When a compilation error occurs, a compilation error message will also be output.

[0111] The embedded operating system update method provided by the present application first obtains updated parameter information corresponding to the embedded operating system when the embedded operating system in the target environment needs to be updated, then determines the building block component to be updated from the target building block component based on at least the identification information of the functional module to be updated in the updated parameter information and the building block dependency information in the script file corresponding to the target building block component, and downloads the building block component to be updated and the script file corresponding to the building block component to the target environment, and finally compiles the updated building block component based on the building block configuration information in the script file corresponding to the updated building block component and the identification information of the functional module to be updated in the updated parameter information to obtain an updated executable file as the updated embedded operating system. It can be seen that when updating the embedded operating system, the present application only needs to configure the updated parameter information to update the embedded operating system in one stop. The update process is relatively simple and improves the update efficiency of the embedded operating system. Moreover, when updating the embedded operating system, only those building block components that need to be updated need to be downloaded, and there is no need to download all building block components, which saves download time, and developers do not need to worry about which building block components are needed and which building block components are not needed among the downloaded building block components, which saves developers' time.

[0112] Experiments have shown that the embedded operating system update method provided in this application allows developers to complete the update of a previously built embedded operating system on Windows, Linux, MAC OS and other systems in one stop, taking only a few minutes.

[0113] In one embodiment of the present application, the process of "determining the building block component to be updated from the target building block component based on at least the identification information of the functional module to be updated in the updated parameter information and the building block dependency information in the script file corresponding to the target building block component" in the above step S102 is described.

[0114] Optionally, the process of “determining the building block component to be updated from the target building block component based on at least the identification information of the function module to be updated in the updated parameter information and the building block dependency information in the script file corresponding to the target building block component” may include:

[0115] If the updated parameter information includes the identification information of the function module to be updated but does not include the version information to be updated of the target building block component, then the building block component to be updated is determined from the target building block component according to the identification information of the function module to be updated in the updated parameter information and the building block dependency information in the script file corresponding to the target building block component;

[0116] If the updated parameter information includes the identification information of the functional module to be updated and the version information to be updated of the target building block component, the building block component to be updated is determined from the target building block component based on the identification information of the functional module to be updated in the updated parameter information, the version information to be updated of the target building block component in the updated parameter information, and the building block dependency information in the script file corresponding to the target building block component.

[0117] The version information of the target building block component to be updated refers to the version information of the target building block component required when updating the embedded operating system.

[0118] In an optional embodiment, the process of "determining the building block component to be updated from the target building block component based on the identification information of the function module to be updated in the updated parameter information and the building block dependency information in the script file corresponding to the target building block component" may include:

[0119] Step a1: Determine a first building block component to be updated from target building blocks according to identification information of the function module to be updated in the updated parameter information.

[0120] In this step, which building blocks need to be updated can be determined based on the identification information of the function modules to be updated contained in the updated parameter information. For ease of description, the building block determined in this step is defined as the first building block to be updated.

[0121] Step a2: According to the building block dependency information in the script file corresponding to the first building block component to be updated, determine from the target building block components a building block component that has a building block dependency relationship with the first building block component to be updated, as the second building block component to be updated.

[0122] In this step, all building block components that have a building block dependency relationship with the first building block component to be updated can be determined as the second building block components to be updated. That is, if a building block component needs to be updated, all building block components under it are defined as the second building block components to be updated. For example, if Figure 2b The building block component on the left side of the dotted frame is the first building block component to be updated, and the eight building block components below it are all determined to be the second building block components to be updated.

[0123] Consider that if a building block component has a dependency relationship with the first building block component to be updated, but no interface dependency, then even if the building block component is not re-downloaded, it will not affect the updated embedded operating system. However, if the building block component has an interface dependency relationship with the first building block component to be updated, then if the building block component is not re-downloaded, the upper-layer building block component will fail when calling the interface provided by the lower-layer building block component. Based on this, the building block dependency information in the script file corresponding to the first building block component to be updated can optionally be an interface dependency.

[0124] Step a3: obtaining a to-be-updated building block assembly from the first to-be-updated building block assembly and the second to-be-updated building block assembly.

[0125] In an optional embodiment, the process of "determining the building block component to be updated from the target building block component based on the identification information of the to-be-updated functional module in the updated parameter information, the to-be-updated version information of the target building block component in the updated parameter information, and the building block dependency information in the script file corresponding to the target building block component" may include:

[0126] Step b1: determining a first building block component to be updated from the target building block components according to the identification information of the function module to be updated in the updated parameter information and the version information of the target building block components to be updated in the updated parameter information.

[0127] In this step, it is possible to determine which building block components need to be updated based on the identification information of the to-be-updated functional modules contained in the updated parameter information and the to-be-updated version information of the target building block components contained in the updated parameter information.

[0128] Step b2: According to the building block dependency information in the script file corresponding to the first building block component to be updated, determine from the target building block components a building block component that has a building block dependency relationship with the first building block component to be updated, and use it as the second building block component to be updated.

[0129] The process of this step is the same as that of the aforementioned step a2. For details, please refer to the introduction in the aforementioned step and will not be repeated here.

[0130] Step b3: obtaining a to-be-updated building block assembly from the first to-be-updated building block assembly and the second to-be-updated building block assembly.

[0131] This embodiment can accurately determine which building block components need to be re-downloaded based on the identification information of the to-be-updated functional module in the updated parameter information and the building block dependency information in the script file corresponding to the target building block component, and / or the to-be-updated version information of the target building block component in the updated parameter information, thereby avoiding the need to download all target building block components, saving the time for downloading building block components, and improving the update efficiency of the embedded operating system.

[0132] The following embodiment illustrates the process of the above step S102 of "downloading the building block component to be updated and the script file corresponding to the building block component to be updated to the target environment".

[0133] In one possible implementation, in order to facilitate the maintenance of building block components, this embodiment can split a large building block component software warehouse into multiple software sub-warehouses, each software sub-warehouse storing a building block component, so that this embodiment can maintain software sub-warehouses at different component levels in a large building block component software warehouse in the form of building block components.

[0134] Therefore, when downloading the building block component to be updated and the corresponding script file, it is necessary to know in which software sub-repository the building block component to be updated and the corresponding script file are located. Based on this, this embodiment can maintain preset repository information, in which the software sub-repository is associated with the building block component, so that the corresponding building block component can be downloaded from the corresponding software sub-repository based on the repository information. Based on this, the process of step S102 "downloading the building block component to be updated and the script file corresponding to the building block component to be updated to the target environment" can include: downloading the building block component to be updated and the script file corresponding to the building block component to be updated to the target environment according to the preset repository information.

[0135] As described in the aforementioned step S102, "determining the building block component to be updated" may specifically be determining identification information of the building block component to be updated. Here, the process of "downloading the building block component to be updated and the script file corresponding to the building block component to be updated to the target environment according to the preset warehouse information" specifically refers to: downloading the building block component to be updated and the script file corresponding to the building block component to be updated to the target environment according to the preset warehouse information and the identification information of the building block component to be updated.

[0136] In another possible implementation, a building block component may correspond to multiple version information (such as version numbers), and the above “each software sub-warehouse stores a building block component” specifically means that each software sub-warehouse stores several versions of a building block component.

[0137] Optionally, in this embodiment, the version information of the building block components may be written into the script file, that is, the script information of any building block component also includes the version information of the building block component.

[0138] It is understandable that, in this embodiment, when downloading a building block component to be updated, it is necessary to know in advance which version of the building block component to be updated is to be downloaded before downloading from the corresponding software sub-warehouse.

[0139] Optionally, the version information to be downloaded (for the convenience of subsequent description, the version information to be downloaded corresponding to the building block component to be updated is defined as the version information to be updated) can be written into the updated parameter information, that is, the updated parameter information can include the version information to be updated of the building block component to be updated. At this time, optionally, the process of step S102 "downloading the building block component to be updated and the script file corresponding to the building block component to be updated to the target environment" can include: according to the preset warehouse information, downloading the building block component to be updated under the version information to be updated and the script file corresponding to the building block component to be updated under the version information to be updated to the target environment.

[0140] Specifically, if the updated parameter information includes the version information to be updated, the process of "downloading the building block components to be updated under the version information to be updated and the script files corresponding to the building block components to be updated under the version information to be updated to the target environment according to the preset warehouse information" includes:

[0141] Step c1. Determine the software sub-warehouse where the building block component to be updated is located based on preset warehouse information, as the target software sub-warehouse, wherein the warehouse information includes the correspondence between the identification information of the building block component and the identification information of the software sub-warehouse, and the target software sub-warehouse includes the building block components to be updated under several versions and the script files corresponding to the building block components to be updated under several versions.

[0142] Optionally, this step may determine the software sub-warehouse where the building block component to be updated is located based on the warehouse information and the identification information of the building block component to be updated.

[0143] Step c2: Download the to-be-updated building block components under the to-be-updated version information and the script files corresponding to the to-be-updated building block components under the to-be-updated version information from the target software sub-warehouse to the target environment.

[0144] Steps c1-c2 above detail the detailed process of downloading the building block component to be updated and the script file corresponding to the building block component to be updated, when the updated parameter information includes the version information to be updated. It is understood that there may also be situations where the updated parameter information does not include the version information to be updated. In this case, step S102 of "downloading the building block component to be updated and the script file corresponding to the building block component to be updated to the target environment" may include: downloading the latest version of the building block component to be updated and the script file corresponding to the building block component to be updated from the target software sub-repository to the target environment.

[0145] Specifically, first determine the target software sub-warehouse where the building block component to be updated is located based on the preset warehouse information, and then download the building block component to be updated under the updated version information and the script file corresponding to the building block component to be updated under the updated version information from the target software sub-warehouse to the target environment.

[0146] That is, in this embodiment, the process of step S102 "downloading the building block component to be updated and the script file corresponding to the building block component to be updated to the target environment" may include: if the updated parameter information does not include the version information to be updated, then downloading the building block component to be updated under the latest version and the script file corresponding to the building block component to be updated under the latest version to the target environment according to the warehouse information; if the updated parameter information includes the version information to be updated, then downloading the building block component to be updated under the version information to be updated and the script file corresponding to the building block component to be updated under the version information to be updated to the target environment according to the warehouse information.

[0147] It should be noted that the above embodiment provides two specific implementation methods of step S102 "downloading the building block component to be updated and the script file corresponding to the building block component to be updated to the target environment", but the implementation method of step S102 "downloading the building block component to be updated and the script file corresponding to the building block component to be updated to the target environment" is not limited to these two implementation methods. In addition, there may be other implementation methods.

[0148] For example, all building block components and corresponding script files can be stored in a large building block component software warehouse. If each building block component in the building block components to be updated has only one version, step S102 can download the building block components to be updated and the script files corresponding to the building block components to be updated to the target environment based only on the identification information of the building block components to be updated. If each building block component in the building block components to be updated includes multiple versions, step S102 can download the building block components to be updated and the script files corresponding to the building block components to be updated to the target environment based on the identification information of the building block components to be updated and the version information to be updated.

[0149] In summary, the above embodiment provides four implementation methods for "downloading the building block component to be updated and the script file corresponding to the building block component to be updated to the target environment" in step S102, which are as follows:

[0150] In a first implementation, if all building block components and corresponding script files are stored in a large building block component software repository, and each building block component in the building block components to be updated has only one version, then the process of step S102 "downloading the building block components to be updated and the script files corresponding to the building block components to be updated to the target environment" may include: downloading the building block components to be updated and the script files corresponding to the building block components to be updated to the target environment according to the identification information of the building block components to be updated.

[0151] In a second implementation method, if all building block components and corresponding script files are stored in a large building block component software warehouse, and each building block component in the building block components to be updated includes multiple versions, then the process of step S102 "downloading the building block components to be updated and the script files corresponding to the building block components to be updated to the target environment" may include: if the updated parameter information does not include the version information to be updated, then according to the identification information of the building block components to be updated, the building block components to be updated under the latest version and the script files corresponding to the building block components to be updated under the latest version are downloaded to the target environment; if the updated parameter information includes the version information to be updated, then according to the identification information of the building block components to be updated, the building block components to be updated under the version information to be updated and the script files corresponding to the building block components to be updated under the version information to be updated are downloaded to the target environment.

[0152] Here, the version information to be updated refers to the version information of the building block component to be updated that needs to be downloaded. In this embodiment, the version information to be updated can be written into the updated parameter information corresponding to the embedded operating system.

[0153] In a third implementation, if each building block component in the building block components to be updated is stored in a software sub-warehouse, and each building block component in the building block components to be updated has only one version, then the process of step S102 "downloading the building block components to be updated and the script files corresponding to the building block components to be updated to the target environment" may include: downloading the building block components to be updated and the script files corresponding to the building block components to be updated from the target software sub-warehouse to the target environment according to the identification information and warehouse information of the building block components to be updated.

[0154] A fourth implementation method is that if each building block component in the building block components to be updated is stored in a software sub-warehouse, and each building block component in the building block components to be updated includes multiple versions, then the process of step S102 "downloading the building block components to be updated and the script files corresponding to the building block components to be updated to the target environment" may include: if the updated parameter information does not include the version information to be updated, then according to the identification information and warehouse information of the building block components to be updated, the building block components to be updated under the latest version and the script files corresponding to the building block components to be updated under the latest version are downloaded from the target software sub-warehouse to the target environment; if the updated parameter information includes the version information to be updated, then according to the identification information and warehouse information of the building block components to be updated, the building block components to be updated under the version information to be updated and the script files corresponding to the building block components to be updated under the version information to be updated are downloaded from the target software sub-warehouse to the target environment.

[0155] It should be noted that the implementation of step S102 of "downloading the building block components to be updated and the script files corresponding to the building block components to be updated to the target environment" is not limited to the above-mentioned implementation methods. In addition, there may be other implementation methods, which are not specifically limited in this application.

[0156] This embodiment can quickly locate the building block components to be updated and their script files that need to be downloaded through warehouse information and / or information about the version to be updated, thereby saving download time and improving download efficiency.

[0157] The following describes "step S103, compiling the updated building block component according to the building block configuration information in the script file corresponding to the updated building block component and the identification information of the to-be-updated functional module in the updated parameter information to obtain an updated executable file" in the above embodiment.

[0158] Optionally, the process of "step S103, compiling the updated building block component according to the building block configuration information in the script file corresponding to the updated building block component and the identification information of the to-be-updated functional module in the updated parameter information to obtain an updated executable file" may include the following steps d1 to d4:

[0159] Step d1: Obtain an updated configuration file based on the building block configuration information in the script file corresponding to the updated building block component and the identification information of the to-be-updated functional module in the updated parameter information.

[0160] Specifically, this step can obtain the updated configuration file based on the building block configuration information in the script file corresponding to the unupdated building block component, the building block configuration information in the script file corresponding to the building block component to be updated, and the identification information of the functional module to be updated in the updated parameter information.

[0161] More specifically, in this step, the construction tool can generate a unified configuration file based on the building block configuration information in the script file corresponding to the unupdated building block component, the building block configuration information in the script file corresponding to the building block component to be updated, and the identification information of the functional module to be updated in the updated parameter information. The unified configuration file is the updated configuration file.

[0162] In an optional embodiment, the process of this step may include: modifying the building block configuration information in the script file corresponding to the building block component to be updated according to the identification information of the to-be-updated functional module in the updated parameter information, and obtaining an updated configuration file from the modified building block configuration information and the building block configuration information in the script file corresponding to the non-updated building block component.

[0163] It can be understood that, initially, the building block configuration information in the script file corresponding to the building block component to be updated usually does not match the updated embedded operating system to be obtained. It is necessary to modify the building block configuration information in the script file corresponding to the building block component to be updated to configuration information that matches the updated embedded operating system to be obtained through the modification process in this step. In other words, for which functional module is required by the updated embedded operating system to be obtained, the configuration information of the functional module is modified to the configuration information corresponding to the functional module to be updated.

[0164] For example, taking the log component shown in step S101 as an example, assuming that the target building block component includes the log component, and the updated parameter information includes the identification information of the function modules to be updated "LOG_SUPPORT_ASYNC" and "LOG_SUPPORT_CLOUD", then after modifying the building block configuration information in the script file of the log component, the modified building block configuration information is:

[0165] Feature_config:

[0166] LOG_SUPPORT_ASYNC Y

[0167] LOG_SUPPORT_FS N

[0168] LOG_SUPPORT_CLOUD Y

[0169] In the above building block configuration information, the "LOG_SUPPORT_ASYNC" contained in the log component is configured as Y, indicating that "LOG_SUPPORT_ASYNC" is a functional module to be updated. Similarly, the "LOG_SUPPORT_CLOUD" contained in the log component is configured as Y, indicating that "LOG_SUPPORT_CLOUD" is a functional module to be updated.

[0170] In this step, the building block configuration information in the script file corresponding to the building block component to be updated is modified according to the identification information of the to-be-updated functional module in the updated parameter information, and the updated configuration file can be obtained from the modified building block configuration information and the building block configuration information in the script file corresponding to the non-updated building block component.

[0171] Step d2: According to the updated configuration file, the updated building block component is trimmed to obtain a trimmed updated building block component.

[0172] Specifically, in this step, the functional modules other than the to-be-updated functional modules in the updated building block assembly can be trimmed according to the updated configuration file. That is, the functional modules other than the to-be-updated functional modules in the unupdated building block assembly and the to-be-upd building block assembly can be trimmed according to the updated configuration file to obtain a trimmed updated building block assembly.

[0173] Because the updated configuration file is generated based on the identification information of the to-be-updated functional modules contained in the updated parameter information, the target configuration file can be used to determine how to tailor the unupdated building blocks and the to-be-updated building blocks. For example, based on the updated configuration file generated by the modified building block configuration file shown in d1, this step can remove the "LOG_SUPPORT_FS" functional module from the log component, resulting in a tailored updated log component consisting of the to-be-updated functional modules "LOG_SUPPORT_ASYNC" and "LOG_SUPPORT_CLOUD."

[0174] Step d3: Generate an updated compiled file based on the updated configuration file.

[0175] The updated compiled file is used to instruct how to compile the tailored updated building block components.

[0176] In this step, the updated configuration file is used as an input file of the updated building block component, and can be used to construct an updated compiled file for instructing how to compile the tailored updated building block component. Here, the updated compiled file is a compiled file required by the pre-installed build software.

[0177] Since this step can automatically generate the updated compiled file based on the updated configuration file, developers no longer need to manually write the compiled file, saving developers' time.

[0178] Optionally, the updated compilation file can be a makefile file or a CMakeLists file.

[0179] Step d4: compile the tailored updated building block components according to the updated compiled file to obtain an updated executable file.

[0180] In this step, the build system can automatically call the build software based on the updated compiled file, and then compile the tailored updated building block components based on the updated compiled file, the build software and the compiler software to obtain the updated executable file.

[0181] In summary, the entire process of this embodiment is executed automatically, so that developers do not need to do any additional work (in the prior art, developers need to make modifications in each software module, and multiple modifications often occur, or due to the coupling of software modules, the configuration is not uniform, which requires developers to spend a lot of time on debugging), saving developers' time and greatly reducing the possibility of errors.

[0182] In some scenarios, after the updated building block component is compiled in the aforementioned step S103, it may be necessary to perform post-processing on the updated executable file, such as encryption, header addition, printing, etc.

[0183] Optionally, in this embodiment, the updated building block post-processing information can be written into a script file corresponding to one or some building block components of the updated building block assembly. For example, the updated building block post-processing information is written into a script file corresponding to the updated building block assembly, so that after step S103, the updated executable file can be post-processed according to the updated building block post-processing information written into the script file corresponding to the updated building block assembly, and the post-processed executable file serves as the updated embedded operating system.

[0184] It should be noted that the updated building block post-processing information contained in the script file is only used to indicate what post-processing needs to be done on the updated executable file when updating the embedded operating system, but the specific post-processing is instructed by external commands.

[0185] For example, if the updated building block post-processing information in the script file corresponding to the updated building block component indicates encryption, this indicates that the executable file needs to be encrypted. However, the method for encryption and the encryption algorithm used are indicated by the external encryption command. In other words, the process of "post-processing the updated executable file based on the updated building block post-processing information" in this embodiment includes: if the updated building block post-processing information includes encryption, obtaining the encryption command from an externally specified location, and encrypting the updated executable file based on the encryption command.

[0186] For another example, if the script file corresponding to the updated building block component contains updated building block post-processing information for adding a header, this indicates that header information needs to be added to the executable file. However, how to add the header and what header information to add are specified by the external header addition command. In other words, the process of "post-processing the updated executable file based on the updated building block post-processing information" in this embodiment includes: if the updated building block post-processing information includes adding a header, obtaining a header addition command from an externally specified location, and adding header information to the updated executable file based on the header addition command.

[0187] For another example, if the script file corresponding to the updated building block component contains post-update building block post-processing information that specifies function printing, this indicates that the relevant information of the to-be-updated functional modules used when updating the embedded operating system needs to be printed out, but the specific printing method is dictated by an external function printing command. In other words, the process of "post-processing the updated executable file based on the post-update building block post-processing information" in this embodiment includes: if the post-update building block post-processing information includes function printing, obtaining a function printing command from an externally designated location, and printing out function list information corresponding to the updated executable file based on the function printing command, where the function list information includes relevant information about the to-be-updated functional modules, such as identification information.

[0188] In summary, this embodiment can perform various post-processing tasks after compiling the updated building block components, so that the embedded operating system provided by this embodiment has richer functions.

[0189] In the above embodiments, it is described in detail that the script file corresponding to any building block component includes the version information of the building block component, the building block dependency information used to describe the dependency relationship between the building block component and other building block components, the building block configuration information, the building block post-processing information, etc. In addition, the script file provided in this embodiment may also include other information. For example, in one embodiment, the script file corresponding to a building block component may include the following content:

[0190] First, the basic information of the building blocks, including the name of the building block component, the version information of the building block component managed independently, a brief description of the building block component, the type classification of the building block component, the license information of the building block component, and other information.

[0191] Second, the building block dependency information includes the dependency table of the building block components. The dependency table represents the upper and lower layer dependency relationship of each building block component. Optionally, the building block dependency information can be interface dependency information. The upper-layer building block component will call the interface provided by the lower-layer building block component.

[0192] Third, the appearance information of the building blocks includes information related to the board-level components that run the embedded operating system, including the CPU, chipset, development board components, etc.

[0193] Fourth, the building block compilation information contains the separate compilation information of the building block components independent of the project.

[0194] Fifth, the building block configuration information contains the relevant configuration information of the building block components. Through the configuration information, the components can be freely cut, so that the building block components can be large or small.

[0195] Sixth, building block post-processing information (optional), which includes various post-processing work information after the building block component is compiled.

[0196] It can be seen that this application uses script files to enable each building block component to provide a unified, customizable set of functional components and a unified style of API calling functions.

[0197] It should be noted that the above script files are only examples and are not intended to limit the script files of this application.

[0198] An embodiment of the present application also provides an update device for an embedded operating system. The update device for the embedded operating system provided in the embodiment of the present application is described below. The update device for the embedded operating system described below and the update method for the embedded operating system described above can be referenced to each other.

[0199] See also Figure 3 , shows a schematic diagram of the structure of the updating device of the embedded operating system provided by the embodiment of the present application, such as Figure 3 As shown, the updating device of the embedded operating system may include: an updated parameter information obtaining module 301 , a re-downloading module 302 and a re-compiling module 303 .

[0200] The updated parameter information acquisition module 301 is used to obtain updated parameter information corresponding to the embedded operating system to be updated, wherein the embedded operating system to be updated is constructed by a target building block assembly in a target environment, each building block assembly included in the target building block assembly is composed of several functional modules and each has a corresponding script file. The updated parameter information includes at least identification information of the functional modules to be updated required for updating the embedded operating system.

[0201] The re-downloading module 302 is configured to determine the building block component to be updated from the target building block component based on at least the identification information of the to-be-updated functional module in the updated parameter information and the building block dependency information in the script file corresponding to the target building block component, and download the to-be-updated building block component and the script file corresponding to the to-be-updated building block component to the target environment.

[0202] The recompile module 303 is configured to compile the updated building block components according to the building block configuration information in the script file corresponding to the updated building block components and the identification information of the to-be-updated functional modules in the updated parameter information, to obtain an updated executable file as the updated embedded operating system, wherein the updated building block components include the unupdated building block components and the to-be-updated building block components.

[0203] In summary, the working principle of the embedded operating system update device disclosed in this embodiment is the same as the working principle of the embedded operating system update method disclosed in the above embodiment. For details, please refer to the introduction in the above embodiment and will not be repeated here.

[0204] The embodiment of the present application also provides an update device for an embedded operating system. Optionally, Figure 4 The hardware structure diagram of the update device of the embedded operating system is shown in FIG. Figure 4 , the hardware structure of the embedded operating system update device may include: at least one processor 401, at least one communication interface 402, at least one memory 403 and at least one communication bus 404;

[0205] In the embodiment of the present application, the number of the processor 401, the communication interface 402, the memory 403, and the communication bus 404 is at least one, and the processor 401, the communication interface 402, and the memory 403 communicate with each other through the communication bus 404;

[0206] The processor 401 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention;

[0207] The memory 403 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory;

[0208] The memory 403 stores a program, and the processor 401 can call the program stored in the memory 403, and the program is used to:

[0209] Obtaining updated parameter information corresponding to an embedded operating system, wherein the embedded operating system is constructed by a target building block assembly in a target environment, each building block assembly included in the target building block assembly is composed of a plurality of functional modules and each corresponding to a script file, and the updated parameter information includes at least identification information of the to-be-updated functional module required for updating the embedded operating system;

[0210] Determining the building block component to be updated from the target building block component based at least on the identification information of the to-be-updated functional module in the updated parameter information and the building block dependency information in the script file corresponding to the target building block component, and downloading the to-be-updated building block component and the script file corresponding to the to-be-updated building block component to the target environment;

[0211] The updated building block components are compiled according to the building block configuration information in the script file corresponding to the updated building block components and the identification information of the functional modules to be updated in the updated parameter information to obtain an updated executable file as the updated embedded operating system, wherein the updated building block components include the unupdated building block components and the building block components to be updated.

[0212] Optionally, the detailed functions and extended functions of the program may refer to the above description.

[0213] An embodiment of the present application further provides a readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the updating method of the embedded operating system as described above is implemented.

[0214] Optionally, the detailed functions and extended functions of the program may refer to the above description.

[0215] Finally, it should be noted that, in this document, relational terms such as and and the like are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.

[0216] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0217] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for updating an embedded operating system, characterized in that: include: Obtaining updated parameter information corresponding to the embedded operating system, wherein the embedded operating system is constructed by a target building block assembly in a target environment, each building block assembly included in the target building block assembly is composed of a plurality of functional modules and each corresponds to a script file, and the updated parameter information includes at least identification information of the to-be-updated functional module required for updating the embedded operating system; Determining a building block component to be updated from the target building block component based at least on identification information of the to-be-updated functional module in the updated parameter information and building block dependency information in a script file corresponding to the target building block component, and downloading the to-be-updated building block component and the script file corresponding to the to-be-updated building block component to the target environment; The updated building block component is compiled according to the building block configuration information in the script file corresponding to the updated building block component and the identification information of the to-be-updated functional module in the updated parameter information to obtain an updated executable file as the updated embedded operating system, wherein the updated building block component includes the unupdated building block component and the to-be-updated building block component.

2. The method for updating an embedded operating system according to claim 1, wherein: The determining the building block component to be updated from the target building block component based on at least the identification information of the function module to be updated in the updated parameter information and the building block dependency information in the script file corresponding to the target building block component comprises: Determining a building block component to be updated from the target building block component according to identification information of the to-be-updated functional module in the updated parameter information and building block dependency information in a script file corresponding to the target building block component; or, The building block component to be updated is determined from the target building block component according to the identification information of the to-be-updated functional module in the updated parameter information, the to-be-updated version information of the target building block component in the updated parameter information, and the building block dependency information in the script file corresponding to the target building block component.

3. The method for updating an embedded operating system according to claim 2, wherein: The determining the building block component to be updated from the target building block component according to the identification information of the to-be-updated functional module in the updated parameter information, the to-be-updated version information of the target building block component in the updated parameter information, and the building block dependency information in the script file corresponding to the target building block component includes: Determining a first to-be-updated building block component from the target building block components according to the identification information of the to-be-updated functional module in the updated parameter information and the to-be-updated version information of the target building block component in the updated parameter information; According to the building block dependency information in the script file corresponding to the first building block component to be updated, determining from the target building block component a building block component that has a building block dependency relationship with the first building block component to be updated, as a second building block component to be updated; The to-be-updated building block assembly is obtained from the first to-be-updated building block assembly and the second to-be-updated building block assembly.

4. The method for updating an embedded operating system according to claim 3, wherein: The building block dependency information in the script file corresponding to the target building block component is interface dependency information.

5. The method for updating an embedded operating system according to claim 4, wherein: The script file corresponding to the building block component to be updated also includes version information of the building block component to be updated; The step of downloading the to-be-updated building block component and the script file corresponding to the to-be-updated building block component to the target environment includes: Determining the software sub-warehouse where the building block component to be updated is located based on preset warehouse information as the target software sub-warehouse, wherein the warehouse information includes a correspondence between identification information of the building block component and identification information of the software sub-warehouse; If the updated parameter information does not include the version information to be updated, downloading the latest version of the building block component to be updated and the script file corresponding to the latest version of the building block component to be updated from the target software sub-warehouse to the target environment; If the updated parameter information includes the version information to be updated, the building block component to be updated under the version information to be updated and the script file corresponding to the building block component to be updated under the version information to be updated are downloaded from the target software sub-warehouse to the target environment.

6. The method for updating an embedded operating system according to claim 1, wherein: The updated building block component is compiled according to the building block configuration information in the script file corresponding to the updated building block component and the identification information of the function module to be updated in the updated parameter information to obtain an updated executable file, including: Obtaining an updated configuration file based on the building block configuration information in the script file corresponding to the updated building block component and the identification information of the to-be-updated functional module in the updated parameter information; According to the updated configuration file, the updated building block component is trimmed to obtain a trimmed updated building block component; Generate an updated compiled file according to the updated configuration file; The tailored updated building block components are compiled according to the updated compiled file to obtain the updated executable file.

7. The method for updating an embedded operating system according to claim 6, wherein: The step of obtaining an updated configuration file based on the building block configuration information in the script file corresponding to the updated building block component and the identification information of the to-be-updated functional module in the updated parameter information includes: The building block configuration information in the script file corresponding to the building block component to be updated is modified according to the identification information of the to-be-updated functional module in the updated parameter information, and the updated configuration file is obtained from the modified building block configuration information and the building block configuration information in the script file corresponding to the non-updated building block component.

8. The method for updating an embedded operating system according to claim 6, wherein: The step of tailoring the updated building block component according to the updated configuration file to obtain a tailored updated building block component includes: According to the updated configuration file, other functional modules except the to-be-updated functional module in the updated building block component are trimmed to obtain the trimmed updated building block component.

9. The method for updating an embedded operating system according to claim 1, wherein: The script file corresponding to the updated building block component also includes updated building block post-processing information; After compiling the updated building block component according to the building block configuration information in the script file corresponding to the updated building block component and the identification information of the to-be-updated functional module in the updated parameter information to obtain an updated executable file, the method further includes: The updated executable file is post-processed according to the updated building block post-processing information, and the post-processed executable file serves as the updated embedded operating system.

10. The method for updating an embedded operating system according to claim 9, wherein: The post-processing of the updated executable file according to the updated building block post-processing information includes: If the updated building block post-processing information includes encryption processing, obtaining an encryption command from an external designated location, and performing encryption processing on the updated executable file based on the encryption command; and / or, If the updated building block post-processing information includes adding a header, obtaining a header adding command from the external designated location, and adding header information to the updated executable file based on the header adding command; and / or, If the updated building block post-processing information includes function printing processing, a function printing command is obtained from the external designated location, and function list information corresponding to the updated executable file is printed out based on the function printing command.

11. An updating device for an embedded operating system, characterized in that: include: Updated parameter information acquisition module, re-download module and re-compile module; The updated parameter information acquisition module is configured to acquire updated parameter information corresponding to the embedded operating system to be updated, wherein the embedded operating system to be updated is constructed by a target building block assembly in a target environment, each building block assembly included in the target building block assembly is composed of a plurality of functional modules and each has a corresponding script file, and the updated parameter information includes at least identification information of the functional modules to be updated required for updating the embedded operating system; The re-downloading module is configured to determine a building block component to be updated from the target building block component based on at least the identification information of the function module to be updated in the updated parameter information and the building block dependency information in the script file corresponding to the target building block component, and download the building block component to be updated and the script file corresponding to the building block component to the target environment; The recompile module is configured to compile the updated building block component according to the building block configuration information in the script file corresponding to the updated building block component and the identification information of the to-be-updated functional module in the updated parameter information, to obtain an updated executable file as the updated embedded operating system, wherein the updated building block component includes the unupdated building block component and the to-be-updated building block component.

12. An update device for an embedded operating system, characterized in that: including memory and processor; The memory is used to store programs; The processor is configured to execute the program to implement the steps of the method for updating the embedded operating system according to any one of claims 1 to 10.

13. A readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, each step of the method for updating an embedded operating system according to any one of claims 1 to 10 is implemented.

Citation Information

Patent Citations

  • A software version testing method and system for embedded device

    CN109460359A

  • System and method for code synchronization between mainframe environment and distributed environment

    US20200326936A1