Skip to content

Commit 90b9eb3

Browse files
ulfalizernashif
authored andcommitted
kconfig: Rename USE_CODE_PARTITION to USE_DT_CODE_PARTITION
USE_CODE_PARTITION is a bit vague as a symbol name ("use code partition how?"). Rename it to USE_DT_CODE_PARTITION to make it clearer that it's about devicetree. This would break any third-party configuration files that set it, but it'll generate an error since kconfig.py promotes warnings to errors, so it's probably not a big deal. Signed-off-by: Ulf Magnusson <[email protected]>
1 parent 1f9c5f1 commit 90b9eb3

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

Kconfig.zephyr

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ config HAS_FLASH_LOAD_OFFSET
8585
This option is selected by targets having a FLASH_LOAD_OFFSET
8686
and FLASH_LOAD_SIZE.
8787

88-
config USE_CODE_PARTITION
88+
config USE_DT_CODE_PARTITION
8989
bool "Link application into /chosen/zephyr,code-partition from devicetree"
9090
depends on HAS_FLASH_LOAD_OFFSET
9191
help
@@ -98,9 +98,9 @@ config USE_CODE_PARTITION
9898
DT_CHOSEN_Z_CODE_PARTITION := zephyr,code-partition
9999

100100
config FLASH_LOAD_OFFSET
101-
# Only user-configurable when USE_CODE_PARTITION is disabled
102-
hex "Kernel load offset" if !USE_CODE_PARTITION
103-
default $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_CODE_PARTITION)) if USE_CODE_PARTITION
101+
# Only user-configurable when USE_DT_CODE_PARTITION is disabled
102+
hex "Kernel load offset" if !USE_DT_CODE_PARTITION
103+
default $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_CODE_PARTITION)) if USE_DT_CODE_PARTITION
104104
default 0
105105
depends on HAS_FLASH_LOAD_OFFSET
106106
help
@@ -112,9 +112,9 @@ config FLASH_LOAD_OFFSET
112112
If unsure, leave at the default value 0.
113113

114114
config FLASH_LOAD_SIZE
115-
# Only user-configurable when USE_CODE_PARTITION is disabled
116-
hex "Kernel load size" if !USE_CODE_PARTITION
117-
default $(dt_chosen_reg_size_hex,$(DT_CHOSEN_Z_CODE_PARTITION)) if USE_CODE_PARTITION
115+
# Only user-configurable when USE_DT_CODE_PARTITION is disabled
116+
hex "Kernel load size" if !USE_DT_CODE_PARTITION
117+
default $(dt_chosen_reg_size_hex,$(DT_CHOSEN_Z_CODE_PARTITION)) if USE_DT_CODE_PARTITION
118118
default 0
119119
depends on HAS_FLASH_LOAD_OFFSET
120120
help
@@ -356,7 +356,7 @@ config BOOTLOADER_SRAM_SIZE
356356

357357
config BOOTLOADER_MCUBOOT
358358
bool "MCUboot bootloader support"
359-
select USE_CODE_PARTITION
359+
select USE_DT_CODE_PARTITION
360360
help
361361
This option signifies that the target uses MCUboot as a bootloader,
362362
or in other words that the image is to be chain-loaded by MCUboot.

boards/arm/nrf52840_pca10059/Kconfig.defconfig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ if BOARD_NRF52840_PCA10059
99
config BOARD
1010
default "nrf52840_pca10059"
1111

12-
if BOARD_HAS_NRF5_BOOTLOADER && !USE_CODE_PARTITION
12+
if BOARD_HAS_NRF5_BOOTLOADER && !USE_DT_CODE_PARTITION
1313

1414
# To let the nRF5 bootloader load an application, the application
1515
# must be linked after Nordic MBR, that is factory-programmed on the board.
@@ -18,14 +18,14 @@ if BOARD_HAS_NRF5_BOOTLOADER && !USE_CODE_PARTITION
1818
# DTS file, so we manually override FLASH_LOAD_OFFEST to link the application
1919
# correctly, after Nordic MBR.
2020

21-
# When building MCUBoot, MCUBoot itself will select USE_CODE_PARTITION
21+
# When building MCUBoot, MCUBoot itself will select USE_DT_CODE_PARTITION
2222
# which will make it link into the correct partition specified in DTS file,
2323
# so no override is necessary.
2424

2525
config FLASH_LOAD_OFFSET
2626
default 0x1000
2727

28-
endif # BOARD_HAS_NRF5_BOOTLOADER && !USE_CODE_PARTITION
28+
endif # BOARD_HAS_NRF5_BOOTLOADER && !USE_DT_CODE_PARTITION
2929

3030
if ADC
3131

soc/riscv/openisa_rv32m1/linker.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
#define VECTOR_SIZE CONFIG_RISCV_RV32M1_VECTOR_SIZE
3030

31-
#ifdef CONFIG_USE_CODE_PARTITION
31+
#ifdef CONFIG_USE_DT_CODE_PARTITION
3232

3333
#ifdef CONFIG_BOOTLOADER_MCUBOOT
3434

0 commit comments

Comments
 (0)