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

improvement: option to disable bmap on specific ranges #29

Open
Louson opened this issue Jun 12, 2024 · 3 comments
Open

improvement: option to disable bmap on specific ranges #29

Louson opened this issue Jun 12, 2024 · 3 comments

Comments

@Louson
Copy link

Louson commented Jun 12, 2024

Hello,

Would it be possible to have an option specifying ranges for which all zeros would be copied ?

In my use case I have a wic image with a verity rootfs on the 3rd partition (let's say from bytes START to END). I would appreciate an option:

bmaptool create --nomap START:END [...]

so the mapping does not skip any zero between START and END.

@moto-timo
Copy link
Collaborator

The use cases are usually around bootloaders, so this impacts u-boot.env and pretty sure I had this problem on minnowboard EFI also (8 years ago or so vague memories).

@darko31
Copy link

darko31 commented Jul 26, 2024

Yes, flashing Mender images that have uboot.env file after the bootloader.
The uboot.env file is usually just empty 16MB filled with zeroes but there's a corner case where sdimg is flashed
with the bmap file and also rootfs is set to B partition. The newly flashed image will wipe the B partition but not the saved environment and u-boot will throw errors that it can not load device tree and kernel.

@schwesinger
Copy link

This is also relevant for #34 (for which I have a WIP patch set laying around, btw):
When writing individual partitions to an existing destination image, the dest. file is not truncated. Unmapped blocks in the source file partition may, after overwriting the destination with it, then leave old, existing data intact.

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

4 participants