Skip to content

Commit

Permalink
aboot: Restore Android boot image check for non-lk2nd configs
Browse files Browse the repository at this point in the history
Non-Android boot images can only be booted when the extlinux lk2nd/boot
module is enabled, so let's restore the check for configurations without
that module.

This reverts parts of commit 6a2af94.
  • Loading branch information
stephan-gh committed Aug 15, 2024
1 parent 17dd46e commit 8660d84
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/aboot/aboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -3943,6 +3943,12 @@ void cmd_flash_mmc_img(const char *arg, void *data, unsigned sz)
if (!strncmp(pname, "boot", strlen("boot"))
|| !strcmp(pname, "recovery"))
{
if (!IS_ENABLED(WITH_LK2ND_BOOT) &&
((sz < BOOT_MAGIC_SIZE) || memcmp((void *)data, BOOT_MAGIC, BOOT_MAGIC_SIZE))) {
fastboot_fail("image is not a boot image");
return;
}

/* Reset multislot_partition attributes in case of flashing boot */
if (partition_multislot_is_supported())
{
Expand Down

0 comments on commit 8660d84

Please sign in to comment.