A Lossless Compression Boot Processing Method for Executable Files under a Partitioned Operating System

By adopting the lossless compression boot processing method of executable files under the partitioned operating system in avionics systems, the problem of insufficient storage space is solved, efficient compression and decompression of executable files is realized, and system reconstruction is supported.

CN113868205BActive Publication Date: 2025-06-17XIAN AVIATION COMPUTING TECH RES INST OF AVIATION IND CORP OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111050725.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-08
Publication Date
2025-06-17
Estimated Expiration
2041-09-08

AI Technical Summary

Technical Problem

In avionics systems, the storage space of airborne embedded software is insufficient to meet the growing demand for executable files, making it difficult for the system to be reconstructed and expanded.

Method used

A lossless compression boot processing method for executable files under partitioned operating system is proposed. Through pre-processing, lossless compression, decompression operation and verification of verification, the correctness of executable files in the compression and decompression process and free up storage space.

Benefits of technology

This method can compress the executable file to about 20%, free up a large amount of storage space, ensure the normal function of the system, and provide support for system reconstruction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113868205B_ABST
    Figure CN113868205B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of airborne embedded software, and particularly relates to a method for lossless compression and boot processing of executable files under a partitioned operating system. The executable files targeted are those that have been verified through engineering in the domestic operating system Tianmai 2. First, the executable files are preprocessed, and through lossless compression storage, verification of the correctness of compression and decompression after power-on, and decompression and operation, the lossless compression and boot processing of the executable files are completed. This method not only ensures the normal operation of the platform functions, but also can release a large amount of software storage space, solves the problem of the increasing executable files when the platform storage space is insufficient, and provides support for the system to achieve reconstruction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of airborne embedded software, and particularly relates to a method for lossless compression and boot processing of executable files under a partitioned operating system. Background Art

[0002] Taimu 2 is the only domestic partitioned real-time operating system with complete independent intellectual property rights, which is oriented to multiple applications and multi-tasks, and meets the application requirements of integrated and modular avionics systems. It has been widely used in the aviation field. At the same time, as an important part of the avionics system, airborne embedded software is required to have high reliability and high security. In order to ensure the execution speed and system reliability of the embedded software, the airborne embedded software is generally solidified in the memory chip or the internal memory of the processor, rather than in external carriers such as disks. However, the internal memory of the processor with relatively limited space is gradually difficult to bear the increasingly complex categories and expanding code scales of the airborne embedded software system. Especially when the hardware system has been finalized and the platform expansion and modification are difficult, the internal storage of the platform cannot meet the code scale requirements, resulting in the airborne embedded software being difficult to meet the new needs of users and falling into a passive situation.

[0003] In order to support different reconstruction types, users need the platform to support local reconstruction and start different applications according to the system configuration locally. Therefore, multiple sets of applications need to be solidified in the local storage space to support the reconstruction of users. Under this kind of demand, based on the current application scale, the storage capacity of the platform hardware simply cannot meet this demand, and a reliable solution is urgently needed. Summary of the Invention

[0004] In view of this, the present invention proposes a method for lossless compression and boot processing of executable files under a partitioned operating system. The executable files targeted are the executable files that have been verified through engineering in the domestic operating system Taimu 2. First, preprocess the executable files, and complete the lossless compression and boot processing of the executable files through lossless compression storage, verification of the correctness of compression and decompression after power-on, and decompression and operation. This method not only ensures the normal operation of the platform functions, but also can release a large amount of software storage space, solves the problem of the increasing executable files when the platform storage space is insufficient, and provides support for the system to achieve reconstruction.

[0005] In order to achieve the above technical objectives, the specific technical solutions adopted by the present invention are as follows:

[0006] A method for lossless compression and boot processing of executable files under a partitioned operating system, comprising the following steps:

[0007] 1) Preprocess the executable file; verify and confirm its correctness after compression and decompression by adding the original check code to the end of each of its sub-files;

[0008] 2) Compression and writing: Compress the executable file with the original checksum added using a lossless data compression algorithm to form a compressed file; Add the file size information of the compressed file to the header of the compressed file and solidify it into the FLASH space;

[0009] 3) Uncompression of the image description file: After the system is powered on, the module support layer software uncompresses the image description file in the compressed file. The specific uncompression process is as follows:

[0010] 3.1) Obtain the file length of the image description file through the file size information and store the file length information at the starting address of the memory;

[0011] 3.2) Move the compressed image description file from the FLASH to the memory according to the file length;

[0012] 3.3) Uncompress the compressed image description file in the memory to form an uncompressed image description file;

[0013] 3.4) Check the checksum of the uncompressed image description file, calculate the calculated checksum of the uncompressed image description file; Compare the calculated checksum of the uncompressed image description file with the original checksum added in 1); If they are the same, remove the original checksum and the uncompression is completed. If they are different, report a file checksum error;

[0014] 4) Uncompression of the image file. The specific method is as follows:

[0015] 4.1) Obtain the solidification address of each image file by parsing the uncompressed image description file;

