Skip to content

Commit

Permalink
zephyr: fix mcuboot can't link into boot-partition
Browse files Browse the repository at this point in the history
Objective of the path is to allow to select by the application
to link into the chosen code-partition.
Introduced USE_CODE_PARTITION will be set by bootloader project.

fixes zephyrproject-rtos#14566

Signed-off-by: Andrzej Puzdrowski <[email protected]>
  • Loading branch information
nvlsianpu authored and carlescufi committed Mar 19, 2019
1 parent f4c8e3f commit 2b1227f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Kconfig.zephyr
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,15 @@ config HAS_FLASH_LOAD_OFFSET
This option is selected by targets having a FLASH_LOAD_OFFSET
and FLASH_LOAD_SIZE.

config USE_CODE_PARTITION
bool "link into code-partition"
depends on HAS_FLASH_LOAD_OFFSET
help
When selected application will be linked into chosen code-partition.

config FLASH_LOAD_OFFSET
hex "Kernel load offset"
default $(dt_hex_val,DT_CODE_PARTITION_OFFSET) if BOOTLOADER_MCUBOOT
default $(dt_hex_val,DT_CODE_PARTITION_OFFSET) if USE_CODE_PARTITION
default 0
depends on HAS_FLASH_LOAD_OFFSET
help
Expand All @@ -97,7 +103,7 @@ config FLASH_LOAD_OFFSET

config FLASH_LOAD_SIZE
hex "Kernel load size"
default $(dt_hex_val,DT_CODE_PARTITION_SIZE) if BOOTLOADER_MCUBOOT
default $(dt_hex_val,DT_CODE_PARTITION_SIZE) if USE_CODE_PARTITION
default 0
depends on HAS_FLASH_LOAD_OFFSET
help
Expand Down Expand Up @@ -341,6 +347,7 @@ config BOOTLOADER_SRAM_SIZE

config BOOTLOADER_MCUBOOT
bool "MCUboot bootloader support"
select USE_CODE_PARTITION
help
This option signifies that the target uses MCUboot as a bootloader,
or in other words that the image is to be chain-loaded by MCUboot.
Expand Down

0 comments on commit 2b1227f

Please sign in to comment.