Skip to content

Commit 9cdb6f4

Browse files
ulfalizernashif
authored andcommitted
kconfig: Make FLASH_LOAD_OFFSET/SIZE non-configurable when DT is used
Having FLASH_LOAD_OFFSET and FLASH_LOAD_SIZE always configurable froze their values at 0 when BOOTLOADER_MCUBOOT was enabled in menuconfig, when instead the values from /chosen/zephyr,code-partition in devicetree should be used. BOOTLOADER_MCUBOOT selects USE_CODE_PARTITION, which is a flag to use the devicetree information. To fix it, only make FLASH_LOAD_OFFSET and FLASH_LOAD_SIZE configurable when USE_CODE_PARTITION is disabled. It looks like no configuration files set them at the moment. See the added documentation in #20722 for an explanation of why this happens. This bit novalisek in #20673. Fixes: #20673 Signed-off-by: Ulf Magnusson <[email protected]>
1 parent 7c8421c commit 9cdb6f4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Kconfig.zephyr

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ config USE_CODE_PARTITION
9595
DT_CHOSEN_Z_CODE_PARTITION := zephyr,code-partition
9696

9797
config FLASH_LOAD_OFFSET
98-
hex "Kernel load offset"
98+
# Only user-configurable when USE_CODE_PARTITION is disabled
99+
hex "Kernel load offset" if !USE_CODE_PARTITION
99100
default $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_CODE_PARTITION)) if USE_CODE_PARTITION
100101
default 0
101102
depends on HAS_FLASH_LOAD_OFFSET
@@ -108,7 +109,8 @@ config FLASH_LOAD_OFFSET
108109
If unsure, leave at the default value 0.
109110

110111
config FLASH_LOAD_SIZE
111-
hex "Kernel load size"
112+
# Only user-configurable when USE_CODE_PARTITION is disabled
113+
hex "Kernel load size" if !USE_CODE_PARTITION
112114
default $(dt_chosen_reg_size_hex,$(DT_CHOSEN_Z_CODE_PARTITION)) if USE_CODE_PARTITION
113115
default 0
114116
depends on HAS_FLASH_LOAD_OFFSET

0 commit comments

Comments
 (0)