[0016] 4.2) Obtain the file length of the image file through the file size information and store the file length information at the starting address of the memory;

[0017] 4.3) Move the compressed image file from the FLASH to the memory according to the file length and the solidification address;

[0018] 4.4) Uncompress the compressed image file in the memory to form an uncompressed image file;

[0019] 4.5) Check the checksum of the uncompressed image file, calculate the calculated checksum of the uncompressed image file; Compare the calculated checksum of the uncompressed image file with the original checksum added in 1); If they are the same, remove the original checksum and the uncompression is completed. If they are different, report a file checksum error;

[0020] 5) Boot the application;

[0021] When all the image description files and each of the image files are decompressed, boot the applications of all the image description files and each of the image files in the memory.

[0022] Furthermore, the check code is a cyclic redundancy check code.

[0023] Furthermore, the compression and decompression processes adopt the LZ77 algorithm and Huffman coding.

[0024] Adopting the above technical solutions, the present invention can bring the following beneficial effects:

[0025] Based on the lossless compression algorithm, in the Tian operating system, the present invention uses checks to ensure the correctness during the solidification and relocation of the entire executable file; the compressed image file is solidified on the FLASH, and during the location and relocation of the image file, decompression of the image file is added to release more FLASH space without affecting the normal functions of the system.

[0026] The advantages and effects of the present invention are as follows: This method can compress the executable file to about 20% of its original size without affecting the normal functions of the system. It has been verified in practical applications, proving the effectiveness and practicality of this method, solving the problem of the increasing executable files when the platform storage space is insufficient, and providing support for the system to achieve reconstruction. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts.

[0028] Figure 1 It is the flowchart of the lossless solidification of the executable file in the specific embodiment of the present invention;

[0029] Figure 2 It is the schematic diagram of the file decompression process in the specific embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0030] The embodiments of the present invention will be described in detail below with reference to the drawings.

[0031] The following describes the implementation manners of the present invention through specific examples. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. The present invention can also be implemented or applied through other different specific implementation manners. Various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that, without conflict, the following embodiments and the features in the embodiments can be combined with each other. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts fall within the protection scope of the present invention.

[0032] It should be noted that the following describes various aspects of the embodiments within the scope of the appended claims. It should be obvious that the aspects described herein can be embodied in a wide variety of forms, and any specific structure and / or function described herein is illustrative only. Based on the present invention, those skilled in the art should understand that one aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects described herein can be used to implement the device and / or practice the method. Additionally, this device and / or this method can be implemented using other structures and / or functionality in addition to one or more of the aspects described herein.

[0033] It should also be noted that the diagrams provided in the following embodiments only schematically illustrate the basic concept of the present invention. The diagrams only show the components related to the present invention, rather than being drawn according to the number, shape, and size of the components in actual implementation. The type, quantity, and ratio of each component in its actual implementation can be arbitrarily changed, and the component layout type may also be more complex.

[0034] In addition, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, those skilled in the art will understand that the described aspects can be practiced without these specific details.

[0035] In an embodiment of this specific implementation manner, a method for lossless compression boot processing of executable files under a partitioned operating system is proposed, as Figure 1 or Figure 2 shown, including the following steps:

[0036] 1) Preprocess the executable file; make it verifiable and confirm its correctness after compression and decompression by adding the original check code to the end of each of its sub-files;

[0037] 2) Compressed writing; the executable file added with the original checksum is compressed using a lossless data compression algorithm to form a compressed file; the file size information of the compressed file is added to the header of the compressed file and solidified into the FLASH space;

[0038] 3) Uncompressing the image description file; after the system is powered on, the module support layer software uncompresses the image description file in the compressed file. The specific uncompression process is as follows:

[0039] 3.1) Obtain the file length of the image description file through the file size information and store the file length information at the starting address of the memory;

[0040] 3.2) Move the compressed image description file from the FLASH to the memory according to the file length;

[0041] 3.3) Uncompress the compressed image description file in the memory to form an uncompressed image description file;

[0042] 3.4) Check the checksum of the uncompressed image description file, calculate the calculated checksum of the uncompressed image description file; compare the calculated checksum of the uncompressed image description file with the original checksum added in 1); if they are the same, remove the original checksum and the uncompression is completed; if they are different, report a file checksum error;

[0043] 4) Uncompressing the image file, the specific method is as follows:

[0044] 4.1) Obtain the solidification address of each image file by parsing the uncompressed image description file;

[0045] 4.2) Obtain the file length of the image file through the file size information and store the file length information at the starting address of the memory;

[0046] 4.3) Move the compressed image file from the FLASH to the memory according to the file length and the solidification address;

[0047] 4.4) Uncompress the compressed image file in the memory to form an uncompressed image file;

[0048] 4.5) Check the checksum of the uncompressed image file, calculate the calculated checksum of the uncompressed image file; compare the calculated checksum of the uncompressed image file with the original checksum added in 1); if they are the same, remove the original checksum and the uncompression is completed; if they are different, report a file checksum error;

[0049] 5) Boot the application;

