Skip to content

Fix bugs in esp32 mkimage.erl script#2093

Open
UncleGrumpy wants to merge 1 commit intoatomvm:mainfrom
UncleGrumpy:mkimage-fix
Open

Fix bugs in esp32 mkimage.erl script#2093
UncleGrumpy wants to merge 1 commit intoatomvm:mainfrom
UncleGrumpy:mkimage-fix

Conversation

@UncleGrumpy
Copy link
Collaborator

@UncleGrumpy UncleGrumpy commented Feb 10, 2026

Fixes an FD leak, the image file was never closed properly after writing. Fixes a misleading error message when a binary overflows its partition. Catches errors in file:write/2 operations, rather than blindly continuing.

Closes #2084
Closes #2094

These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later

@UncleGrumpy UncleGrumpy force-pushed the mkimage-fix branch 2 times, most recently from dc96177 to ff8e506 Compare February 10, 2026 01:50
@UncleGrumpy UncleGrumpy marked this pull request as draft February 10, 2026 01:59
@UncleGrumpy UncleGrumpy marked this pull request as ready for review February 10, 2026 02:24
@UncleGrumpy UncleGrumpy requested a review from pguyot February 10, 2026 02:25
@UncleGrumpy UncleGrumpy force-pushed the mkimage-fix branch 2 times, most recently from 729ef65 to 89313e8 Compare February 10, 2026 15:54
@UncleGrumpy UncleGrumpy force-pushed the mkimage-fix branch 4 times, most recently from 9faef56 to 6913849 Compare February 10, 2026 22:57
* Fixes an FD leak, the image file was never closed properly after
writing.
* Fixes a misleading error message when a binary overflows its
partition.
* Fixes and unaligned end of data problems that can prevent flashing
with a web-flasher tool.
* Now catches errors in file:write/2 operations, rather than blindly
continue when an error is returned.

Closes atomvm#2084
Closes atomvm#2094

Signed-off-by: Winford <winford@object.stream>
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

Successfully merging this pull request may close these issues.

mkimage should 4-byte align/pad last segment mkimage script error message is misleading

2 participants