Skip to content

Commit

Permalink
cmake: remove dead 'soc_legacy' folder handling
Browse files Browse the repository at this point in the history
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-root>/soc/<arch>/<soc-path>' 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 <[email protected]>
  • Loading branch information
tejlmand authored and dleach02 committed Jun 12, 2024
1 parent ae833cd commit 0d51cb0
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 11 deletions.
3 changes: 0 additions & 3 deletions cmake/modules/kconfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
3 changes: 0 additions & 3 deletions cmake/modules/soc_v1.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
3 changes: 0 additions & 3 deletions soc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 0 additions & 2 deletions soc/Kconfig.v1.choice
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 0d51cb0

Please sign in to comment.