[0050] When all the image description files and each image file are uncompressed, all the image description files and each image file are booted to run the application in the memory.

[0051] In this embodiment, the check code is a cyclic redundancy check code.

[0052] In this embodiment, the LZ77 algorithm and Huffman coding are used in the compression and decompression processes.

[0053] In this embodiment, the method for lossless compression and boot processing of executable files under a partitioned operating system is a method that, in the Tianmai 2 environment, performs lossless compression and storage on the currently generated executable files by adding checks, decompresses the files when the system starts, completes the checks, and correctly starts the application.

[0054] In the specific implementation process of this solution, taking the CRC check as the example of the check algorithm and the Deflate-Inflate lossless compression-decompression algorithm provided by Wind River as the example of the lossless data compression algorithm, the implementation details of this solution are elaborated in detail as follows:

[0055] 1) Preprocessing of executable files

[0056] Use the cyclic redundancy check code (CRC) to implement the error detection function for data transmission, perform polynomial calculation on the data, and append the obtained result to the end of the frame to reconstruct the executable file to be compressed mixed with the CRC check code.

[0057] 2) Compression processing of executable files

[0058] By comparing the compression performance and time of current mainstream data compression algorithms, the Deflate-Inflate data compression-decompression provided by the Wind River operating system has the highest compression performance and moderate occupied time, and finally the Deflate data compression algorithm is selected.

[0059] This algorithm is a lossless and efficient data compression algorithm, which is a lossless data compression algorithm that uses both the LZ77 algorithm and Huffman coding. Among them, Huffman coding is a prefix coding generated by a specific algorithm, and the LZ77 compression algorithm uses the repetitive structure information of the data and completes the compression of the data by searching for repetitive sequences.

[0060] This method uses the Deflate lossless data compression algorithm under the Wind River operating system to complete the compression of the executable file, adds the size of the compressed file to the head of the compressed file, and finally solidifies the file in the FLASH space.

[0061] 3) Decompression processing of the image description file. After the system is powered on, the MSL layer software first decompresses the image description file. The specific decompression process is as follows:

[0062] First: Obtain the file length, and the file length is stored at its actual address;

[0063] Second: Move the file from FLASH to memory based on the file length;

[0064] Third, use the Inflate algorithm to decompress the file;

[0065] Fourth: perform CRC check on the file. The CRC is stored at the end of the file. Calculate the CRC of the decompressed file and compare it with the CRC at the end of the file. If it is correct, remove the CRC and execute the next step. Otherwise, report the image description file CRC error.

[0066] Executable file compression processing. The image description file records the relevant information of each image. By parsing the image description file, the fixed address of each image is obtained, and each image is decompressed according to the four steps of the image description file decompression processing, and finally the executable file is booted from the memory to run.

[0067] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A method for lossless compression and boot processing of executable files under a partitioned operating system, characterized in that, Including the following steps: 1) Preprocess the executable file; make it verifiable and confirm its correctness after compression and decompression by adding the original checksum to the end of each of its sub-files; 2) Compress and write; compress the executable file added with the original checksum using a lossless data compression algorithm to form a compressed file; Add the file size information of the compressed file to the header of the compressed file and solidify it into the FLASH space; 3) Decompress the image description file; after the system is powered on, the module support layer software decompresses the image description file in the compressed file. The specific decompression process is as follows: 3.1) Obtain the file length of the image description file through the file size information and store the file length information at the starting address of the memory; 3.2) Move the compressed image description file from the FLASH to the memory according to the file length; 3.3) Decompress the compressed image description file in the memory to form a decompressed image description file; 3.4) Check the checksum of the decompressed image description file, calculate the calculated checksum of the decompressed image description file; compare the calculated checksum of the decompressed image description file with the original checksum added in 1); if they are the same, remove the original checksum and the decompression is completed; if they are different, report a file checksum error; 4) Decompress the image file. The specific method is as follows: 4.1) Obtain the solidification address of each image file by parsing the decompressed image description file; 4.2) Obtain the file length of the image file through the file size information and store the file length information at the starting address of the memory; 4.3) Move the compressed image file from the FLASH to the memory according to the file length and the solidification address; 4.4) Decompress the compressed image file in the memory to form a decompressed image file; 4.5) Check the checksum of the decompressed image file, calculate the calculated checksum of the decompressed image file; compare the calculated checksum of the decompressed image file with the original checksum added in 1); if they are the same, remove the original checksum and the decompression is completed; if they are different, report a file checksum error; 5) Boot the application; When the image description file and each of the image files are decompressed, boot the application of all the image description files and each of the image files in the memory.

2. The compression and boot processing method according to claim 1, characterized in that, The checksum is a cyclic redundancy checksum.

3. The compression and boot processing method according to claim 1, characterized in that, The compression and decompression processes use the LZ77 algorithm and Huffman coding.

Citation Information

Patent Citations

  • Rapid and safe starting method for embedded Linux system

    CN104778060A

  • Method for optimizing VxWorks startup process by using ARJ compressed file

    CN106406909A