From 07b43e352cd4b05460768c971a426779a3f51f07 Mon Sep 17 00:00:00 2001 From: Andy Gross Date: Fri, 16 Jun 2017 10:32:43 -0400 Subject: [PATCH] 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 --- scripts/extract_dts_includes.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/extract_dts_includes.py b/scripts/extract_dts_includes.py index 60ba40b9d89..cc2d83c5a3c 100755 --- a/scripts/extract_dts_includes.py +++ b/scripts/extract_dts_includes.py @@ -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')