diff options
author | Damien Le Moal <damien.lemoal@wdc.com> | 2019-01-14 11:17:25 +0900 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2019-01-21 09:58:33 +0530 |
commit | ac3041f4e906ee75d423ac788803218db51ef343 (patch) | |
tree | 3e096ccc8f91d44ff440ca9259eed25d62954166 /platform/kendryte | |
parent | ebfe23125666a11fd3dc14b85f5ca58b7f40276b (diff) |
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/kendryte')
-rw-r--r-- | platform/kendryte/k210/config.mk | 4 |
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 |