Method for optimizing and improving flash speed performance of eMMC storage medium

By dividing the mirror file into files in sparse format and using erase to replace the writing of 0 data, the problem of limited writing image speed of eMMC storage media in the prior art is solved, and the writing rate consistent with the maximum writing rate of eMMC storage media is achieved, and the writing time is reduced.

CN120010764APending Publication Date: 2025-05-16JINDI SPACE TIME (ZHUHAI) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411932390.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

The prior art has limitations in improving the writing and mirroring speed of eMMC storage media, mainly due to the upper limit of read and write rate and the increase in the size of the mirror file.

Method used

By dividing the mirror file into files in the sparse format, and using erasing to replace the writing of 0 data in the writing process, increasing the amount of data written in a single time and improving the overall data writing rate.

Benefits of technology

When the read and write rate of the eMMC storage medium and the image file size remain unchanged, the overall burn-in mirror rate is basically consistent with the maximum write rate of the eMMC storage medium, reducing the time-consuming writing and avoiding the introduction of unknown defects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120010764A_ABST
    Figure CN120010764A_ABST
Patent Text Reader

Abstract

The invention discloses a method for optimizing and improving the flash speed performance of an eMMC storage medium, and the method comprises the following steps: executing a fastboot command, and starting to program a mirror image file; the size of the mirror image file and the size of the FASTBOOTBUFSIZE are judged; the mirror image file is segmented into N mirror image files in a sparse format, and the mirror image files in the sparse format are programmed; when it is judged that the image file in the sparse format is the fill data, filling the fill data, and when it is judged that the fill data is 0, erasing an offset address and a size specified by the eMMC; and finishing the programming of the mirror image file in the single spark format and the programming of all mirror image files in the spark format, and ending the programming of the mirror image files. According to the method, the time consumed by programming is reduced by improving the efficiency of the programming process, the data writing efficiency can be effectively improved, the logic of native codes is reserved and the unknown defect is prevented from being introduced by replacing the programming of 0 data with an erasing mode, and meanwhile, the overall data writing rate is improved by increasing the single-time writing data volume.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for optimizing and improving the flashing speed performance of an eMMC storage medium. Background Art

[0002] Embedded Multi Media Card (EMMC) is an embedded non-volatile memory system consisting of flash memory and flash memory controller. An obvious advantage of EMMC is that a flash memory controller is integrated into the package. It uses JEDEC standard ball grid array (BGA) package and uses a unified flash memory interface to manage flash memory.

[0003] As software applications become more complex, the size of their image files also becomes larger. For embedded devices with eMMC storage media, burning images will also increase the time required to burn images. To increase the speed of burning images, the following methods are generally used: 1. Increase the read and write rate of eMMC storage media; 2. Reduce the size of image files.

[0004] like Figure 5 As shown, this is a single image file burning process in the native code burning process. The read and write rate of the eMMC storage medium in the prior art cannot be infinitely improved, and the size of the image file can only become larger and larger, so the two current methods have certain limitations on improving the performance of burning the image. Summary of the invention

[0005] The purpose of the present invention is to provide a technical solution for optimizing and improving the flashing speed performance of eMMC storage media in view of the shortcomings of the prior art. When the read and write rate of the eMMC storage medium and the size of the image file remain unchanged, the overall image burning rate is basically consistent with the maximum writing rate of the eMMC storage medium. The efficiency of the burning process is improved to reduce the time consumption of burning. For the burning of 0 data, erasing is used instead to effectively improve the efficiency of data writing, retain the logic of the native code, avoid introducing unknown defects, and at the same time increase the amount of data written in a single time to improve the overall data writing rate.

[0006] In order to solve the above technical problems, the present invention adopts the following technical solutions:

[0007] A method for optimizing and improving the flashing speed performance of an eMMC storage medium, characterized by comprising the following steps:

[0008] Step1. Execute the fastboot command to start burning the image file;

[0009] Step 2. Determine the size of the image file and FASTBOOT_BUF_SIZE;

[0010] Step 3, split the image file into N sparse format image files, and burn the sparse format image files;

[0011] Step 4. When the image file in sparse format is judged to be fill data, fill the fill data, judge the fill data to be 0, and erase the offset address and size specified by eMMC;

[0012] Step 5. Complete the burning of a single sparse image file and all sparse image files, and end the burning of image files.

[0013] Further, when the image file in step Step2 is smaller than FASTBOOT_BUF_SIZE, the image file is written as raw data to the eMMC storage medium, and the burning of the image file is terminated.

