Skip to content

Conversation

@jwsbck
Copy link
Member

@jwsbck jwsbck commented Jan 5, 2026

should be improved/discussed:

  • Cleanup of copied files during initialization

jwsbck added 3 commits January 5, 2026 15:13
When copying images while initializing the A/B update mechanism failes,
the potentially corrupted copy should be cleaned up. This ensures that
in case of failure (e.g. EFI partition too small to hold two kernel
images) no corrupted copy takes up all space and we are not able to load
another update.

Signed-off-by: Johannes Wiesböck <johannes.wiesboeck@aisec.fraunhofer.de>
Align return types in header with implementation.

Signed-off-by: Johannes Wiesböck <johannes.wiesboeck@aisec.fraunhofer.de>
Like for file_copy, check if initializing efivars was successful and
abort if initialization failed.

Signed-off-by: Johannes Wiesböck <johannes.wiesboeck@aisec.fraunhofer.de>
efivars_set_boot_order((uint16_t[]){ 0000, 0001 }, 2);
int ret = 0;

ret = efivars_set_boot_entry(0, "GyroidosA", "\\EFI\\BOOT\\" DEFAULT_KERNEL_BINARY ".A");
Copy link
Member

@quitschbo quitschbo Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

putting this in the IF_TRUE_RETVAL parenthesis will generate a more meaningful log message.

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.

2 participants