aboutsummaryrefslogtreecommitdiff
path: root/make_helpers
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2016-12-25 13:52:22 +0900
committerMasahiro Yamada <yamada.masahiro@socionext.com>2017-01-28 14:47:44 +0900
commit1c75d5dfb03181bc481fe021dc5a8ab29c0f7557 (patch)
tree44bfc0e0bf8cef2c447bd9b55591027a880755dd /make_helpers
parent65caa3d0ad72eb22c5e0a2a98aaa159e51eab43b (diff)
downloadtrusted-firmware-a-1c75d5dfb03181bc481fe021dc5a8ab29c0f7557.tar.gz
fiptool: support --align option to add desired alignment to image offset
The current fiptool packs all the images without any padding between them. So, the offset to each image has no alignment. This is not efficient, for example, when the FIP is read from a block-oriented device. For example, (e)MMC is accessed by block-addressing. The block size is 512 byte. So, the best case is each image is aligned by 512 byte since the DMA engine can transfer the whole of the image to its load address directly. The worst case is the offset does not have even DMA-capable alignment (this is where we stand now). In this case, we need to transfer every block to a bounce buffer, then do memcpy() from the bounce buffer to our final destination. At least, this should work with the abstraction by the block I/O layer, but the CPU-intervention for the whole data transfer makes it really slow. This commit adds a new option --align to the fiptool. This option, if given, requests the tool to align each component in the FIP file by the specified byte. Also, add a new Make option FIP_ALIGN for easier access to this feature; users can give something like FIP_ALIGN=512 from the command line, or add "FIP_ALIGN := 512" to their platform.mk file. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'make_helpers')
-rw-r--r--make_helpers/defaults.mk3
1 files changed, 3 insertions, 0 deletions
diff --git a/make_helpers/defaults.mk b/make_helpers/defaults.mk
index fc39819d71..0b93dfcaca 100644
--- a/make_helpers/defaults.mk
+++ b/make_helpers/defaults.mk
@@ -89,6 +89,9 @@ ENABLE_RUNTIME_INSTRUMENTATION := 0
# Build flag to treat usage of deprecated platform and framework APIs as error.
ERROR_DEPRECATED := 0
+# Byte alignment that each component in FIP is aligned to
+FIP_ALIGN := 0
+
# Default FIP file name
FIP_NAME := fip.bin