From fa6a52a07cb87ecf2538a6b0d47605d79104e4cc Mon Sep 17 00:00:00 2001 From: Vadim Bendebury Date: Mon, 21 Apr 2014 18:44:48 -0700 Subject: [PATCH] ipq8064: SBL headers must have 4 byte aligned blob sizes It turns out that for SBL3 to load the next phase, the sizes int the MBN header must be 4 byres aligned. This change makes sure that this requirement is enforced. BRANCH=None BUG=chrome-os-partner:28137 TEST=manual . examined the generated header, observed the size field aligned . the new image gets successfully started by the SBL3 on ap148 Change-Id: Ia64f04bb281ae772b060d2f7713c98dd348972ba Signed-off-by: Vadim Bendebury Reviewed-on: https://chromium-review.googlesource.com/196167 --- util/ipqheader/ipqheader.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/util/ipqheader/ipqheader.py b/util/ipqheader/ipqheader.py index 1cace0b076..b6f3c43b49 100755 --- a/util/ipqheader/ipqheader.py +++ b/util/ipqheader/ipqheader.py @@ -17,6 +17,9 @@ def create_header(base, size): @returns: string, the MBN header """ + # SBLs require size to be 4 bytes aligned. + size = (size + 3) & 0xfffffffc + # We currently do not support appending certificates. Signing GPL # code might violate the GPL. So U-Boot will never be signed. So # this is not required for U-Boot.