[0014] Furthermore, the image file in sparse format is composed of multiple fill data and raw data alternately combined.

[0015] Furthermore, fill data records the same byte data by marking.

[0016] Furthermore, when it is determined in step 4 that the image file in the sparse format is raw data, a temporary space is applied for storing the raw data, and the data in the temporary space is cyclically written into the eMMC storage medium until all the data is written.

[0017] Furthermore, cyclically writing the data in the temporary space into the eMMC storage medium specifically includes: copying the data to the buf memory space, and writing the buf data in the memory space into the eMMC storage medium.

[0018] Furthermore, if the fill data in step Step4 is not 0, the filled fill data is written into the eMMC storage medium.

[0019] Furthermore, if the burning of a single sparse format image file is not completed in step 5, the process returns to step 4 to continue to determine whether the sparse format image file is fill data or raw data.

[0020] Furthermore, if the burning of all the image files in the sparse format is not completed in step 5, the process returns to step 3 to burn the image files in the sparse format.

[0021] The present invention has the following beneficial effects due to the adoption of the above technical solution:

[0022] In the present invention, when the read and write rate of the eMMC storage medium and the size of the image file remain unchanged, the overall burning image rate is basically consistent with the maximum writing rate of the eMMC storage medium, the efficiency of the burning process is improved to reduce the time consumption of burning, and for the burning of 0 data, the erasing method is used instead to effectively improve the efficiency of data writing, retain the logic of the native code, avoid introducing unknown defects, and at the same time increase the amount of data written at a single time to improve the overall data writing rate. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The present invention will be further described below in conjunction with the accompanying drawings:

[0024] Figure 1 A flowchart of a method for optimizing and improving the flashing speed performance of eMMC storage media according to the present invention;

[0025] Figure 2 It is a schematic diagram of the overall programming process after optimization of the present invention;

[0026] Figure 3 It is a schematic diagram of the programming time before optimization in the present invention;

[0027] Figure 4 It is a schematic diagram of the optimized burning time in the present invention;

[0028] Figure 5 This is a flow chart of burning a single image file in the native code burning process of the present invention. DETAILED DESCRIPTION

[0029] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0030] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only embodiments of a part of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions.

[0032] The Chinese meanings of the English words in this invention are shown in Table 1

[0033]

[0034]

[0035] Table 1

[0036] like Figure 1 and Figure 2 As shown, a method for optimizing and improving the flashing speed performance of eMMC storage media of the present invention comprises the following steps:

[0037] Step1. Execute the fastboot command to start burning the image file;

[0038] Step 2, determine the size of the image file and FASTBOOT_BUF_SIZE; if the image file is larger than FASTBOOT_BUF_SIZE, the fastboot tool will convert the image file into N sparse format image files of FASTBOOT_BUF_SIZE size. The sparse format image file in this application takes sparse.img as an example.

[0039] When the image file is smaller than FASTBOOT_BUF_SIZE, the image file raw data is written to the eMMC storage medium and the image file burning process ends.

[0040] Step 3, split the image file into N sparse format image files, and burn the sparse format image files;

[0041] The image file in sparse format is composed of multiple fill data (filled data) and raw data (raw data) alternatingly combined.

[0042] Fill data records the same byte data in a marked manner.

[0043] Step 4. When it is determined that the image file in sparse format is fill data, fill the fill data, and determine that the fill data is 0, erase the offset address and size specified by the eMMC; if the fill data is not 0, write the filled fill data into the eMMC storage medium.

[0044] When it is determined that the image file in sparse format is raw data, a temporary space is applied for storing the raw data, and the data in the temporary space is cyclically written to the eMMC storage medium until all data is written.

[0045] Writing the data in the temporary space into the eMMC storage medium in a loop specifically includes: copying the data to the buf memory space, and writing the buf data in the memory space into the eMMC storage medium.

[0046] For raw data, the native programming process will apply for a memory space of 100 bytes, then copy the data to the memory space, and then write it to the eMMC storage medium. From the writing rate of the eMMC storage medium, it can be seen that increasing the memory space size to 6MB can effectively increase the writing rate.

[0047] The temporary space in this application preferably uses a sufficiently large memory space, such as 0x3000 bytes in length. 0x3000 bytes of data are copied to the memory space, and then written to the eMMC storage medium.

[0048] The write rate of eMMC is shown in Table 2

