From 022990f73d091563a6a596cf8a57f7edc96d53e5 Mon Sep 17 00:00:00 2001 From: Rajavardhan Gundi Date: Thu, 29 Nov 2018 12:00:36 +0530 Subject: [PATCH] xtensa: Implement CONFIG_TEXT_SECTION_OFFSET CONFIG_TEXT_SECTION_OFFSET allows the entire image to be moved in memory to allow space for some type of header. The mcubootloader can boot only such images which reserve some space for the header. Signed-off-by: Rajavardhan Gundi --- boards/xtensa/intel_s1000_crb/Kconfig.defconfig | 5 +++++ soc/xtensa/intel_s1000/linker.ld | 1 + 2 files changed, 6 insertions(+) diff --git a/boards/xtensa/intel_s1000_crb/Kconfig.defconfig b/boards/xtensa/intel_s1000_crb/Kconfig.defconfig index 0f4a4eb4690..1ffde0c4c95 100644 --- a/boards/xtensa/intel_s1000_crb/Kconfig.defconfig +++ b/boards/xtensa/intel_s1000_crb/Kconfig.defconfig @@ -77,6 +77,11 @@ choice SPI_NOR_BLOCK_ERASE_SIZE default SPI_NOR_BLOCK_ERASE_64K endchoice +if BOOTLOADER_MCUBOOT +config TEXT_SECTION_OFFSET + default 0x100 +endif + if USB config USB_DW default y diff --git a/soc/xtensa/intel_s1000/linker.ld b/soc/xtensa/intel_s1000/linker.ld index 1e126b71bf9..20fe7919532 100644 --- a/soc/xtensa/intel_s1000/linker.ld +++ b/soc/xtensa/intel_s1000/linker.ld @@ -172,6 +172,7 @@ SECTIONS .ResetVector.text : ALIGN(4) { + . = CONFIG_TEXT_SECTION_OFFSET; _ResetVector_text_start = ABSOLUTE(.); KEEP (*(.ResetVector.text)) _ResetVector_text_end = ABSOLUTE(.);