wic/bootimg-efi: Respect fixed partition size
PATCH 1/1 wic/bootimg-efi: Respect fixed partition size
Signed-off-by Andrei Gherzan <[email protected]>
--- scripts/lib/wic/plugins/source/bootimg-efi.py | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-)
scripts/lib/wic/plugins/source/bootimg-efi.py +12 -9
@@ -263,19 +263,22 @@ class BootimgEFIPlugin(SourcePlugin): cp_cmd = "cp %s %s/" % (startup, hdddir) exec_cmd(cp_cmd, True) - du_cmd = "du -bks %s" % hdddir - out = exec_cmd(du_cmd) - blocks = int(out.split()[0]) + if part.fixed-size: + blocks = part.fixed_size + else: + du_cmd = "du -bks %s" % hdddir + out = exec_cmd(du_cmd) + blocks = int(out.split()[0]) - extra_blocks = part.get_extra_block_count(blocks) + extra_blocks = part.get_extra_block_count(blocks) - if extra_blocks < BOOTDD_EXTRA_SPACE: - extra_blocks = BOOTDD_EXTRA_SPACE + if extra_blocks < BOOTDD_EXTRA_SPACE: + extra_blocks = BOOTDD_EXTRA_SPACE - blocks += extra_blocks + blocks += extra_blocks - logger.debug("Added %d extra blocks to %s to get to %d total blocks", - extra_blocks, part.mountpoint, blocks) + logger.debug("Added %d extra blocks to %s to get to %d total blocks", + extra_blocks, part.mountpoint, blocks) # dosfs image, created by mkdosfs bootimg = "%s/boot.img" % cr_workdir
Signature · 1 line
2.17.1
Hi,
Quoted 42 lines · Andrei Gherzan
Signed-off-by Andrei Gherzan <[email protected]>--- scripts/lib/wic/plugins/source/bootimg-efi.py | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-)scripts/lib/wic/plugins/source/bootimg-efi.py +12
-9@@ -263,19 +263,22 @@ class BootimgEFIPlugin(SourcePlugin): cp_cmd = "cp %s %s/" % (startup, hdddir) exec_cmd(cp_cmd, True) - du_cmd = "du -bks %s" % hdddir - out = exec_cmd(du_cmd) - blocks = int(out.split()[0]) + if part.fixed-size: + blocks = part.fixed_size + else: + du_cmd = "du -bks %s" % hdddir + out = exec_cmd(du_cmd) + blocks = int(out.split()[0]) - extra_blocks = part.get_extra_block_count(blocks) + extra_blocks = part.get_extra_block_count(blocks) - if extra_blocks < BOOTDD_EXTRA_SPACE: - extra_blocks = BOOTDD_EXTRA_SPACE + if extra_blocks < BOOTDD_EXTRA_SPACE: + extra_blocks = BOOTDD_EXTRA_SPACE - blocks += extra_blocks + blocks += extra_blocks - logger.debug("Added %d extra blocks to %s to get to %d total blocks", - extra_blocks, part.mountpoint, blocks) + logger.debug("Added %d extra blocks to %s to get to %d total blocks", + extra_blocks, part.mountpoint, blocks)
Quoted 4 lines
# dosfs image, created by mkdosfs
bootimg = "%s/boot.img" % cr_workdirSmall ping for this.
Thanks,
Andrei
Quoted 5 lines · Andrei Gherzan
Signed-off-by Andrei Gherzan <[email protected]>--- scripts/lib/wic/plugins/source/bootimg-efi.py | 21 +++++++++++---- ---- 1 file changed, 12 insertions(+), 9 deletions(-)
Causes build failures:
https://autobuilder.yoctoproject.org/typhoon/#/builders/48/builds/2302
https://autobuilder.yoctoproject.org/typhoon/#/builders/113/builds/146
and others in:
https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/1260
Cheers,
Richard