HomeFreeBSD

mkimg: We always want the last block of the last inserted partition

Description

mkimg: We always want the last block of the last inserted partition

Even with an absolute offset we want to know the last block the partition
otherwise we endup with an image the size of the metadata.
This allow to create image with the ESP placed at a specific position which
is useful on arm/arm64 where u-boot have always a hard time to read the ESP
if it's not aligned on 512k.
mkimg -v -o sdcard -s gpt -p efi::54M:1M -p freebsd-ufs::1G
now works.

MFC after: 3 days

Details

Provenance
manuAuthored on Feb 25 2021, 3:34 PM
Parents
rG369706a6f887: buf: Fix the dirtybufthresh check
Branches
Unknown
Tags
Unknown