From fd9981a7c4905e3d6881716174fc961291ed5a6d Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Sat, 16 Nov 2019 01:33:09 +0100 Subject: [PATCH] kconfig: Factor out HAS_FLASH_LOAD_OFFSET dependency Use a top-level 'if' instead of three separate 'depends on'. They're exactly equivalent (top-level 'if's are just a shorthand for adding 'depends on' to each item within the 'if'). Signed-off-by: Ulf Magnusson --- Kconfig.zephyr | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Kconfig.zephyr b/Kconfig.zephyr index a0fead75e93..d878031bed8 100644 --- a/Kconfig.zephyr +++ b/Kconfig.zephyr @@ -85,9 +85,10 @@ config HAS_FLASH_LOAD_OFFSET This option is selected by targets having a FLASH_LOAD_OFFSET and FLASH_LOAD_SIZE. +if HAS_FLASH_LOAD_OFFSET + config USE_DT_CODE_PARTITION bool "Link application into /chosen/zephyr,code-partition from devicetree" - depends on HAS_FLASH_LOAD_OFFSET help When enabled, the application will be linked into the flash partition selected by the zephyr,code-partition property in /chosen in devicetree. @@ -102,7 +103,6 @@ config FLASH_LOAD_OFFSET hex "Kernel load offset" if !USE_DT_CODE_PARTITION default $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_CODE_PARTITION)) if USE_DT_CODE_PARTITION default 0 - depends on HAS_FLASH_LOAD_OFFSET help This option specifies the byte offset from the beginning of flash that the kernel should be loaded into. Changing this value from zero will @@ -116,7 +116,6 @@ config FLASH_LOAD_SIZE hex "Kernel load size" if !USE_DT_CODE_PARTITION default $(dt_chosen_reg_size_hex,$(DT_CHOSEN_Z_CODE_PARTITION)) if USE_DT_CODE_PARTITION default 0 - depends on HAS_FLASH_LOAD_OFFSET help If non-zero, this option specifies the size, in bytes, of the flash area that the Zephyr image will be allowed to occupy. If zero, the @@ -125,6 +124,8 @@ config FLASH_LOAD_SIZE If unsure, leave at the default value 0. +endif # HAS_FLASH_LOAD_OFFSET + config TEXT_SECTION_OFFSET hex prompt "TEXT section offset" if !BOOTLOADER_MCUBOOT