summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorDamien Le Moal <damien.lemoal@wdc.com>2019-01-14 05:17:25 +0300
committerAnup Patel <anup@brainfault.org>2019-01-21 07:28:33 +0300
commitac3041f4e906ee75d423ac788803218db51ef343 (patch)
tree3e096ccc8f91d44ff440ca9259eed25d62954166 /platform
parentebfe23125666a11fd3dc14b85f5ca58b7f40276b (diff)
downloadopensbi-ac3041f4e906ee75d423ac788803218db51ef343.tar.xz
build: Introduce FW_PAYLOAD_ALIGN
The firmware payload offset defined by FW_PAYLOAD_OFFSET must specify a value large enough so the the payload does not overlap with the base firmware data, bss and text. For platforms without any strong requirement on the payload address, introduce the FW_PAYLOAD_ALIGN build parameter to automatically place the payload right after the base firmware at an address aligned with the defined value. Either FW_PAYLOAD_OFFSET or FW_PAYLOAD_ALIGN should be defined by a platform configuration. If both FW_PAYLOAD_OFFSET and FW_PAYLOAD_ALIGN are defined by a platform, FW_PAYLOAD_OFFSET has precedence and is used for building the final firmawre image. Using FW_PAYLOAD_ALIGN=4096 with the Kendryte platform rather than the abitrary FW_PAYLOAD_OFFSET=0x10000 value reduces the final firmware image size by about 20KB. Add a description of the FW_PAYLOAD_ALIGN configuration parameter in the fw_payload documentation file as well. And while at it, also fix various grammar and style issues in that file.. Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Diffstat (limited to 'platform')
-rw-r--r--platform/kendryte/k210/config.mk4
1 files changed, 1 insertions, 3 deletions
diff --git a/platform/kendryte/k210/config.mk b/platform/kendryte/k210/config.mk
index b8510cb..eed8bfb 100644
--- a/platform/kendryte/k210/config.mk
+++ b/platform/kendryte/k210/config.mk
@@ -19,10 +19,8 @@ PLATFORM_SYS_CLINT=y
# Blobs to build
FW_TEXT_START=0x80000000
-FW_JUMP=n
FW_PAYLOAD=y
-FW_PAYLOAD_OFFSET=0x10000
-#FW_PAYLOAD_FDT_ADDR=0x80040000
+FW_PAYLOAD_ALIGN=0x1000
# External Libraries to include
PLATFORM_INCLUDE_LIBC=y