Skip to content
Snippets Groups Projects
Commit 48a6d059 authored by Ariel D'Alessandro's avatar Ariel D'Alessandro
Browse files

generate_signed_fit_image: Align FIT image to 64-byte boundary


Currently, external data is used for the FIT image so it can be aligned
properly matching the kernel expectation for the fdt to be 8 bytes
(64 bits) aligned.

FSL CAAM crypt module uses DMA, which expects images to be 64 byte
aligned. Let's use this alignment so the FIT image matches all the
requirements.

Signed-off-by: default avatarAriel D'Alessandro <ariel.dalessandro@collabora.com>
parent bfeb1d80
No related branches found
No related tags found
1 merge request!505generate_signed_fit_image: Align FIT image to 64-byte boundary
Pipeline #372580 passed with warnings
......@@ -56,10 +56,12 @@ def fit_image_create(kernel, ramdisk, dtb, fit_template, fitimage):
ivt.flush()
print("Generating FIT image:")
# Use external data for the fit image at least aligned at 8 bytes (64)
# bits to match the expectation of the kernel (fdt to be 64 bit
# aligned) when using fdt in place.
subprocess.run(["mkimage", "-E", "-B", "0x8", "-f", ivt.name, fitimage], check=True)
# Use external data for the FIT image so it can be aligned properly
# matching the following requirements:
# - Kernel expects fdt to be 8 bytes (64 bits) aligned.
# - FSL CAAM crypt module uses DMA, which expects images to be 64 byte
# aligned.
subprocess.run(["mkimage", "-E", "-B", "0x40", "-f", ivt.name, fitimage], check=True)
# Sign the whole image with assumption it is loaded at FIT_LOADADDR
def sign_image(image, csf_template, length):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment