scripts: extract_dts_includes.py: Correct LOAD_OFFSET

This patch fixes the LOAD_OFFSET calculation to use the actual offset
of the partition.  This assumes the reg entry in the DTS for that
partition is in relative offset to the flash base address.

Signed-off-by: Andy Gross <andy.gross@linaro.org>
This commit is contained in:
Andy Gross 2017-06-16 10:32:43 -04:00 committed by Kumar Gala
commit 07b43e352c

View file

@ -722,8 +722,7 @@ def main():
"PARTITION", 1, 'offset')
part_base = lookup_defs(part_defs, chosen['zephyr,code-partition'],
'PARTITION_OFFSET')
load_defs['CONFIG_FLASH_LOAD_OFFSET'] = \
hex(int(part_base, 16) - int(flash_base, 16))
load_defs['CONFIG_FLASH_LOAD_OFFSET'] = part_base
load_defs['CONFIG_FLASH_LOAD_SIZE'] = \
lookup_defs(part_defs, chosen['zephyr,code-partition'],
'PARTITION_SIZE')