diff options
author | Haris Okanovic <haris.okanovic@ni.com> | 2019-11-07 12:51:42 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-11-10 14:06:10 +0000 |
commit | a98c7c7aa3770988b4cd564fbdfc26476c46f8f3 (patch) | |
tree | bfb68b2300442e054d40ea36a89e833d3d7cac9b /scripts/lib/wic | |
parent | 36bb63c3d24aca805cccf465789749d04f90902c (diff) | |
download | poky-a98c7c7aa3770988b4cd564fbdfc26476c46f8f3.tar.gz |
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 <haris.okanovic@ni.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/wic')
-rw-r--r-- | scripts/lib/wic/plugins/source/isoimage-isohybrid.py | 6 |
1 files 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): | |||
336 | (img_iso_dir, isodir) | 336 | (img_iso_dir, isodir) |
337 | exec_cmd(install_cmd) | 337 | exec_cmd(install_cmd) |
338 | else: | 338 | else: |
339 | # Default to 100 blocks of extra space for file system overhead | ||
340 | esp_extra_blocks = int(source_params.get('esp_extra_blocks', '100')) | ||
341 | |||
339 | du_cmd = "du -bks %s/EFI" % isodir | 342 | du_cmd = "du -bks %s/EFI" % isodir |
340 | out = exec_cmd(du_cmd) | 343 | out = exec_cmd(du_cmd) |
341 | blocks = int(out.split()[0]) | 344 | blocks = int(out.split()[0]) |
342 | # Add some extra space for file system overhead | 345 | blocks += esp_extra_blocks |
343 | blocks += 100 | ||
344 | logger.debug("Added 100 extra blocks to %s to get to %d " | 346 | logger.debug("Added 100 extra blocks to %s to get to %d " |
345 | "total blocks", part.mountpoint, blocks) | 347 | "total blocks", part.mountpoint, blocks) |
346 | 348 | ||