[0049] Data length Time(s) rate 0.5KB 0.003 166KB / s 50KB 0.005 9.7MB / s 512KB 0.016 31MB / s 1MB 0.028 35MB / s 2MB 0.047 42MB / s 6MB 0.136 44MB / s 8MB 0.185 44MB / s

[0050] Table 2

[0051] Table 2 shows the write rate of eMMC when writing data of different lengths. From the table, we can see that the shorter the length of the written data, the lower the relative rate. When the written data reaches a certain length, the write rate remains basically unchanged. The comparison of the erase and write rates of eMMC is shown in Table 3.

[0052] Time(s) rate Erase 0x400 blocks in length 0.006 83MB / s Write 0x400 blocks in length 0.015 33MB / s

[0053] Table 3

[0054] After the eMMC erases the data, the data on the eMMC will be erased to 0. For writing 0 data, the efficiency of erasing is significantly higher than the efficiency of writing.

[0055] Step 5. Complete the burning of a single sparse image file and all sparse image files, and end the burning of image files.

[0056] If the burning of a single sparse format image file is not completed, return to step 4 to continue to determine whether the sparse format image file is fill data or raw data.

[0057] If the burning of all the image files in the sparse format is not completed, return to step Step 3 to burn the image files in the sparse format.

[0058] Comparison of programming time before and after optimization Figure 3 and Figure 4 As shown,

[0059] Prerequisites:

[0060] 1) The emmc rate remains consistent;

[0061] 2) The size of the burned image remains the same and is 8.25GB;

[0062] 3) Use the same flashing tool to flash the image, such as spacemit flashing tool, fastboot tool, etc. The following data takes spacemit flashing tool as an example;

[0063] The programming time before optimization is 844s.

[0064] The optimized burning time is 515s.

[0065] From the data comparison, the optimization performance has been improved by (844-515) / 844=38.98%. And from the optimization changes, there is basically no difference in the flashing process, the logic of the native code is retained to avoid the introduction of unknown defects.

[0066] The above are only specific embodiments of the present invention, but the technical features of the present invention are not limited thereto. Any simple changes, equivalent replacements or modifications made based on the present invention to achieve basically the same technical effects are all included in the protection scope of the present invention.

Claims

1. A method for optimizing and improving the flashing speed performance of eMMC storage media, characterized in that The steps include: Step1. Execute the fastboot command to start burning the image file; Step 2. Determine the size of the image file and FASTBOOT_BUF_SIZE; Step 3, split the image file into N sparse format image files, and burn the sparse format image files; Step 4. When the image file in sparse format is judged to be fill data, fill the fill data, judge the fill data to be 0, and erase the offset address and size specified by eMMC; Step 5. Complete the burning of a single sparse image file and all sparse image files, and end the burning of image files.

2. A method for optimizing and improving the flash speed performance of eMMC storage media according to claim 1, characterized in that: When the image file in step 2 is smaller than FASTBOOT_BUF_SIZE, the image file is written as raw data to the eMMC storage medium, and the image file burning is completed.

3. A method for optimizing and improving the flash speed performance of eMMC storage media according to claim 1, characterized in that: The image file in the sparse format is composed of a plurality of fill data and raw data alternately combined.

4. A method for optimizing and improving the flash speed performance of eMMC storage media according to claim 3, characterized in that: The fill data records the same byte data in a marking manner.

5. The method for optimizing and improving the flash speed performance of eMMC storage media according to claim 1, characterized in that: When it is determined in step 4 that the image file in the sparse format is raw data, a temporary space is applied for storing the raw data, and the data in the temporary space is cyclically written into the eMMC storage medium until all the data is written.

6. A method for optimizing and improving the flash speed performance of eMMC storage media according to claim 5, characterized in that: The step of cyclically writing the data in the temporary space into the eMMC storage medium specifically includes: copying the data to the buf memory space, and writing the buf data in the memory space into the eMMC storage medium.

7. The method for optimizing and improving the flashing speed performance of eMMC storage media according to claim 1, characterized in that: If the fill data in step Step4 is not 0, the filled fill data is written to the eMMC storage medium.

8. The method for optimizing and improving the flashing speed performance of eMMC storage media according to claim 5, characterized in that: If the burning of a single sparse format image file is not completed in step 5, the process returns to step 4 to continue determining whether the sparse format image file is fill data or raw data.

9. The method for optimizing and improving the flashing speed performance of eMMC storage media according to claim 1, characterized in that: If the burning of all the image files in the sparse format is not completed in step 5, the process returns to step 3 to burn the image files in the sparse format.