diff options
author | Tom Zanussi <tom.zanussi@linux.intel.com> | 2014-02-07 16:19:28 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-02-09 09:40:01 +0000 |
commit | df634f3b1e02aa18f84b4b74f13c7260a21691aa (patch) | |
tree | 2c8d06bbf3ff8c7f892f803c67db6b8419d3a69c /scripts/lib/mic/plugins/source/bootimg-efi.py | |
parent | 8d008aa840a4086ca6b6a17af926c7c601bd5dd9 (diff) | |
download | poky-df634f3b1e02aa18f84b4b74f13c7260a21691aa.tar.gz |
wic: Honor --size for --source partititions
Instead of simply creating partitions large enough to contain the
contents of a --source partition (and adding a pre-specified amount of
padding), use the --size used in the partition .wks statement.
If --size isn't used, or is smaller than the actual --source size,
retain the current behavior.
(From OE-Core rev: 23b6c5ea4d48cdf731e5202991961a0e4b10ff29)
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/mic/plugins/source/bootimg-efi.py')
-rw-r--r-- | scripts/lib/mic/plugins/source/bootimg-efi.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/lib/mic/plugins/source/bootimg-efi.py b/scripts/lib/mic/plugins/source/bootimg-efi.py index 3e0997bacf..1974b062b2 100644 --- a/scripts/lib/mic/plugins/source/bootimg-efi.py +++ b/scripts/lib/mic/plugins/source/bootimg-efi.py | |||
@@ -131,7 +131,15 @@ class BootimgEFIPlugin(SourcePlugin): | |||
131 | rc, out = exec_cmd(du_cmd) | 131 | rc, out = exec_cmd(du_cmd) |
132 | blocks = int(out.split()[0]) | 132 | blocks = int(out.split()[0]) |
133 | 133 | ||
134 | blocks += BOOTDD_EXTRA_SPACE | 134 | extra_blocks = part.get_extra_block_count(blocks) |
135 | |||
136 | if extra_blocks < BOOTDD_EXTRA_SPACE: | ||
137 | extra_blocks = BOOTDD_EXTRA_SPACE | ||
138 | |||
139 | blocks += extra_blocks | ||
140 | |||
141 | msger.debug("Added %d extra blocks to %s to get to %d total blocks" % \ | ||
142 | (extra_blocks, part.mountpoint, blocks)) | ||
135 | 143 | ||
136 | # Ensure total sectors is an integral number of sectors per | 144 | # Ensure total sectors is an integral number of sectors per |
137 | # track or mcopy will complain. Sectors are 512 bytes, and we | 145 | # track or mcopy will complain. Sectors are 512 bytes, and we |