Skip to content

Image size is rounded up even when already multiple of 4 MB #156

@cariad-robert-abel

Description

@cariad-robert-abel

Commit aa87310 added rounding of the image size using this formula:

IMG_SIZE=$(((BOOT_SIZE + TOTAL_SIZE + (800 * 1024 * 1024) + ROUND_SIZE) / ROUND_SIZE * ROUND_SIZE))

It should instead be

IMG_SIZE=$(((BOOT_SIZE + TOTAL_SIZE + (800 * 1024 * 1024) + ROUND_SIZE - 1) / ROUND_SIZE * ROUND_SIZE))

so images that already are a multiple of 4 MB don't get added an extra 4 MB on top.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions