summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--futility/vb1_helper.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/futility/vb1_helper.c b/futility/vb1_helper.c
index 92cdda16..ab72f05a 100644
--- a/futility/vb1_helper.c
+++ b/futility/vb1_helper.c
@@ -668,6 +668,12 @@ uint8_t *CreateKernelBlob(uint8_t *vmlinuz_buf, uint32_t vmlinuz_size,
g_param_size +
g_bootloader_size +
g_vmlinuz_header_size;
+
+ /*
+ * Round the whole blob up so it's a multiple of sectors, even on 4k
+ * devices.
+ */
+ g_kernel_blob_size = roundup(g_kernel_blob_size, CROS_ALIGN);
VB2_DEBUG("g_kernel_blob_size 0x%" PRIx64 "\n", g_kernel_blob_size);
/* Allocate space for the blob. */