From a98c7c7aa3770988b4cd564fbdfc26476c46f8f3 Mon Sep 17 00:00:00 2001 From: Haris Okanovic Date: Thu, 7 Nov 2019 12:51:42 -0600 Subject: isoimage-isohybrid.py: Parameterize ESP partition size Add "esp_extra_blocks" plugin parameter so that caller may change ESP's free space from the default 100 blocks. (From OE-Core rev: db4be094b0d6741ca4f9e2cbb499fc9c224fa690) Signed-off-by: Haris Okanovic Signed-off-by: Richard Purdie --- scripts/lib/wic/plugins/source/isoimage-isohybrid.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py index 95a54a09d2..11326a274b 100644 --- a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py +++ b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py @@ -336,11 +336,13 @@ class IsoImagePlugin(SourcePlugin): (img_iso_dir, isodir) exec_cmd(install_cmd) else: + # Default to 100 blocks of extra space for file system overhead + esp_extra_blocks = int(source_params.get('esp_extra_blocks', '100')) + du_cmd = "du -bks %s/EFI" % isodir out = exec_cmd(du_cmd) blocks = int(out.split()[0]) - # Add some extra space for file system overhead - blocks += 100 + blocks += esp_extra_blocks logger.debug("Added 100 extra blocks to %s to get to %d " "total blocks", part.mountpoint, blocks) -- cgit v1.2.3-54-g00ecf