Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve speed of burning #426

Open
MihanLee opened this issue May 29, 2024 · 3 comments
Open

Improve speed of burning #426

MihanLee opened this issue May 29, 2024 · 3 comments

Comments

@MihanLee
Copy link

Hi author

We found that it takes nearly 20 minutes to burn an image which is about 4GB
Is there any command to improve the speed or which code could we modify for that?

Best regards
Mingheng

@nxpfrankli
Copy link
Contributor

what's method do you use burn image? If use uuu -b emmc_all *wic, which should be some minutes.

@MihanLee
Copy link
Author

MihanLee commented May 30, 2024 via email

@nxpfrankli
Copy link
Contributor

nxpfrankli commented May 30, 2024

try change uboot, some emmc is slow when write small chunk data.

commit 268f06af821001d2b399022cc44a41a61c5f8d83
Author: Frank Li <[email protected]>
Date:   Mon Oct 24 16:45:36 2022 -0400
 
    LF-7382: fastboot: improve emmc write speed
    tested at iMX8MM platfrom reduce almost half write time.
    (499s vs 1000s).
    About 1/4 improve at 8DXL platform.
    100*512 = 51k, which small than emmc erase block size 64k,
    which may cause more page management in emmc.
    Increase to 4096, about 2M write to emmc each time.
    Signed-off-by: Frank Li <[email protected]>
    Reviewed-by: Ye Li <[email protected]>
 
diff --git a/lib/image-sparse.c b/lib/image-sparse.c
index b255d3acc0b..a90d51624e8 100644
--- a/lib/image-sparse.c
+++ b/lib/image-sparse.c
@@ -55,7 +55,7 @@ static lbaint_t write_sparse_chunk_raw(struct sparse_storage *info,
                                       void *data,
                                       char *response)
{
-       lbaint_t n = blkcnt, write_blks, blks = 0, aligned_buf_blks = 100;
+       lbaint_t n = blkcnt, write_blks, blks = 0, aligned_buf_blks = 4096;
        uint32_t *aligned_buf = NULL;
        if (CONFIG_IS_ENABLED(SYS_DCACHE_OFF)) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants