mirror of
https://git.yoctoproject.org/poky
synced 2026-04-30 03:32:12 +02:00
wic: Add 512 Byte alignment to --offset
Allows the --offset argument to use the "s" or "S" suffix to specify that it is reporting the number of 512 byte sectors. This is required for some SoCs where the mask ROM looks for an item at a sector that isn't aligned to a 1KB boundary. (From OE-Core rev: 938595d1dc4abaf5f7f3a7900add3f0492b805d0) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
5359b85610
commit
5fa3c3d2e3
@@ -429,14 +429,14 @@ class PartitionedImage():
|
||||
self.offset += align_sectors
|
||||
|
||||
if part.offset is not None:
|
||||
offset = (part.offset * 1024) // self.sector_size
|
||||
offset = part.offset // self.sector_size
|
||||
|
||||
if offset * self.sector_size != part.offset * 1024:
|
||||
raise WicError("Could not place %s%s at offset %dK with sector size %d" % (part.disk, self.numpart, part.offset, self.sector_size))
|
||||
if offset * self.sector_size != part.offset:
|
||||
raise WicError("Could not place %s%s at offset %d with sector size %d" % (part.disk, self.numpart, part.offset, self.sector_size))
|
||||
|
||||
delta = offset - self.offset
|
||||
if delta < 0:
|
||||
raise WicError("Could not place %s%s at offset %dK: next free sector is %d (delta: %d)" % (part.disk, self.numpart, part.offset, self.offset, delta))
|
||||
raise WicError("Could not place %s%s at offset %d: next free sector is %d (delta: %d)" % (part.disk, self.numpart, part.offset, self.offset, delta))
|
||||
|
||||
logger.debug("Skipping %d sectors to place %s%s at offset %dK",
|
||||
delta, part.disk, self.numpart, part.offset)
|
||||
|
||||
Reference in New Issue
Block a user