Skip to content

Commit

Permalink
lk2nd: boot: Allow fs on 'boot' partition
Browse files Browse the repository at this point in the history
  • Loading branch information
TravMurav committed Mar 24, 2024
1 parent 886df75 commit 7707f11
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lk2nd/boot/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,14 @@ static void lk2nd_scan_devices(void)
if (!bdev->is_leaf)
continue;

/* Skip partitions that are too small to have a boot fs on. */
if (bdev->size < LK2ND_BOOT_MIN_SIZE)
/*
* Skip partitions that are too small to have a boot fs on.
*
* 'boot' partition is explicitly allowed to have a small fs on it
* in case one installs next stage bootloader package (i.e. u-boot)
* there but still wants to make use of lk2nd's device database.
*/
if (bdev->size < LK2ND_BOOT_MIN_SIZE && !!strncmp(bdev->label, "boot", strlen("boot")))
continue;

snprintf(mountpoint, sizeof(mountpoint), "/%s", bdev->name);
Expand Down

0 comments on commit 7707f11

Please sign in to comment.