]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
mkimg: We always want the last block of the last inserted partition
authorEmmanuel Vadot <manu@FreeBSD.org>
Thu, 25 Feb 2021 15:34:28 +0000 (16:34 +0100)
committerEmmanuel Vadot <manu@FreeBSD.org>
Tue, 2 Mar 2021 14:20:53 +0000 (15:20 +0100)
commitf3054d18bfbd4629cb695922f3cd1fab36b1dc5b
treef4d2ef47e536a519ea9299bd46ad64376dedc085
parent90cf334642c234675a70721a8b06a7c92c014a8e
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
Approved by: re (gjb)
(cherry picked from commit 3b6268bb9e4aea939c4ce7f37353174aa90e6751)
(cherry picked from commit 9c5f4f8e4ee8261a669ab99257bffd439bad6635)
usr.bin/mkimg/mkimg.c