From 0d51cb08c47c64f7d4a056b461602eafccfe57e7 Mon Sep 17 00:00:00 2001 From: Torsten Rasmussen Date: Mon, 10 Jun 2024 16:28:53 +0200 Subject: [PATCH] cmake: remove dead 'soc_legacy' folder handling During HWMv2 migration, non-ported SoCs were placed in a 'soc_legacy' folder and sourced from there instead of 'soc' folder. Remove the no-longer needed soc_legacy folder. CMake oot SoCs in old hardware model are sourced from '/soc//' which has always been the case, also before HWMv2. Remove the 'osource "soc/soc_legacy/...' generation in Kconfig, because the source is relative to Zephyr base. All SoCs in Zephyr repository has been ported to the new hardware model and therefore there is no need for this line. Signed-off-by: Torsten Rasmussen --- cmake/modules/kconfig.cmake | 3 --- cmake/modules/soc_v1.cmake | 3 --- soc/Kconfig | 3 --- soc/Kconfig.v1.choice | 2 -- 4 files changed, 11 deletions(-) diff --git a/cmake/modules/kconfig.cmake b/cmake/modules/kconfig.cmake index 56b73c716a2..73ed4163f46 100644 --- a/cmake/modules/kconfig.cmake +++ b/cmake/modules/kconfig.cmake @@ -30,9 +30,6 @@ if(HWMv1) list(REMOVE_ITEM kconfig_soc_root ${ZEPHYR_BASE}) set(soc_defconfig_file ${KCONFIG_BINARY_DIR}/soc/Kconfig.defconfig) - # This loads Zephyr base SoC root defconfigs - file(WRITE ${soc_defconfig_file} "osource \"soc/soc_legacy/$(ARCH)/*/Kconfig.defconfig\"\n") - set(OPERATION WRITE) foreach(root ${kconfig_soc_root}) file(APPEND ${soc_defconfig_file} diff --git a/cmake/modules/soc_v1.cmake b/cmake/modules/soc_v1.cmake index 1bba9536c0c..e2004f32255 100644 --- a/cmake/modules/soc_v1.cmake +++ b/cmake/modules/soc_v1.cmake @@ -60,9 +60,6 @@ if(HWMv1) if(EXISTS ${root}/soc/${ARCH}/${SOC_PATH}) set(SOC_DIR ${root}/soc) break() - elseif(EXISTS ${root}/soc/soc_legacy/${ARCH}/${SOC_PATH}) - set(SOC_DIR ${root}/soc/soc_legacy) - break() endif() endforeach() diff --git a/soc/Kconfig b/soc/Kconfig index cd3b17f28af..51af8596287 100644 --- a/soc/Kconfig +++ b/soc/Kconfig @@ -9,9 +9,6 @@ menu "Hardware Configuration" rsource "Kconfig.$(HWM_SCHEME)" -# This loads Zephyr base SoC Kconfigs for both hw model v1 and v2 -osource "soc/soc_legacy/$(ARCH)/Kconfig" - # Source Zephyr Kconfig specifics from SoC roots. osource "$(KCONFIG_BINARY_DIR)/soc/Kconfig" diff --git a/soc/Kconfig.v1.choice b/soc/Kconfig.v1.choice index f3424f71196..e96dd15bedd 100644 --- a/soc/Kconfig.v1.choice +++ b/soc/Kconfig.v1.choice @@ -7,7 +7,5 @@ choice # This loads custom SoC root Kconfig (only available if custom SoC root are defined) osource "$(KCONFIG_BINARY_DIR)/soc/Kconfig.soc.choice" -# This loads Zephyr base SoC scheme v1 root Kconfig -osource "soc/soc_legacy/$(ARCH)/*/Kconfig.soc" endchoice